Commit graph

2815 commits

Author SHA1 Message Date
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
2e356aed1d dotty: fix output of name and detection of state-based acceptance
* src/tgbaalgos/dotty.cc: Do not output name by default.  Display
accepting states by default no acceptance set are used.
Avoid copying the automaton when possible.
* src/tgbatest/dstar.test: Exercise --dot=t.
2015-01-04 12:38:07 +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
5497bef3d0 * doc/org/ioltl.org: Typo. 2015-01-03 22:36:06 +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
5b723bf8c0 work around a swig issue on Arch Linux
destroy_atomic_prop_set() takes a parameter named 'as', and aparently
Swig reuses this name as-is, although it is a Python keyword.

* src/ltlvisit/apcollect.hh (destroy_atomic_prop_set): Rename the
parameter to please Swig on Arch Linux.
2015-01-03 17:08:14 +01:00
Alexandre Duret-Lutz
c73a4ac916 * src/sanity/style.test: Do not use the deprecated GREP_OPTIONS. 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
bbf019a450 * iface/ltsmin/Makefile.am: Fix location of -lpthread. 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
77cb836e47 dotty: Specialize for tgba_digraph_ptr
* src/tgbaalgos/dotty.cc: Specialize for tgba_digraph_ptr.
* src/tgba/tgbagraph.hh, src/tgbaalgos/dupexp.cc: Copy properties by
default when cloning an automaton.
* src/tgbatest/det.test, src/tgbatest/dstar.test,
src/tgbatest/ltl2tgba.test, src/tgbatest/monitor.test,
src/tgbatest/neverclaimread.test, src/tgbatest/tgbaread.test: Adjust
tests.
2015-01-03 16:49:14 +01:00
Alexandre Duret-Lutz
1d7a20b2d5 * src/tgba/tgbagraph.hh: Add a format_state for unsigned. 2015-01-03 16:49:13 +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
Alexandre Duret-Lutz
84620175e6 * src/tgbatest/Makefile.am: Run and distribute uniq.test. 2014-12-17 16:53:08 +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
1a022c8093 hoaparse: improve reporting of errors in LBTT guards
* src/hoaparse/hoaparse.yy: forward the error messages
from lbt_parse().
* src/hoaparse/hoascan.ll: Minor cleanups.
* src/tgbatest/lbttparse.test: Test it.
2014-12-11 22:36:47 +01:00
Alexandre Duret-Lutz
f9e859d765 ltlparse: allow comments
* src/ltlparse/ltlscan.ll: Skip comments.
* src/ltltest/ltlfilt.test: Test this.
* NEWS: Mention it.
2014-12-11 21:43:08 +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
541ce543c7 are-isomorphic: speed it up
* src/tgbaalgos/are_isomorphic.cc: inline is_isomorphism() into
are_isomorphic() so that the reference vector is only sorted once,
and both vectors are only allocated once.
2014-12-11 08:32:22 +01:00
Alexandre Duret-Lutz
6eb2b06fa7 hoaparse: also accept LBTT input
This is probably the worse grammar I wrote: the LBTT format is designed
to be scanned with scanf, and very inconvenient to parse with
bison/flex.  Here the scanner basically has to emulate a parser to
classify the different INTs as tokens with different types.

* src/hoaparse/hoaparse.yy, src/hoaparse/hoascan.ll: Add rules for LBTT.
* src/hoaparse/parsedecl.hh: Add a way to reset the parser between each
automata.
* src/tgbatest/hoaparse.test, src/tgbatest/lbttparse.test: Add more
tests.
2014-12-10 20:56:07 +01:00
Alexandre Duret-Lutz
e4158c21ee tgbaparse, lbttparse: do not pass an environment for acceptance sets
* src/priv/accmap.hh, src/tgbaalgos/lbtt.cc, src/tgbaalgos/lbtt.hh,
src/tgbaparse/public.hh, src/tgbaparse/tgbaparse.yy,
src/tgbatest/ltl2tgba.cc, src/tgbatest/tgbaread.cc: Do not pass any
environment parameter to parse acceptance sets.  This is not used
anymore since we moved to int-labeled acceptance sets.
2014-12-10 20:49:17 +01:00
Alexandre Duret-Lutz
be57ec290a are-isomorphic: small simplifications
* src/tgbaalgos/are_isomorphic.cc (is_isomorphism): Do not copy
trans_storage_t elements as they contain more than what we use.
Remap the states of a1 before the sort, not during the sort.
(are_trivially_different): Also catch the case where the
number of acceptance sets are different.
* src/tgbaalgos/are_isomorphic.hh: Improve doxygen.
2014-12-10 17:59:41 +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
d033633be0 are_isomorphic: do not try to map initial state to a non-initial state
* src/tgbaalgos/are_isomorphic.cc: Here.
2014-12-10 16:36:34 +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
68adcc70fa Use autfilt --isomorph instead of a diff in some tests
* 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/tripprod.test, src/tgbatest/readsave.test: Here.
2014-12-10 16:36:34 +01:00