introduce is_obligation(f)

This is not optimal yet because it still construct a minimal WDBA
internally, but it's better than the previous way to call
minimize_obligation() since it can avoid constructing the minimized
automaton in a few more cases.

* spot/tl/hierarchy.cc, spot/tl/hierarchy.hh: Introduce
is_obligation().
* bin/ltlfilt.cc: Wire it to --obligation.
* spot/twaalgos/minimize.cc: Implement is_wdba_realizable(),
needed by the above.
* tests/core/obligation.test: Test it.
* bin/man/spot-x.x, NEWS: Document it.
This commit is contained in:
Alexandre Duret-Lutz 2017-11-15 21:51:33 +01:00
parent f7ee9ed18e
commit 50fe34a55a
7 changed files with 214 additions and 29 deletions

View file

@ -732,7 +732,7 @@ namespace
// Because this is costly, we compute it later, so that we don't
// have to compute it on formulas that have been discarded for
// other reasons.
if (obligation)
if (obligation && (safety || guarantee))
{
if (!aut)
aut = ltl_to_tgba_fm(f, simpl.get_dict(), true);
@ -752,10 +752,10 @@ namespace
matched &= !safety || is_safety_automaton(min, &si);
}
}
else if (obligation) // just obligation, not safety or guarantee
matched &= is_obligation(f, aut);
else if (persistence)
matched &= spot::is_persistence(f);
else if (recurrence)
matched &= spot::is_recurrence(f, aut);
}

View file

@ -99,6 +99,23 @@ 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_O_CHECK\fR
Specifies the default algorithm that should be used
by the \f(CWis_obligation()\fR function. The value should
be one of the following:
.RS
.IP 1
Make sure that the formula and its negation are
realizable by non-deterministic co-Büchi automata.
.IP 2
Make sure that the formula and its negation are
realizable by deterministic Büchi automata.
.IP 3
Make sure that the formula is realizable
by a weak and deterministic Büchi automata.
.RE
.TP
\fBSPOT_OOM_ABORT\fR
If this variable is set, Out-Of-Memory errors will \f(CWabort()\fR the