Commit graph

126 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
19a273929c python: rewrite translate() to deal with unambiguous and sbacc
and make it easier to extend and use.

* src/twaalgos/postproc.hh, src/twaalgos/translate.cc,
src/twaalgos/translate.hh: Incorporate the Unambiguous option
with the other preferences.  It's cleaner this way, and the
previous setup did not work well with Python.
* src/bin/ltl2tgba.cc: Adjust to this change.
* wrap/python/spot.py (translate): Rewrite.
* wrap/python/tests/automata.ipynb: Adjust existing cases, and
add more as well as some comments.
2015-05-15 23:50:19 +02:00
Alexandre Duret-Lutz
1ef3e5f3ff translate: remove arbitrary restriction on -U and -D
* src/twaalgos/translate.cc, src/bin/ltl2tgba.cc: Do not assume that
unambiguous is incompatible with deterministic.
2015-05-14 21:05:12 +02:00
Alexandre Duret-Lutz
0786e068ae postproc: add a SBAcc option
Producing state-based acceptance is now part of the postprocessing
routines.  That means we can more easily simplify automata with
state-based acceptance (using autfilt -S --small --high, for instance)
and as as side-effect, ltl2tgba can produce GBA.  However the result of
ltl2tgba -S is often larger than that of ltl2tgba -B.

* src/twaalgos/postproc.cc, src/twaalgos/postproc.hh: Implement
the SBAcc option.
* src/bin/common_post.cc, src/bin/common_post.hh: Implement -S.
* src/bin/autfilt.cc, src/bin/dstar2tgba.cc, src/bin/ltl2tgba.cc,
src/bin/ltl2tgta.cc, src/bin/ltldo.cc: Adjust.
* src/tests/sim3.test: Augment test case.
* NEWS, doc/org/ltl2tgba.org, doc/org/autfilt.org: Document it -S.
2015-05-14 21:05:12 +02:00
Alexandre Duret-Lutz
dd87bdf868 wdba: adjust to work on any TωA
* src/twaalgos/minimize.cc, src/twaalgos/safety.cc,
src/twaalgos/safety.hh: Adjust.
* src/tests/wdba2.test: More tests.
2015-05-14 18:34:14 +02:00
Alexandre Duret-Lutz
8080813303 simulation: work on TωA
* src/twaalgos/simulation.cc, src/twaalgos/simulation.hh: Adjust
to work on TωA.  This only require separate acceptance sets.
* src/tests/sim3.test: New test.
* src/tests/Makefile.am: Add it.
2015-05-14 18:34:14 +02:00
Alexandre Duret-Lutz
3d1ccdc45e autfilt: new --separate-sets option
* src/twaalgos/sepsets.cc, src/twaalgos/sepsets.hh: New files.
* src/twaalgos/Makefile.am: Add them.
* src/twa/acc.hh (get_acceptance): Add a non-const version.
* src/bin/autfilt.cc: Add the --separate-sets option.
* src/tests/sepsets.test: New file.
* src/tests/Makefile.am: Add it.
2015-05-14 18:34:14 +02:00
Alexandre Duret-Lutz
f006f0df34 * src/twaalgos/isunamb.cc: Simplify. 2015-05-13 23:23:11 +02:00
Alexandre Duret-Lutz
8c32fba8b9 scc_info: determine accepting/rejecting-SCCs for any acceptance
* src/twaalgos/sccinfo.cc, src/twaalgos/sccinfo.hh
(determine_unknown_acceptance): New function to call explicitly
in case one want to know whether the accepting/rejecting status
of all SCCs regardless of the acceptance.
* src/twaalgos/dotty.cc src/twaalgos/sccfilter.cc,
src/twaalgos/sccfilter.hh: Use it.
* src/tests/unambig.test, src/tests/sccdot.test: Add more tests.
* doc/org/oaut.org: Adjust doc for --dot=s, orange is not output
anymore.
2015-05-13 23:16:26 +02:00
Alexandre Duret-Lutz
07ee3d2dd0 allow scc_filter() and scc_filter_states() on any TωA
Note however that scc_info does not provide a precise accept/reject
characterization for SCCs when using Fin acceptance.  However whenever
it tells that an SCC is rejecting, scc_filter_states() may safely remove
it.

* src/twaalgos/sccfilter.cc (scc_filter_states): Allow on any TωA.
(scc_filter): Only use acceptance simplifications on TGBA.
* src/tests/unambig.test: Add a co-Büchi test.
2015-05-13 18:54:11 +02:00
Alexandre Duret-Lutz
5d76b9127b ltl2tgba_fm: produce unambiguous automata for PSL as well
* src/twaalgos/ltl2tgba_fm.cc: Fix the PSL operators.
* src/tests/unambig.test: Add more tests.
2015-05-12 20:21:16 +02:00
Alexandre Duret-Lutz
778d8fe95b ltl2tgba_fm: make it easier to preserve state names
* src/twa/twagraph.cc, src/twa/twagraph.hh (create_formula_namer,
release_formula_namer): New functions.
* src/twaalgos/ltl2tgba_fm.cc: Use it.
2015-05-12 20:21:16 +02:00
Alexandre Duret-Lutz
487a86d06a bin: add --check=unambiguous
* src/bin/common_aoutput.cc: Add --check=unambiguous.
* src/twa/twa.hh: New unambiguous property.
* src/twaalgos/hoa.cc: Print it.
* src/twaalgos/ltl2tgba_fm.cc: Set it.
* src/twaalgos/isunamb.cc, src/twaalgos/isunamb.hh
(check_unambiguous): New function.
* src/tests/unambig.test: More tests.
2015-05-12 20:21:15 +02:00
Alexandre Duret-Lutz
98de84f3de Add an is_unambiguous() function, use it in ltlcross and autfilt
* src/twaalgos/isunamb.hh, src/twaalgos/isunamb.cc: New files.
* src/twaalgos/Makefile.am: Add them.
* src/tests/unambig.test: New file.
* src/tests/Makefile.am: Add it.
* src/bin/ltlcross.cc: Record whether each produced automaton is
ambiguous.
* src/bin/autfilt.cc: Add a --is-unambiguous option.
* NEWS: Mention it.
2015-05-12 20:21:15 +02:00
Alexandre Duret-Lutz
9f3a7a49de Add support for unambiguous automata
* src/twaalgos/ltl2tgba_fm.hh, src/twaalgos/ltl2tgba_fm.cc: Implement
generation of unambiguous automata.
* src/tests/ltl2tgba.cc: Add option -fu to test it.
* src/bin/common_post.cc: Adjust the group of options so we can easily
add more from ltl2tgba.cc.
* src/bin/ltl2tgba.cc: Add support for -U and --unambigous.
* src/twaalgos/translate.cc, src/twaalgos/translate.hh: Add support
for Unambiguous.
* src/tests/ltlcross.test, src/tests/ltlcross2.test: Test both
bin/ltl2tgba and tgbatest/ltl2tgba.
* NEWS: Mention the change.
2015-05-12 20:21:15 +02:00
Alexandre Duret-Lutz
7b506a919c * src/twaalgos/stats.hh: Typo in comment. 2015-05-11 19:45:43 +02:00
Alexandre Duret-Lutz
6bc2fa2431 hoa: add a stutter-sensitive property
* src/twa/twa.hh: Support this new property.
* src/twaalgos/stutter.cc: Set it if needed.
* src/twaalgos/hoa.cc: Output it.
* src/tests/stutter-tgba.test: More tests.
2015-05-10 21:13:11 +02:00
Alexandre Duret-Lutz
fe2fc88fc6 bin: add a --check option for automata outputs
This currently only allows extra check for stutter invariance.

* src/bin/common_aoutput.cc: Add check option,
and test stutter invariance.
* src/twaalgos/stutter.cc, src/twaalgos/stutter.hh
(check_stutter_invariance): New function.
* src/tests/stutter-tgba.test: Test it.
2015-05-10 21:13:11 +02:00
Alexandre Duret-Lutz
fa37bc5f72 postproc: do not simplify BA via transitions-based simulation
This addresses the easy part of #79.

* src/twaalgos/postproc.cc: If the input is already BA and we want a BA
as output, do not try the transition-based simulation only to
degeneralize the result.
* src/tests/optba.test: New file.
* src/tests/Makefile.am: Add it.
2015-05-05 00:02:28 +02:00
Alexandre Duret-Lutz
a4b63e8e7f dot: heuristic to switch between circles and ellipses
* src/twaalgos/dotty.cc: Add an option (e) to force elliptic shape, and
a heuristic to choose between circle and ellipse by default.
* src/bin/common_aoutput.cc, src/bin/dstar2tgba.cc: Document 'e'.
* src/taalgos/dotty.cc: Ignore 'e'.
* wrap/python/spot.py (setup): Do not force circular states.  The
default should be fine.
* src/tests/det.test, src/tests/dstar.test, src/tests/monitor.test,
src/tests/neverclaimread.test, src/tests/readsave.test,
src/tests/sccdot.test, src/tests/tgbagraph.test: Adjust expected
results.
* NEWS: Adjust.
2015-04-28 18:25:37 +02:00
Alexandre Duret-Lutz
8aa88c2951 dot: --dot=B to use bullets for all automata but Büchi and co-Büchi
* src/twaalgos/dotty.cc: Add option 'B'.
* src/taalgos/dotty.cc: Ignore it.
* src/bin/common_aoutput.cc, src/bin/dstar2tgba.cc: Document it.
* wrap/python/spot.py (setup): Use it by default, and rewrite
the function to be a bit more flexible.
* wrap/python/tests/automata-io.ipynb, wrap/python/tests/automata.ipynb,
wrap/python/tests/piperead.ipynb, wrap/python/tests/randaut.ipynb,
wrap/python/tests/testingaut.ipynb: Use setup() everywhere.
2015-04-28 18:25:10 +02:00
Alexandre Duret-Lutz
51309cf742 dot: --dot=1 to ignore names and force numbered states
Fixes #78.

* src/twaalgos/dotty.cc: Add option '1'.
* src/taalgos/dotty.cc: Ignore '1'.
* src/bin/dstar2tgba.cc, src/bin/common_aoutput.cc: Document it.
* src/tests/readsave.test: Test it.
2015-04-28 18:25:10 +02:00
Alexandre Duret-Lutz
b1cdab6f95 * src/twaalgos/remfin.cc: Fix comment. 2015-04-28 18:25:10 +02:00
Alexandre Duret-Lutz
340557a12d remove some unused variables
as reported by cppcheck

* src/taalgos/emptinessta.cc, src/taalgos/tgba2ta.cc, src/twa/acc.cc,
src/twaalgos/minimize.cc, src/twaalgos/neverclaim.cc,
src/twaalgos/remprop.cc, src/twaalgos/sccinfo.cc: Here.
2015-04-24 08:39:23 +02:00
Alexandre Duret-Lutz
967f9e8cf1 fix some cppcheck errors
* src/twaalgos/hoa.cc, src/twaalgos/ltl2tgba_fm.cc: Remove some
useless declarations of iterators, as detected by cppcheck.
2015-04-23 23:46:26 +02:00
Alexandre Duret-Lutz
a06ae1e97e get rid of the deprecated std::auto_ptr
Fixes #77.  g++ 5.1 warns about auto_ptr.

* src/twaalgos/ltl2tgba_fm.cc: replace auto_ptr by unique_ptr.
2015-04-23 18:20:06 +02:00
Alexandre Duret-Lutz
de529df59f rename src/tgbaalgos/ as src/twaalgos/
Automatic mass renaming.

* src/tgbaalgos/: Rename as...
* src/twaalgos/: ... this.
* README, configure.ac, iface/ltsmin/modelcheck.cc, src/Makefile.am,
src/bin/autfilt.cc, src/bin/common_aoutput.cc,
src/bin/common_aoutput.hh, src/bin/common_output.hh,
src/bin/common_post.hh, src/bin/dstar2tgba.cc, src/bin/ltl2tgba.cc,
src/bin/ltl2tgta.cc, src/bin/ltlcross.cc, src/bin/ltldo.cc,
src/bin/ltlfilt.cc, src/bin/randaut.cc, src/dstarparse/dra2ba.cc,
src/dstarparse/nra2nba.cc, src/dstarparse/nsa2tgba.cc,
src/graphtest/twagraph.cc, src/kripke/kripkeprint.cc,
src/ltlvisit/contain.cc, src/ltlvisit/contain.hh,
src/ltlvisit/exclusive.cc, src/taalgos/emptinessta.hh,
src/tgbatest/checkpsl.cc, src/tgbatest/checkta.cc,
src/tgbatest/complementation.cc, src/tgbatest/emptchk.cc,
src/tgbatest/ltl2tgba.cc, src/tgbatest/ltlprod.cc,
src/tgbatest/randtgba.cc, src/tgbatest/taatgba.cc, src/twa/twa.cc,
src/twa/twagraph.hh, src/twa/twasafracomplement.cc,
wrap/python/spot_impl.i: Adjust.
2015-04-22 17:58:06 +02:00