Commit graph

241 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
49701ca3bc dotty: get rid of the decorated version
* src/tgbaalgos/dottydec.cc, src/tgbaalgos/dottydec.hh,
src/tgbaalgos/rundotdec.cc, src/tgbaalgos/rundotdec.hh: Delete.
* src/tgbaalgos/Makefile.am, wrap/python/spot.i: Adjust.
* src/tgbaalgos/dotty.cc, src/tgbaalgos/dotty.hh: Remove the
decorated version, and the related arguments.
* src/bin/common_aoutput.cc, src/bin/dstar2tgba.cc,
src/tgbatest/ltl2tgba.cc, src/tgbatest/complementation.cc,
src/tgbatest/emptchk.cc: Adjust calls.
* wrap/python/ajax/spot.in: Draw the accepting run as an
automaton instead of painting it.
* wrap/python/ajax/ltl2tgba.html: Update help text.
2015-01-24 12:22:31 +01:00
Alexandre Duret-Lutz
947ab17b12 autfilt: add an --intersect filter
* src/bin/autfilt.cc: Add option --intersect.  Factor the code to read
automata.
* src/tgbatest/neverclaimread.test: Rewrite the tests, replacing 3 calls
to ltl2tgba by a single call to autfilt.
2015-01-23 22:48:15 +01:00
Alexandre Duret-Lutz
0159027395 simulation: get rid of the "don't care" simulation reductions
Those where never really publicized because they were slow and we failed
to fix what we hopped to fix with them.  They where never used by
default.  Getting rid of them will make it easier to cleanup the
simulation code.

* src/tgbaalgos/simulation.cc, src/tgbaalgos/simulation.hh: Remove
the simulation code.
* src/tgbaalgos/postproc.cc, src/tgbaalgos/postproc.hh,
src/tgbatest/ltl2tgba.cc: Do not call it.
* src/bin/spot-x.cc: Update doc.
* src/tgbatest/sim.test: Delete this file.
* src/tgbatest/Makefile.am: Adjust.
* src/tgbatest/spotlbtt.test, bench/ltl2tgba/tools.sim:
Remove uses to don't care simulation.
2015-01-19 18:17:44 +01:00
Alexandre Duret-Lutz
34f1601b9b ltl: rename is_X_free() into is_syntactic_stutter_invariant()
and adjust it to detect siPSL formulas, as in the paper of Dax et
al. (ATVA'09).  For issue #51.

* src/ltlast/atomic_prop.cc, src/ltlast/binop.cc,
src/ltlast/bunop.cc, src/ltlast/constant.cc, src/ltlast/formula.cc,
src/ltlast/formula.hh, src/ltlast/multop.cc, src/ltlast/unop.cc: Rename
the property, and adjust its computation on siSERE.
* src/ltlvisit/remove_x.cc, src/ltlvisit/simplify.cc,
src/tgbaalgos/stutter.cc: Adjust to new names.
* src/bin/ltlfilt.cc: Add option --syntactic-sutter-invariant.
* src/ltltest/kind.test: Update tests and add some new.
2015-01-19 14:39:41 +01:00
Alexandre Duret-Lutz
8fd594f5d0 ltlfilt: add a --max-count/-n option
This fixes #44.

* src/bin/ltlfilt.cc: Implement -n/--max-count.
* doc/org/ltlfilt.org, src/tgbatest/randpsl.test: Use it
* NEWS: Document it.
2015-01-14 19:59:23 +01:00
Alexandre Duret-Lutz
ae234d2e12 ltlfilt: remove -n.
* src/bin/ltlfilt.cc: Remove short option -n for --negate.
2015-01-14 18:24:31 +01:00
Alexandre Duret-Lutz
6a2aad6259 never: add an option to output in Spin's 6.2.4 style
Fixes #46.

* src/tgbaalgos/neverclaim.cc: Add option '6'.
* src/bin/common_aoutput.cc, src/bin/dstar2tgba.cc: Make it
possible to use the option.
* NEWS, doc/org/oaut.org: Document it.
* src/tgbatest/ltlcross2.test: Test it.
2015-01-09 22:52:46 +01:00
Alexandre Duret-Lutz
e01ab2b236 sccinfo: make it easier to iterate over all SCCs
* src/tgbaalgos/sccinfo.cc, src/tgbaalgos/sccinfo.hh: add
scc_info::begin() and scc_info::end() methods to iterate over the
node_ vector.   Tidy the scc_node structure that that its member
are accessed via methods.
* src/tgbaalgos/safety.cc, src/bin/ltlcross.cc: Simplify using
this interface.
2015-01-09 13:46:13 +01:00
Alexandre Duret-Lutz
94577d6519 product: rename the one-the-fly version as otf_product
This avoid compiler errors about ambiguous calls and make sure we are
calling the intended algorithms everywhere (this wasn't the case).

* src/tgba/tgbaproduct.hh (product, product_at): Rename as...
(otf_product, otf_product_at): ... this.
* iface/ltsmin/modelcheck.cc, src/bin/autfilt.cc, src/bin/ltlfilt.cc,
src/tgbaalgos/minimize.cc, src/tgbaalgos/powerset.cc,
src/tgbatest/ltl2tgba.cc, src/tgbatest/checkpsl.cc,
src/tgbatest/complementation.cc, src/tgbatest/ltlprod.cc: Adjust
callers.
2015-01-09 08:23:49 +01:00
Alexandre Duret-Lutz
7c34c1ae79 stutterize: fix sl2() to keep the correct properties
Combined with 87c2b29, this fixes #7.

* src/tgbaalgos/stutterize.cc: Call keep_props().
* src/tgbaalgos/closure.cc: Just specify the encoding.
* src/bin/autfilt.cc: Add a --instut=2 option.
* src/tgbatest/stutter.test: More test.
2015-01-05 21:52:12 +01:00
Alexandre Duret-Lutz
a5d52633bd bin: fix help text for --dot
* src/bin/common_aoutput.cc, src/bin/dstar2tgba.cc: Here.
2015-01-04 15:59:45 +01:00
Alexandre Duret-Lutz
c6a5de3e23 dstar2tgba: add support for --name and --stats=%m
* src/bin/dstar2tgba.cc: Here.
* src/tgbatest/dstar.test: Test them.
2015-01-04 12:55:26 +01:00
Alexandre Duret-Lutz
4d4c5d807b ltl2tgba, randaut: better error reporting
* src/bin/ltl2tgba.cc, src/bin/randaut.cc: Catch exceptions
in main loop.
* src/tgbatest/ltl2tgba.test, src/tgbatest/randaut.test: Test
errors with unknown --dot argument.
2015-01-04 11:24:31 +01:00
Alexandre Duret-Lutz
3b7b52027c More files to ignore. 2015-01-03 19:01:44 +01:00
Alexandre Duret-Lutz
b048f65dd8 bin: --dot=s display SCCs
* src/tgbaalgos/dotty.cc: Add option 's' to display SCCs.
* src/bin/dstar2tgba.cc, src/bin/common_aoutput.cc: Document it.
* src/tgbatest/neverclaimread.test: Test it.
2015-01-03 17:08:14 +01:00
Alexandre Duret-Lutz
40fb80ea2c bin: use common_aoutput in ltl2tgba
* src/bin/common_aoutput.hh, src/bin/common_aoutput.cc: Adjust to
support three kind of statistics printer, depending on whether the
tool input formulas, automata, or nothing.
* src/bin/randaut.cc, src/bin/autfilt.cc: Adjust.
* src/bin/ltl2tgba.cc: Use the common_aoutput printers.  The
--csv-escape option disappeared along the way, but it was not honored
anyway...
2015-01-03 17:08:14 +01:00
Alexandre Duret-Lutz
72737dfefc bin: factor output options of autfilt and randaut
* src/bin/autfilt.cc: Move output options handling...
* src/bin/common_aoutput.cc, src/bin/common_aoutput.hh:... here.
* src/bin/randaut.cc: Use them.
* src/tgbatest/randaut.test: Test --name and --stats for randaut.
2015-01-03 17:08:14 +01:00
Alexandre Duret-Lutz
3f4b19142d * src/bin/common_setup.cc: bump copyright year to 2015. 2015-01-03 17:08:14 +01:00
Alexandre Duret-Lutz
cf65f606b4 ltlgrind: cosmetics
* src/bin/ltlgrind.cc: Adjust help text to match other tools.
2015-01-03 17:08:14 +01:00
Alexandre Duret-Lutz
06b8118dec ltl2tgba: rename --hoa to --hoaf
for consistency with autfilt, randaut, and dstar2tgba

* src/bin/ltl2tgba.cc: Here.
2015-01-03 17:08:14 +01:00
Alexandre Duret-Lutz
a7c1d4c479 autfilt, randaut: rename --uniq to --unique
for consistency with ltlfilt

* src/bin/autfilt.cc, src/bin/randaut.cc: Here.
2015-01-03 17:08:14 +01:00
Alexandre Duret-Lutz
18d8c3efc0 bin: tooling and documentation about option names
* src/bin/options.py: New file.
* src/bin/Makefile.am: Distribute it.
* src/bin/README: New file.
2015-01-03 17:08:14 +01:00
Alexandre Duret-Lutz
21dcc73deb randaut: fix --uniq
* src/bin/autfilt.cc: Also accept '-u' for '--uniq'.
* src/bin/randaut.cc: Likewise, plus fix the unicity check.
* src/tgbatest/uniq.test: Really test it.
2015-01-03 17:08:14 +01:00
Alexandre Duret-Lutz
36f995651e autfilt: move output functions to a separate file
* src/bin/common_aoutput.cc, src/bin/common_aoutput.hh: New files...
* src/bin/autfilt.cc: ... extracted from here.
* src/bin/Makefile.am: Add them.
2015-01-03 17:08:14 +01:00
Alexandre Duret-Lutz
87c2b291ed tgba_digraph: force selection of properties kept on copy
* src/tgba/tgba.hh: Declare a prop_set to specify the types.
* src/tgba/tgbagraph.hh: Use prop_set for all copy constructors.
* iface/ltsmin/ltsmin.cc, src/bin/autfilt.cc, src/bin/randaut.cc,
src/tgbaalgos/are_isomorphic.cc, src/tgbaalgos/closure.cc,
src/tgbaalgos/complete.cc, src/tgbaalgos/degen.cc,
src/tgbaalgos/dotty.cc, src/tgbaalgos/dtgbacomp.cc,
src/tgbaalgos/dupexp.cc, src/tgbaalgos/dupexp.hh,
src/tgbaalgos/sccfilter.cc, src/tgbaalgos/simulation.cc,
src/tgbaalgos/stutterize.cc, src/tgbatest/checkpsl.cc,
src/tgbatest/emptchk.cc, src/tgbatest/ltl2tgba.cc,
wrap/python/spot.i,src/graphtest/tgbagraph.test: Adjust all uses.
2015-01-03 17:08:01 +01:00
Alexandre Duret-Lutz
0f178288c6 dotty: switch to horizontal output and add options
* src/tgbaalgos/dotty.cc, src/tgbaalgos/dotty.hh: Add an options
parameter.
* src/bin/randaut.cc, src/bin/autfilt.cc, src/bin/dstar2tgba.cc,
src/bin/ltl2tgba.cc, wrap/python/ajax/spot.in: Use it.
* src/tgbatest/det.test, src/tgbatest/dstar.test,
src/tgbatest/ltl2tgba.cc, src/tgbatest/monitor.test,
src/tgbatest/neverclaimread.test, src/tgbatest/tgbaread.test,
src/graphtest/tgbagraph.test: Adjust
because automata are now output horizontally.
* NEWS: Mention the change.
2015-01-03 16:49:13 +01:00
Alexandre Duret-Lutz
0842494fed * src/bin/autfilt.cc: Missing std::move. 2014-12-23 15:07:12 +01:00
Thibaud Michaud
a989d41b3f option --uniq in autfilt and randaut
* src/bin/autfilt.cc: add option --uniq.
* src/bin/randaut.cc: add option --uniq.
* src/tgbatest/uniq.test: Test it.
2014-12-17 16:05:14 +01:00
Thibaud Michaud
176878554e Wrap are_isomorphic inside a class and optimize when deterministic
* src/bin/autfilt.cc: Use isomorphism_checker.
* src/tgbaalgos/are_isomorphic.cc, src/tgbaalgos/are_isomorphic.hh: Wrap
are_isomorphic inside a class to keep the canonic version of the first
automaton between two calls, and use a more efficient algorithm in case
both automata are deterministic.
* src/tgbatest/isomorph.test: Add tests for deterministic automata.
2014-12-17 14:15:02 +01:00
Thibaud Michaud
1995602df5 Adding function to canonicalize an automaton.
* src/tgbaalgos/are_isomorphic.cc, src/tgbaalgos/are_isomorphic.hh,
src/bin/autfilt.cc: are_isomorphic now uses canonicalize. It returns a
bool, because the mapping cannot be deduced easily from the
canonicalized automaton.
* src/graph/graph.hh: Add equality operator to trans_storage_t
for easy comparison of transition vectors.
* src/tgba/tgbagraph.hh: Add equality operator to tgba_graph_trans_data
and to tgba_digraph.
* src/tgbaalgos/canonicalize.cc, src/tgbaalgos/canonicalize.hh:
New files.
* src/tgbaalgos/Makefile.am: Add them.
* src/tgbatest/isomorph.test: Test them.
2014-12-17 14:12:59 +01:00
Alexandre Duret-Lutz
b83d6d7f29 autfilt: %w shows an accepting word
* src/bin/autfilt.cc: Support %w.
* src/tgbatest/readsave.test: Test it.
2014-12-17 10:26:46 +01:00
Alexandre Duret-Lutz
a626a32dbc autfilt: --instut, --destut, --is-empty
* src/bin/autfilt.cc: Add these new options.
* src/tgbaalgos/stutterize.cc, src/tgbaalgos/stutterize.hh: Make it
possible to call sl() and sl2() without passing the set of atomic
propositions.
* src/tgbatest/stutter.test: New file.
* src/tgbatest/Makefile.am: Add it.
2014-12-17 10:26:46 +01:00
Alexandre Duret-Lutz
8e9c431706 merge transitions: also merge transitions with same conditions
* src/tgba/tgbagraph.cc (merge_transition): Do it.
* src/tgbatest/readsave.test: Test it.
* src/bin/autfilt.cc: Fix statistics about the original
automaton when using --stats or --name.
2014-12-17 10:26:46 +01:00
Alexandre Duret-Lutz
b8a38915e5 autfilt: --edges --acc-sets
* src/bin/autfilt.cc: Add these new options.
* src/tgbatest/readsave.test: Test them.
2014-12-16 15:57:44 +01:00
Alexandre Duret-Lutz
56caacbf78 autfilt: support -n,--max-count
* src/bin/autfilt.cc: Implement this new option.
* src/tgbatest/readsave.test: Test it.
2014-12-16 11:45:26 +01:00
Alexandre Duret-Lutz
40c457b626 autfilt: add support for --name, %M, and %m
* src/bin/autfilt.cc: Here.
* src/tgbaalgos/stats.cc: Do not segfault if format is nullptr.
* src/tgbatest/readsave.test: Exercise --name, %M, and %m.
2014-12-16 11:25:43 +01:00
Alexandre Duret-Lutz
0d710f969b autfilt: --count
* src/bin/autfilt.cc: Add a --count option.
* src/tgbatest/randaut.test: Test autfilt's --count and --states.
2014-12-15 12:06:34 +01:00
Alexandre Duret-Lutz
cad4d94cc2 autfilt: --states=RANGE
* src/bin/autfilt.cc: Add a --states=RANGE option.
* src/bin/common_range.cc, src/bin/common_range.hh: Generalize
range_parse to allow an optional upper bound.
2014-12-15 11:59:06 +01:00
Alexandre Duret-Lutz
9cee6e6fa1 autfilt: add options --is-deterministic --is-complete and -v
* src/bin/autfilt.cc: Here.
* src/tgbatest/hoaparse.test: More tests.
2014-12-11 19:26:19 +01:00
Alexandre Duret-Lutz
9c672ac49b autfilt: support --stats=%L to display the automaton location
* src/bin/autfilt.cc: Add support for %L.
* src/tgbatest/hoaparse.test: Test it.
2014-12-11 15:45:14 +01:00
Alexandre Duret-Lutz
ac225c0ee9 ltlfilt: implement -q/--quiet as in grep
the existing -q/--quiet option is renamed to --ignore-errors

* src/bin/ltlfilt.cc: Adjust option.
* src/bin/common_output.cc, src/bin/common_output.hh: Add a
quiet_output.
* bench/dtgbasat/prepare.sh: Rename -q to --ignore-errors..
* src/ltltest/remove_x.test: Use -q.
* NEWS: Mention this change.
2014-12-11 15:34:39 +01:00
Alexandre Duret-Lutz
1e84bb1ee7 autfilt: add a --quiet option
* src/bin/autfilt.cc: Add option.
* src/tgbatest/det.test: Test it.
2014-12-11 15:15:23 +01:00
Alexandre Duret-Lutz
ff4dca48a5 autfilt: some cleanup around --are-isomorphic
* src/bin/autfilt.cc: Do not use -I for --are-isomorphic.
Fix --help.
* src/tgbatest/isomorph.test: Adjust to use --are-isomorphic, and speed
it up 5-fold.
2014-12-10 17:02:50 +01:00
Thibaud Michaud
099d3d724a autfilt: rename --isomorph to --are-isomorphic
* src/bin/autfilt.cc: Here.
2014-12-10 16:36:34 +01:00
Thibaud Michaud
b54fe4c035 autfilt: return with exit code 1 if there is no match
* src/bin/autfilt.cc: Return with exit code 1 if no match found.
* src/tgbaalgos/are_isomorphic.cc,src/tgbatest/degenlskip.test
src/tgbatest/explpro2.test,src/tgbatest/explpro3.test
src/tgbatest/explpro4.test,src/tgbatest/explprod.test
src/tgbatest/neverclaimread.test, src/tgbatest/readsave.test
src/tgbatest/tripprod.test: Use exit status to check for output
emptiness instead of 'test -n'.
* src/tgbatest/isomorph.test: Simplify test.
2014-12-10 16:36:34 +01:00
Thibaud Michaud
1b9354c9b5 are_isomorphic: return the mapping found, not just true or false
* src/bin/autfilt.cc: Here.
* src/tgbaalgos/are_isomorphic.cc, src/tgbaalgos/are_isomorphic.hh:
Here.
2014-12-10 16:36:34 +01:00
Thibaud Michaud
97fdea9d71 Adding function to test if two büchi automata are isomorphic.
And add the corresponding --isomorphic=FILENAME option to autfilt.

* src/tgbaalgos/are_isomorphic.cc, src/tgbaalgos/are_isomorphic.hh:
New.
* src/tgbaalgos/Makefile.am: Add it.
* src/bin/autfilt.cc: Add --isomorphic option.
* src/tgbatest/isomorph.test: Test it.
* src/tgbatest/Makefile.am: Add it.
2014-12-10 16:36:34 +01:00
Alexandre Duret-Lutz
61edf7f41d tgba: simplify usage of named properties
* src/tgba/tgba.hh, src/tgba/tgba.cc (set_named_prop): Add a template
version.
(get_named_prop): Hide the old version, and supply a template version
that casts.
* src/bin/ltlcross.cc, src/hoaparse/hoaparse.yy, src/tgbaalgos/hoa.cc,
src/tgbaalgos/product.cc: Adjust usage.
2014-12-09 16:21:45 +01:00
Alexandre Duret-Lutz
45db1c5fb9 autfilt: add a --merge-transitions option
* src/bin/randaut.cc: Fix memory leak.
* src/bin/autfilt.cc: Add a --merge-transitions option.
* src/tgbatest/readsave.test: Rewrite using randaut and autfilt.
2014-12-08 21:46:53 +01:00
Alexandre Duret-Lutz
8014833ae3 autfilt: add a --product option
* src/bin/autfilt.cc: Implement the --product option.
* src/tgbatest/explprod.cc, src/tgbatest/tripprod.cc: Delete.
* src/tgbatest/Makefile.am: Adjust.
* src/tgbatest/explpro2.test, src/tgbatest/explpro3.test,
src/tgbatest/explpro4.test, src/tgbatest/explprod.test,
src/tgbatest/tripprod.test: Rewrite using autfilt --product.
2014-12-07 13:50:51 +01:00