game: fix solving "parity min" games with multi-colored edges

* spot/twaalgos/game.cc: If the original acceptance is "parity min",
use min_set(), not max_set(), to read edge priorities.
* tests/python/game.py: Add a test case.
* NEWS: Mention the bug.
This commit is contained in:
Alexandre Duret-Lutz 2024-08-30 16:05:50 +02:00
parent c5d991e55c
commit 89a06772b8
3 changed files with 31 additions and 2 deletions

View file

@ -357,7 +357,8 @@ namespace spot
// Takes an edge and returns the "equivalent" max odd parity
auto equiv_par = [max, odd, next_max_par, inv = 2*max-1](const auto& e)
{
par_t e_par = e.acc.max_set() - 1; // -1 for empty
par_t e_par =
(max ? e.acc.max_set() : e.acc.min_set()) - 1; // -1 for empty
// If "min" and empty -> set to n
if (!max & (e_par == -1))
e_par = next_max_par;