diff --git a/spot/twaalgos/synthesis.cc b/spot/twaalgos/synthesis.cc index 5d14c2155..45de43928 100644 --- a/spot/twaalgos/synthesis.cc +++ b/spot/twaalgos/synthesis.cc @@ -1741,11 +1741,11 @@ namespace // anonymous for subsformula if (child.is(op::F)) { // The result can be G(And). - auto f2 = - formula::G( - extract_and(formula::Not(child[0]), outs, false, form2props)); - // What ? - return f2; + return + extract_and( + formula::G( + extract_and(formula::Not(child[0]), outs, false, form2props)), + outs, false, form2props); } // ¬(φ→ψ) ≡ φ ∧ ¬ψ else if (child.is(op::Implies)) diff --git a/tests/core/ltlsynt.test b/tests/core/ltlsynt.test index 2d11c58af..4d318dbae 100644 --- a/tests/core/ltlsynt.test +++ b/tests/core/ltlsynt.test @@ -653,3 +653,171 @@ EOF ltlsynt -f "Ga <-> Gb" --outs=b --verbose --decompose=0 --verify --aiger 2> out sed 's/ [0-9.e-]* seconds/ X seconds/g' out > outx diff outx exp + +cat >exp < y +direct strategy might exist but was not found. +translating formula done in X seconds +automaton has 2 states and 1 colors +LAR construction done in X seconds +DPA has 2 states, 2 colors +split inputs and outputs done in X seconds +automaton has 4 states +solving game with acceptance: parity max odd 4 +game solved in X seconds +trying to create strategy directly for (a | x) -> x +direct strategy might exist but was not found. +translating formula done in X seconds +automaton has 2 states and 1 colors +LAR construction done in X seconds +DPA has 2 states, 2 colors +split inputs and outputs done in X seconds +automaton has 4 states +solving game with acceptance: parity max odd 4 +game solved in X seconds +AIG circuit was created in X seconds and has 0 latches and 0 gates +EOF +ltlsynt -f '((a|x) & (b | y) & b) => (x & y)' --outs="x,y" --aiger=ite\ + --verify --verbose 2> out +sed 's/ [0-9.e-]* seconds/ X seconds/g' out > outx +diff outx exp + +# Here, G!(!x | !y) should be Gx & Gy +cat >exp < out +sed 's/ [0-9.e-]* seconds/ X seconds/g' out > outx +diff outx exp + +# Here, !F(a | b) should be G(!a) & G(!b) +cat >exp < out || true +sed 's/ [0-9.e-]* seconds/ X seconds/g' out > outx +diff outx exp + +# Here, G!(a -> b) should be G(a) & G(!b) +cat >exp < b)' --outs=b --decompose=yes --aiger\ + --verbose 2> out || true +sed 's/ [0-9.e-]* seconds/ X seconds/g' out > outx +diff outx exp + +# Here, (a & b) U (b & c) should be (a U (b & c)) & (b U (b & c)) +cat >exp < out +sed 's/ [0-9.e-]* seconds/ X seconds/g' out > outx +diff outx exp + +# Here, a => (b & c & d) should be +# (a => b) & (a => c) & (a => d) +cat >exp < b +direct strategy might exist but was not found. +translating formula done in X seconds +automaton has 2 states and 1 colors +LAR construction done in X seconds +DPA has 2 states, 2 colors +split inputs and outputs done in X seconds +automaton has 4 states +solving game with acceptance: parity max odd 4 +game solved in X seconds +trying to create strategy directly for a -> c +direct strategy might exist but was not found. +translating formula done in X seconds +automaton has 2 states and 1 colors +LAR construction done in X seconds +DPA has 2 states, 2 colors +split inputs and outputs done in X seconds +automaton has 4 states +solving game with acceptance: parity max odd 4 +game solved in X seconds +trying to create strategy directly for a -> d +direct strategy might exist but was not found. +translating formula done in X seconds +automaton has 2 states and 1 colors +LAR construction done in X seconds +DPA has 2 states, 2 colors +split inputs and outputs done in X seconds +automaton has 4 states +solving game with acceptance: parity max odd 4 +game solved in X seconds +AIG circuit was created in X seconds and has 0 latches and 0 gates +EOF +ltlsynt -f 'a => (b & c & d)' --outs=b,c,d, --decompose=yes\ + --verbose --aiger 2> out +sed 's/ [0-9.e-]* seconds/ X seconds/g' out > outx +diff outx exp + +# Here, !(F(a | b)) should be G!a & G!b +cat >exp < out || true +sed 's/ [0-9.e-]* seconds/ X seconds/g' out > outx +diff outx exp