Commit graph

1918 commits

Author SHA1 Message Date
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
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
5a1e38d90f hoa: store the automaton name as a property
* src/hoaparse/hoaparse.yy: Store the automaton name.
* src/tgbaalgos/hoa.cc: Output it if it exists.
* src/tgbatest/hoaparse.test: Adjust tests.
2014-12-09 16:00:10 +01:00
Alexandre Duret-Lutz
f37ff8407c hoa: mordenize printer slightly
* src/tgbaalgos/hoa.cc: Here.
2014-12-08 23:34:56 +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
fbbf584bbb graph: let transitions() iterate only on valid transitions
This fixes #6.

* src/graph/graph.hh: Rename the old transitions() as
transition_vector(), and implement a new transitions() that iterates
only on non-dead transitions.
* src/tgba/tgbagraph.hh, src/tgba/tgbagraph.cc, src/graph/ngraph.hh:
Adjust wrappers.
* src/hoaparse/hoaparse.yy, src/tgbaalgos/complete.cc,
src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc,
src/tgbaalgos/randomize.cc, src/tgbaalgos/safety.cc: Adjust calls.
2014-12-08 18:29:45 +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
6dd2749c25 delete two unused files
* src/tgbaalgos/gtec/explscc.cc, src/tgbaalgos/gtec/explscc.hh: Delete.
* src/tgbaalgos/gtec/Makefile.am: Adjust.
2014-12-06 23:41:50 +01:00
Alexandre Duret-Lutz
1156866630 simplify: remove an incorect SERE simplification
* src/ltlvisit/simplify.cc, doc/tl/tl.tex: Remove the rule.
* src/ltltest/reduc0.test: Add a regression test.
* src/ltltest/reduccmp.test: Adjust test cases for its removal.
* NEWS: Mention it.
2014-12-05 11:06:21 +01:00
Alexandre Duret-Lutz
88da1ad84d work around BSD sed not interpreting \r in s/$/\r/
* src/kripketest/bad_parsing.test, src/tgbatest/neverclaimread.test,
src/tgbatest/readsave.test, src/tgbatest/hoaparse.test: Use Perl for the
unix2dos conversion.
2014-12-05 11:06:21 +01:00
Alexandre Duret-Lutz
a0d9268fda ltl: remove the useless Finish operator
* src/ltlast/unop.cc, src/ltlast/unop.hh src/ltlvisit/lbt.cc,
src/ltlvisit/mark.cc, src/ltlvisit/simplify.cc,
src/ltlvisit/tostring.cc, src/ltlvisit/tunabbrev.cc,
src/tgba/formula2bdd.cc, src/tgbaalgos/ltl2tgba_fm.cc: Remove Finish.
* src/tgbaalgos/ltl2taa.cc: Remove Finish, and simply use an empty
destination to code the sink.
2014-12-04 17:48:42 +01:00
Alexandre Duret-Lutz
ad77145496 how: fix multi-line incomplete strings
Location tracking was incorrect for multi-line
strings/comments/parentheses.  This also fixes and tests recovery on
inclosed strings/comments/parentheses.

* src/hoaparse/hoaparse.yy: Abort on expected EOF.
* src/hoaparse/hoascan.ll: Track newlines inside strings and comments.
Do not use unput() to close incomplete parentheses.
* src/tgbatest/neverclaimread.test, src/tgbatest/hoaparse.test: Add
more tests.
2014-12-04 12:19:18 +01:00
Alexandre Duret-Lutz
ebc3d64927 neverclaim: fix reporting of parse_boolean() errors
* src/hoaparse/hoaparse.yy: Correctly adjust the
location of error messagges.
* src/tgbatest/neverclaimread.test: Add test case.
2014-12-04 12:19:18 +01:00
Alexandre Duret-Lutz
d0525871ed neverclaim: fix parsing of aliased states
* src/graph/ngraph.hh (alias_states): Deal with the case
of aliasing two existing states.
* src/hoaparse/hoaparse.yy: Fix handling of aliased states.
* src/tgbatest/neverclaimread.test: Augment test case.
2014-12-04 12:19:18 +01:00
Alexandre Duret-Lutz
e1bba50047 hoa: swallow the neverclaim parser
This way we can easily parse a stream of HOAs intermixed with
neverclaims.

* src/hoaparse/hoaparse.yy, src/hoaparse/hoascan.ll: Add rules
for neverclaims, adjusted from src/neverparse/neverclaimparse.yy
and src/neverparse/neverclaimparse.ll.
* src/hoaparse/public.hh, NEWS: Update documentation.
* src/neverparse/: Remove this directory.
* README, configure.ac, src/Makefile.am: Adjust accordingly.
* src/tgbatest/ltl2tgba.cc, src/bin/ltlcross.cc: Use HOA
parser to read neverclaims.
* src/tgbatest/hoaparse.test, src/tgbatest/neverclaimread.test: Adjust.
2014-12-04 12:19:17 +01:00
Alexandre Duret-Lutz
39eefd0c6e * src/misc/random.cc: Declare the generator as static. 2014-12-03 14:23:59 +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
0db0eca14e graph: store the source indices in the transition vector
... and use it to sort transitions.

* src/graph/graph.hh: Adjust storage of source index.  Provide
remove_dead_transitions_(), sort_transitions_() and
chain_transitions_() methods.
* src/tgba/tgbagraph.cc (merge_transitions): Rewrite using
above methods.
* src/tgba/tgbagraph.hh: Add a comparison operator for
transitions.
* src/tgbatest/degenlskip.test, src/tgbatest/det.test,
src/tgbatest/ltl2ta.test, src/tgbatest/neverclaimread.test,
src/tgbatest/readsave.test: Adjust expected transition order in test
cases.
2014-12-02 22:58:18 +01:00
Alexandre Duret-Lutz
80ce0e2129 satminimization: do not assume the initial state is 0
* src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc: Here.
2014-12-02 22:58:18 +01:00
Alexandre Duret-Lutz
5d8f16da99 countstates: remove unused file
* src/priv/countstates.cc, src/priv/countstates.hh: Delete.
* src/priv/Makefile.am, src/tgbaalgos/postproc.cc: Adjust.
2014-12-01 17:51:57 +01:00
Alexandre Duret-Lutz
a95693906a bddop: remove unused file
* src/misc/bddop.cc, src/misc/bddop.hh: Delete.
* src/misc/Makefile.am, src/ta/taexplicit.cc, src/ta/tgtaexplicit.cc,
src/taalgos/tgba2ta.cc, src/tgba/taatgba.cc, src/tgba/tgbagraph.hh:
Adjust.
2014-12-01 17:48:39 +01:00
Alexandre Duret-Lutz
202b960994 accconv, acccompl: remove unused files
* src/priv/acccompl.cc, src/priv/acccompl.hh,
src/priv/accconv.cc, src/priv/accconv.hh: Delete.
* src/priv/Makefile.am: Adjust.
* src/tgbaalgos/ltl2tgba_fm.cc, src/tgbaalgos/scc.cc,
src/tgbaalgos/sccinfo.cc, src/tgbaalgos/simulation.cc: Remove unused
includes.
2014-12-01 17:38:22 +01:00
Alexandre Duret-Lutz
12401fe91a ltlfile: remove unused file
* src/ltlparse/ltlfile.cc, src/ltlparse/ltlfile.hh: Delete.
* src/ltlparse/Makefile.am: Adjust.
2014-12-01 17:34:13 +01:00
Alexandre Duret-Lutz
4f1535c8fe defaultenv: simplify usage
* src/ltlenv/defaultenv.hh, src/ltlenv/defaultenv.cc (require): Return
an atomic_prop*, not a formula*.
* src/bin/randaut.cc, src/bin/randltl.cc, src/ltlvisit/apcollect.cc,
src/tgbatest/ltl2tgba.cc, src/tgbatest/randtgba.cc: Do not cast
the return of require().
2014-11-30 19:53:14 +01:00
Alexandre Duret-Lutz
c5842c3a0a randaut: new binary
* src/bin/randaut.cc, src/bin/man/randaut.x: New files.
* src/bin/Makefile.am, src/bin/man/Makefile.am: Adjust.
* src/tgbaalgos/randomgraph.hh, src/tgbaalgos/randomgraph.cc:
Add an option to output state-based acceptance, and update
the TGBA properties.
* src/tgbatest/randaut.test: New test.
* src/tgbatest/Makefile.am: Add it.
2014-11-29 16:04:26 +01:00
Alexandre Duret-Lutz
61dc1203ca * src/bin/randltl.cc: Fix typos in examples. 2014-11-29 15:45:16 +01:00
Thibaud Michaud
6400ec852b Add documentation for is_stutter_invariant.
* src/tgbaalgos/stutter_invariance.hh: Add documentation.
2014-11-29 10:53:49 +01:00
Alexandre Duret-Lutz
0beb148b6a * src/tgbaalgos/closure.cc: Fix invalid read. 2014-11-26 10:38:32 +01:00
Alexandre Duret-Lutz
0250a32747 export a create_atomic_prop_set() function
* src/ltlvisit/apcollect.hh,
src/ltlvisit/apcollect.cc (create_atomic_prop_set): New function.
* src/bin/randltl.cc, bench/stutter/stutter_invariance_randomgraph.cc:
Use it.
2014-11-26 10:37:40 +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
5b5c5edcf8 * src/ltlparse/ltlscan.ll: Mark as non-interactive. 2014-11-25 21:46:27 +01:00
Alexandre Duret-Lutz
2a71517f5c hoa: more coverage for the parser
* src/tgbatest/hoaparse.test: More tests.
2014-11-25 14:31:56 +01:00
Alexandre Duret-Lutz
12389adf4f hoa: check parsing from stdin
* src/tgbatest/hoaparse.test: More test.
2014-11-25 11:53:34 +01:00
Alexandre Duret-Lutz
fa2ad77078 hoa: test DOS-style input
* src/tgbatest/hoaparse.test: Add test.
2014-11-25 11:44:58 +01:00
Alexandre Duret-Lutz
0d59e55f4d hoa: fix handling of escaped characters in atomic propositions
* src/hoaparse/hoascan.ll: Remove superfluous line.
* src/tgbaalgos/hoaf.cc: Do not call to_string() to display names, as
this would add another level of escaping.
* src/tgbatest/hoaparse.test: Test it.
2014-11-25 11:37:29 +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
e7e21ae58f hoa: improve parser and scanner
* src/hoaparse/hoaparse.yy: Improve error reporting
in case labeled edges are mixed with unlabeled edges.
* src/hoaparse/hoascan.ll: Fix handling of nested comments.
* src/tgbatest/hoaparse.test: More coverage.
2014-11-25 08:51:55 +01:00
Alexandre Duret-Lutz
1c8b58d69f hoa: add some error recovery
* src/hoaparse/hoaparse.yy: Here.
* src/tgbatest/hoaparse.test: More tests.
2014-11-21 17:44:10 +01:00
Alexandre Duret-Lutz
4043ad2ccf hoa: diagnose unsupported Headers
* src/hoaparse/hoaparse.yy: Here.
* src/tgbatest/hoaparse.test: Test it.
2014-11-21 17:44:10 +01:00
Alexandre Duret-Lutz
8004dca157 hoa: add support for multiple initial states
* src/hoaparse/hoaparse.yy: Here.
* src/tgbatest/hoaparse.test: Add tests.
2014-11-21 16:07:27 +01:00
Alexandre Duret-Lutz
63abfed108 ltlcross: report aborted HOA files
* src/bin/ltlcross.cc: Here.
* src/tgbatest/ltlcross3.test: Add test case.
2014-11-21 16:07:27 +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
8c8c2f0b7c hoa: allocate the states once, after parsing the header
* src/hoaparse/hoaparse.yy: Allocate state after parsing the entire
header, not right after passing "States:".
* src/tgbatest/hoaparse.test: Reflect improved error message
about initial state.
2014-11-21 16:07:27 +01:00
Alexandre Duret-Lutz
71d21b378b hoa: support Inf(!x)
* src/hoaparse/hoaparse.yy: Here.
* src/tgbatest/hoaparse.test: More tests.
* src/tgba/acc.hh (operator^=): New method.
2014-11-21 16:07:11 +01:00
Alexandre Duret-Lutz
7a03228880 hoa: add alias support
* src/hoaparse/hoaparse.yy: Here.
* src/tgbatest/hoaparse.test: Test it.
2014-11-21 11:05:24 +01:00
Alexandre Duret-Lutz
691ab05926 hoa: catch redefinition of states
* src/hoaparse/hoaparse.yy: Here.
* src/tgbatest/hoaparse.test: More test.
2014-11-21 10:49:58 +01:00
Alexandre Duret-Lutz
69678152b6 hoa: add support for unlabeled transitions
* src/hoaparse/hoaparse.yy: Here.
* src/tgbatest/hoaparse.test: Add tests.
2014-11-20 19:44:56 +01:00