is_unambiguous: fix false negatives again

Reported by Simon Jantsch and David Müller.

* spot/twaalgos/isunamb.cc (is_unambiguous): Rewrite wihtout assuming
that the product of two accepting SCCs is accepting,  Also use
the result of is_accepting_scc()/is_rejectng_scc() when available.
* spot/twaalgos/sccinfo.cc, spot/twaalgos/sccinfo.hh: Make it
possible to check the acceptance of a unique SCC.
* tests/core/unambig.test: Add more test cases.
This commit is contained in:
Alexandre Duret-Lutz 2018-04-15 13:51:39 +02:00
parent 978cebe606
commit 965ae855c2
4 changed files with 107 additions and 32 deletions

View file

@ -583,10 +583,20 @@ namespace spot
return node(scc).is_rejecting();
}
// Study the SCC that are currently reported neither as accepting
// nor rejecting because of the presence of Fin sets
/// \brief Study the SCCs that are currently reported neither as
/// accepting nor as rejecting because of the presence of Fin sets
///
/// This simply calls check_scc_emptiness() on undeterminate SCCs.
void determine_unknown_acceptance();
/// \brief Recompute whether an SCC is accepting or not.
///
/// This is an internal function of
/// determine_unknown_acceptance(). The Boolean vector k will be
/// used by the method to mark the state that belong to the SCC.
/// It can be shared between multiple calls.
bool check_scc_emptiness(unsigned n, std::vector<bool>* k);
bool is_useful_scc(unsigned scc) const
{
if (SPOT_UNLIKELY(!!(options_ & scc_info_options::STOP_ON_ACC)))