parseaut: allow false edges to not be dropped
This is a followup to issue #548, which was caused by edges being dropped. In that context dropping edge was not really desirable, so let's make this behavior configurable. * spot/parseaut/public.hh: Add a new option. * python/spot/__init__.py: Likewise. * spot/parseaut/parseaut.yy: Honor that option. * tests/python/parsetgba.py: Add a short test for it. * NEWS: Mention it.
This commit is contained in:
parent
bed87c60a4
commit
35fca49075
5 changed files with 84 additions and 19 deletions
|
|
@ -564,7 +564,7 @@ function acd{num}_node(node, acc){{
|
|||
|
||||
def automata(*sources, timeout=None, ignore_abort=True,
|
||||
trust_hoa=True, no_sid=False, debug=False,
|
||||
want_kripke=False):
|
||||
want_kripke=False, drop_false_edges=True):
|
||||
"""Read automata from a list of sources.
|
||||
|
||||
Parameters
|
||||
|
|
@ -587,6 +587,9 @@ def automata(*sources, timeout=None, ignore_abort=True,
|
|||
If True, the input is expected to discribe Kripke
|
||||
structures, in the HOA format, and the returned type
|
||||
will be of type kripke_graph_ptr.
|
||||
drop_false_edges : bool, optional
|
||||
If True (the default), edges labeled by false will
|
||||
be ignored during parsing.
|
||||
no_sid : bool, optional
|
||||
When an automaton is obtained from a subprocess, this
|
||||
subprocess is started from a shell with its own session
|
||||
|
|
@ -647,6 +650,7 @@ def automata(*sources, timeout=None, ignore_abort=True,
|
|||
o.trust_hoa = trust_hoa
|
||||
o.raise_errors = True
|
||||
o.want_kripke = want_kripke
|
||||
o.drop_false_edges = drop_false_edges
|
||||
|
||||
for filename in sources:
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue