Commit graph

8 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
6d9d35c985 acc: turn some assertions into exceptions
* spot/misc/bitset.cc, spot/misc/bitset.hh (set, clear):
Turn asserts into exceptions.
* spot/twa/acc.hh (mark_t): As a consequence, the
constructor is not noexcept anymore.
* tests/core/acc.cc, tests/python/except.py: More tests.
2018-05-26 09:44:18 +02:00
Alexandre Duret-Lutz
b12eb0508f fix and check shifting issue
The exception raised by << and >> when shifting mark_t by too many
bits are only enabled in SPOT_DEBUG, as those operations are quite
low-level.  However we were always testing them, and although we
wanted them to be active in Python, it was not always the case.

* spot/twa/acc.hh: introduce max_accsets() as
a static constexpr method, so we can see it in Python.
* spot/misc/bitset.hh: Fix preprocessing directive
so the check is actually enabled when compiling the Python
bindings.
* bin/autcross.cc, bin/autfilt.cc, bin/ltlcross.cc: Use max_accsets().
* tests/core/acc.cc: Comment out the shifting exception when
SPOT_DEBUG is unset.
* tests/python/except.py: Make sure the exception is always raised in
Python.
2018-05-25 16:08:00 +02:00
Alexandre Duret-Lutz
23e0d718fd * tests/python/except.py: Make sure exceptions are raised. 2018-05-25 14:44:34 +02:00
Alexandre Duret-Lutz
00c3271c72 python: tests exceptions raised by is_weak_scc() and friends
* tests/python/except.py: Here.
2018-05-18 20:50:48 +02:00
Alexandre Duret-Lutz
7a65bdf6bc specialized translation for GF(guarantee) and FG(safety)
This is adapted from a proposition in a paper by J. Esparza,
J. Křentínský, and S. Sickert, submitted to LICS'18.  We should add
proper references to the code and documentation once that paper is
accepted.

* spot/twaalgos/gfguarantee.cc, spot/twaalgos/gfguarantee.hh:
New files.
* spot/twaalgos/Makefile.am, python/spot/impl.i: Add them.
* spot/twa/fwd.hh: Add a forward declaration of bdd_dict_ptr.
* spot/twaalgos/postproc.cc, spot/twaalgos/postproc.hh: Make it
possible to call finalize() from the translator subclass.  Constify
all the do_* functions while we are there.
* spot/twaalgos/translate.cc, spot/twaalgos/translate.hh: Add
a "gf-guarantee" option to decide whether to use the new translation.
* bin/spot-x.cc: Document it.
* tests/core/dca2.test, tests/core/genltl.test,
tests/core/ltl2tgba2.test, tests/core/parity2.test,
tests/core/satmin.test, tests/python/automata.ipynb,
tests/python/sbacc.py: Adjust test cases.
* tests/python/except.py: Add a couple more tests.
2018-03-28 18:20:46 +02:00
Alexandre Duret-Lutz
028b56d511 twa_run: better protection against empty cycles
Fixes #337.

* spot/twaalgos/emptiness.cc, spot/twaalgos/emptiness.hh: Here.
* tests/python/except.py: Test it.
* NEWS: Mention the issue.
2018-03-16 17:12:26 +01:00
Maximilien Colange
1ebd86de04 Improve IAR construction
spot::iar() was fixed to handle correctly Rabin-like conditions.
It also now supports Streett-like conditions.

* NEWS, spot/twaalgos/postproc.cc: document it
* spot/twaalgos/rabin2parity.cc, spot/twaalgos/rabin2parity.hh:
  implement it
* tests/core/rabin2parity.test, tests/python/except.py: test it
2018-01-24 09:27:37 +01:00
Alexandre Duret-Lutz
527c802511 more coverage
* python/spot/impl.i: Add missing bindings from remprop.hh
* tests/python/except.py: New file to test several error cases.
* tests/Makefile.am: Add it.
* spot/twaalgos/rabin2parity.cc (iar): Fix error message.
2018-01-19 21:19:36 +01:00