add support for the "terminal" property
* src/twa/twa.hh: Store the terminal property. * src/twaalgos/hoa.cc, src/parseaut/parseaut.yy: Add I/O for "terminal". * src/twaalgos/ltl2tgba_fm.cc, src/twaalgos/minimize.cc: Set terminal as apropriate. * src/twaalgos/safety.cc: Use it. * doc/org/tut21.org, doc/org/hoa.org, NEWS: Document it. * src/tests/complement.test, src/tests/monitor.test, wrap/python/tests/automata-io.ipynb: Adjust.
This commit is contained in:
parent
654888718c
commit
0c5f87b442
12 changed files with 68 additions and 29 deletions
|
|
@ -425,7 +425,9 @@ namespace spot
|
|||
prop(" stutter-invariant");
|
||||
if (aut->prop_stutter_sensitive())
|
||||
prop(" stutter-sensitive");
|
||||
if (aut->prop_weak())
|
||||
if (aut->prop_terminal())
|
||||
prop(" terminal");
|
||||
if (aut->prop_weak() && (verbose || !aut->prop_terminal()))
|
||||
prop(" weak");
|
||||
if (aut->prop_inherently_weak() && (verbose || !aut->prop_weak()))
|
||||
prop(" inherently-weak");
|
||||
|
|
|
|||
|
|
@ -1972,6 +1972,8 @@ namespace spot
|
|||
}
|
||||
bdd all_events = observable_events | unobservable_events;
|
||||
|
||||
auto orig_f = f2;
|
||||
|
||||
// This is in case the initial state is equivalent to true...
|
||||
if (symb_merge)
|
||||
f2 = fc.canonize(f2);
|
||||
|
|
@ -2172,9 +2174,6 @@ namespace spot
|
|||
}
|
||||
}
|
||||
|
||||
// Set the following to true to preserve state names.
|
||||
a->release_formula_namer(namer, false);
|
||||
|
||||
auto& acc = a->acc();
|
||||
unsigned ns = a->num_states();
|
||||
for (unsigned s = 0; s < ns; ++s)
|
||||
|
|
@ -2185,10 +2184,18 @@ namespace spot
|
|||
|
||||
a->prop_inherently_weak(f2.is_syntactic_persistence());
|
||||
a->prop_stutter_invariant(f2.is_syntactic_stutter_invariant());
|
||||
if (orig_f.is_syntactic_guarantee())
|
||||
{
|
||||
a->prop_terminal(true);
|
||||
assert(a->num_sets() <= 1);
|
||||
}
|
||||
|
||||
// Currently the unambiguous option work only with LTL.
|
||||
a->prop_unambiguous(f2.is_ltl_formula() && unambiguous);
|
||||
|
||||
// Set the following to true to preserve state names.
|
||||
a->release_formula_namer(namer, false);
|
||||
|
||||
if (!simplifier)
|
||||
// This should not be deleted before we have registered all propositions.
|
||||
delete s;
|
||||
|
|
|
|||
|
|
@ -584,6 +584,16 @@ namespace spot
|
|||
res->prop_copy(a, { false, false, false, true });
|
||||
res->prop_deterministic(true);
|
||||
res->prop_weak(true);
|
||||
// If the input was terminal, then the output is also terminal.
|
||||
// FIXME:
|
||||
// (1) We should have a specialized version of this function for
|
||||
// the case where the input is terminal. See issue #120.
|
||||
// (2) It would be nice to have a more precise detection of
|
||||
// terminal automata in the output. Calling
|
||||
// is_guarantee_automaton() seems overkill here. But maybe we can
|
||||
// add a quick check inside minimize_dfa.
|
||||
if (a->prop_terminal())
|
||||
res->prop_terminal(true);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ namespace spot
|
|||
is_guarantee_automaton(const const_twa_graph_ptr& aut,
|
||||
scc_info* si)
|
||||
{
|
||||
if (aut->prop_terminal())
|
||||
return true;
|
||||
// Create an scc_info if the user did not give one to us.
|
||||
bool need_si = !si;
|
||||
if (need_si)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue