diff --git a/ChangeLog b/ChangeLog index 84824819e..19532d0b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-08-07 Alexandre Duret-Lutz + + * wrap/python/cgi/ltl2tgba.in: Convert GIFs to PNGs. Restrict + the size of dot's output to 1024x1024. + * src/tgbaalgos/dotty.cc (dotty_bfs::start): Do not preset + the size of the graph. Set height=0 for the invisible state. + 2003-08-06 Alexandre Duret-Lutz * src/ltlparse/ltlparse.yy: Fix precedence OP_OR < OP_XOR < OP_AND. diff --git a/src/tgbaalgos/dotty.cc b/src/tgbaalgos/dotty.cc index 4d44990f9..2d6c0e07e 100644 --- a/src/tgbaalgos/dotty.cc +++ b/src/tgbaalgos/dotty.cc @@ -18,8 +18,7 @@ namespace spot start() { os_ << "digraph G {" << std::endl; - os_ << " size=\"7.26,10.69\"" << std::endl; - os_ << " 0 [label=\"\", style=invis]" << std::endl; + os_ << " 0 [label=\"\", style=invis, height=0]" << std::endl; os_ << " 0 -> 1" << std::endl; } diff --git a/wrap/python/cgi/README b/wrap/python/cgi/README index 6360346d0..ce191c314 100644 --- a/wrap/python/cgi/README +++ b/wrap/python/cgi/README @@ -37,5 +37,8 @@ You have to install the script yourself if you want to test it. will run the script when the HTTP server processes the request. - ltl2tgba purges old files (>10min) from this directory + ltl2tgba purges old files (>10min) from this directory each time it runs. + +4) `dot' from the GraphViz package, and `convert' from + the ImageMagick package should be in the PATH. diff --git a/wrap/python/cgi/ltl2tgba.in b/wrap/python/cgi/ltl2tgba.in index 7b33e0712..b3d5baf33 100644 --- a/wrap/python/cgi/ltl2tgba.in +++ b/wrap/python/cgi/ltl2tgba.in @@ -126,9 +126,11 @@ if show_formula_gif: outfile = spot.ofstream(imgprefix + '-f.dot') spot.dotty(outfile, f) del outfile - os.spawnlp(os.P_WAIT, 'dot', 'dot', '-Tgif', '-o', + os.spawnlp(os.P_WAIT, 'dot', 'dot', '-Tgif', '-Gsize=14,14', '-o', imgprefix + '-f.gif', imgprefix + '-f.dot') - print '' + os.spawnlp(os.P_WAIT, 'convert', 'convert', + imgprefix + '-f.gif', imgprefix + '-f.png') + print '' print '

Automaton

' @@ -155,9 +157,11 @@ if show_automaton_gif: outfile = spot.ofstream(imgprefix + '-a.dot') spot.dotty_reachable(outfile, concrete) del outfile - os.spawnlp(os.P_WAIT, 'dot', 'dot', '-Tgif', '-o', + os.spawnlp(os.P_WAIT, 'dot', 'dot', '-Tgif', '-Gsize=14,14', '-o', imgprefix + '-a.gif', imgprefix + '-a.dot') - print '' + os.spawnlp(os.P_WAIT, 'convert', 'convert', + imgprefix + '-a.gif', imgprefix + '-a.png') + print '' if show_degen_dot or show_degen_gif: @@ -174,9 +178,11 @@ if show_degen_dot or show_degen_gif: outfile = spot.ofstream(imgprefix + '-d.dot') spot.dotty_reachable(outfile, degen) del outfile - os.spawnlp(os.P_WAIT, 'dot', 'dot', '-Tgif', '-o', + os.spawnlp(os.P_WAIT, 'dot', 'dot', '-Tgif', '-Gsize=14,14', '-o', imgprefix + '-d.gif', imgprefix + '-d.dot') - print '' + os.spawnlp(os.P_WAIT, 'convert', 'convert', + imgprefix + '-d.gif', imgprefix + '-d.png') + print '' else: degen = 0 @@ -200,9 +206,11 @@ if show_relation_dot or show_relation_set or show_relation_gif: spot.bdd_print_dot(outfile, concrete.get_dict(), concrete.get_core_data().relation) del outfile - os.spawnlp(os.P_WAIT, 'dot', 'dot', '-Tgif', '-o', + os.spawnlp(os.P_WAIT, 'dot', 'dot', '-Tgif', '-Gsize=14,14', '-o', imgprefix + '-b.gif', imgprefix + '-b.dot') - print '' + os.spawnlp(os.P_WAIT, 'convert', 'convert', + imgprefix + '-b.gif', imgprefix + '-b.png') + print '' if show_acceptance_dot or show_acceptance_set or show_acceptance_gif: print '

Acceptance relation

' @@ -217,9 +225,11 @@ if show_acceptance_dot or show_acceptance_set or show_acceptance_gif: spot.bdd_print_dot(outfile, concrete.get_dict(), concrete.get_core_data().accepting_conditions) del outfile - os.spawnlp(os.P_WAIT, 'dot', 'dot', '-Tgif', '-o', + os.spawnlp(os.P_WAIT, 'dot', 'dot', '-Tgif', '-Gsize=14,14', '-o', imgprefix + '-c.gif', imgprefix + '-c.dot') - print '' + os.spawnlp(os.P_WAIT, 'convert', 'convert', + imgprefix + '-c.gif', imgprefix + '-c.png') + print '' if show_lbtt: print '

LBTT conversion

'