Commit 26cf0145 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

* wrap/python/cgi/ltl2tgba.in (print_stats): New function. Call

it to display the size of the generalized and degeneralized
automata.
parent 834ce052
2004-02-02 Alexandre Duret-Lutz <adl@gnu.org>
* wrap/python/cgi/ltl2tgba.in (print_stats): New function. Call
it to display the size of the generalized and degeneralized
automata.
2004-02-02 Alexandre Duret-Lutz <adl@src.lip6.fr>
* src/tgbalagos/stats.hh, src/tgbalagos/stats.cc: New files.
......
#!@PYTHON@
# -*- python -*-
# Copyright (C) 2003 Laboratoire d'Informatique de Paris 6 (LIP6),
# Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
# dpartement Systmes Rpartis Coopratifs (SRC), Universit Pierre
# et Marie Curie.
#
......@@ -56,6 +56,21 @@ def escaped_print_set(dict, what):
del s
print '</pre>'; sys.stdout.flush()
def print_stats(automaton):
stats = spot.stats_reachable(automaton)
print "<p>", stats.states,
if stats.states == 1:
print " state,",
else:
print " states,",
print stats.transitions,
if stats.transitions == 1:
print " transition",
else:
print " transitions",
print "</p>"
sys.stdout.flush()
print "Content-Type: text/html"
print
......@@ -188,6 +203,8 @@ elif trans_fm:
print 'done.</p>'
sys.stdout.flush()
print_stats(automaton)
if show_automaton_dot:
print '<pre>'; sys.stdout.flush()
s = spot.ostringstream()
......@@ -210,6 +227,7 @@ if show_automaton_gif:
if show_degen_dot or show_degen_gif:
print '<H3>Degeneralized automaton</H3>'
degen = spot.tgba_tba_proxy(automaton)
print_stats(degen)
if show_degen_dot:
print '<pre>'; sys.stdout.flush()
s = spot.ostringstream()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment