cgi: fix displaying of TA and GTA
* wrap/python/ajax/spot.in (print_stats): Do not call sub_stats_reachable on testing automata.
This commit is contained in:
parent
abb5170565
commit
0b21af5893
1 changed files with 17 additions and 8 deletions
|
|
@ -298,7 +298,11 @@ def render_formula(f):
|
||||||
spot.dotty(dotsrc, f)
|
spot.dotty(dotsrc, f)
|
||||||
render_dot_maybe(dotsrc.str(), False)
|
render_dot_maybe(dotsrc.str(), False)
|
||||||
|
|
||||||
def print_stats(automaton, detinfo = False):
|
def print_stats(automaton, detinfo = False, ta = False):
|
||||||
|
if ta: # TA/GTA
|
||||||
|
stats = spot.stats_reachable(automaton)
|
||||||
|
detinfo = False
|
||||||
|
else:
|
||||||
stats = spot.sub_stats_reachable(automaton)
|
stats = spot.sub_stats_reachable(automaton)
|
||||||
unbufprint("<p>%d state" % stats.states)
|
unbufprint("<p>%d state" % stats.states)
|
||||||
if stats.states > 1:
|
if stats.states > 1:
|
||||||
|
|
@ -309,6 +313,11 @@ def print_stats(automaton, detinfo = False):
|
||||||
unbufprint(" (deterministic)")
|
unbufprint(" (deterministic)")
|
||||||
else:
|
else:
|
||||||
unbufprint(" (%d nondeterministic)" % nondet)
|
unbufprint(" (%d nondeterministic)" % nondet)
|
||||||
|
if not hasattr(stats, 'sub_transitions'):
|
||||||
|
unbufprint(", %d transition" % stats.transitions)
|
||||||
|
if stats.transitions > 1:
|
||||||
|
unbufprint("s")
|
||||||
|
else:
|
||||||
unbufprint(", %d edge%s (%d transition%s)"
|
unbufprint(", %d edge%s (%d transition%s)"
|
||||||
% (stats.transitions,
|
% (stats.transitions,
|
||||||
's' if stats.transitions > 1 else '',
|
's' if stats.transitions > 1 else '',
|
||||||
|
|
@ -715,7 +724,7 @@ if output_type == 't':
|
||||||
issba, True, singlepass, livelock)
|
issba, True, singlepass, livelock)
|
||||||
if bisimulation:
|
if bisimulation:
|
||||||
tautomaton = spot.minimize_ta(tautomaton)
|
tautomaton = spot.minimize_ta(tautomaton)
|
||||||
dont_run_dot = print_stats(tautomaton)
|
dont_run_dot = print_stats(tautomaton, ta = True)
|
||||||
render_automaton(tautomaton, dont_run_dot, issba)
|
render_automaton(tautomaton, dont_run_dot, issba)
|
||||||
tautomaton = 0
|
tautomaton = 0
|
||||||
degen = 0
|
degen = 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue