CAR: Correct the value of the max color of the acceptance condition

* spot/twaalgos/car.cc: Update the max_color in apply_to_Buchi.
* tests/python/car.py: Add some tests that showed this issue.
This commit is contained in:
Florian Renkin 2020-02-25 12:59:45 +01:00
parent 4b9704a072
commit 6f3208a783
2 changed files with 60 additions and 0 deletions

View file

@ -711,7 +711,10 @@ public:
col = inf_fin_prefix[c] + is_odd;
}
if (col != -1)
{
acc = { (unsigned) col };
max_color = std::max(max_color, (unsigned) col);
}
else
acc = {};
res_->new_edge(src_state, dst_state, e.cond, acc);
@ -1048,6 +1051,7 @@ private:
bool scc_acc_clean, bool parity_equiv, bool use_last, bool parity_prefix,
bool rabin_to_buchi, bool pretty_print)
{
auto new_aut = remove_false_transitions(aut);
return car_generator(new_aut, search_ex, partial_degen, scc_acc_clean,
parity_equiv, use_last, parity_prefix,