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.
This commit is contained in:
Alexandre Duret-Lutz 2017-08-01 18:03:06 +02:00
parent d3607a7ce3
commit eb8df6d72c
5 changed files with 33 additions and 5 deletions

View file

@ -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;
}
}