Commit eb8df6d7 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

parseaut: allow the univ-branch diagnostics to be ignored

* spot/parseaut/parseaut.yy: Check the SPOT_HOA_TOLERANT variable.
* tests/core/ltl3ba.test, tests/core/parseaut.test: Adjust test cases.
* NEWS, bin/man/spot-x.x: Mention SPOT_HOA_TOLERANT.
parent d3607a7c
......@@ -181,6 +181,11 @@ New in spot 2.3.5.dev (not yet released)
been adjusted to these new semantics, see "Backward-incompatible
changes" below.
- The parser for HOA now recognize and verifies correct use of the
"univ-branch" property. This is known to be a problem with option
-H1 of ltl3ba 1.1.2 and ltl3dra 0.2.3, so the environment variable
SPOT_HOA_TOLERANT can be set to disable the diagnostic.
Python:
- The 'spot.gen' package exports the functions from libspotgen.
......
......@@ -91,6 +91,14 @@ The contents of this variable is added to any dot output, immediately
before the first state is output. This makes it easy to override
global attributes of the graph.
.TP
\fBSPOT_HOA_TOLERANT\fR
If this variable is set, a few sanity checks performed by the HOA
parser are skipped. The tests in questions correspond to issues
in third-party tools that output incorrect HOA (e.g., declaring
the automaton with property "univ-branch" when no universal branching
is actually used)
.TP
\fBSPOT_SATLOG\fR
If set to a filename, the SAT-based minimization routines will append
......
......@@ -1110,18 +1110,25 @@ body: states
error(p.loc, "... despite 'properties: !deterministic'");
det_warned = true;
}
if (res.universal.is_true() && !det_warned)
static bool tolerant = getenv("SPOT_HOA_TOLERANT");
if (res.universal.is_true() && !det_warned && !tolerant)
if (auto p = res.prop_is_true("exist-branch"))
{
error(@1, "automaton has no existential branching...");
error(p.loc, "... despite 'properties: exist-branch'");
error(p.loc, "... despite 'properties: exist-branch'\n"
"note: If this is an issue you cannot fix, you may disable "
"this diagnostic\n by defining the SPOT_HOA_TOLERANT "
"environment variable.");
det_warned = true;
}
if (res.existential.is_true() && !det_warned)
if (res.existential.is_true() && !det_warned && !tolerant)
if (auto p = res.prop_is_true("univ-branch"))
{
error(@1, "automaton is has no universal branching...");
error(p.loc, "... despite 'properties: univ-branch'");
error(p.loc, "... despite 'properties: univ-branch'\n"
"note: If this is an issue you cannot fix, you may disable "
"this diagnostic\n by defining the SPOT_HOA_TOLERANT "
"environment variable.");
det_warned = true;
}
}
......
......@@ -29,7 +29,11 @@ set -e
(ltl3ba -v) || exit 77
# The -H1 option will output alternating automata, so this tests
# ltlcross's support in this area.
# ltlcross's support in this area. However ltl3ba 1.1.3 incorrectly
# output "univ-branch" for all automata produced by -H1, causing
# error messages from Spot's parser unless SPOT_HOA_TOLERANT is set.
SPOT_HOA_TOLERANT=1
export SPOT_HOA_TOLERANT
# Using '_x' as first formula makes sure that ltlcross automatically
# relabels the input formula when the atomic propositions are not
# compatible with Spin's syntax.
......
......@@ -783,12 +783,16 @@ input:62.1-64.6: automaton has existential branching...
input:57.13-25: ... despite 'properties: !exist-branch'
input:58.9-64.6: automaton is has no universal branching...
input:57.27-37: ... despite 'properties: univ-branch'
note: If this is an issue you cannot fix, you may disable this diagnostic
by defining the SPOT_HOA_TOLERANT environment variable.
input:68.1-10: conjunct initial state despite...
input:71.26-37: ... property: !univ-branch
input:91.6-8: universal branch used despite previous declaration...
input:85.26-37: ... here
input:86.9-91.8: automaton has no existential branching...
input:85.13-24: ... despite 'properties: exist-branch'
note: If this is an issue you cannot fix, you may disable this diagnostic
by defining the SPOT_HOA_TOLERANT environment variable.
input:106.6-9: we can read HOA v1 but this file uses v1.1; $t
input:108.1-10: conjunct initial state despite...
input:111.13-25: ... property: deterministic
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment