use the generic emptiness check

* spot/twa/twa.cc (is_empty, intersects): Here.
* spot/twaalgos/sccinfo.cc (check_scc_emptiness): Here.
* spot/twaalgos/genem.cc: Report error if the input is alternating.
* spot/twaalgos/isunamb.cc, spot/twaalgos/sccinfo.hh: Adjust.
* NEWS: Mention the change.
This commit is contained in:
Alexandre Duret-Lutz 2018-07-24 10:54:36 +02:00
parent 86b6506268
commit da996ecbaf
6 changed files with 51 additions and 18 deletions

View file

@ -207,6 +207,9 @@ namespace spot
bool generic_emptiness_check(const const_twa_graph_ptr& aut)
{
if (SPOT_UNLIKELY(!aut->is_existential()))
throw std::runtime_error("generic_emptiness_check() "
"does not support alternating automata");
auto aut_ = std::const_pointer_cast<twa_graph>(aut);
acc_cond old = aut_->acc();
bool res = generic_emptiness_check_main_nocopy<true>(aut_);
@ -217,6 +220,9 @@ namespace spot
bool generic_emptiness_check_for_scc(const scc_info& si,
unsigned scc)
{
if (SPOT_UNLIKELY(!si.get_aut()->is_existential()))
throw std::runtime_error("generic_emptiness_check_for_scc() "
"does not support alternating automata");
return generic_emptiness_check_for_scc_nocopy<true>(si, scc);
}
}