synthesis: fix suboptimal colorization after LAR

* spot/twaalgos/synthesis.cc (ltl_to_game): In LAR and LAR_OLD mode,
for max odd and colorize the game after the split, not before.  The
previous code used to colorize twice, and could waste up to 4 colors
in the process.
* tests/core/ltlsynt.test, tests/python/_mealy.ipynb,
tests/python/games.ipynb, tests/python/synthesis.ipynb,
tests/python/synthesis.py: Adjust all test cases to reflect the fact
that the game uses fewer colors.
This commit is contained in:
Alexandre Duret-Lutz 2022-03-17 14:30:05 +01:00
parent c1e6340228
commit 75818fde13
6 changed files with 1820 additions and 1806 deletions

View file

@ -974,16 +974,13 @@ namespace spot
if (gi.s == algo::LAR)
{
dpa = to_parity(aut);
// reduce_parity is called by to_parity(),
// but with colorization turned off.
colorize_parity_here(dpa, true);
// reduce_parity is called by to_parity()
}
else
{
dpa = to_parity_old(aut);
dpa = reduce_parity_here(dpa, true);
}
change_parity_here(dpa, parity_kind_max, parity_style_odd);
if (bv)
bv->paritize_time += sw.stop();
if (vs)
@ -995,6 +992,7 @@ namespace spot
if (bv)
sw.start();
dpa = split_2step(dpa, outs, true);
change_parity_here(dpa, parity_kind_max, parity_style_odd);
colorize_parity_here(dpa, true);
if (bv)
bv->split_time += sw.stop();