parseaut: Add a trust_hoa option.
Fixes #114. * src/parseaut/public.hh: Add support for a trust_hoa option. * src/parseaut/parseaut.yy: If trust_hoa is set, recognize the "inherently-weak" and "stutter-invariant" properties. * src/bin/common_conv.cc, src/bin/common_conv.hh (read_automaton): Move... * src/bin/common_hoaread.cc, src/bin/common_hoaread.hh: ... in this new file, that also handle the --trust-hoa option. * src/bin/Makefile.am: Add them. * src/bin/autfilt.cc, src/bin/dstar2tgba.cc, src/bin/ltlcross.cc, src/bin/ltldo.cc: Use them. * src/tests/parseaut.test, src/tests/ltldo.test: Adjust, and test --trust-hoa=no. * src/tests/complement.test, src/tests/prodor.test, src/tests/sbacc.test: Adjust. * wrap/python/spot.py (automata): Add option trust_hoa. * NEWS: Update.
This commit is contained in:
parent
585e29e7d8
commit
51a75a316d
18 changed files with 221 additions and 38 deletions
|
|
@ -297,7 +297,8 @@ class formula:
|
|||
raise ValueError("unknown type of formula")
|
||||
|
||||
|
||||
def automata(*sources, timeout=None, ignore_abort=True, debug=False):
|
||||
def automata(*sources, timeout=None, ignore_abort=True,
|
||||
trust_hoa=True, debug=False):
|
||||
"""Read automata from a list of sources.
|
||||
|
||||
Parameters
|
||||
|
|
@ -306,13 +307,16 @@ def automata(*sources, timeout=None, ignore_abort=True, debug=False):
|
|||
These sources can be either commands (end with `|`),
|
||||
textual represantations of automata (contain `\n`),
|
||||
or filenames (else).
|
||||
timeout_error : int, optional
|
||||
timeout : int, optional
|
||||
Number of seconds to wait for the result of a command.
|
||||
If None (the default), not limit is used.
|
||||
ignore_abort : bool, optional
|
||||
If True (the default), skip HOA atomata that ends with
|
||||
`--ABORT--`, and return the next automaton in the stream.
|
||||
If False, aborted automata are reported as syntax errors.
|
||||
trust_hoa : bool, optional
|
||||
If True (the default), supported HOA properies that
|
||||
cannot be easily verified are trusted.
|
||||
debug : bool, optional
|
||||
Whether to run the parser in debug mode.
|
||||
|
||||
|
|
@ -366,6 +370,7 @@ def automata(*sources, timeout=None, ignore_abort=True, debug=False):
|
|||
o = automaton_parser_options()
|
||||
o.debug = debug
|
||||
o.ignore_abort = ignore_abort
|
||||
o.trust_hoa = trust_hoa
|
||||
for filename in sources:
|
||||
try:
|
||||
p = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue