wdba_minimization: avoid translating !f when input is deterministic

* spot/twaalgos/minimize.cc (wdba_minimization): Here.
This commit is contained in:
Alexandre Duret-Lutz 2017-11-11 08:59:01 +01:00
parent 32019b6e1a
commit f0735d4d86

View file

@ -619,7 +619,13 @@ namespace spot
// Build negation automaton if not supplied.
if (!aut_neg_f)
{
if (f)
if (is_deterministic(aut_f))
{
// If the automaton is deterministic, complementing is
// easy.
aut_neg_f = remove_fin(dualize(aut_f));
}
else if (f)
{
// If we know the formula, simply build the automaton for
// its negation.
@ -627,12 +633,6 @@ namespace spot
// Remove useless SCCs.
aut_neg_f = scc_filter(aut_neg_f, true);
}
else if (is_deterministic(aut_f))
{
// If the automaton is deterministic, complementing is
// easy.
aut_neg_f = remove_fin(dualize(aut_f));
}
else
{
// Otherwise, we cannot check if the minimization is safe.