Commit graph

734 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
566118a5be hoa: add option to output implicit labels
Fixes #59.

* src/tgbaalgos/hoa.cc: Add option i.
* src/bin/common_aoutput.cc, src/bin/dstar2tgba.cc,
src/tgbaalgos/hoa.hh: Document it.
* src/tgbatest/hoaparse.test: Test it.
2015-02-28 12:50:33 +01:00
Etienne Renault
734bceff8e random: Get rid of uniform_distribution (non-portable).
* src/misc/random.cc, src/misc/random.hh,
src/tgbaalgos/randomgraph.cc, src/tgbatest/randaut.test,
src/tgbatest/randomize.test, src/tgbatest/readsave.test,
src/ltlvisit/simplify.cc, src/tgbaalgos/randomize.cc,
src/graph/graph.hh, src/tgbatest/randpsl.test: here.
2015-02-27 14:17:07 +01:00
Alexandre Duret-Lutz
5b3034b605 dot: add an option to display the acceptance
* src/tgbaalgos/dotty.cc: Display the acceptance if "a" is used.
* src/bin/common_aoutput.cc, src/bin/dstar2tgba.cc,
src/tgbaalgos/dotty.hh: Document it.
* src/tgbatest/readsave.test: Test it.
2015-02-26 17:30:01 +01:00
Alexandre Duret-Lutz
095ac93b5b postproc: make sure WDBA have an acceptance set if BA is desired
* src/tgbaalgos/postproc.cc: Here.
* src/tgbatest/ltl2tgba.test: Make sure ltl2tgba -B 0 has one
acceptance set.
2015-02-26 17:30:01 +01:00
Alexandre Duret-Lutz
5b2c7b55ed acc: refactor strip() routines
* src/tgba/acc.cc, src/tgba/acc.hh: Move the strip() routine from
acc_cond into acc_cond::mark_t, and the strip() routine from
cleanacc.cc into acc_cond::acc_code.  Introduce helper functions
to create inf()/fin()/t()/f() at the acc_code level.
* src/tgbaalgos/cleanacc.cc: Simplify, using the strip() function
from acc_code.
* src/tgbaalgos/mask.cc (mask_acc_sets): Use the strip() function
from acc_code so that it work on non-Buchi acceptance.
* src/tgbatest/maskacc.test: Add a test for the latter change.
* src/tgbaalgos/sccfilter.cc, src/tgbatest/acc.cc: Adjust the
use mark_t::strip().
2015-02-26 17:30:01 +01:00
Alexandre Duret-Lutz
717c857794 ltlcross: adjust to work with generic acceptance
* src/bin/ltlcross.cc: Remove Fin-acceptance before
doing checks.  More --verbose output.
* src/tgba/acc.cc, src/tgba/acc.hh: Add an eval_sets() function
to find the set of acceptance sets needed to satisfy the condition
in an accepting SCC.
* src/tgbaalgos/gtec/ce.cc: Use eval_sets() when computing
a counter example.
* src/tgbaalgos/gtec/gtec.cc: Raise an exception when called
on an acceptance that contains Fin.
* src/tgbatest/ltl2dstar3.test, src/tgbatest/ltlcrossce2.test:
New files.
* src/tgbatest/Makefile.am: Add them.
* src/tgba/tgba.cc (is_empty): Call remove_fin if needed.
* src/tgbaalgos/product.cc, src/tgbaalgos/dtgbacomp.cc: Adjust
to work with generic acceptance.
2015-02-26 17:30:01 +01:00
Alexandre Duret-Lutz
9ccbc34964 remfin: introduce less acceptance sets for interferences
Instead of adding one set per term in the DNF, reuse the
removed Fin(x) sets as Inf(x) sets.

* src/tgbaalgos/remfin.cc: Here.
* src/tgbatest/remfin.test: Additional test.
2015-02-26 17:30:01 +01:00
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
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 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 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
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
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
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
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
48d508420b ltldo: rounds start at 1
* src/bin/ltldo.cc: Start at 1.
* src/tgbatest/ltldo.test: Adjust.
2015-01-27 16:02:13 +01:00
Alexandre Duret-Lutz
a24a021964 bin: add shorthands for ltlcross and ltldo
* src/bin/common_trans.cc: Implement shorthands.
* doc/org/ltlcross.org, doc/org/ltldo.org: Document them.
* src/tgbatest/ltldo2.test: Quick test.
* NEWS: Mention it.
2015-01-27 15:16:50 +01:00
Alexandre Duret-Lutz
259c9faaae ltldo: automatic renaming of AP
* src/bin/ltldo.cc: Relabel formula and output automata as needed.
* src/tgbaalgos/relabel.cc, src/tgbaalgos/relabel.hh: New files.
* src/tgbaalgos/Makefile.am: Add them.
* src/tgbatest/ltldo.test: Add some tests.
* doc/org/ltldo.org: Document this.
2015-01-27 15:16:50 +01:00
Alexandre Duret-Lutz
16a8c03143 ltldo: new binary
* src/bin/common_trans.cc, src/bin/common_trans.hh: New files,
extracted from...
* src/bin/ltlcross.cc: ... here, so that ltldo can use them.
* src/bin/ltldo.cc: New file.
* src/bin/Makefile.am: Adjust.
* src/bin/common_aoutput.cc, src/bin/common_aoutput.hh: Make
it possible to add new statistics.
* doc/org/ltldo.org: New file.
* doc/Makefile.am, doc/org/tools.org: Adjust.
* src/bin/man/ltldo.x: New file.
* src/bin/man/Makefile.am: Adjust.
* src/bin/man/ltlcross.x, src/bin/man/ltlfilt.x: Mention ltldo(1).
* src/tgbatest/ltldo.test, src/tgbatest/ltldo2.test: New files.
* src/tgbatest/Makefile.am: Add them.
* NEWS: Mention ltldo.
2015-01-27 08:18:15 +01:00
Alexandre Duret-Lutz
e5294aac21 never: use state-names as comments
* src/tgbaalgos/neverclaim.cc: Here.
* src/hoaparse/hoaparse.yy: Use set_acceptance_conditions() to set
the number of acceptance sets.  Otherwise, the single_acc_set property
is not set.
* src/tgbaalgos/postproc.cc: When expecting a BA or a monitor, do not do
anything if the input is already a BA or a monitor.
* src/tgbatest/hoaparse.test: Add a test case.
* src/tgbatest/readsave.test: Adjust.
2015-01-25 13:07:04 +01:00
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
8dc6776c24 postproc: fix handling of --complete
* src/tgbaalgos/postproc.cc: Here.
* src/tgbatest/readsave.test: Test it.
2015-01-23 18:50:12 +01:00
Alexandre Duret-Lutz
93271bed6f randomize: reorder state names
* src/tgbaalgos/randomize.cc: Reorder state names.
* src/tgbatest/randomize.test: Add a new test.
2015-01-23 18:50:12 +01:00
Alexandre Duret-Lutz
9add895ba7 hoa,dot: propagate state names
* src/hoaparse/hoaparse.yy: Store state names.
* src/tgbaalgos/dotty.cc, src/tgbaalgos/hoa.cc: Output them.
* src/tgbatest/readsave.test: Test this.
* src/tgbatest/hoaparse.test: Update.
2015-01-23 18:50:03 +01:00
Alexandre Duret-Lutz
ae50155297 dotty: output label for unreachable state even if SCCs are shown
* src/tgbaalgos/dotty.cc: Fix output of unreachable states.
* src/tgbatest/readsave.test: Add test.
2015-01-23 18:48:21 +01:00
Alexandre Duret-Lutz
46d967945b simulation: do not mark codeterministic automata as deterministic
* src/tgbaalgos/simulation.cc: Here.
* src/tgbatest/det.test: Test it.
2015-01-22 17:40:00 +01:00