Commit graph

29 commits

Author SHA1 Message Date
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
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
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
Alexandre Duret-Lutz
c0e9891246 randomize: new function
* src/tgbaalgos/randomize.cc, src/tgbaalgos/randomize.hh: New files.
* src/tgbaalgos/Makefile.am: Add them.
* src/graph/graph.hh (rename_states_): New method.
* src/bin/autfilt.cc: Add options --randomize and --seed.
* src/tgbatest/randomize.test: Test them.
* src/tgbatest/Makefile.am: Add randomize.test.
* NEWS: Mention randomize().
2014-12-03 14:23:59 +01:00
Alexandre Duret-Lutz
f08a26f7b9 hoa: rename hoaf_reachable() to hoa_reachable()
* src/tgbaalgos/hoaf.cc, src/tgbaalgos/hoaf.hh: Rename to...
* src/tgbaalgos/hoa.cc, src/tgbaalgos/hoa.hh: ... these, and
fix the function names.
* src/tgbaalgos/Makefile.am, src/bin/autfilt.cc,
src/bin/dstar2tgba.cc, src/bin/ltl2tgba.cc, src/tgbatest/ltl2tgba.cc:
Adjust all calls.
2014-11-25 22:02:59 +01:00
Alexandre Duret-Lutz
a9fa7d33c5 autfilt: diagnose non-existant files
* src/bin/autfilt.cc: Catch exception.
* src/tgbatest/hoaparse.test: Test it.
2014-11-25 09:00:23 +01:00
Alexandre Duret-Lutz
c12b2d63b3 hoa: add support for --ABORT--
* src/hoaparse/parsedecl.hh (hoa_abort): New structure.
* src/hoaparse/hoascan.ll: Throw hoa_abort on --ABORT--.
* src/hoaparse/hoaparse.yy: Deal with this exception.
* src/hoaparse/public.hh: Add a boolean flag to mark aborted automata.
* src/bin/autfilt.cc: Report aborted automata.
* src/tgbatest/hoaparse.test: Add test case.
2014-11-21 16:07:27 +01:00
Alexandre Duret-Lutz
1d962f79ac hoa: make the parser more resilient to errors
* src/hoaparse/hoaparse.yy: Improve error recovery,
and fix location tracking in streams.
* src/hoaparse/public.hh: Store the last location so
that the next parse start at the correct position.
* src/bin/autfilt.cc: Stop parsing a stream on irrecoverable errors.
* src/tgbatest/hoaparse.test: Adjust tests.
2014-11-20 12:29:18 +01:00
Alexandre Duret-Lutz
6eeb74e15f autfilt, dstar2tgba: fix --help
* src/bin/autfilt.cc, src/bin/dstar2tgba.cc: Do not reference the
formula in --help.
2014-11-20 10:02:29 +01:00
Alexandre Duret-Lutz
131299d03e hoa: make it possible to read a stream of automata
* src/bin/autfilt.cc: Loop over all automata in a file.
* src/hoaparse/public.hh: Turn the parser into an object.
* src/hoaparse/hoaparse.yy: Adjust.
2014-11-19 23:24:09 +01:00
Alexandre Duret-Lutz
5aff262844 autfilt: first stub
* src/bin/autfilt.cc, src/bin/man/autfilt.x: New files.
* src/bin/Makefile.am, src/bin/man/Makefile.am: Add them.
* src/bin/common_post.cc, src/bin/common_post.hh: Adjust.
2014-11-19 23:24:09 +01:00