Commit graph

359 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
0f0ada825a Show how to rewrite a̅ as ¬a before calling dot, if needed.
Because some old version of libpango will render a̅ as a‾, without
combining.

* wrap/python/ajax/spot.in: Add the code as a comment.
2012-05-01 14:31:15 +02:00
Alexandre Duret-Lutz
861969b53a Prefer -R3 to -R3f when applying direct simulation in the web interface.
* wrap/python/ajax/spot.in: Adjust.
2012-04-30 18:11:13 +02:00
Alexandre Duret-Lutz
a09ad6b4c6 Implement W,M removal for Spin output.
* src/ltlvisit/wmunabbrev.hh, src/ltlvisit/wmunabbrev.cc: New files.
* src/ltlvisit/Makefile.am: Add them.
* src/ltlvisit/tostring.cc (to_spin_string): Use the new rewriting.
* wrap/python/ajax/spot.in: Warn when a "Spin" still contain PSL
operators.
* wrap/python/ajax/ltl2tgba.html: Adjust help text.
* doc/tl/tl.tex, NEWS: Document the new rewriting.
2012-04-30 11:57:55 +02:00
Alexandre Duret-Lutz
43d1be09d5 Add an UTF-8 option to the web interface.
* wrap/python/ajax/ltl2tgba.html: Add the checkbox.
* wrap/python/ajax/css/ltl2tgba.css: Add the necessary class.
* wrap/python/ajax/protocol.txt: Add the new option.
* wrap/python/ajax/spot.in: Handle it.
* wrap/python/ajax/README: Add a few lines to explain
how to run the CGI script from the command line for debugging.
2012-04-30 11:57:55 +02:00
Alexandre Duret-Lutz
e93ceebafe Make it possible to output UTF-8 for dotty().
* src/tgba/tgbaexplicit.hh: Rerganize a bit to
allow different functions to be used to format
states.  Add an enabled_utf8() method to
tgba_explicit_formula.
* src/tgbaalgos/dotty.hh, src/tgbaalgos/dotty.cc:
Simplify the interface by not depending on
dotty_decorator explicitely.
* src/tgba/bddprint.hh (enable_utf8): New function.
* src/tgba/bddprint.cc (enable_utf8): Implement it
and use the global utf8 flag in other functions.
* src/tgbatest/ltl2tgba.cc: Add an -8 option for
UTF-8 outpout.
* wrap/python/spot.i: Adjust for tgbexplicit.hh
changes.
2012-04-30 11:57:55 +02:00
Alexandre Duret-Lutz
bdeb87a6b0 web ltl2tgba: add an option to disable larger rewritings
* wrap/python/ajax/ltl2tgba.html: Add a checkbox and some
code to keep it consistent with the basic rewriting checkbox.
* wrap/python/ajax/spot.in: Deal with the new option.
* wrap/python/ajax/protocol.txt: Document it.
2012-04-28 09:34:46 +02:00
Alexandre Duret-Lutz
8f40fd41f4 Replace the "encoding: utf-8" by "coding: utf-8" comments.
* Makefile.am, src/ltlast/formula.cc, src/ltlast/formula.hh,
src/tgba/tgbaexplicit.hh, wrap/python/ajax/Makefile.am,
wrap/python/spot.i: Here.
* HACKING: Document -*- coding: utf-8 -*-.
2012-04-28 09:34:46 +02:00
Alexandre Duret-Lutz
3d41bf9ff1 ltl2tgba.html: Display properties of formulas.
* src/ltlast/formula.hh, src/ltlast/formula.cc (list_formula_props):
New function.
* wrap/python/spot.i: Adjust to wrap list_formula_props.
* wrap/python/ajax/ltl2tgba.html: Add option to display properties.
* wrap/python/ajax/spot.in: Handle ff=p and display properties.
* wrap/python/ajax/protocol.txt: Adjust.
2012-04-28 09:34:45 +02:00
Alexandre Duret-Lutz
5ce59c011c ltl2tgba.html: Provide a link to an SVG output. Suggested by Denis.
Because this means we are running dot twice, I have added a flag that
will allow us to easily turn this off, should it prove too slow.

* wrap/python/ajax/spot.in (output_both): New variable.
(run_dot): New function, extracted from ...
(render_dot): ... here.  Adjust to call run_dot for all needed format.
And ajust the output accordingly.
2012-04-28 09:34:45 +02:00
Alexandre Duret-Lutz
266bd25ba5 ltl2tgba.html: lists PSL operators in the help text.
* wrap/python/ajax/ltl2tgba.html: Revamp the syntax table to include
PSL operators.
* wrap/python/ajax/css/ltl2tgba.css: Adjust CSS as needed.
2012-04-28 09:34:45 +02:00
Alexandre Duret-Lutz
3d183d68c8 Make sure PSL formulae are translated with the FM translation online.
* wrap/python/ajax/spot.in: Diagnose attempt to use LaCIM or Tau
on PSL formulae.
* wrap/python/ajax/css/ltl2tgba.css (.ltl2tgba .error): New entry.
2012-04-28 09:34:44 +02:00
Alexandre Duret-Lutz
67f4e8b5ce Deprecate reduce() in favor of ltl_simplifier.
* src/ltlvisit/reduce.hh: Mark the file as obsolete.
(reduce): Declare this function as obsolete.
* src/ltlvisit/reduce.cc: Define SKIP_DEPRECATED_WARNING
so we can include reduce.hh.
* src/sanity/includes.test: Also use SKIP_DEPRECATED_WARNING
when compiling headers.
* iface/dve2/dve2check.cc,
src/ltltest/equals.cc, src/ltltest/randltl.cc,
src/ltltest/reduc.cc, src/tgbaalgos/ltl2tgba_fm.hh,
src/tgbaalgos/ltl2tgba_fm.cc, src/tgbatest/randtgba.cc,
wrap/python/ajax/spot.in, wrap/python/spot.i: Adjust
to use ltl_simplifier.
* src/tgbatest/ltl2tgba.cc: Adjust to use ltl_simplifier,
and replace -fr1...-fr7 options by a single -fr option.
* src/tgbatest/spotlbtt.test: Adjust -fr flags accordingly.
* src/tgbatest/reductgba.cc: Do not include reduce.hh.
2012-04-28 09:34:42 +02:00
Alexandre Duret-Lutz
916c154291 Adjust Python tests to the new simplification rules.
* wrap/python/tests/ltlsimple.py: Adjust.
2012-04-28 09:30:34 +02:00
Alexandre Duret-Lutz
7e5875845a Remove the old broken game-theory-based simulation reductions.
This implementation of direct simulation was only working on
degeneralized automata, and produce automata that are inferiors to
those output by the new direct simulation implementation (in
tgba/simulation.hh) which can also work on TGBA.  The delayed
simulation has never been reliable.  It's time for some spring
cleaning.

* src/tgba/tgbareduc.hh, src/tgba/tgbareduc.cc: Delete.
* src/tgba/Makefile.am: Adjust.
* src/tgbaalgos/reductgba_sim.cc, src/tgbaalgos/reductgba_sim.hh:
Remove all code, and keep only a deprecated replacement
from reduc_tgba_sim().
* src/tgbaalgos/reductgba_sim_del.cc: Delete.
* src/tgbaalgos/Makefile.am: Adjust.
* src/tgbatest/reduccmp.test, src/tgbatest/reductgba.cc,
src/tgbatest/reductgba.test: Delete.
* src/tgbatest/Makefile.am: Adjust.
* src/tgbatest/ltl2tgba.cc: Undocument options -R1s, -R1t,
-R2s, -R2t, and implement them using the new direct simulation.
Remove options -Rd and -RD.
* src/tgbatest/spotlbtt.test: Remove entry using these old options.
* wrap/python/spot.i: Do not process tgbaalgos/reductgba_sim.cc.
2012-04-27 22:47:49 +02:00
Alexandre Duret-Lutz
7ba4ab7931 slights documentation changes around direct simulation
* src/tgbaalgos/simulation.hh: Mention the fact that this is
a "direct" simulation.
* wrap/python/ajax/ltl2tgba.html: Likewise, and change the key
to "ds".
* wrap/python/ajax/protocol.txt, wrap/python/ajax/spot.in: Adjust.
2012-04-27 15:51:20 +02:00
Thomas Badie
dfcaed034e Add the simulation in the Spot web interface.
* wrap/python/ajax/spot.in: Add the simulation.
* wrap/python/ajax/protocol.txt: Add the direct simulation in the
automaton simplifications section.
* wrap/python/spot.i (simulation_new): Create a function which
takes an automaton and a call to the simulation with the good
template parameter.
* wrap/python/ajax/ltl2tgba.html: Add the direct simulation
checkbox.
2012-04-18 19:02:09 +02:00
Alexandre Duret-Lutz
603c5d603b tgba_explicit: make the new class work with Swig.
* src/tgba/tgbaexplicit.hh (explicit_graph, tgba_explicit): Make the
transition type explicit.
(state_explicit_string::get_iterator): New method.
(explicit_graph::get_transition): Use it.
(tba): Rename as ...
(sba): ... this.
* wrap/python/spot.i: Instanciate explicit_graph and tgba_explicit
for all three types.
2012-04-12 17:40:12 +02:00
Alexandre Duret-Lutz
862c248a41 ltl2tgba.html: Scroll to result. (Suggested by Thomas Badie.)
* wrap/python/ajax/ltl2tgba.html: Scroll the the results the first
time a formula is submitted, and anytime a formula is submitted with
'enter'.  Also do not animate the settings of panels when reloading
the page from a hash fragment.
2012-03-18 22:40:48 +01:00
Alexandre Duret-Lutz
187997fe5d ltl2tgba.html: Fix initialization of unset options on reload.
* wrap/python/ajax/ltl2tgba.html: On page reload, do not ignore
fields for which no value has been set in the hash fragment.
Otherwise they will keep their default value.
Reported by Thomas Badie.
2012-03-08 22:02:16 +01:00
Alexandre Duret-Lutz
802319ddbb * wrap/python/ajax/spot.in: Fix emulation of execfile. 2012-03-08 21:30:09 +01:00
Alexandre Duret-Lutz
9114305995 ltl2tgba.html: save state in URL to preserve history
* wrap/python/ajax/js/jquery.ba-bbq.min.js: New file.
* wrap/python/ajax/Makefile.am: Distribute it.
* wrap/python/ajax/ltl2tgba.html: Include it, and
Adjust the code to update the URL's hash fragment,
and to read it.
2012-03-04 17:37:37 +01:00
Alexandre Duret-Lutz
88044453fc python: fix return value of emptiness_check_instantiator
* wrap/python/spot.i: Fix typemap for
emptiness_check_instantiator::construct.  The previous code used
to turn (None, "error") into simply ("error").
* wrap/python/ajax/spot.in: Fix handling or errors when
instantiating emptiness checks.
2012-03-04 17:23:46 +01:00
Alexandre Duret-Lutz
61127a3fd5 Make all python code compatible with Python 2.x and Python 3.x.
* wrap/python/buddy.i (__le__, __lt__, __eq__, __ne__, __ge__
__gt__): New operators for bdd.
* wrap/python/spot.i (__le__, __lt__, __eq__, __ne__, __ge__
__gt__, __hash__): New operators for formula.
(nl_cout, nl_cerr): New functions.
* 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,
wrap/python/tests/minato.py, wrap/python/tests/modgray.py: Adjust
to the new print syntax by using sys.output.write() or nl_cout()
instead.
* wrap/python/tests/optionmap.py: Remove all print calls.
* wrap/python/ajax/spot.in: Massive adjustments in order to work
with both Python 2 and 3.  In python 3, reopening stdout as
unbuffered requires it to be open as binary, which in turns
requires any string output to be encoded manually.  BaseHTTPServer
and CGIHTTPServer have been merged into http.server, so we have
to try two different import syntaxes.  execfile no longer exists,
so it has to be emulated.
This also fixes two bugs where the script would segfault on
empty input, or when calling Tau03 on automata with less then
one acceptance conditions.
2012-02-25 14:01:43 +01:00
Alexandre Duret-Lutz
62914059f7 Fix a race condition on the CGI script.
* wrap/python/ajax/spot.in: Create all cache files in a temporary
directory, and only rename this directory at the end.  This way if
two processes are processing the same request, they won't attempt
to populate the same directory (and only one of the first of two
renames will succeed, but that is OK).
2012-02-15 11:58:54 +01:00
Alexandre Duret-Lutz
ebc92d4688 Fix position of the Send button with WebKit.
* wrap/python/ajax/css/ltl2tgba.css: Fix position of the "Send"
button with WebKit.  The folding arrow icon had a vertical border
that overlapped with the next line.
2012-01-17 14:02:15 +01:00
Alexandre Duret-Lutz
7854283593 * wrap/python/ajax/spot.py: Add a required "None" second
argument to utime().
2012-01-17 13:27:09 +01:00
Alexandre Duret-Lutz
28b7c0858b Fix VPATH builds, now that hash.hh include _config.h
* iface/dve2/Makefile.am, src/eltlparse/Makefile.am
src/eltltest/Makefile.am, src/evtgba/Makefile.am,
src/evtgbaalgos/Makefile.am, src/evtgbaparse/Makefile.am,
src/evtgbatest/Makefile.am, src/kripke/Makefile.am,
src/kripketest/Makefile.am, src/ltlast/Makefile.am,
src/ltlparse/Makefile.am, src/ltltest/Makefile.am,
src/ltlvisit/Makefile.am, src/misc/Makefile.am,
src/neverparse/Makefile.am, src/saba/Makefile.am,
src/sabaalgos/Makefile.am, src/sanity/Makefile.am,
src/tgba/Makefile.am, src/tgbaalgos/Makefile.am,
src/tgbaalgos/gtec/Makefile.am, src/tgbaparse/Makefile.am,
src/tgbatest/Makefile.am, wrap/python/Makefile.am (AM_CPPFLAGS):
Make sure $(top_builddir)/src is included.
2011-12-18 12:56:44 +01:00
Alexandre Duret-Lutz
a804c88e1b Fix mkdir error in ajax/spot.in.
* wrap/python/ajax/spot.in: Do not print an error
when attempting to create an existing directory.
Reported by Étienne Renault.
2011-12-01 12:33:20 +01:00
Alexandre Duret-Lutz
6acf30b2ab Remove the old CGI interface.
* wrap/python/cgi-bin: Remove this directory.
* wrap/python/Makefile.am (SUBDIRS): Remove it.
* configure.ac, README, wrap/python/ajax/README: Likewise.
2011-11-28 18:17:50 +01:00
Alexandre Duret-Lutz
6794b8570a Undocument `.' from the web interface.
* wrap/python/ajax/ltl2tgba.html: Remove `.'
from the list of acceptable symbols for AND.
2011-11-28 17:56:46 +01:00
Alexandre Duret-Lutz
7aefc190c9 Add some "drop shadow" in ltl2tgba.html.
* wrap/python/ajax/ltl2tgba.html: Add shadow to all boxes.
* wrap/python/ajax/css/ltl2tgba.css (.shadow): New class.
2011-06-26 18:26:20 +02:00
Alexandre Duret-Lutz
c42d55e6b1 * wrap/python/ajax/spot.in: Touch the directory containing
the cached result for the requests.  So that it survives
the browser's cache.
(finish): Prune the cache only once per hour, and only eraes
files that are older than 2 hours.
2011-06-10 11:12:05 +02:00
Alexandre Duret-Lutz
8059047b21 * wrap/python/ajax/ltl2tgba.html: Add focus on the formula field
on page load.
2011-06-09 14:51:45 +02:00
Alexandre Duret-Lutz
3216494cf6 Implement cache pruning in the CGI script.
* wrap/python/ajax/spot.in (finish): Prune the cache once in a
while.  We rely on hardlinks for garbage collecting the pictures
and dot sources that may be shared by different requests.
2011-06-08 16:44:52 +02:00
Alexandre Duret-Lutz
155ba42c90 Cache dot sources in the CGI script.
* wrap/python/ajax/spot.in (render_dot, render_dot_maybe)
(render_automaton, render_formula): Cache the dot source, so that
we do not have to regenerate two pictures from the same contents.
* wrap/python/spot.i: Typo in the ostringstream declaration.
2011-06-08 16:44:52 +02:00
Alexandre Duret-Lutz
0d2ac81a8c Output a "Cache-Control:" header in the CGI script.
* wrap/python/ajax/spot.in: Output a cache-control header, so that
browsers do no even send two identical requests.
2011-06-08 16:44:47 +02:00
Alexandre Duret-Lutz
b8f8441167 Cache results of the spot.py CGI script.
* wrap/python/ajax/spot.in: Use the QUERY_STRING as a hash key to
cache the result of the script.  Open stdout without buffering and
redirect it to a file that we can dump later on cache hits.  Parts
of this change are extracted from code from Pierre Parutto
<parutto@lrde.epita.fr>.
* AUTHORS: Add him.
2011-06-08 11:36:45 +02:00
Alexandre Duret-Lutz
78f932081b Document the protocol used between ltl2tgba.html and spot.py.
* wrap/python/ajax/protocol.txt: New file.
* wrap/python/ajax/Makefile.am (EXTRA_DIST): Add it.
2011-06-03 17:13:53 +02:00
Alexandre Duret-Lutz
f3bae53e5b Update jQuery and jQuery-UI.
* wrap/python/ajax/ltl2tgba.html: Adjust to use
jQuery 1.6.1 and jQuery-UI 1.8.13.  Remove a useless check
of $("#autoupdate").attr("checked") since this checkbox no longer
exists.
* wrap/python/ajax/css/ui-lightness/jquery-ui-1.8.8.custom.css:
Replace by ...
* wrap/python/ajax/css/ui-lightness/jquery-ui-1.8.13.custom.css: This.
* wrap/python/ajax/Makefile.am (EXTRA_DIST): Adjust.
2011-06-02 14:10:40 +02:00
Alexandre Duret-Lutz
9ad062b247 Fix two spurious segfaults in test cases for the Python interface.
* wrap/python/tests/setxor.py, wrap/python/tests/bddnqueen.py:
Clean all used bdd variables before calling bdd_done(), so that
bdd_delref() is never called after bdd_done().  In NDEBUG builds,
bdd_delref() does not check whether the BuDDy is running or not,
and calling it after bdd_done() will crash.
2011-04-09 17:33:42 +02:00
Alexandre Duret-Lutz
35a0193781 Include <cstddef> in python modules to workaround Swig bug.
* wrap/python/spot.i, wrap/python/buddy.i: Include <cstddef>
because Swig 2.0.2 uses ptrdiff_t and does not do the include
itself.  In g++ most libstdc++ standard headers have been changed
to no longer include <cstddef> as an implementation detail, so
the difference shows.
2011-03-29 22:52:17 +02:00
Alexandre Duret-Lutz
e1ef47d975 Using double borders for acceptance states in SBAs.
* src/tgbaalgos/dotty.hh (dotty_reachable): Take a new
assume_sba argument.
* src/tgbaalgos/dotty.cc (dotty_bfs): Take a new
mark_accepting_states arguments.
(dotty_bfs::process_state): Check if a state is accepting using
the state_is_accepting() method for tgba_sba_proxies, or by
looking at the first outgoing transition of the state.  Pass
the result to the dectorator.
(dotty_reachable): Adjust function.
* src/tgbaalgos/dottydec.hh, src/tgbaalgos/dottydec.cc,
src/tgbaalgos/rundotdec.hh, src/tgbaalgos/rundotdec.cc
(state_decl): Add an "accepting" argument, and use it to
decorate accepting states with a double border.
* src/tgbatest/ltl2tgba.cc: Keep track of whether the output
is an SBA or not, so that we can tell it to dotty().
* wrap/python/ajax/spot.in: Likewise.
* wrap/python/cgi-bin/ltl2tgba.in: Likewise.
2011-03-05 10:26:20 +01:00
Alexandre Duret-Lutz
0792fb741d * wrap/python/ajax/spot.in: Use the degeneralized automaton if
available while computing the emptiness check.
2011-03-04 21:04:38 +01:00
Alexandre Duret-Lutz
40e7350c80 Enable VERBOSE logs for nips, greatspn, and python tests.
* wrap/python/tests/run.in, iface/nips/nipstest/defs.in,
iface/gspn/defs.in: Do not disable VERBOSE when running from "make
check".  Since we have started using parallel-check on 2009-08-31,
we should always send verbose output to the log.
2011-02-10 12:58:16 +01:00
Alexandre Duret-Lutz
caaf0a80c2 Document the new operators in the on-line tools.
* wrap/python/ajax/ltl2tgba.html: Mention Goal's ~, -->, and <-->
operators.
* wrap/python/cgi-bin/ltl2tgba.in: Likewise.
2011-02-06 17:36:26 +01:00
Alexandre Duret-Lutz
97df5b4285 Fix call to scc_filter in the CGI script.
* wrap/python/ajax/spot.in: Do full scc_filter for TGBA (-R3f),
and keep some extra acceptance conditions (-R3) when
degeneralizing.  The converse was done.
2011-02-05 14:27:04 +01:00
Alexandre Duret-Lutz
08ee714760 * wrap/python/cgi-bin/ltl2tgba.in: Fix python error occurring
only when the user did not make any error...
2011-02-04 21:59:43 +01:00
Alexandre Duret-Lutz
2fe5b3fb62 Minor fixes to ltl2tgba.html.
* wrap/python/ajax/css/ltl2tgba.css,
wrap/python/ajax/ltl2tgba.html: Tweak a few things for Firefox
3.0, and fix a </li> tag.
2011-02-03 15:49:37 +01:00
Alexandre Duret-Lutz
dd0f01fe03 more files to ignore 2011-01-27 21:47:47 +01:00
Alexandre Duret-Lutz
60930d7a12 * wrap/python/ajax/ltl2tgba.html: Display the Spot version in
the tooltip over the Spot logo.
2011-01-26 23:13:40 +01:00