zlktree: implement ACD and its transform
A quick and dirty implementation of the Alternating Cycle Decomposition of the casares.21.icalp paper. * spot/twaalgos/genem.cc, spot/twaalgos/genem.hh (maximal_accepting_loops_for_scc): New function. * spot/twaalgos/sccinfo.cc, spot/twaalgos/sccinfo.hh (scc_and_mark_filter): Add a possibility to specify a mask of transition to filter. * spot/twaalgos/zlktree.hh, spot/twaalgos/zlktree.cc (acd): New class. (acd_transform): New function. * python/spot/__init__.py: Add SVG rendering for acd. * tests/python/_zlktree.ipynb: Play with acd and acd_transform. * tests/python/toparity.py: Add more tests to compare the sizes of acd_transform and to_parity. * NEWS: Mention this new feature.
This commit is contained in:
parent
8c5bb6c2eb
commit
26f2179805
10 changed files with 4657 additions and 144 deletions
|
|
@ -436,6 +436,14 @@ class zielonka_tree:
|
|||
self.dot(ostr)
|
||||
return _ostream_to_svg(ostr)
|
||||
|
||||
@_extend(acd)
|
||||
class acd:
|
||||
def _repr_svg_(self):
|
||||
"""Output the ACD as SVG"""
|
||||
ostr = ostringstream()
|
||||
self.dot(ostr)
|
||||
return _ostream_to_svg(ostr)
|
||||
|
||||
|
||||
def automata(*sources, timeout=None, ignore_abort=True,
|
||||
trust_hoa=True, no_sid=False, debug=False,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue