1. 25 Feb, 2012 1 commit
    • Alexandre Duret-Lutz's avatar
      Make all python code compatible with Python 2.x and Python 3.x. · 61127a3f
      Alexandre Duret-Lutz authored
      * 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.
      61127a3f
  2. 15 Feb, 2012 1 commit
    • Alexandre Duret-Lutz's avatar
      Fix a race condition on the CGI script. · 62914059
      Alexandre Duret-Lutz authored
      * 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).
      62914059
  3. 17 Jan, 2012 1 commit
  4. 01 Dec, 2011 1 commit
  5. 10 Jun, 2011 1 commit
  6. 08 Jun, 2011 4 commits
    • Alexandre Duret-Lutz's avatar
      Implement cache pruning in the CGI script. · 3216494c
      Alexandre Duret-Lutz authored
      * 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.
      3216494c
    • Alexandre Duret-Lutz's avatar
      Cache dot sources in the CGI script. · 155ba42c
      Alexandre Duret-Lutz authored
      * 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.
      155ba42c
    • Alexandre Duret-Lutz's avatar
      Output a "Cache-Control:" header in the CGI script. · 0d2ac81a
      Alexandre Duret-Lutz authored
      * wrap/python/ajax/spot.in: Output a cache-control header, so that
      browsers do no even send two identical requests.
      0d2ac81a
    • Alexandre Duret-Lutz's avatar
      Cache results of the spot.py CGI script. · b8f84411
      Alexandre Duret-Lutz authored
      * 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.
      b8f84411
  7. 05 Mar, 2011 1 commit
    • Alexandre Duret-Lutz's avatar
      Using double borders for acceptance states in SBAs. · e1ef47d9
      Alexandre Duret-Lutz authored
      * 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.
      e1ef47d9
  8. 04 Mar, 2011 1 commit
  9. 05 Feb, 2011 1 commit
  10. 18 Jan, 2011 1 commit
    • Alexandre Duret-Lutz's avatar
      Preliminary implementation of an ajax-based ltl2tgba translator. · 34f49a86
      Alexandre Duret-Lutz authored
      * 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/.
      34f49a86