add support for the weak property
This fixes #119. * doc/org/tut21.org, doc/org/hoa.org, NEWS: Document it. * src/twa/twa.hh: Support it in automata. * src/twaalgos/hoa.cc, src/parseaut/parseaut.yy: Add I/O support. * src/twaalgos/minimize.cc, src/twaalgos/totgba.cc: Set weak automata on output. * src/tests/complement.test, src/tests/parseaut.test, src/tests/readsave.test, src/tests/remfin.test, src/tests/sccsimpl.test, src/tests/wdba2.test, wrap/python/tests/automata-io.ipynb: Adjust.
This commit is contained in:
parent
eecd201273
commit
654888718c
15 changed files with 62 additions and 33 deletions
|
|
@ -425,7 +425,9 @@ namespace spot
|
|||
prop(" stutter-invariant");
|
||||
if (aut->prop_stutter_sensitive())
|
||||
prop(" stutter-sensitive");
|
||||
if (aut->prop_inherently_weak())
|
||||
if (aut->prop_weak())
|
||||
prop(" weak");
|
||||
if (aut->prop_inherently_weak() && (verbose || !aut->prop_weak()))
|
||||
prop(" inherently-weak");
|
||||
os << nl;
|
||||
|
||||
|
|
|
|||
|
|
@ -482,7 +482,7 @@ namespace spot
|
|||
auto res = minimize_dfa(det_a, final, non_final);
|
||||
res->prop_copy(a, { false, false, false, true });
|
||||
res->prop_deterministic(true);
|
||||
res->prop_inherently_weak(true);
|
||||
res->prop_weak(true);
|
||||
res->prop_state_acc(true);
|
||||
return res;
|
||||
}
|
||||
|
|
@ -583,7 +583,7 @@ namespace spot
|
|||
auto res = minimize_dfa(det_a, final, non_final);
|
||||
res->prop_copy(a, { false, false, false, true });
|
||||
res->prop_deterministic(true);
|
||||
res->prop_inherently_weak(true);
|
||||
res->prop_weak(true);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
@ -605,7 +605,7 @@ namespace spot
|
|||
|
||||
// If the input automaton was already weak and deterministic, the
|
||||
// output is necessary correct.
|
||||
if (aut_f->prop_inherently_weak() && aut_f->prop_deterministic())
|
||||
if (aut_f->prop_weak() && aut_f->prop_deterministic())
|
||||
return min_aut_f;
|
||||
|
||||
// if f is a syntactic obligation formula, the WDBA minimization
|
||||
|
|
@ -654,7 +654,7 @@ namespace spot
|
|||
if (product(min_aut_f, aut_neg_f)->is_empty())
|
||||
{
|
||||
// Complement the minimized WDBA.
|
||||
assert(min_aut_f->prop_inherently_weak());
|
||||
assert(min_aut_f->prop_weak());
|
||||
auto neg_min_aut_f = remove_fin(dtwa_complement(min_aut_f));
|
||||
if (product(aut_f, neg_min_aut_f)->is_empty())
|
||||
// Finally, we are now sure that it was safe
|
||||
|
|
|
|||
|
|
@ -335,7 +335,7 @@ namespace spot
|
|||
res = make_twa_graph(aut->get_dict());
|
||||
res->set_init_state(res->new_state());
|
||||
res->prop_state_acc(true);
|
||||
res->prop_inherently_weak(true);
|
||||
res->prop_weak(true);
|
||||
res->prop_deterministic(true);
|
||||
res->prop_stutter_invariant(true);
|
||||
return res;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue