Commit graph

3058 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
519f5e3cee hoa: fix an assert() when initial states are not declared
* src/hoaparse/hoaparse.yy: Make sure initial states are
declared.
* src/tgbatest/hoaparse.test: Test it.
2015-03-20 18:01:14 +01:00
Alexandre Duret-Lutz
b803a0ee4d get rid of prop_single_acc_set() and set_single_acc_set()
Fixes #64.

* src/tgba/tgba.hh: Here.
* src/tgbaalgos/complete.cc, src/tgbaalgos/degen.cc,
src/tgbaalgos/dtgbacomp.cc, src/tgbaalgos/mask.cc,
src/tgbaalgos/minimize.cc, src/tgbaalgos/remfin.cc,
src/tgbaalgos/sccfilter.cc, src/tgbaalgos/simulation.cc,
src/tgbaalgos/stutter.cc: Adjust.
2015-03-18 21:50:37 +01:00
Alexandre Duret-Lutz
d2f11e4075 move set_generalized_buchi and set_buchi to tgba
* src/tgba/tgbagraph.hh (set_generalized_buchi, set_buchi): Move...
* src/tgba/tgba.hh: ... here.
2015-03-18 20:52:58 +01:00
Alexandre Duret-Lutz
47d9a2d57c rename set_single_acceptance_set() to set_buchi()
Fixes #66.

* src/dstarparse/dra2ba.cc, src/dstarparse/nra2nba.cc,
src/hoaparse/hoaparse.yy, src/tgba/tgbagraph.hh,
src/tgbaalgos/complete.cc, src/tgbaalgos/degen.cc,
src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbacomp.cc,
src/tgbaalgos/minimize.cc, src/tgbaalgos/postproc.cc: Here.
2015-03-18 20:27:37 +01:00
Alexandre Duret-Lutz
2dbef514bd move copy_acceptance_of and copy_ap_of to tgba.hh
Fixes #65.

* src/tgba/tgbagraph.hh (copy_acceptance_of, copy_ap_of): Move...
* src/tgba/tgba.hh: ... here.
2015-03-18 20:19:49 +01:00
Alexandre Duret-Lutz
a79267b8a3 rename copy_acceptance_conditions_of()
... into copy_acceptance_of().  For #65.

* src/tgba/tgbagraph.hh, src/tgbaalgos/dupexp.cc,
src/tgbaalgos/emptiness.cc, src/tgbaalgos/mask.cc,
src/tgbaalgos/powerset.cc, src/tgbaalgos/sbacc.cc,
src/tgbaalgos/simulation.cc, src/tgbaalgos/stutter.cc: Here.
2015-03-18 20:07:57 +01:00
Alexandre Duret-Lutz
c3fbbaa87c python: more automata examples
* wrap/python/tests/automata.ipynb: Restrict dot size, and more
examples.
2015-03-18 18:48:09 +01:00
Alexandre Duret-Lutz
231b3e1809 * src/tgba/tgbagraph.hh: Remove orphaned prototype. 2015-03-18 18:48:09 +01:00
Alexandre Duret-Lutz
316401c5c3 debian: fix some lintian warnings and errors
* debian/control: Update standars-version.  Add missing ${misc:Depends}.
Use Depends: ${source:Version} for libspot-dev.  Fix description of
spot.
* debian/spot-doc.doc-base: Move the doc to Science/Mathematics.
2015-03-18 18:48:02 +01:00
Alexandre Duret-Lutz
72eed9b2e2 sat: add missing prop_state_based_acc() call
Fixes #62.

* src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc: Add call to
prop_state_based_acc() when building an automaton with state-based
acceptance.
* src/tgbatest/satmin2.test: New test.
* doc/org/satmin.org: Update.
2015-03-17 19:28:34 +01:00
Alexandre Duret-Lutz
6712fa3c65 man: fix section number of spot-x.7
* src/bin/man/Makefile.am: Make sure the header of spot-x.7 refers to
section 7, not 1.  This error was caught by lintian on the Debian
packages.
2015-03-17 19:28:34 +01:00
Alexandre Duret-Lutz
838bfb2ae3 dotty: colored acceptance sets
This implement several new options for --dot in order to
allow emptiness sets to be output as colored ⓿ or ❶...
Also add a SPOT_DOTDEFAULT environment variable.

* NEWS, src/bin/man/spot-x.x, src/bin/common_aoutput.cc,
src/bin/dstar2tgba.cc: Document the new options.
* doc/org/.dir-locals.el, doc/org/init.el.in: Setup
SPOT_DOTEXTRA and SPOT_DOTDEFAULT for all documents.
* doc/org/autfilt.org, doc/org/dstar2tgba.org, doc/org/ltl2tgba.org,
doc/org/ltldo.org, doc/org/oaut.org, doc/org/randaut.org,
doc/org/satmin.org: Adjust to this new setup.
* src/misc/escape.cc, src/misc/escape.hh (escape_html): New function.
* src/tgba/acc.cc, src/tgba/acc.hh (to_text, to_html): New method.
* src/tgbaalgos/dotty.cc: Implement the new options.
* src/tgbatest/readsave.test, wrap/python/tests/automata.ipynb: More
tests.
* wrap/python/spot.py: Make sure the default argument for
dotty_reachable is None, so that SPOT_DOTDEFAULT is honored.
2015-03-17 19:28:34 +01:00
Alexandre Duret-Lutz
7caf2b83d6 dot: allow extra configuration via environment
* src/tgbaalgos/dotty.cc, src/taalgos/dotty.cc: Honnor the SPOT_DOTEXTRA
environement variable.
* src/tgbatest/readsave.test, wrap/python/tests/automata.ipynb: Test it.
* NEWS, src/bin/man/spot-x.x: Document it.
2015-03-16 18:40:31 +01:00
Alexandre Duret-Lutz
b6762b7dc9 * wrap/python/spot.py: Typo. 2015-03-16 17:36:49 +01:00
Alexandre Duret-Lutz
1f7c374798 python: More fixes for GraphViz variations
One of our ArchLinux build produice slightly different SVG.

* wrap/python/tests/ipnbdoctest.py: Strip larger parts of SVG outputs.
2015-03-16 17:36:49 +01:00
Alexandre Duret-Lutz
3c38780d50 python: some bindings for translating formulas and diplaying automata
* wrap/python/spot.py: Introduce spot.translate (and
spot.formula.translate) as well, as a wrapper around the
spot.translator class.  Also implement spot.tgba.show()
to allow passing argument to dotty_reachable() before
the result is converted to SVG.
* wrap/python/tests/automata.ipynb: New test file.
* wrap/python/tests/Makefile.am: Add it.
2015-03-15 19:50:40 +01:00
Alexandre Duret-Lutz
d05404a61e * wrap/python/tests/ipnbdoctest.py: Typo. 2015-03-13 10:22:50 +01:00
Alexandre Duret-Lutz
127b77fb25 python: be more robust to different graphviz version in tests
* wrap/python/tests/ipnbdoctest.py: Ignore anything that look like an
SVG coordinate to compare outputs.
2015-03-11 23:45:09 +01:00
Alexandre Duret-Lutz
1ffdd57383 [buddy] backport some fixes from upstream
* src/fdd.c, src/imatrix.c, src/kernel.c, src/reorder.c: Here.
2015-03-11 23:45:00 +01:00
Alexandre Duret-Lutz
2d13fd50ab python: get ipnbdoctest to work with ipython 3.0
With great help from the first two commits in
https://github.com/paulgb/runipy/pull/49/commits

* wrap/python/tests/ipnbdoctest.py: Update.
2015-03-11 22:47:18 +01:00
Alexandre Duret-Lutz
2362b9ab68 python: improve handling of formulas
* src/misc/escape.hh, src/misc/escape.cc (escape_latex): New function.
* src/ltlvisit/tostring.cc: Escape atomic proposition in LaTeX output.
* wrap/python/spot.py: Make it easy to output formulas in different
syntaxes.  Also allow the AST to be shown.
* wrap/python/spot_impl.i: Catch std::runtime_error.
* wrap/python/tests/formulas.ipynb: New file.
* wrap/python/tests/Makefile.am: Add it.
2015-03-11 21:09:12 +01:00
Alexandre Duret-Lutz
a6dbf5cf5e debian: harden version requirements
* debian/control: Make sure libspot-dev and spot have
the same versions.
2015-03-11 16:18:31 +01:00
Alexandre Duret-Lutz
787e3f9315 [buddy] fix undefined behavior
The bug was found while running Spot's src/tgbatest/randpsl.test
on Debian i386 with gcc-4.9.2.  The following call would crash:

./ltl2tgba -R3 -t '(!(F(({{{(p0) |
{[*0]}}:{{{(p1)}[*2]}[:*]}[*]:[*2]}[:*0..3]}[]-> (G(F(p1)))) &
(G((!(p1)) | ((!(p2)) W (G(!(p0)))))))))'

On amd64 the call does not crash, but valgrind nonetheless
report that uninitialized memory is being read by bdd_gbc()
during the second garbage collect.

* src/kernel.h (PUSHREF): Define as a function rather than a macro
to avoid undefined behavior.  See comments for details.
2015-03-10 15:44:08 +01:00
Alexandre Duret-Lutz
ffabbfb048 * debian/rules: Do not hard-code the path to the LTO plugin. 2015-03-09 18:08:37 +01:00
Alexandre Duret-Lutz
5adec9199b debian: build a python3 package
* debian/python3-spot.install: New file.
* Makefile.am: Ship it.
* debian/control, debian/rules, debian/spot.install: Adjust.
2015-03-08 21:22:15 +01:00
Alexandre Duret-Lutz
4ffb0cb98d randltl: some code cleanup
* src/ltlvisit/randomltl.cc, src/ltlvisit/randomltl.hh: Throw
invalid_argument exceptions consistently (not std::string), and use
forwarding constructors to avoid the construct() method.
* src/bin/randltl.cc: Catch the above exceptions.  Destroy
the opts variable right after its use, so that we don't need
explicit destructor calls.
* src/ltltest/rand.test: Add a test.
2015-03-08 13:50:12 +01:00
Alexandre Duret-Lutz
72c7ad9fcd * wrap/python/tests/ipnbdoctest.py: Skip if IPython is missing. 2015-03-08 10:50:17 +01:00
Thibaud Michaud
3bf3d2c8a1 Adding python functions to mirror the functionalities found in src/bin
* wrap/python/spot.i: Rename to...
* wrap/python/spot_impl.i: ...this, and import spot_impl from spot.py so
that it is not needed to recompile everything when modifying python
code.
* wrap/python/spot.py: Adding python functions to mirror the
functionalities found in src/bin.
* src/bin/common_r.cc: Move simplification level...
* src/ltlvisit/simplify.hh: ... here as a constructor of
ltl_simplifier_options, to make it available in wrap/python.
* src/bin/ltlfilt.cc: Set simplification level using the new
ltl_simplifier_options constructor.
* src/bin/randltl.cc: Move most of the code...
* src/ltlvisit/randomltl.cc, src/ltlvisit/randomltl.hh: ... here, as a
class named randltlgenerator.
* wrap/python/tests/bddnqueen.py, wrap/python/tests/minato.py: Avoid
calling bdd_init twice by moving 'import spot' after bdd initialization.
* wrap/python/Makefile.am: Rename spot to spot_impl
* wrap/python/tests/Makefile.am: Add ipnbdoctest.py.
* wrap/python/.gitignore: Rename spot.py to spot_impl.py
* src/ltlvisit/tostring.cc: \ttrue and \ffalse should be \top and \bot.
* wrap/python/tests/ipnbdoctest.py: Run code cells of a python notebook
and compare the output to the actual content of the notebook.
* wrap/python/tests/randltl.ipynb: Document and test randltl.
* wrap/python/tests/run.in: Call ipnbdoctest.py to run ipython
notebooks.
2015-03-08 00:07:25 +01:00
Alexandre Duret-Lutz
cb9867b7d4 org: fix -o example
* doc/org/oaut.org: Adjust the parameters of randaut so that we get a
mix of deterministic and nondeterministic automata.
2015-03-05 20:42:38 +01:00
Alexandre Duret-Lutz
a0ac8dc512 acc: add a to_cnf() function
* src/tgba/acc.cc, src/tgba/acc.hh (to_cnf, is_cnf): New functions.
* src/bin/autfilt.cc: Add a --cnf-acceptance option.
* src/tgbatest/acc2.test: Test it.
2015-03-05 09:18:46 +01:00
Alexandre Duret-Lutz
b71e6addd2 acc: fix is_dnf()
A Fin() terms with multiple sets should not appear under an And.

* src/tgba/acc.cc (is_dnf): Fix it.
* src/tgbatest/acc.cc, src/tgbatest/acc.test: Augment test case.
2015-03-05 09:18:38 +01:00
Alexandre Duret-Lutz
518de8d5eb acc: implement to_dnf() using BDDs
This way we have for instance
  (Inf(1) | Fin(2)) & (Fin(1) | Inf(3)) & Inf(0)
converted into just
  (Fin(1) & Fin(2) & Inf(0)) | (Inf(0)&Inf(1)&Inf(3))
while previously we would produce 4 terms:
  (Fin(2) & Fin(1) & Inf(0)) | (Fin(2) & (Inf(0)&Inf(3)))
  | (Fin(1) & (Inf(0)&Inf(1))) | (Inf(0)&Inf(1)&Inf(3))

* src/tgba/acc.cc (to_dnf): Recode it.
* src/tgbatest/acc2.test: Adjust.
2015-03-04 22:54:50 +01:00
Alexandre Duret-Lutz
ebe4ffc507 sccinfo: introduce is_rejecting()
Because scc_info does not perform a full emptiness check, it is not
always able to tell whether an SCC is accepting if the acceptance
condition use Fin primitives.  This introduce is_rejecting_scc() in
addition to to is_accepting_scc().  Only one of them may be true, but
they can both be false if scc_info has no idea whether the SCC is
accepting.

* src/tgbaalgos/sccinfo.cc, src/tgbaalgos/sccinfo.hh: Implement
is_rejecting_scc().
* src/bin/ltlcross.cc, src/tgba/acc.cc, src/tgba/acc.hh,
src/tgbaalgos/dtgbacomp.cc, src/tgbaalgos/isweakscc.cc,
src/tgbaalgos/remfin.cc, src/tgbaalgos/safety.cc,
src/tgbaalgos/sccfilter.cc: Use it.
* src/tgbaalgos/dotty.cc: Use is_rejecting_scc() and is_accepting_scc()
to color SCCs.
* doc/org/oaut.org: Document the colors used.
* src/tgbatest/neverclaimread.test, src/tgbatest/readsave.test: Adjust
tests.
* src/tgbatest/sccdot.test: New test case.
* src/tgbatest/Makefile.am: Add it.
2015-03-03 20:32:29 +01:00
Alexandre Duret-Lutz
8658441839 bin: use enums instead of #define for option codes
* src/bin/autfilt.cc, src/bin/common_aoutput.cc,
src/bin/common_finput.cc, src/bin/common_output.cc,
src/bin/common_post.cc, src/bin/common_setup.cc,
src/bin/common_trans.cc, src/bin/dstar2tgba.cc, src/bin/genltl.cc,
src/bin/ltl2tgba.cc, src/bin/ltl2tgta.cc, src/bin/ltlcross.cc,
src/bin/ltlfilt.cc, src/bin/ltlgrind.cc, src/bin/randaut.cc,
src/bin/randltl.cc: Here.
2015-03-02 16:55:56 +01:00
Alexandre Duret-Lutz
a530498fbd Fix a bug seen with link-time optimizations enabled.
* src/tgbaalgos/simulation.cc (direct_simulation): Do not store the
original_ automaton as a reference. Otherwise with LTO (+ probably NRVO)
we get a situation where the result automaton (that will be stored in
original_) copies the properties of itself.
2015-03-01 11:20:35 +01:00
Alexandre Duret-Lutz
9454584074 stutter.test: Fix for failure seen on arch linux.
* src/ltltest/stutter.test: Reverse the logic for the test for time, in
case the shell has a builtin version.
2015-03-01 10:48:37 +01:00
Alexandre Duret-Lutz
6bacbe1e92 * src/ltltest/stutter.test: Run time only if present. 2015-03-01 00:15:58 +01:00
Alexandre Duret-Lutz
176a7bf199 debian: include the number of git patches in the version
* configure.ac, debian/changelog.in: Adjust.
* debian/source/format: Distribute this.
* Makefile.am (deb): New target.
2015-02-28 18:24:43 +01:00
Alexandre Duret-Lutz
1f0bb428b0 add a stutter-invariant property to automata
... and show it in the HOA output.  Fixes #60.

* src/tgba/tgba.hh: Add is_stutter_invariant().
* src/tgbaalgos/hoa.cc: Print stutter-invariant
and inherently-weak.
* src/tgbaalgos/ltl2tgba_fm.cc: Set both.
* src/tgbaalgos/are_isomorphic.cc, src/tgbaalgos/complete.cc,
src/tgbaalgos/degen.cc, src/tgbaalgos/dtgbacomp.cc,
src/tgbaalgos/mask.cc, src/tgbaalgos/minimize.cc,
src/tgbaalgos/remfin.cc, src/tgbaalgos/sccfilter.cc,
src/tgbaalgos/simulation.cc, src/tgbaalgos/stutter.cc,
src/tgbatest/hoaparse.test, src/tgbatest/ltldo.test,
src/tgbatest/monitor.test, src/tgbatest/randomize.test,
src/tgbatest/remfin.test, src/tgbatest/sbacc.test: Adjust.
2015-02-28 16:44:06 +01:00
Alexandre Duret-Lutz
566118a5be hoa: add option to output implicit labels
Fixes #59.

* src/tgbaalgos/hoa.cc: Add option i.
* src/bin/common_aoutput.cc, src/bin/dstar2tgba.cc,
src/tgbaalgos/hoa.hh: Document it.
* src/tgbatest/hoaparse.test: Test it.
2015-02-28 12:50:33 +01:00
Alexandre Duret-Lutz
5749fe6f7c * src/tgbaalgos/isweakscc.cc (is_inherently_weak_scc): Allow Fin. 2015-02-28 00:06:17 +01:00
Alexandre Duret-Lutz
b396f373fa debian: First attempt at creating Debian packages
* debian/: New directory.
* Makefile.am, README: Add it.
* configure.ac: Generate debian/changelog.
2015-02-28 00:06:00 +01:00
Etienne Renault
e05ec12b37 Clang needs explicit copy-initialization for sets.
* src/tgba/acc.cc: here.
2015-02-27 14:50:57 +01:00
Etienne Renault
734bceff8e random: Get rid of uniform_distribution (non-portable).
* src/misc/random.cc, src/misc/random.hh,
src/tgbaalgos/randomgraph.cc, src/tgbatest/randaut.test,
src/tgbatest/randomize.test, src/tgbatest/readsave.test,
src/ltlvisit/simplify.cc, src/tgbaalgos/randomize.cc,
src/graph/graph.hh, src/tgbatest/randpsl.test: here.
2015-02-27 14:17:07 +01:00
Etienne Renault
5610d10ac3 simplify: resolve assertion failed.
* src/ltltest/reduc0.test, src/ltlvisit/simplify.cc: here.
2015-02-27 14:17:07 +01:00
Alexandre Duret-Lutz
58da54e79a * src/tgbaalgos/remfin.cc: Purge unreachable states. 2015-02-26 17:44:47 +01:00
Alexandre Duret-Lutz
f93fc98655 More files to ignore 2015-02-26 17:30:02 +01:00
Alexandre Duret-Lutz
7bac775ad4 Bump version to 1.99b to celebrate support for generic acceptance
* configure.ac: Bump version.
* NEWS: Update description of HOA support.
2015-02-26 17:30:02 +01:00
Alexandre Duret-Lutz
b321a410d5 org: more documentation
* doc/org/oaut.org: Mention --dot=a.
* doc/org/autfilt.org: Update list of transformations.
2015-02-26 17:30:02 +01:00
Alexandre Duret-Lutz
af1d05fd13 bin: better documentation for --hoaf=s
* src/bin/common_aoutput.cc, src/bin/dstar2tgba.cc: Here.
2015-02-26 17:30:02 +01:00