record properties as side-effect of is_deterministic() / is_weak() / ...

Fixes #165.

* spot/twaalgos/isdet.cc, spot/twaalgos/strength.cc: Here.
* spot/twaalgos/isdet.hh, spot/twaalgos/strength.hh, NEWS: Document it.
* spot/twaalgos/hoa.cc: Fix output of negated properties.
* tests/core/readsave.test: New test case.
This commit is contained in:
Alexandre Duret-Lutz 2016-05-08 15:31:15 +02:00
parent b708ab778f
commit 73621e8f17
7 changed files with 49 additions and 11 deletions

View file

@ -102,7 +102,10 @@ namespace spot
trival v = aut->prop_terminal();
if (v.is_known())
return v.is_true();
return is_type_automaton<true>(std::const_pointer_cast<twa_graph>(aut), si);
bool res =
is_type_automaton<true>(std::const_pointer_cast<twa_graph>(aut), si);
std::const_pointer_cast<twa_graph>(aut)->prop_terminal(res);
return res;
}
bool
@ -111,8 +114,10 @@ namespace spot
trival v = aut->prop_weak();
if (v.is_known())
return v.is_true();
return is_type_automaton<false>(std::const_pointer_cast<twa_graph>(aut),
si);
bool res =
is_type_automaton<false>(std::const_pointer_cast<twa_graph>(aut), si);
std::const_pointer_cast<twa_graph>(aut)->prop_weak(res);
return res;
}
bool
@ -121,8 +126,10 @@ namespace spot
trival v = aut->prop_inherently_weak();
if (v.is_known())
return v.is_true();
return is_type_automaton<false, true>
bool res = is_type_automaton<false, true>
(std::const_pointer_cast<twa_graph>(aut), si);
std::const_pointer_cast<twa_graph>(aut)->prop_inherently_weak(res);
return res;
}
void check_strength(const twa_graph_ptr& aut, scc_info* si)