Commit graph

19 commits

Author SHA1 Message Date
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
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
802319ddbb * wrap/python/ajax/spot.in: Fix emulation of execfile. 2012-03-08 21:30:09 +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
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
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
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
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
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
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
34f49a8692 Preliminary implementation of an ajax-based ltl2tgba translator.
* configure.ac: Output wrap/python/ajax/Makefile.
* wrap/python/Makefile.am (SUBDIRS): Add ajax.
* wrap/python/ajax/Makefile.am, wrap/python/ajax/README,
wrap/python/ajax/ltl2tgba.html, wrap/python/ajax/spot.in: New files.
* wrap/python/ajax/css/, wrap/python/ajax/js,
wrap/python/ajax/logos: New directories.
* README: Document wrap/python/ajax/.
2011-01-18 16:31:33 +01:00