Commit graph

2951 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
83dfb4a971 remfin: cleanup acceptance
* src/tgbaalgos/remfin.cc: Call cleanup_acceptance().
* src/tgbatest/remfin.test: Adjust.
2015-02-26 17:30:01 +01:00
Alexandre Duret-Lutz
d597050f6d Make it easy to complement an acceptance condition
* src/tgba/acc.cc, src/tgba/acc.hh (complement): New method.
* src/bin/autfilt.cc: Add a --complement-acceptance option.
* src/tgbatest/acc2.test: Test it.
2015-02-26 17:30:01 +01:00
Alexandre Duret-Lutz
659107a000 Add a cleanup_acceptance() algorithm
* src/tgbaalgos/cleanacc.cc, src/tgbaalgos/cleanacc.hh: New file.
* src/tgbaalgos/Makefile.am: Add them.
* src/tgba/acc.hh, src/tgba/tgba.hh (get_acceptance): Return a
reference.
* src/bin/autfilt.cc: Add a --cleanup-acceptance option.
* src/tgbatest/hoaparse.test: Test it.
2015-02-26 17:30:01 +01:00
Alexandre Duret-Lutz
85508a0ea6 Add a remove_fin() algorithm
* src/bin/autfilt.cc: Add remove_fin().
* src/tgba/acc.cc, src/tgba/acc.hh: Add is_dnf() and simplify eval().
* src/tgbaalgos/remfin.cc, src/tgbaalgos/remfin.hh: New files.
* src/tgbaalgos/Makefile.am: Add them.
* src/tgbatest/remfin.test: New file.
* src/tgbatest/Makefile.am: Add it.
2015-02-26 17:30:01 +01:00
Alexandre Duret-Lutz
1441c4fe34 acc: add a to_dnf() method
* src/tgba/acc.cc, src/tgba/acc.hh: Implement a to_dnf()
method.
* src/bin/autfilt.cc: Add option --dnf-acceptance.
* src/tgbatest/acc2.test: Test it.
2015-02-24 15:32:15 +01:00
Alexandre Duret-Lutz
de586dd2f0 stats: use %g to print the (generic) acceptance condition
* src/tgbaalgos/stats.cc, src/tgbaalgos/stats.hh: Implement %g.
* src/bin/common_aoutput.cc, src/bin/common_aoutput.hh:
Document it, and also implement %G.
* src/tgbatest/acc2.test: New file.
* src/tgbatest/Makefile.am: Add it.
2015-02-23 17:12:12 +01:00
Alexandre Duret-Lutz
33c496a4bb acc: Add operators == and != for acc_code
and make sure are_isomorphic does not look only at the number of
acceptance sets

* src/tgba/acc.hh: Here.
* src/tgbaalgos/are_isomorphic.cc: Use it to ensure two automata
have the same acceptance condition.
* src/tgbatest/explpro4.test: Test product between Büchi and co-Büchi,
and make sure the isomorphic check look at the acceptance condition.
2015-02-23 17:12:12 +01:00
Alexandre Duret-Lutz
039274b238 sbacc: Make sure it also work for non-TGBA
* src/tgbatest/sbacc.test: Adjust test case.
2015-02-23 17:12:11 +01:00
Alexandre Duret-Lutz
f325cddc1c acc: avoid superfluous parentheses when printing acceptance
* src/tgba/acc.cc: Do not output (Inf(x)) or (Fin(x)).
* src/tgbatest/acc.test: Adjust.
2015-02-23 17:12:11 +01:00
Alexandre Duret-Lutz
76c676dba0 rename set_acceptance_conditions as set_generalized_buchi
* src/hoaparse/hoaparse.yy, src/tgba/tgbagraph.hh,
src/tgbaalgos/compsusp.cc, src/tgbaalgos/dtgbasat.cc,
src/tgbaalgos/mask.cc, src/tgbaalgos/randomgraph.cc,
src/tgbaalgos/sccfilter.cc, src/tgbaalgos/simulation.cc,
src/tgbaalgos/stripacc.cc, src/tgba/tgba.hh: Here.
2015-02-23 17:12:11 +01:00
Alexandre Duret-Lutz
fd1f6c4d61 Preliminirary support for generic acceptance.
* src/tgba/acc.hh: Add creation and printing of generic acceptance
code.
* src/tgba/acc.cc: New file.
* src/tgba/Makefile.am: Add it.
* src/tgbatest/acc.cc: More tests.
* src/tgbatest/acc.test: Update.
* src/tgba/tgba.hh (set_acceptance, get_acceptance): New methods.
* src/tgba/tgbagraph.hh: Store acceptance code.
* src/hoaparse/hoaparse.yy: Read any acceptance.
* src/dstarparse/nsa2tgba.cc, src/ta/taexplicit.cc,
src/tgba/tgbaproduct.cc, src/tgba/tgbasafracomplement.cc,
src/tgbaalgos/degen.cc, src/tgbaalgos/hoa.cc,
src/tgbaalgos/ltl2taa.cc, src/tgbaalgos/ltl2tgba_fm.cc,
src/tgbaalgos/product.cc, src/tgbaalgos/stutter.cc,
src/tgbatest/hoaparse.test: Adjust.
2015-02-23 17:12:11 +01:00
Alexandre Lewkowicz
c61f053e2d transform: copy and accessible versions
* src/tgbaalgos/mask.cc, src/tgbaalgos/mask.hh: Rename transform_mask
to accessible_mask. Add Copy version and use it in mask_keep_states().
* src/tgbatest/maskkeep.test: Update.
2015-02-19 23:47:04 +01:00
Alexandre Duret-Lutz
223d41d26b autfilt: fix destruction order for static variables
Depending on whether the global atomic proposition map was destroyed
after the global automata declared in autfilt, we could get
double-free errors.

* src/bin/autfilt.cc: Force destruction of automata in main().
2015-02-18 12:45:09 +01:00
Alexandre Lewkowicz
dcad10fc68 maskkeep: Add a tgba_digraph version
* src/bin/autfilt.cc: Add option --keep-states.
* src/tgbaalgos/mask.cc, src/tgbaalgos/mask.hh: Keep the selected states
and update the initial state.
* src/tgbatest/Makefile.am: Adjust.
* src/tgbatest/maskkeep.test: New file.
2015-02-16 11:42:41 +01:00
Alexandre Lewkowicz
727c351657 common_conv: Parse comma and space separated numbers
* src/bin/common_conv.cc, src/bin/common_conv.hh: Here.
2015-02-16 10:51:05 +01:00
Alexandre Duret-Lutz
78def4f8ca bin: add the --output to tools that output formulas
* src/bin/common_output.cc, src/bin/common_output.hh: Add option
--output.
* src/ltltest/ltlfilt.test, src/ltltest/rand.test: Add tests.
* NEWS, doc/org/ioltl.org: Document it.
2015-02-16 01:23:07 +01:00
Alexandre Duret-Lutz
e22a800fe4 ltlfilt: add a --count option, like autfilt
* src/bin/common_output.cc, src/bin/common_output.hh:
Add count_output.
* src/bin/ltlfilt.cc: Add the --count option.
* src/ltltest/ltlfilt.test: Test it.
* NEWS: Mention it.
2015-02-16 00:46:00 +01:00
Alexandre Duret-Lutz
1e7c1e5cdd bin: implement --output for automata
Fixes #56.

* src/bin/common_aoutput.cc, src/bin/common_aoutput.hh,
src/bin/dstar2tgba.cc: Implement it.
* src/bin/autfilt.cc, src/bin/ltl2tgba.cc, src/bin/ltldo.cc,
src/bin/randaut.cc: Fix main() to catch exceptions from the
constructor of the automaton printer as well.
* src/tgbatest/randaut.test: Add a test case.
* doc/org/oaut.org: Document it.
2015-02-15 12:32:12 +01:00
Alexandre Duret-Lutz
d17d7469c3 ltlcross: allow appending to files via >>FILENAME
Suggested by Joachim Klein.  Fixes #57.

* src/bin/common_file.hh, src/bin/common_file.cc: New file.
* src/bin/Makefile.am: Build them.
* src/bin/ltlcross.cc: Use the output_file class.
* src/tgbatest/ltlcross3.test: Test >>.
* NEWS: mention it.
2015-02-14 17:39:51 +01:00
Alexandre Duret-Lutz
7daea8d3cb bitvect: Fix routines for 64-width vectors
* src/misc/bitvect.hh: Here.
* src/tgbatest/det.test, src/ltltest/ltlfilt.test: Add test cases.
2015-02-13 19:15:23 +01:00
Alexandre Duret-Lutz
be40885010 * doc/org/ltlfilt.org: Update description of --stutter-invariant. 2015-02-13 17:07:48 +01:00
Alexandre Duret-Lutz
e900488e13 bench/stutter: add a "user" benchmark
* bench/stutter/user.sh: New bench.
* bench/stutter/Makefile.am: Add it.
* bench/stutter/README: Mention it.
* bench/stutter/stutter_bench.sh: Run it.
2015-02-13 16:58:42 +01:00
Alexandre Duret-Lutz
204af40b09 stutter: Improve sl2.
* src/tgbaalgos/stutter.cc (sl2): Detect selfloops, and merge
intermediate states when possible.
2015-02-11 11:39:43 +01:00
Alexandre Duret-Lutz
bd414d4d4c bench/stutter: Update
* bench/stutter/stutter_invariance_randomgraph.cc: Update to recent
changes.  If an algorithm took more that 30s on an average for a set of
parameters, avoid running it with more states.  Take the density and
ap count as parameter.  Output all the algorithms on the same line.
Add additional statistics about automata.
* bench/stutter/stutter_invariance_formulas.cc: Update to recent
changes.  Output all the algorithms on the same line.
Add additional statistics about automata.
* bench/stutter/stutter_bench.sh: Use a Makefile to manage concurrency.
* bench/stutter/README: Update.
2015-02-11 11:39:43 +01:00
Alexandre Duret-Lutz
5d31094029 dtgba_complement: take a tgba_digraph_ptr as input
* src/tgbaalgos/dtgbacomp.cc, src/tgbaalgos/dtgbacomp.hh: Here.
* src/tgbatest/ltl2tgba.cc: Adjust.
2015-02-10 16:58:08 +01:00
Alexandre Duret-Lutz
afc8773de1 ltlcross: Add --ignore-execution-failures.
Suggested by Joachim Klein.

* src/bin/ltlcross.cc: Add --ignore-execution-failures.
* src/tgbatest/ltlcross3.test: Test it.
* NEWS: Mention it.
2015-02-10 13:17:55 +01:00
Etienne Renault
2786d0c652 hoaparse: Fix non-posix warnings.
*  src/hoaparse/Makefile.am: here.
2015-02-09 10:10:06 +01:00
Alexandre Duret-Lutz
87f51e28e0 ltldo: cleanup temporary files
* src/bin/ltldo.cc: Here.
2015-02-06 22:31:39 +01:00
Alexandre Duret-Lutz
db34207084 graph: Make perfect forwarding imperfect.
Make sure the constructors with perfect forwarding for states and
transitions do not take the place of copy constructors.  Thanks to Akim
Demaille for its help.  This should fix a bug observed by Joachim Klein
and David Muller.

* src/graph/graph.hh: Disable forwarding constructors for states and
transitions if the first argument is a subclass of the current class.
2015-02-06 14:40:08 +01:00
Alexandre Duret-Lutz
f2ba94f4d4 Add (void) casts for variables used only in assert()s.
Report from Akim Demaille.

* src/ltlvisit/snf.cc, src/ta/taexplicit.cc, src/taalgos/tgba2ta.cc,
src/tgbaalgos/dupexp.cc, src/tgbaalgos/stutter.cc: Here.
2015-02-06 11:57:27 +01:00
Alexandre Duret-Lutz
78e63d0324 nra2nba: Fix initial state construction.
This bug caused tgbatest/ltl2dstar.test to fail but because I had
no ltl2dstar on my computer for a while, I only discovered it after
David Müller and Joachim Klein reported a bug against ltlcross.
It might be the case that their bug is different (I can't reproduce it
using their format), but I hope it was caused by this as well.

* src/dstarparse/nra2nba.cc: Revert 57cda2d9, with a comment.
* THANKS: Add David.
2015-02-05 18:55:52 +01:00
Alexandre Duret-Lutz
856adef9a8 acc: do not store a bdd_dict
Fixes #55.

* src/tgba/acc.hh: Do not store a bdd_dict_ptr, it is not used.
* src/tgba/tgba.hh, src/tgba/tgba.cc, src/ta/ta.hh,
src/tgba/tgbagraph.hh, src/tgbaalgos/dtgbasat.cc,
src/tgbatest/acc.cc: Adjust.
2015-02-04 21:40:46 +01:00
Alexandre Duret-Lutz
2a3c126c15 Make the compiler requirement clearer.
* configure.ac: Check for g++ 4.6 bugs, so we catch
the error at compile time, not make time.
* README: Mention the minimal g++ and clang++ versions.
2015-02-04 15:57:58 +01:00
Alexandre Duret-Lutz
ee0b8e4ea8 autfilt: add a --strip-acceptance option
* src/bin/autfilt.cc: New option.
* src/tgbatest/sbacc.test: Test it.
2015-02-03 23:02:37 +01:00
Alexandre Duret-Lutz
acb67c1bf6 autfilt: add a --sbacc option
... to force automata into state-based acceptance.

* src/tgbaalgos/sbacc.cc, src/tgbaalgos/sbacc.hh,
src/tgbatest/sbacc.test: New files.
* src/tgbaalgos/Makefile.am, src/tgbatest/Makefile.am: Add
them.
* src/tgba/tgbagraph.hh (copy_acceptance_conditions_of):
Call set_acceptance_conditions().
* src/bin/autfilt.cc: Add option --sbacc.
2015-02-03 21:40:56 +01:00
Alexandre Duret-Lutz
cbee5c1a3f hoaparse: detect duplicate atomic propositions
Reported by Joachim Klein.

* src/hoaparse/hoaparse.yy: Add a std::set to keep track of duplicate
propositions.
* src/tgbatest/hoaparse.test: Test it.
2015-02-03 09:57:53 +01:00
Alexandre Duret-Lutz
d7dc584992 hoaparse: fix parsing of LBTT with non 0-based states
* src/hoaparse/hoaparse.yy: Here.
* src/tgbatest/lbttparse.test: Add test cases.
* src/tgbatest/hoaparse.test: Adjust.
2015-02-02 20:09:33 +01:00
Alexandre Duret-Lutz
08fbe27136 bin: diagnose empty automata in ltlcross and ltldo
* src/bin/ltlcross.cc, src/bin/ltldo.cc: Make sure
the result of hoa_parse() is non-empty.
* src/tgbatest/ltlcross3.test, src/tgbatest/ltldo.test:
Add test cases.
2015-02-02 18:53:14 +01:00
Alexandre Duret-Lutz
de935d40ca autfilt: improve documentation
* src/bin/autfilt.cc: Tweak --help.
* doc/org/autfilt.org: More documentation.
2015-02-01 20:31:21 +01:00
Alexandre Duret-Lutz
57cda2d9c3 * src/dstarparse/nra2nba.cc: Simplify construction of initial state. 2015-02-01 17:18:49 +01:00
Alexandre Duret-Lutz
847270b480 ltlcross: replace %H,%T,%N by %O
Also get rid of the lbt_parser, and fix the LBT support of the HOA
parser.

* doc/org/ltlcross.org, doc/org/ltldo.org: Update.
* src/bin/common_trans.cc, src/bin/common_trans.hh: Add support for
%O, and keep %T,%N,%H as hidden aliases without disabling them.
* src/bin/ltlcross.cc, src/bin/ltldo.cc, src/tgbatest/ltl2tgba.cc:
Call hoa_parse instead of lbt_parse.
* src/hoaparse/hoaparse.yy: Improve error reporting from LBT.
* src/hoaparse/hoascan.ll: Fix typos preventing parsing of
LBT files with more than 10 states.
* src/tgbaalgos/lbtt.cc, src/tgbaalgos/lbtt.hh: Delete the lbt
parser.
* src/tgbatest/lbttparse.test: Adjust the expected error message.
* NEWS: Update.
2015-02-01 02:09:48 +01:00
Alexandre Duret-Lutz
dbd824c539 save: remove
Get rid of the output in Spot's format.

This finally fixes #1.

* src/tgbaalgos/save.cc, src/tgbaalgos/save.hh: Delete.
* src/tgbaalgos/Makefile.am: Adjust.
* src/ltlvisit/contain.cc: Remove useless includes.
* src/bin/dstar2tgba.cc, src/bin/common_aoutput.cc,
src/bin/common_aoutput.hh: Remove the "Spot" output.
* doc/org/dstar2tgba.org, doc/org/ioltl.org,
doc/org/ltl2tgba.org, doc/org/oaut.org: Update doc.
* NEWS: Mention that Spot i/o is gone.
* src/tgbatest/randtgba.cc: Output in HOA.
* src/tgbatest/randtgba.test: Use randaut instead of
randtgba.
* wrap/python/spot.i: Do not provide binding for save.hh
2015-01-31 21:22:15 +01:00
Alexandre Duret-Lutz
a246c3b8ba tgbaparse: remove this parser
For issue #1 (nearly done).

* src/tgbaparse/: Delete.
* configure.ac, src/Makefile.am, README: Adjust.
* src/tgbatest/randtgba.cc: Remove useless #include.
2015-01-31 21:22:10 +01:00
Alexandre Duret-Lutz
d0f0be234d maskacc: Add a tgba_digraph version
* src/tgbaalgos/mask.cc, src/tgbaalgos/mask.hh: New files.
* src/tgbaalgos/Makefile.am: Adjust.
* src/tgba/acc.hh (mark_t::set): New method.
* src/bin/autfilt.cc: Add option --mask-acc.
* src/tgbatest/maskacc.test: Rewrite.
* src/tgbatest/maskacc.cc: Delete.
* src/tgbatest/Makefile.am: Adjust.
2015-01-31 21:21:46 +01:00
Alexandre Duret-Lutz
a0a035e0e1 tgbatest: remove the unused powerset source
* src/tgbatest/powerset.cc: Delete.
* src/tgbatest/Makefile.am: Adjust.
2015-01-31 17:55:38 +01:00
Alexandre Duret-Lutz
7b5f80d46d tgbatest: get rid of tgbaread
since it's only purpose is to test a parser we
want to get rid of (#1)

* src/tgbatest/tgbaread.cc, src/tgbatest/tgbaread.test: Delete.
* src/tgbatest/Makefile.am: Adjust.
2015-01-31 17:49:02 +01:00
Alexandre Duret-Lutz
33a944705c tgbatest: drop support of Spot's legacy format from ltl2tgba
This is progress for #1.

* src/tgbatest/ltl2tgba.cc: Remove options -b and -X.  Change
-P to read HOA files instead.
* src/tgbatest/complementation.cc: Replace option -b by -H for
HOA output, and read files in HOA.
* src/tgbatest/complementation.test, src/tgbatest/cycles.test,
src/tgbatest/dbacomp.test, src/tgbatest/degenid.test,
src/tgbatest/dfs.test, src/tgbatest/emptchke.test,
src/tgbatest/ltl2tgba.test, src/tgbatest/renault.test,
src/tgbatest/satmin2.test, src/tgbatest/sccsimpl.test,
src/tgbatest/sim2.test: Adjust.
2015-01-31 17:46:32 +01:00
Alexandre Duret-Lutz
5852292c9f hoa: correctly deal with "Acceptance: 1 t"
Report from Tomáš Babiak and František Blahoudek

See also https://github.com/adl/hoaf/issues/36

Also fix a typo in the handling of Fin(1)&Fin(!1) while we are at it.

* src/hoaparse/hoaparse.yy: Here.
* src/tgbatest/hoaparse.test: Add tests.
2015-01-28 22:35:11 +01:00
Alexandre Duret-Lutz
44f98219d3 python: use hoa_parse instead of tgba_parse
* src/hoaparse/public.hh: Cope with SWIG.
* wrap/python/spot.i: Bind hoa_parse instead of tgba_parse.
Remove the binding for tgba_parse because it will be removed
soon from Spot (cf. #1).
* wrap/python/ajax/spot.in: Use the HOA output of ltl3ba.
* wrap/python/tests/parsetgba.py: Adjust test case.
2015-01-27 22:44:01 +01:00
Alexandre Duret-Lutz
6819cee682 bin: fix compilation on mingw
* src/bin/common_trans.cc: Fix conditional compilation.
* src/bin/ltldo.cc, src/bin/ltlcross.cc: Include sys/wait.h.
2015-01-27 22:03:26 +01:00