Commit graph

1231 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
260a141b1c improve fuse_marks_here by detecting more patterns
This remove some restrictions that prevented fuse_marks_here from
simplifying certain patterns, as noted in the first comment of
issue #405.

* spot/twaalgos/cleanacc.cc (find_interm_rec, find_fusable): Remove
some unnecessary restrictions to singleton marks, and replace the hack
put one non-singleton mark at the beginning of the singleton list by a
sort.
* tests/python/simplacc.py: Add two test cases.
* tests/python/automata.ipynb, tests/core/remfin.test: Improve
expected results.
* NEWS: Mention the bug.
2020-05-22 20:53:57 +02:00
Alexandre Duret-Lutz
645935f796 fixpool: allocate a new chunk on creation
Allocate the first chunk when the fixpool is created.  This avoid a
undefined behavior reported in issue #413 without requiring an extra
comparison in allocate().

* spot/misc/fixpool.hh, spot/misc/fixpool.cc (new_chunk_): New method
extracted from allocate().  Use it in the constructor as well.
* NEWS: Mention the bug.
2020-05-22 20:53:48 +02:00
Alexandre Duret-Lutz
a0767e3c1e postproc: option to wdba-minimize only when sure
Fixes #15.

* spot/twaalgos/minimize.hh, spot/twaalgos/minimize.cc
(minimize_obligation_garanteed_to_work): New function.
* spot/twaalgos/postproc.hh, spot/twaalgos/postproc.cc: Use it if
wdba-minimize=1.  Handle new default for wdba-minimize.
* NEWS, bin/spot-x.cc: Document those changes.
* tests/core/ltl2tgba2.test: Add some test cases.
* tests/core/genltl.test: Improve expected results.
2020-05-21 23:48:21 +02:00
Alexandre Duret-Lutz
208d0f7885 stats: speed up the computation of transitions
Juraj Major reported a case with 32 APs where ltlcross would take
forever to gather statistics.  It turns out that for each edge,
twa_sub_statistics was enumerating all compatible assignments of 32
APs.  This uses bdd_satcountset() instead, and also store the result
in a long long to avoid overflows.

* spot/twaalgos/stats.cc (twa_sub_statistics): Improve the code for
counting transitions.
* bin/common_aoutput.hh, bin/ltlcross.cc, spot/twaalgos/stats.hh:
Store transition counts are long long.
* tests/core/readsave.test: Add test case.
* NEWS: Mention the bug.
2020-05-18 20:49:47 +02:00
Alexandre Duret-Lutz
6bfa9793d6 translate: improve handling of Xor and Equiv at top-level for -G -D
* spot/tl/formula.hh: Add variant of formula::is that support 4
arguments.
* spot/tl/simplify.hh, spot/tl/simplify.cc: Add option keep_top_xor
to preserve Xor and Equiv at the top-level.
* spot/twaalgos/translate.cc: Adjust ltl-split to deal with Xor and
Equiv for the -D -G case.
* NEWS: Mention that.
* tests/core/ltl2tgba2.test: Add test case.
* tests/python/simstate.py: Adjust expected result.
2020-05-16 18:19:26 +02:00
Alexandre Duret-Lutz
3ab2dd17a7 product: add product_xor() and product_xnor()
* spot/twaalgos/product.cc, spot/twaalgos/product.hh: Add those
functions.
* tests/python/_product_weak.ipynb, tests/python/except.py: Test them.
* NEWS: Mention them.
2020-05-16 17:55:36 +02:00
Alexandre Duret-Lutz
a78137f9d4 * NEWS, configure.ac: Bump version to 2.9.0.dev. 2020-04-30 09:03:48 +02:00
Alexandre Duret-Lutz
eeb5713a30 release Spot 2.9
* configure.ac, doc/org/setup.org, NEWS: Set version to 2.9.
2020-04-30 09:00:35 +02:00
Alexandre Duret-Lutz
82d69241f1 ltlsynt: add a --csv=FILENAME option
* bin/ltlsynt.cc: Add a --csv option to record the
duration of the various phases.
* tests/core/ltlsynt.test: Test the new option.
* NEWS: Mention it.
2020-04-30 08:14:50 +02:00
Alexandre Duret-Lutz
a7051b32c8 dot: fix #393
* spot/twaalgos/dot.cc: Add support for option 'E', and default to
rectangle nodes for large labels.
* bin/common_aoutput.cc, NEWS: Document it.
* tests/core/alternating.test, tests/core/dstar.test,
tests/core/readsave.test, tests/core/sccdot.test,
tests/core/tgbagraph.test, tests/python/_product_weak.ipynb,
tests/python/alternation.ipynb, tests/python/atva16-fig2b.ipynb,
tests/python/automata.ipynb, tests/python/decompose.ipynb,
tests/python/gen.ipynb, tests/python/highlighting.ipynb,
tests/python/ltsmin-dve.ipynb, tests/python/ltsmin-pml.ipynb,
tests/python/parity.ipynb, tests/python/pdegen.py,
tests/python/satmin.ipynb, tests/python/stutter-inv.ipynb: Adjust all
test cases.
2020-04-29 21:14:36 +02:00
Alexandre Duret-Lutz
a6da6ed95a ltlsynt: add option to call to_parity_old
* bin/ltlsynt.cc: Add support for --algo=lar.old
* NEWS: Mention it.
2020-04-20 14:48:23 +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
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
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
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
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
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
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
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
Florian Renkin
96531f29f2 CAR: new algorithm for paritizing
* NEWS: Mention it.
* spot/twaalgos/car.cc, spot/twaalgos/car.hh, tests/python/car.py:
New files.
* spot/twaalgos/Makefile.am, tests/Makefile.am: Add them.
* python/spot/impl.i: Include CAR.
* spot/twa/acc.cc, spot/twa/acc.hh, spot/twa/twagraph.cc,
spot/twa/twagraph.hh: Add supporting methods.
2020-02-24 15:05:40 +01:00
Alexandre Duret-Lutz
b44daef42a Merge branch 'master' into next 2020-02-19 15:09:25 +01:00
Alexandre Duret-Lutz
c98f82dc36 * NEWS, configure.ac: Bump version to 2.8.6.dev. 2020-02-19 14:47:34 +01:00
Alexandre Duret-Lutz
39fa829340 Release Spot 2.8.6
* NEWS, configure.ac, doc/org/setup.org: Update version.
2020-02-19 14:45:07 +01:00
Alexandre Duret-Lutz
aad5b135ef fix is_generalized_rabin() and is_generalized_streett()
* spot/twa/acc.cc: Fix detection of single-pairs gen-Rabin and
gen-Streett.
* tests/core/randaut.test: Add test case.
* NEWS: Mention this issue.
2020-02-19 10:52:15 +01:00
Alexandre Duret-Lutz
9365f8de1b relabel: do not create automata with false labels
* spot/twaalgos/relabel.cc: Remove false transitions if
some of the propositions are equivalent to true or false.
* NEWS: Mention the bug.
* tests/core/ltl2tgba2.test: Test it.
2020-02-19 10:52:15 +01:00
Alexandre Duret-Lutz
cf2cfcd2fb _postproc_translate_options: fix syntax error
* python/spot/__init__.py: Here.
* tests/python/except.py: Add test.
* NEWS: Mention the issue.
2020-02-19 10:52:15 +01:00
Alexandre Duret-Lutz
e7ae3d3ae0 fix degeneralize_tba after accepting transition
* spot/twaalgos/degen.cc (degeneralize_tba): Here.
* tests/python/simstate.py: Adjust expected values.
* NEWS: Mention the bug.
2020-02-19 10:52:15 +01:00
Alexandre Duret-Lutz
b5e464e05a autfilt add support for --partial-degeneralize
* bin/autfilt.cc: Add a --partial-degeneralize option.
* NEWS: Mention it.
* spot/twaalgos/degen.cc: Do not restrict partial_degeneralize() to
deterministic automata.
* spot/twaalgos/degen.hh: Adjust documentation.
* tests/core/pdegen.test: New test case.
* tests/Makefile.am: Add it.
* tests/python/pdegen.py: Adjust.
2020-02-15 10:31:28 +01:00
Alexandre Duret-Lutz
bf42b19eff fix is_generalized_rabin() and is_generalized_streett()
* spot/twa/acc.cc: Fix detection of single-pairs gen-Rabin and
gen-Streett.
* tests/core/randaut.test: Add test case.
* NEWS: Mention this issue.
2020-02-15 10:05:27 +01:00
Alexandre Duret-Lutz
443f638b9c relabel: do not create automata with false labels
* spot/twaalgos/relabel.cc: Remove false transitions if
some of the propositions are equivalent to true or false.
* NEWS: Mention the bug.
* tests/core/ltl2tgba2.test: Test it.
2020-02-10 12:05:36 +01:00
Alexandre Duret-Lutz
09bb61db33 _postproc_translate_options: fix syntax error
* python/spot/__init__.py: Here.
* tests/python/except.py: Add test.
* NEWS: Mention the issue.
2020-02-10 11:37:58 +01:00
Alexandre Duret-Lutz
febbe5c2e3 rabin_to_buchi_if_realizable: new function
* spot/twaalgos/remfin.cc, spot/twaalgos/remfin.hh: Implement it.
* tests/python/tra2tba.py: Test it.
* NEWS: Mention it.
2020-02-05 17:44:45 +01:00
Alexandre Duret-Lutz
b733d486be fix degeneralize_tba after accepting transition
* spot/twaalgos/degen.cc (degeneralize_tba): Here.
* tests/python/pdegen.py, tests/python/simstate.py: Adjust expected
values.
* NEWS: Mention the bug.
2020-02-03 15:38:51 +01:00
Alexandre Duret-Lutz
f9e75de647 partial_degeneralize: a support for disjunction of Fin
* spot/twaalgos/degen.cc, spot/twaalgos/degen.hh: Implement this.
Also throw a runtime error in case were todegen does not match any
subformula.
* tests/python/pdegen.py: Add tests.
2020-02-03 11:08:20 +01:00
Alexandre Duret-Lutz
f1008c156b improve partial_degeneralize() on several cases
On these 4 cases, added to pdegen.py, and supplied by Florian Renkin,
partial_degeneralize() is now at least as good as degeneralize_tba(),
and sometimes better.  This is achieved as follows: (1) a
propagate_marks procedure is introduced to propagate marks as far as
possible on the automaton (e.g., common outgoing marks can be push
onto the incoming transitions and vice-versa), (2) the
degeneralization order is compute dynamically, and (3) whenever and
fully-accepting transition is taken in the original automaton, the
destination level is chosen to be the highest existing level.

* spot/twaalgos/degen.cc,
spot/twaalgos/degen.hh (propagate_marks_vector, propagate_marks_here):
New functions.
(partial_degeneralize): Improve, as described above.
* tests/python/pdegen.py: Add test cases.
2020-02-03 09:52:54 +01:00
Alexandre Duret-Lutz
50c0f880dc Inf(i)|Inf(j) -> Inf(k) and Fin(i)&Fin(j) -> Fin(k)
Implement those rules in simplify_acceptance_here().

* NEWS: Mention the change.
* spot/twa/acc.cc,
spot/twa/acc.hh (acc_cond::acc_code::used_once_sets): New method.
* spot/twaalgos/cleanacc.cc, spot/twaalgos/cleanacc.hh:
Implement the above rule.
* tests/core/remfin.test: Adjust expected results.
* tests/python/simplacc.py: New file.
* tests/Makefile.am: Add it.
2020-01-28 09:37:28 +01:00