fix handling of Rabin-like input for dnf_to_dca()
The bug is mentioned by Maximilien Colange in a comment to issue #317, but turned out to be unrelated to that original issue. * spot/twaalgos/totgba.cc (dnf_to_streett): Save the correspondence between the created states an the DNF clause in a named property. * doc/org/concepts.org, spot/twaalgos/totgba.hh: Mention the new property. * spot/twaalgos/cobuchi.cc (save_inf_nca_st): Rewrite using the named property. Relying on seen marks and trying to deduce the matching original clause could only work from plain Rabin. * tests/core/dca.test: Add the test from Maximilien. * NEWS: Mention the issue.
This commit is contained in:
parent
69f31c89c6
commit
81e5357e62
6 changed files with 63 additions and 54 deletions
|
|
@ -402,18 +402,22 @@ namespace spot
|
|||
auto orig_states = new std::vector<unsigned>();
|
||||
orig_states->resize(res_->num_states(), -1U);
|
||||
res_->set_named_prop("original-states", orig_states);
|
||||
|
||||
auto orig_clauses = new std::vector<unsigned>();
|
||||
orig_clauses->resize(res_->num_states(), -1U);
|
||||
res_->set_named_prop("original-clauses", orig_clauses);
|
||||
|
||||
unsigned orig_num_states = in_->num_states();
|
||||
for (unsigned orig = 0; orig < orig_num_states; ++orig)
|
||||
{
|
||||
if (!si_.is_useful_scc(si_.scc_of(orig)))
|
||||
continue;
|
||||
for (const auto& p : st_repr_[orig])
|
||||
(*orig_states)[p.second] = orig;
|
||||
{
|
||||
(*orig_states)[p.second] = orig;
|
||||
(*orig_clauses)[p.second] = p.first;
|
||||
}
|
||||
}
|
||||
#if DEBUG
|
||||
for (unsigned i = 1; i < orig_states->size(); ++i)
|
||||
assert((int)(*orig_states)[i] >= 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
set_acc_condition();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue