zlktree: fix colored output of acd_transform_sbacc()

* spot/twaalgos/zlktree.cc (acd_transform_sbacc): Fix the
acceptance condition when colored is true.
* tests/python/zlktree.py: Add test case.
This commit is contained in:
Alexandre Duret-Lutz 2021-11-10 15:51:13 +01:00
parent 2f528c7190
commit 75b89db5ac
2 changed files with 19 additions and 2 deletions

View file

@ -1107,7 +1107,9 @@ namespace spot
{
src_prio = si.is_trivial(src_scc) ?
scc_max_lvl : theacd.node_level(branch);
if (!scc_max_lvl_can_be_omitted || src_prio != scc_max_lvl)
if (colored
|| !scc_max_lvl_can_be_omitted
|| src_prio != scc_max_lvl)
max_color = std::max(max_color, src_prio);
}
for (auto& i: a->out(s.first))
@ -1141,7 +1143,7 @@ namespace spot
}
else
{
if (!sbacc)
if constexpr (!sbacc)
max_color = std::max(max_color, prio);
res->new_edge(src, dst, i.cond, {prio});
}