Skip to content
GitLab
Menu
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
59125b2a
Commit
59125b2a
authored
Feb 02, 2004
by
Alexandre Duret-Lutz
Browse files
* wrap/python/cgi/ltl2tgba.in (print_stats): Compute and display
the number of acceptance conditions.
parent
49192cc3
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
59125b2a
2004-02-02 Alexandre Duret-Lutz <adl@gnu.org>
* wrap/python/cgi/ltl2tgba.in (print_stats): Compute and display
the number of acceptance conditions.
* wrap/python/tests/bddnqueen.py, wrap/python/tests/interdep.py,
wrap/python/tests/ltl2tgba.py, wrap/python/tests/ltlparse.py,
wrap/python/tests/ltlsimple.py: Specify coding system to
...
...
wrap/python/cgi/ltl2tgba.in
View file @
59125b2a
...
...
@@ -59,15 +59,31 @@ def escaped_print_set(dict, what):
def
print_stats
(
automaton
):
stats
=
spot
.
stats_reachable
(
automaton
)
print
"<p>"
,
stats
.
states
,
if
stats
.
states
=
=
1
:
if
stats
.
states
<
=
1
:
print
" state,"
,
else
:
print
" states,"
,
print
stats
.
transitions
,
if
stats
.
transitions
=
=
1
:
print
" transition"
,
if
stats
.
transitions
<
=
1
:
print
" transition
,
"
,
else
:
print
" transitions"
,
print
" transitions,"
,
# compute the number of acceptance conditions
acc
=
all
=
automaton
.
all_acceptance_conditions
()
count
=
0
while
all
!=
buddy
.
bddfalse
:
all
-=
buddy
.
bdd_satone
(
all
)
count
+=
1
if
count
>
0
:
print
count
,
if
count
<=
1
:
print
"acceptance condition:"
,
else
:
print
"acceptance conditions:"
,
sys
.
stdout
.
flush
()
spot
.
bdd_print_accset
(
spot
.
get_cout
(),
automaton
.
get_dict
(),
acc
)
else
:
print
"no acceptance condition (all cycles are accepting)"
print
"</p>"
sys
.
stdout
.
flush
()
...
...
@@ -96,6 +112,7 @@ os.close(sys.stderr.fileno())
os
.
dup2
(
sys
.
stdout
.
fileno
(),
sys
.
stderr
.
fileno
())
import
spot
import
buddy
print
"<TITLE>LTL-to-Bchi test</TITLE>"
print
"<H1>Input</H1>"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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