sccinfo: fix accepting run computation

* spot/twaalgos/sccinfo.cc (scc_info::get_accepting_run): Ignore edges
whose colors are not part of the colors gathered in the SCC up to
deciding acceptance.
* tests/python/genem.py: New test case, reported by Clément Tamines.
* THANKS: Add him.
* NEWS: Mention the bug.
This commit is contained in:
Alexandre Duret-Lutz 2022-01-14 15:46:53 +01:00
parent 890423936f
commit fc92c88cdb
4 changed files with 19 additions and 6 deletions

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2014-2021 Laboratoire de Recherche et Développement
// Copyright (C) 2014-2022 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
@ -637,8 +637,8 @@ namespace spot
const unsigned start = (unsigned)substart;
// Cycle search
acc_cond actual_cond = acccond.restrict_to(node.acc_marks())
.force_inf(node.acc_marks());
acc_cond::mark_t allc = node.acc_marks();
acc_cond actual_cond = acccond.restrict_to(allc).force_inf(allc);
assert(!actual_cond.uses_fin_acceptance());
assert(!actual_cond.is_f());
acc_cond::mark_t acc_to_see = actual_cond.accepting_sets(node.acc_marks());
@ -650,7 +650,7 @@ namespace spot
[&](const twa_graph::edge_storage_t& t)
{
// Stay in the specified SCC.
return scc_of(t.dst) != scc || filter(t);
return scc_of(t.dst) != scc || filter(t) || !t.acc.subset(allc);
},
[&](const twa_graph::edge_storage_t& t)
{