Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Spot
Spot
Commits
5904255b
Commit
5904255b
authored
Apr 21, 2004
by
Alexandre Duret-Lutz
Browse files
* wrap/python/cgi/ltl2tgba.in (add_options): Revamp options output
using this new function.
parent
0c3d4fef
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
5904255b
2004-04-21 Alexandre Duret-Lutz <adl@gnu.org>
* wrap/python/cgi/ltl2tgba.in (add_options): Revamp options output
using this new function.
* wrap/python/spot.i: Process tgbaalgos/neverclaim.hh.
* wrap/python/cgi/ltl2tgba.in: Display the never claim on demand.
...
...
wrap/python/cgi/ltl2tgba.in
View file @
5904255b
...
...
@@ -194,24 +194,23 @@ formula = form.getfirst('formula', '')
color_fm
=
'#E0D8E0'
color_lacim
=
"#F8D8E8"
options
=
[(
'Common options'
,
0
,
''
,
[
options_common
=
[
(
'show_formula_png'
,
'draw the formula'
,
0
),
(
'show_automaton_png'
,
'draw Bchi automaton'
,
1
),
(
'show_degen_png'
,
'draw degeneralized Bchi automaton'
,
0
),
(
'show_never_claim'
,
'output Spin never claim'
,
0
),
(
'show_lbtt'
,
'convert automaton for LBTT'
,
0
),
]
),
(
'Debugging options'
,
0
,
''
,
[
]
options_debug
=
[
(
'show_parse'
,
'show traces during parsing'
,
0
),
(
'show_dictionnay'
,
'print BDD dictionary'
,
0
),
]
),
(
'Couvreur/FM options'
,
1
,
color
_fm
,
[
]
options_trans
_fm
=
[
(
'opt_exprop'
,
'optimize determinism'
,
1
),
(
'opt_symb_merge'
,
'merge states with same symbolic successor representation'
,
1
),
]
),
(
'Couvreur/LaCIM options'
,
1
,
color
_lacim
,
[
]
options_trans
_lacim
=
[
(
'show_relation_set'
,
'print the transition relation as a BDD set'
,
0
),
(
'show_relation_png'
,
...
...
@@ -220,7 +219,7 @@ options = [(
'print the acceptance relation as a BDD set'
,
0
),
(
'show_acceptance_png'
,
'draw the acceptance relation'
,
0
),
]
)]
]
default_translator
=
'trans_fm'
;
translators
=
[
...
...
@@ -300,6 +299,28 @@ an indentifier: <code>aUb</code> is an atomic proposition, unlike
column
=
[[],
[]]
def
add_options
(
opt_group
,
opt_column
,
opt_color
,
opt_list
):
if
opt_color
:
opt_color
=
' bgcolor="%s"'
%
opt_color
if
opt_group
:
column
[
opt_column
].
append
((
"<TH%s>"
%
opt_color
)
+
opt_group
+
"</TH>"
)
prefix
=
''
else
:
prefix
=
' '
for
opt
,
desc
,
arg
,
in
opt_list
:
if
formula
:
val
=
int
(
form
.
getfirst
(
opt
,
0
))
else
:
val
=
arg
if
val
:
str
=
" checked"
else
:
str
=
""
globals
()[
opt
]
=
val
s
=
'<TD%s>%s<INPUT type="checkbox" name="%s" value="1"%s>%s</TD>'
column
[
opt_column
].
append
((
s
%
(
opt_color
,
prefix
,
opt
,
str
,
desc
)))
column
[
0
].
append
(
"<TH>Algorithm</TH>"
)
trans
=
form
.
getfirst
(
"trans"
,
default_translator
)
for
opt
,
desc
,
color
in
translators
:
...
...
@@ -310,25 +331,12 @@ for opt, desc, color in translators:
globals
()[
opt
]
=
str
s
=
'<TD bgcolor=%s><INPUT type="radio" name="trans" value="%s" %s>%s</TD>'
column
[
0
].
append
(
s
%
(
color
,
opt
,
str
,
desc
))
add_options
(
''
,
0
,
color
,
globals
()[
'options_'
+
opt
])
print
"""</TD></TR></TABLE><TABLE>"""
for
opt_group
,
opt_column
,
opt_color
,
opt_list
in
options
:
if
opt_color
:
opt_color
=
' bgcolor="%s"'
%
opt_color
column
[
opt_column
].
append
((
"<TH%s>"
%
opt_color
)
+
opt_group
+
"</TH>"
)
for
opt
,
desc
,
arg
,
in
opt_list
:
if
formula
:
val
=
int
(
form
.
getfirst
(
opt
,
0
))
else
:
val
=
arg
if
val
:
str
=
" checked"
else
:
str
=
""
globals
()[
opt
]
=
val
s
=
'<TD%s><INPUT type="checkbox" name="%s" value="1"%s>%s</TD>'
column
[
opt_column
].
append
(
s
%
(
opt_color
,
opt
,
str
,
desc
))
add_options
(
"Common Options"
,
1
,
''
,
options_common
)
add_options
(
"Debugging Options"
,
1
,
''
,
options_debug
)
print
'<TABLE>'
width
=
range
(
len
(
column
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment