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.
This commit is contained in:
Alexandre Duret-Lutz 2019-03-30 11:03:03 +01:00
parent 0d9c81a6d9
commit 55db24e00e
7 changed files with 256 additions and 48 deletions

View file

@ -1244,3 +1244,12 @@ class twa_word:
"""
from IPython.display import SVG
return SVG(self.as_svg())
# Make scc_and_mark filter usable as context manager
@_extend(scc_and_mark_filter)
class scc_and_mark_filter:
def __enter__(self):
return self
def __exit__(self, exc_type, exc_value, traceback):
self.restore_acceptance()

View file

@ -832,7 +832,6 @@ def state_is_accepting(self, src) -> "bool":
std::string __str__() { return spot::str_psl(*self); }
}
%runtime %{
#include <memory>