This was discussed in the comments of
https://github.com/adl/hoaf/issues/39
* src/hoaparse/hoaparse.yy: Rename defined_states as info_states
and keep additional information about states in this vector to
diagnose undefined states.
* src/tgbatest/hoaparse.test: Add a test case.
* src/hoaparse/hoaparse.yy, src/hoaparse/hoascan.ll,
src/hoaparse/parsedecl.hh, src/hoaparse/public.hh:
Add a way to read automata from a file descriptor.
* wrap/python/spot.py: Add machinery to read from
pipes.
* wrap/python/tests/piperead.ipynb: New file.
* wrap/python/tests/Makefile.am: Add it.
* wrap/python/tests/run.in: Setup PATH.
* src/hoaparse/fmterror.cc, src/hoaparse/public.hh,
src/hoaparse/hoaparse.yy (hoa_stream_parser::parse_strict): New method
that raises an exception whenever a syntax error is encountered.
* src/ltlparse/public.hh (parse_error): Move ...
* src/misc/common.hh: ... here.
* wrap/python/spot_impl.i: Wrap the hoa output.
* wrap/python/spot.py: Implement spot.automata.
* wrap/python/tests/automata-io.ipynb: New test.
* wrap/python/tests/Makefile.am: Add it.
Also get rid of the lbt_parser, and fix the LBT support of the HOA
parser.
* doc/org/ltlcross.org, doc/org/ltldo.org: Update.
* src/bin/common_trans.cc, src/bin/common_trans.hh: Add support for
%O, and keep %T,%N,%H as hidden aliases without disabling them.
* src/bin/ltlcross.cc, src/bin/ltldo.cc, src/tgbatest/ltl2tgba.cc:
Call hoa_parse instead of lbt_parse.
* src/hoaparse/hoaparse.yy: Improve error reporting from LBT.
* src/hoaparse/hoascan.ll: Fix typos preventing parsing of
LBT files with more than 10 states.
* src/tgbaalgos/lbtt.cc, src/tgbaalgos/lbtt.hh: Delete the lbt
parser.
* src/tgbatest/lbttparse.test: Adjust the expected error message.
* NEWS: Update.
Report from Tomáš Babiak and František Blahoudek
See also https://github.com/adl/hoaf/issues/36
Also fix a typo in the handling of Fin(1)&Fin(!1) while we are at it.
* src/hoaparse/hoaparse.yy: Here.
* src/tgbatest/hoaparse.test: Add tests.
* src/tgbaalgos/neverclaim.cc: Here.
* src/hoaparse/hoaparse.yy: Use set_acceptance_conditions() to set
the number of acceptance sets. Otherwise, the single_acc_set property
is not set.
* src/tgbaalgos/postproc.cc: When expecting a BA or a monitor, do not do
anything if the input is already a BA or a monitor.
* src/tgbatest/hoaparse.test: Add a test case.
* src/tgbatest/readsave.test: Adjust.
* src/hoaparse/hoaparse.yy: If we have multiple initial states, but
one of them has no incoming edge, use this state instead of the fake
initial state we normally add.
* src/tgbatest/hoaparse.test: Add test case.
The namespace dstaryy was declared inline and then reopened as
non-inline. Likewise for hoayy. Let's use different names.
* src/dstarparse/dstarparse.yy, src/hoaparse/hoaparse.yy: Here.
autfilt would segfault after reading any file, because the local result_
structure used in hoaparse has the same name as the local result_
structure used in dstarparse. For some reason I can only see this
problem using clang-3.5, not with gcc.
* src/dstarparse/dstarparse.yy, src/hoaparse/hoaparse.yy: Declare both
structures in a different namespace.
* src/hoaparse/hoaparse.yy: validate deterministic and
complete when parsing HOA. Also set the deterministic
property on the TGBA.
* src/tgbatest/hoaparse.test: Test errors.
* src/hoaparse/hoaparse.yy: Fix a map with properties, and use it to
report error when state-label or trans-label are misused.
* src/tgbatest/hoaparse.test: Test that.
* src/hoaparse/hoaparse.yy: forward the error messages
from lbt_parse().
* src/hoaparse/hoascan.ll: Minor cleanups.
* src/tgbatest/lbttparse.test: Test it.
This is probably the worse grammar I wrote: the LBTT format is designed
to be scanned with scanf, and very inconvenient to parse with
bison/flex. Here the scanner basically has to emulate a parser to
classify the different INTs as tokens with different types.
* src/hoaparse/hoaparse.yy, src/hoaparse/hoascan.ll: Add rules for LBTT.
* src/hoaparse/parsedecl.hh: Add a way to reset the parser between each
automata.
* src/tgbatest/hoaparse.test, src/tgbatest/lbttparse.test: Add more
tests.
* src/tgba/tgba.hh, src/tgba/tgba.cc (set_named_prop): Add a template
version.
(get_named_prop): Hide the old version, and supply a template version
that casts.
* src/bin/ltlcross.cc, src/hoaparse/hoaparse.yy, src/tgbaalgos/hoa.cc,
src/tgbaalgos/product.cc: Adjust usage.
This fixes#6.
* src/graph/graph.hh: Rename the old transitions() as
transition_vector(), and implement a new transitions() that iterates
only on non-dead transitions.
* src/tgba/tgbagraph.hh, src/tgba/tgbagraph.cc, src/graph/ngraph.hh:
Adjust wrappers.
* src/hoaparse/hoaparse.yy, src/tgbaalgos/complete.cc,
src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc,
src/tgbaalgos/randomize.cc, src/tgbaalgos/safety.cc: Adjust calls.
Location tracking was incorrect for multi-line
strings/comments/parentheses. This also fixes and tests recovery on
inclosed strings/comments/parentheses.
* src/hoaparse/hoaparse.yy: Abort on expected EOF.
* src/hoaparse/hoascan.ll: Track newlines inside strings and comments.
Do not use unput() to close incomplete parentheses.
* src/tgbatest/neverclaimread.test, src/tgbatest/hoaparse.test: Add
more tests.
* src/graph/ngraph.hh (alias_states): Deal with the case
of aliasing two existing states.
* src/hoaparse/hoaparse.yy: Fix handling of aliased states.
* src/tgbatest/neverclaimread.test: Augment test case.
This way we can easily parse a stream of HOAs intermixed with
neverclaims.
* src/hoaparse/hoaparse.yy, src/hoaparse/hoascan.ll: Add rules
for neverclaims, adjusted from src/neverparse/neverclaimparse.yy
and src/neverparse/neverclaimparse.ll.
* src/hoaparse/public.hh, NEWS: Update documentation.
* src/neverparse/: Remove this directory.
* README, configure.ac, src/Makefile.am: Adjust accordingly.
* src/tgbatest/ltl2tgba.cc, src/bin/ltlcross.cc: Use HOA
parser to read neverclaims.
* src/tgbatest/hoaparse.test, src/tgbatest/neverclaimread.test: Adjust.
* src/hoaparse/hoaparse.yy: Improve error reporting
in case labeled edges are mixed with unlabeled edges.
* src/hoaparse/hoascan.ll: Fix handling of nested comments.
* src/tgbatest/hoaparse.test: More coverage.
* src/hoaparse/parsedecl.hh (hoa_abort): New structure.
* src/hoaparse/hoascan.ll: Throw hoa_abort on --ABORT--.
* src/hoaparse/hoaparse.yy: Deal with this exception.
* src/hoaparse/public.hh: Add a boolean flag to mark aborted automata.
* src/bin/autfilt.cc: Report aborted automata.
* src/tgbatest/hoaparse.test: Add test case.
* src/hoaparse/hoaparse.yy: Allocate state after parsing the entire
header, not right after passing "States:".
* src/tgbatest/hoaparse.test: Reflect improved error message
about initial state.
* src/hoaparse/hoaparse.yy: Improve error recovery,
and fix location tracking in streams.
* src/hoaparse/public.hh: Store the last location so
that the next parse start at the correct position.
* src/bin/autfilt.cc: Stop parsing a stream on irrecoverable errors.
* src/tgbatest/hoaparse.test: Adjust tests.