Commit graph

5442 commits

Author SHA1 Message Date
Florian Renkin
b4db34995f Move several functions from acc.hh to acc.h
* spot/twa/acc.hh: Remove colors_inf_conj and colors_fin_disj
(unused) and moved get_alone_mark (now find_unit_clause),
propagate_fin_inf (now unit_propagation) and has_parity_prefix
to acc.cc.
* spot/twa/acc.cc: Use a new implementation of unit_propagation
and find_unit_clause.
* spot/twaalgos/cleanacc.cc: Use the new name of
propagate_fin_inf.
2020-04-12 18:31:51 +02:00
Florian Renkin
630b8333fe Impove simplify_acceptance
* spot/twaalgos/cleanacc.cc: Use cleanup_acceptance if
propagate_fin_inf was useful.
* spot/twa/acc.hh: Avoid to reverse the order of the condition in
propagate_fin_inf.
* tests/core/accsimpl.test, tests/core/remfin.test,
tests/python/merge.py, tests/python/automata.ipynb: Update tests.
* tests/python/toparity.py: Update tests and add tests to check the
number of states.
2020-04-12 18:31:28 +02:00
Florian Renkin
a020607664 Correct an issue in toparity with parity prefix
* spot/twaalgos/toparity.cc: Use a lower value in the parity
prefix vector to avoid the creation of unwanted {0} marks.
2020-04-12 14:50:27 +02:00
Florian Renkin
13ede90210 * spot/twaalgos/toparity.hh: Add documentation for toparity options. 2020-04-12 14:50:27 +02:00
Florian Renkin
37897e89e8 Remove redundant Fin and Inf with simplify_acceptance
* spot/twa/acc.hh: Add simplification like
Fin(0)|(Inf(0) & Fin(1)) to Fin(0)|Fin(1).
* spot/twaalgos/cleanacc.cc: Use this simplification.
2020-04-12 14:34:55 +02:00
Florian Renkin
502778f83f toparity: Search a compatible state at the end of the algo
* spot/twaalgos/toparity.cc: Search existing state at
the end of the algorihm.
* spot/twaalgos/toparity.hh: Update documentation.
2020-04-12 14:34:55 +02:00
Alexandre Duret-Lutz
a1a5334d5e relabel_bse: improve handling of n-ary operators
* spot/tl/relabel.cc: Here.
* tests/core/ltlrel.test: Add test cases, and update existing ones.
* NEWS: Mention it.
2020-04-12 11:55:53 +02:00
Alexandre Duret-Lutz
33289f5166 relabel_bse: fix incorrect detection of common APs
Based on a report by Jean Kreber.

* spot/tl/relabel.cc (cut_points): Really connect children of Boolean
operators using undirected edges, not directed ones.
* tests/core/ltlrel.test: Add test cases.
* NEWS: Mention the bug.
2020-04-11 23:50:07 +02:00
Alexandre Duret-Lutz
0b25820211 ignore false edges in emptiness checks and scc_info
Based on reports by Florian Renkin and Jens Kreber.

* spot/twaalgos/bfssteps.cc, spot/twaalgos/couvreurnew.cc,
spot/twaalgos/gtec/gtec.cc, spot/twaalgos/gv04.cc,
spot/twaalgos/magic.cc, spot/twaalgos/sccinfo.cc
spot/twaalgos/se05.cc, spot/twaalgos/tau03.cc: Ignore bddfalse edges.
* spot/twaalgos/gtec/gtec.hh: Remove debugging function.
* tests/core/neverclaimread.test: Adjust.
* tests/python/ecfalse.py: New test file.
* tests/Makefile.am: Add it.
* NEWS: Mention the bug.
2020-04-11 11:24:55 +02:00
Alexandre Duret-Lutz
67fa19cb08 relabel: generalize 9365f8de1 to remove more false edges
* spot/twaalgos/relabel.cc: Detect false edges as they are created,
even as the result of multiple renamings.
* tests/core/ltl2tgba2.test: More test cases, reported by Jens Kreber.
* NEWS: Mention the bug.
* THANKS: Add Jens.
2020-04-10 10:52:40 +02:00
Alexandre Duret-Lutz
a434778fba remove is_alternating() methods
Those were deprecated more than 3 years ago.

* spot/graph/graph.hh, spot/twa/twagraph.hh: Here.
* NEWS: Mention the change.
2020-04-05 14:12:45 +02:00
Alexandre Duret-Lutz
682ec77b0b toparity: take a const_twa_graph_ptr as input
* spot/twaalgos/toparity.hh (to_parity): Take a const TWA as input, as
in Spot 2.8.
* spot/twaalgos/toparity.cc: Adjust.
2020-04-05 14:12:45 +02:00
Alexandre Duret-Lutz
2b918d1c02 toparity: rename iar_old()/iar_maybe_old() to iar()/iar_maybe()
* spot/twaalgos/toparity.hh, spot/twaalgos/toparity.cc: Use the
original names, to minimize differences with spot 2.8.  Deprecate
them.
* tests/python/except.py: Adjust.
* NEWS: Mention the change.
2020-04-05 14:12:40 +02:00
Alexandre Duret-Lutz
0a95314dca to_parity: improve remove_false_transitions
* spot/twaalgos/toparity.hh (remove_false_transitions): Keep it
private.
* spot/twaalgos/toparity.cc (remove_false_transitions): Do not clone
automata without false transitions, simplify the loops, and preserve
all properties.
2020-04-04 16:06:51 +02:00
Alexandre Duret-Lutz
1db319267f python: simplify to_parity() interface
* python/spot/__init__.py (to_parity): Iterate over the attributes
of spot.to_parity_options instead of naming each option explicitely,
also accept a to_parity_options() instance as argument.
* tests/python/toparity.py: Add tests for both styles of calls, and
reduce the number of random tests to lower the run time of this test.
2020-04-04 15:44:27 +02:00
Alexandre Duret-Lutz
1750c0fb6d to_parity: improve doc, and rename car_option into to_parity_options
* spot/twaalgos/toparity.hh: Improve doc, and rename car_option into
to_parity_options.
* doc/spot.bib: Add one reference.
* python/spot/__init__.py, spot/twaalgos/toparity.cc,
tests/python/toparity.py: Adjust.
2020-04-04 14:43:47 +02:00
Alexandre Duret-Lutz
86144ac171 * NEWS: Typo in date for 2.8.7. 2020-03-30 11:14:06 +02:00
Alexandre Duret-Lutz
eec0389de4 * NEWS: Remove mention of car(). 2020-03-26 10:47:39 +01:00
Florian Renkin
0a4312f8fe Adapt ltlsynt to the new version of to_parity
* bin/ltlsynt.cc: Use colorize_parity_here() but remove
 reduce_parity_here() already used in the new version of
 to_parity().
2020-03-24 19:51:24 +01:00
Florian Renkin
d112fca0e4 Remove useless comments in toparity
* spot/twaalgos/toparity.cc: Remove useless comments.
2020-03-24 16:09:26 +01:00
Florian Renkin
75990063f0 Moved IAR and the new version of to_parity in toparity.cc
* python/spot/__init__.py: Use keyword arguments in to_parity()
* python/spot/impl.i: remove useless includes.
* spot/twaalgos/car.cc, spot/twaalgos/car.hh,
spot/twaalgos/rabin2parity.cc, spot/twaalgos/rabin2parity.hh,
tests/Makefile.am, spot/twaalgos/Makefile.am:
content moved to toparity.
* spot/twaalgos/postproc.cc: Use the new version of to_parity in
postprocessor::run.
* spot/twaalgos/toparity.cc, spot/twaalgos/toparity.hh: Add the
content of rabin2parity and car.
* tests/python/car.py, tests/python/toparity.py: Moved all tests
from car.py to toparity.py.
* tests/python/except.py: Change iar() to iar_old().
2020-03-24 15:41:02 +01:00
Florian Renkin
dddc7920e4 Add several options to CAR
* spot/twa/acc.hh: Remove useless comment.
* spot/twaalgos/car.cc: Rewrite the implementation to try
  multiple algorithms and choose the best, add the possibility
  to force the order of the colors/pairs in LAR and use
  propagate_marks_here.
* spot/twaalgos/car.hh, tests/python/car.py: Create a new system of
  options for CAR.
* spot/twaalgos/degen.cc, spot/twaalgos/degen.hh: Add the possibility
  to forbid some marks in is_partially_degeneralizable.
2020-03-24 15:41:02 +01:00
Florian Renkin
6489d6c091 ltlsynt: Correct segfault with ds algorithm and verbose
* bin/ltlsynt.cc: Use initialized DPA when printing when
 we use DET_SPLIT and verbose.
2020-03-22 16:04:44 +01:00
Alexandre Duret-Lutz
e827d3a634 Merge branch 'master' into next 2020-03-13 08:07:16 +01:00
Alexandre Duret-Lutz
f53338e8ad * NEWS, configure.ac: Bump version to 2.8.7.dev. 2020-03-13 08:04:48 +01:00
Alexandre Duret-Lutz
32e9bd4dbf Release Spot 2.8.7
* NEWS, configure.ac, doc/org/setup.org: Update.
2020-03-13 07:53:38 +01:00
Alexandre Duret-Lutz
c368903398 ltlcross: detect write errors for --save-bogus and --grind
* bin/ltlcross.cc: Explicitly close those files to check for
error conditions.
* NEWS: Mention it.
2020-03-13 07:52:34 +01:00
Alexandre Duret-Lutz
0940c9a25a stutter: fix sl, sl2 to never accept on added self-loop
Fixes #401, reported by Victor Khomenko.

* spot/twaalgos/stutter.cc (sl, sl2): If {} is accepting, upgrade the
acceptance condition.
* tests/python/stutter.py: Add test cases.
2020-03-12 22:51:13 +01:00
Alexandre Duret-Lutz
7aec23f019 sccinfo: fix generation of self-loop accepting runs
Reported by Juraj Major.

* spot/twaalgos/sccinfo.cc (scc_info::get_accepting_run): Do not
assume TRACK_STATES is enabled.
* tests/core/autcross5.test: New file.
* tests/Makefile.am: Add it.
* NEWS: Mention the bug.
2020-03-12 22:49:56 +01:00
Alexandre Duret-Lutz
e2ec711c40 autfilt: fix -u
Fixes #399.

* bin/autfilt.cc: Fix it.
* tests/core/isomorph.test: Add test case.
* NEWS: Mention the issue.
2020-03-12 22:49:38 +01:00
Alexandre Duret-Lutz
5b8dbc6549 product: fix handling of operand with false acceptance
* NEWS: Mention the issue.
* spot/twaalgos/product.cc: Fix it.
* tests/python/prodexpt.py: Test it.
2020-03-12 22:49:26 +01:00
Alexandre Duret-Lutz
fa90a97d54 org: fix some typos
* doc/org/tut12.org: Here.
2020-03-12 22:49:14 +01:00
Alexandre Duret-Lutz
3820f369b0 genem: fix suboptimal selection of Fin to remove
* spot/twaalgos/genem.cc: If a disjunct has no unit-Fin to remove the
code should select any Fin occuring in the disjunct, but it was
selecting any Fin occuring in the acceptance condition (made of
disjuncts) instead.  This could potentially double the number of
recursive calls.
2020-03-12 22:47:03 +01:00
Alexandre Duret-Lutz
b5d688dc97 stutter: fix sl, sl2 to never accept on added self-loop
Fixes #401, reported by Victor Khomenko.

* spot/twaalgos/stutter.cc (sl, sl2): If {} is accepting, upgrade the
acceptance condition.
* tests/core/stutter-tgba.test, tests/python/stutter.py: Add test cases.
2020-03-12 21:54:13 +01:00
Alexandre Duret-Lutz
150f815c87 sccinfo: fix generation of self-loop accepting runs
Reported by Juraj Major.

* spot/twaalgos/sccinfo.cc (scc_info::get_accepting_run): Do not
assume TRACK_STATES is enabled.
* tests/core/autcross5.test: New file.
* tests/Makefile.am: Add it.
* NEWS: Mention the bug.
2020-03-12 17:06:03 +01:00
Alexandre Duret-Lutz
ceb5210569 * NEWS: Typos. 2020-03-11 23:14:29 +01:00
Alexandre Duret-Lutz
f9f4fd1c89 ltlcross --save-inclusion-products: name the saved automata
* bin/ltlcross.cc: Name saved automata for easier tracking.
2020-03-11 23:06:19 +01:00
Alexandre Duret-Lutz
124de77925 autfilt: fix -u
Fixes #399.

* bin/autfilt.cc: Fix it.
* tests/core/isomorph.test: Add test case.
* NEWS: Mention the issue.
2020-03-11 23:05:15 +01:00
Alexandre Duret-Lutz
c3d7e942d3 ltlfilt, autfilt: add support for --nth
* bin/autfilt.cc, bin/ltlfilt.cc: Implement it.
* NEWS: Mention it.
* tests/core/genaut.test, tests/core/genltl.test: Add test cases.
2020-03-11 11:42:31 +01:00
Alexandre Duret-Lutz
4e99518da7 ltlcross: do not use remove_fin anymore
* bin/ltlcross.cc: Since is_empty() now works with arbitrary
acceptance conditions, calling remove_fin() is not necessary anymore.
* tests/core/ltlcrossce.test: Adjust.
* NEWS: Mention the change.
2020-03-09 17:51:44 +01:00
Alexandre Duret-Lutz
addaf7f5b0 ltlcross: detect write errors for --save-bogus, --grind, etc
* bin/ltlcross.cc: Explicitly close those file to check for
error conditions.
* tests/core/full.test: Add one test.
2020-03-08 09:15:06 +01:00
Alexandre Duret-Lutz
3805b63e24 ltlcross: add option --save-inclusion-products
* NEWS: Mention it.
* bin/ltlcross.cc: Implement it.
* tests/core/ltlcross3.test: Test it.
2020-03-08 09:15:06 +01:00
Alexandre Duret-Lutz
d8a0f307eb product: fix handling of operand with false acceptance
* NEWS: Mention the issue.
* spot/twaalgos/product.cc: Fix it.
* tests/python/prodexpt.py: Test it.
2020-03-08 09:15:06 +01:00
Alexandre Duret-Lutz
7f0ef7ad59 genem: improve the worst case
* spot/twaalgos/genem.cc, spot/twaalgos/genem.hh: Improve the worst
case by not recurring twice into each disjunct individually.  Keep
the previous two implementation available and add a function
generic_emptiness_check_select_version() so we can benchmark the
difference.
* tests/python/genem.py: Test the three versions.
2020-03-06 12:38:20 +01:00
Alexandre Duret-Lutz
73277bed96 org: fix some typos
* doc/org/tut12.org: Here.
2020-03-04 23:22:21 +01:00
Alexandre Duret-Lutz
d4b8ecdf90 genem: fix suboptimal selection of Fin to remove
* spot/twaalgos/genem.cc: If a disjunct has no unit-Fin to remove the
code should select any Fin occuring in the disjunct, but it was
selecting any Fin occuring in the acceptance condition (made of
disjuncts) instead.  This could potentially double the number of
recursive calls.
2020-03-04 16:41:23 +01:00
Alexandre Duret-Lutz
332f830d58 * HACKING: Update various bits. 2020-03-02 23:17:38 +01:00
Florian Renkin
6f3208a783 CAR: Correct the value of the max color of the acceptance condition
* spot/twaalgos/car.cc: Update the max_color in apply_to_Buchi.
* tests/python/car.py: Add some tests that showed this issue.
2020-02-26 15:40:52 +01:00
Florian Renkin
4b9704a072 Check that every color appears once in is_parity_max_equiv
* spot/twa/acc.cc: Now suppose that a condition cannot contain
the same mark twice to be parity equivalent.
2020-02-26 15:40:52 +01:00
Florian Renkin
f4c201c980 Correct CAR when we use apply_to_Buchi
* spot/twaalgos/car.cc: Correct the colors producted in apply_to_Buchi.
2020-02-26 15:40:52 +01:00