ltl2tgba cgi updates.
* wrap/python/cgi-bin/ltl2tgba.in (dot): Use the value computed by configure. (os.system): Cleanup stale files only when the form has been submitted. (list options): Keep track of the selected value. (draw_acc_run|print_acc_run): set ec=0 to detect if it has been later set or not. Fix error message when using generalized automata with degeneralized emptiness checks. * wrap/python/cgi-bin/Makefile.am (ltl2tgba.py): Substitute @DOT@.
This commit is contained in:
parent
bc61ca73c6
commit
72b7deec12
3 changed files with 26 additions and 10 deletions
14
ChangeLog
14
ChangeLog
|
|
@ -1,3 +1,17 @@
|
|||
2010-02-17 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
||||
|
||||
ltl2tgba cgi updates.
|
||||
|
||||
* wrap/python/cgi-bin/ltl2tgba.in (dot): Use the value computed by
|
||||
configure.
|
||||
(os.system): Cleanup stale files only when the form has been
|
||||
submitted.
|
||||
(list options): Keep track of the selected value.
|
||||
(draw_acc_run|print_acc_run): set ec=0 to detect if it has been
|
||||
later set or not. Fix error message when using generalized
|
||||
automata with degeneralized emptiness checks.
|
||||
* wrap/python/cgi-bin/Makefile.am (ltl2tgba.py): Substitute @DOT@.
|
||||
|
||||
2010-02-02 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
||||
|
||||
* wrap/python/cgi-bin/ltl2tgba.in: Reword description of svg_output.
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ ltl2tgba.py: $(srcdir)/ltl2tgba.in Makefile
|
|||
-e 's|[@]srcdir[@]|@srcdir@|g' \
|
||||
-e 's|[@]top_builddir[@]|@top_builddir@|g' \
|
||||
-e 's|[@]PACKAGE_VERSION[@]|@PACKAGE_VERSION@|g' \
|
||||
-e 's|[@]DOT[@]|@DOT@|g' \
|
||||
<$(srcdir)/ltl2tgba.in >ltl2tgba.tmp
|
||||
chmod +x ltl2tgba.tmp
|
||||
mv -f ltl2tgba.tmp $@
|
||||
|
|
|
|||
|
|
@ -86,9 +86,8 @@ extra_header = ''
|
|||
extra_form_notice = ''
|
||||
|
||||
# Location of the dot command
|
||||
dot = 'dot' # in PATH.
|
||||
dot = '@DOT@'
|
||||
dot_bgcolor = '-Gbgcolor=#FFFFFF'
|
||||
# dot = '/usr/local/bin/dot'
|
||||
|
||||
ltl2tgba_version = '@PACKAGE_VERSION@'
|
||||
|
||||
|
|
@ -139,9 +138,6 @@ signal.signal(signal.SIGALRM, alarm_handler)
|
|||
reset_alarm()
|
||||
|
||||
|
||||
# Cleanup stale files from our image directory.
|
||||
os.system('find ' + imgdir + ' -type f -amin +15 -print | xargs rm -f')
|
||||
|
||||
myself = os.environ['SCRIPT_NAME'];
|
||||
form = cgi.FieldStorage()
|
||||
filled = form.has_key('formula')
|
||||
|
|
@ -405,6 +401,7 @@ def add_options(opt_group, opt_column, opt_color, opt_list):
|
|||
if isinstance(desc, list):
|
||||
s += '%s <select name="%s">' % (desc[0], opt);
|
||||
n = 1
|
||||
val = int(form.getfirst(opt, n))
|
||||
if val >= len(desc) or val < 1:
|
||||
val = n
|
||||
for i in desc[1:]:
|
||||
|
|
@ -475,6 +472,9 @@ if not filled:
|
|||
|
||||
reset_alarm()
|
||||
|
||||
# Cleanup stale files from our image directory.
|
||||
os.system('find ' + imgdir + ' -type f -amin +15 -print | xargs rm -f')
|
||||
|
||||
print "<hr><H1>Output</H1>"
|
||||
|
||||
env = spot.default_environment.instance()
|
||||
|
|
@ -636,6 +636,7 @@ if show_lbtt:
|
|||
print '</pre>'
|
||||
|
||||
|
||||
ec = 0
|
||||
if draw_acc_run or print_acc_run:
|
||||
print '<H3>Accepting run</H3>'
|
||||
sys.stdout.flush()
|
||||
|
|
@ -660,11 +661,11 @@ if draw_acc_run or print_acc_run:
|
|||
ec_msg += ' <b>on degeneralized automaton</b>'
|
||||
else:
|
||||
print ('<font color="red">Cannot run ' + emptiness_check
|
||||
+ ' on automata with more than ' + n_max + ' acceptance '
|
||||
+ 'conditions. Please select "draw degeneralized '
|
||||
+ 'Büchi automaton" if you want to try this'
|
||||
+ ' algorithm on the degeneralized version of the'
|
||||
+ ' automaton.</font>')
|
||||
+ ' on automata with more than ' + str(n_max)
|
||||
+ ' acceptance conditions. Please select '
|
||||
+ '"draw degeneralized Büchi automaton" if you '
|
||||
+ 'want to try this algorithm on the degeneralized '
|
||||
+ 'version of the automaton.</font>')
|
||||
|
||||
if ec_a:
|
||||
ec = eci.instantiate(ec_a)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue