diff --git a/spot/twaalgos/postproc.cc b/spot/twaalgos/postproc.cc index 19e3d2b6c..1a2915dda 100644 --- a/spot/twaalgos/postproc.cc +++ b/spot/twaalgos/postproc.cc @@ -239,11 +239,13 @@ namespace spot { if (PREF_ != Any && level_ != Low) tmp->remove_unused_ap(); - if (COMP_) + bool was_complete = tmp->prop_complete().is_true(); + if (COMP_ && !was_complete) tmp = complete(tmp); bool want_parity = type_ & Parity; - if (want_parity && (tmp->acc().is_generalized_buchi() - || tmp->acc().is_generalized_co_buchi())) + if (want_parity && tmp->num_sets() > 1 + && (tmp->acc().is_generalized_buchi() + || tmp->acc().is_generalized_co_buchi())) tmp = choose_degen(tmp); assert(!!SBACC_ == state_based_); if (state_based_) @@ -252,7 +254,7 @@ namespace spot tmp = ensure_ba(tmp); if (want_parity) { - if (!acd_was_used_) + if (!acd_was_used_ || (COMP_ && !was_complete)) reduce_parity_here(tmp, COLORED_); parity_kind kind = parity_kind_any; parity_style style = parity_style_any; diff --git a/spot/twaalgos/translate.cc b/spot/twaalgos/translate.cc index 0f5e86cde..8a99313a3 100644 --- a/spot/twaalgos/translate.cc +++ b/spot/twaalgos/translate.cc @@ -387,6 +387,7 @@ namespace spot || type_ == GeneralizedBuchi) aut2 = gf_guarantee_to_ba_maybe(r, simpl_->get_dict(), det, state_based_); + acd_was_used_ = false; if (aut2 && (pref_ & Deterministic)) return finalize(aut2); if (!aut2 && (type_ == Generic