remove_fin: apply Rabin conversion before Streett
* spot/twaalgos/remfin.cc (remove_fin_impl): Apply the Rabin strategy before the Streett one.
This commit is contained in:
parent
f7ba490898
commit
15cc7301cc
1 changed files with 16 additions and 5 deletions
|
|
@ -43,8 +43,8 @@ namespace spot
|
||||||
trivial = 1,
|
trivial = 1,
|
||||||
weak = 2,
|
weak = 2,
|
||||||
alternation = 4,
|
alternation = 4,
|
||||||
street = 8,
|
rabin = 8,
|
||||||
rabin = 16
|
streett = 16,
|
||||||
};
|
};
|
||||||
|
|
||||||
using strategy_flags = strong_enum_flags<strategy_t>;
|
using strategy_flags = strong_enum_flags<strategy_t>;
|
||||||
|
|
@ -489,7 +489,7 @@ namespace spot
|
||||||
: nullptr;
|
: nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
twa_graph_ptr street_strategy(const const_twa_graph_ptr& aut)
|
twa_graph_ptr streett_strategy(const const_twa_graph_ptr& aut)
|
||||||
{
|
{
|
||||||
return (aut->get_acceptance().used_inf_fin_sets().first)
|
return (aut->get_acceptance().used_inf_fin_sets().first)
|
||||||
? streett_to_generalized_buchi_maybe(aut)
|
? streett_to_generalized_buchi_maybe(aut)
|
||||||
|
|
@ -772,10 +772,21 @@ namespace spot
|
||||||
return maybe;
|
return maybe;
|
||||||
if (auto maybe = handle(alternation_strategy, strategy_t::alternation))
|
if (auto maybe = handle(alternation_strategy, strategy_t::alternation))
|
||||||
return maybe;
|
return maybe;
|
||||||
if (auto maybe = handle(street_strategy, strategy_t::street))
|
// The order between Rabin and Streett matters because for
|
||||||
return maybe;
|
// instance "Streett 1" (even generalized Streett 1) is
|
||||||
|
// Rabin-like, and dually "Rabin 1" is Streett-like.
|
||||||
|
//
|
||||||
|
// We therefore check Rabin before Streett, because the
|
||||||
|
// resulting automata are usually smaller, and it can preserve
|
||||||
|
// determinism.
|
||||||
|
//
|
||||||
|
// Note that SPOT_STREETT_CONV_MIN default to 3, which means
|
||||||
|
// that regardless of this order, Rabin 1 is not handled by
|
||||||
|
// streett_strategy unless SPOT_STREETT_CONV_MIN is changed.
|
||||||
if (auto maybe = handle(rabin_strategy, strategy_t::rabin))
|
if (auto maybe = handle(rabin_strategy, strategy_t::rabin))
|
||||||
return maybe;
|
return maybe;
|
||||||
|
if (auto maybe = handle(streett_strategy, strategy_t::streett))
|
||||||
|
return maybe;
|
||||||
return default_strategy(aut);
|
return default_strategy(aut);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue