rename is_guarantee_automaton() as is_terminal_automaton()
* src/twaalgos/safety.hh, src/twaalgos/safety.cc: Here. * src/bin/ltlfilt.cc, src/tests/ikwiad.cc, src/twaalgos/minimize.cc, wrap/python/ajax/spotcgi.in: Adjust. * NEWS: Mention the change.
This commit is contained in:
parent
0c5f87b442
commit
8a8ec21de7
7 changed files with 16 additions and 28 deletions
|
|
@ -590,7 +590,7 @@ namespace spot
|
|||
// 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
|
||||
// is_terminal_automaton() seems overkill here. But maybe we can
|
||||
// add a quick check inside minimize_dfa.
|
||||
if (a->prop_terminal())
|
||||
res->prop_terminal(true);
|
||||
|
|
@ -625,7 +625,7 @@ namespace spot
|
|||
|
||||
// If aut_f is a guarantee automaton, the WDBA minimization must be
|
||||
// correct.
|
||||
if (is_guarantee_automaton(aut_f))
|
||||
if (is_terminal_automaton(aut_f))
|
||||
return min_aut_f;
|
||||
|
||||
// Build negation automaton if not supplied.
|
||||
|
|
@ -654,10 +654,8 @@ namespace spot
|
|||
|
||||
// If the negation is a guarantee automaton, then the
|
||||
// minimization is correct.
|
||||
if (is_guarantee_automaton(aut_neg_f))
|
||||
{
|
||||
return min_aut_f;
|
||||
}
|
||||
if (is_terminal_automaton(aut_neg_f))
|
||||
return min_aut_f;
|
||||
|
||||
bool ok = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@
|
|||
namespace spot
|
||||
{
|
||||
bool
|
||||
is_guarantee_automaton(const const_twa_graph_ptr& aut,
|
||||
scc_info* si)
|
||||
is_terminal_automaton(const const_twa_graph_ptr& aut, scc_info* si)
|
||||
{
|
||||
if (aut->prop_terminal())
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -23,30 +23,18 @@
|
|||
|
||||
namespace spot
|
||||
{
|
||||
/// \brief Whether an automaton represents a guarantee property.
|
||||
/// \brief Whether an automaton is terminal.
|
||||
///
|
||||
/// A weak deterministic TGBA represents a guarantee property if any
|
||||
/// accepting path ends on an accepting state with only one
|
||||
/// transition that is a self-loop labelled by true.
|
||||
///
|
||||
/// Note that in the general case, this is only a sufficient
|
||||
/// condition : some guarantee automata might not be recognized with
|
||||
/// this check e.g. because of some non-determinism in the
|
||||
/// automaton. In that case, you should interpret a \c false return
|
||||
/// value as "I don't know".
|
||||
///
|
||||
/// If you apply this function on a weak deterministic TGBA
|
||||
/// (e.g. after a successful minimization with
|
||||
/// minimize_obligation()), then the result leaves no doubt: false
|
||||
/// really means that the automaton is not a guarantee property.
|
||||
/// An automaton is terminal if any accepting path ends on an
|
||||
/// accepting state with only one transition that is a self-loop
|
||||
/// labelled by true.
|
||||
///
|
||||
/// \param aut the automaton to check
|
||||
///
|
||||
/// \param sm an scc_info object for the automaton if available (it
|
||||
/// will be built otherwise).
|
||||
SPOT_API bool
|
||||
is_guarantee_automaton(const const_twa_graph_ptr& aut,
|
||||
scc_info* sm = nullptr);
|
||||
is_terminal_automaton(const const_twa_graph_ptr& aut, scc_info* sm = nullptr);
|
||||
|
||||
/// \brief Whether a minimized WDBA represents a safety property.
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue