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)
|
||||
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)
|
||||
unbufprint("<p>%d state" % stats.states)
|
||||
if stats.states > 1:
|
||||
|
|
@ -309,6 +313,11 @@ def print_stats(automaton, detinfo = False):
|
|||
unbufprint(" (deterministic)")
|
||||
else:
|
||||
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)"
|
||||
% (stats.transitions,
|
||||
's' if stats.transitions > 1 else '',
|
||||
|
|
@ -715,7 +724,7 @@ if output_type == 't':
|
|||
issba, True, singlepass, livelock)
|
||||
if bisimulation:
|
||||
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)
|
||||
tautomaton = 0
|
||||
degen = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue