Commit graph

13 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
fc92c88cdb sccinfo: fix accepting run computation
* spot/twaalgos/sccinfo.cc (scc_info::get_accepting_run): Ignore edges
whose colors are not part of the colors gathered in the SCC up to
deciding acceptance.
* tests/python/genem.py: New test case, reported by Clément Tamines.
* THANKS: Add him.
* NEWS: Mention the bug.
2022-01-14 15:46:53 +01:00
Alexandre Duret-Lutz
9539fbcf4c genem: implement the logic from the future journal version of ATVA19
This version of the generic emptiness-check, using smart selection and
extraction of the Fin (implemented here via fin_one_extract), was
suggested by Jan Strejček on 2020-06-26.

* spot/twaalgos/genem.cc, spot/twaalgos/genem.hh: Add the spot210
variant.  Also use it for the ACD use-case.
* spot/twaalgos/zlktree.cc (zielonka_tree): Also use the same logic
here.
* tests/python/genem.py: Test the new version as well.
2021-09-11 01:08:15 +02: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
935c412df0 remfin: simplify tra_to_tba using generic emptiness check
* spot/twaalgos/remfin.cc (tra_to_tba): Remove the SCC-emptiness
check that was done by creating a temporary automaton.  Use the
scc_info::check_scc_emptiness() function instead.
* spot/twaalgos/sccinfo.cc,
spot/twaalgos/sccinfo.hh (scc_info::check_scc_emptiness): Mark
this function as const.
(scc_and_mark_filter): Make sure we only combine with a lower filter
of the same type.
* spot/twaalgos/genem.cc: Remove one stray debugging statement.
* tests/python/genem.py: Remove a duplicate test.
2019-12-07 12:51:59 +01:00
Alexandre Duret-Lutz
822fe77891 python: cleanup with autopep8
* tests/python/341.py, tests/python/alarm.py, tests/python/bdddict.py,
tests/python/bddnqueen.py, tests/python/bugdet.py,
tests/python/dualize.py, tests/python/except.py, tests/python/gen.py,
tests/python/genem.py, tests/python/implies.py,
tests/python/interdep.py, tests/python/ipnbdoctest.py,
tests/python/kripke.py, tests/python/ltl2tgba.py,
tests/python/ltlf.py, tests/python/ltlparse.py,
tests/python/ltlsimple.py, tests/python/relabel.py,
tests/python/rs_like.py, tests/python/sccsplit.py,
tests/python/semidet.py, tests/python/setacc.py,
tests/python/setxor.py, tests/python/split.py,
tests/python/streett_totgba.py, tests/python/stutter.py,
tests/python/sum.py, tests/python/toparity.py, tests/python/toweak.py,
tests/python/trival.py, python/spot/__init__.py, python/spot/aux.py,
python/spot/jupyter.py: Reformat with autopep8.

fixup! * spot/tl/simplify.cc: Fix typos in tracing code.
2019-07-05 21:22:29 +02:00
Alexandre Duret-Lutz
5c3a33f720 test: add missing copyright boilerplate
* tests/python/genem.py: Here.
2019-05-24 23:26:49 +02:00
Alexandre Duret-Lutz
0623965b43 genem: improve handling of co-Büchi
* spot/twaalgos/sccinfo.cc, spot/twaalgos/sccinfo.hh: Make sure
scc_and_mark_filter does not install a filter if there is nothing
to filter.
* tests/python/genem.py, spot/twaalgos/genem.cc,
python/spot/impl.i: Adjust.
2019-04-12 23:14:29 +02:00
Alexandre Duret-Lutz
2178684528 sccinfo: rename scc_info(x,opt) into scc_info_with_options(x,opt)
* spot/twaalgos/sccinfo.hh, python/spot/impl.i: Here.  This avoid
ambiguities where options (integer in Python) are interpreted as
initial states.
* tests/python/genem.py: Adjust.
2019-04-11 18:06:00 +02:00
Alexandre Duret-Lutz
55db24e00e scc_info: introduce scc_and_mark_filter
* spot/twaalgos/sccinfo.hh, spot/twaalgos/sccinfo.cc: Here.
* spot/twaalgos/genem.cc: Use it.
* python/spot/impl.i, python/spot/__init__.py: Add bindings.
* tests/python/genem.py: Test it.
* NEWS: Mention it.
2019-03-30 12:09:32 +01:00
Alexandre Duret-Lutz
af67c04a67 genem: minor simplifications
* tests/python/genem.py: Use SPOT_ON_ACC explicitely.
* spot/twaalgos/genem.cc: Do not keep track of states.  Don't
check that the clauses of the disjuncts are Fin-less: they aren't
(this was discovered while discussing with Jan and Fanda).
2019-03-19 17:26:14 +01:00
Clément Gillard
51ca5ecdb1 genem: Implement accepting cycle search
Implement an accepting run search in spot::sccinfo, use it with the
generic emptiness check.

* spot/twaalgos/sccinfo.cc, spot/twaalgos/sccinfo.hh: Here.
* spot/twaalgos/genem.cc, spot/twaalgos/genem.hh: Use it.
* tests/python/genem.py: Test it.
2019-02-14 16:25:25 +01:00
Alexandre Duret-Lutz
469d2b4ef4 genem: fix removal of unsatisfied Fin(x) sets
Fixes #360.

* spot/twa/acc.cc, spot/twa/acc.hh (force_inf): New method.
* spot/twaalgos/genem.cc: Fix the emptiness check using force_inf.
* tests/python/genem.py: Add test case and adjust the python
version of the emptiness check.
2018-07-26 16:07:30 +02:00
Alexandre Duret-Lutz
d708174cfe genem: implement a generic emptiness check for twa_graph_ptr
* spot/twa/acc.cc, spot/twa/acc.hh (fin_unit, one_fin): New function.
* spot/twaalgos/genem.cc, spot/twaalgos/genem.hh: New files.
* spot/twaalgos/Makefile.am: Add it.
* tests/python/genem.py: New file.
* tests/Makefile.am: Add it.
* python/spot/impl.i: Add bindings for genem.hh.
* NEWS: Mention the new function.
2018-07-24 13:36:04 +02:00