simplify: fix handling of keep_top_xor

Under that option, !(a ^ b) was converted
to (!a <=> !b) instead of simply (a <=> b).

* spot/tl/simplify.cc (equiv_or_xor): Improve
rewriting.
* tests/core/ltl2tgba2.test, tests/python/simstate.py: Adjust test
cases.
This commit is contained in:
Alexandre Duret-Lutz 2020-07-22 16:23:34 +02:00
parent 1784671ca1
commit 1c5468a93a
4 changed files with 20 additions and 15 deletions

View file

@ -453,9 +453,9 @@ test 1,3,2 = `ltl2tgba -G -D "(GFp0 | FGp1)" --stats=%s,%e,%a`
# Handling of Xor and <-> by ltl-split and -D -G.
res=`ltl2tgba -D -G 'X((Fa & Fb & Fc & Fd) <-> GFe)' --stats='%s %g'`
test "$res" = "17 (Inf(0) & Fin(1)) | (Fin(0) & Inf(1))"
res=`ltl2tgba -D -G 'X((Fa & Fb & Fc & Fd) ^ GFe)' --stats='%s %g'`
test "$res" = "17 (Inf(0)&Inf(1)) | (Fin(0) & Fin(1))"
res=`ltl2tgba -D -G 'X((Fa & Fb & Fc & Fd) ^ GFe)' --stats='%s %g'`
test "$res" = "17 (Inf(0) & Fin(1)) | (Fin(0) & Inf(1))"
ltlcross 'ltl2tgba -D -G' 'ltl2tgba -G' -f '(Fa & Fb & Fc & Fd) ^ GFe'
f='G(p1 | G!p0) M Xp1'

View file

@ -178,13 +178,13 @@ b.copy_state_names_from(a)
assert b.to_str() == """HOA: v1
States: 1
Start: 0
AP: 2 "p1" "p0"
AP: 2 "p0" "p1"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels trans-acc complete
properties: deterministic stutter-invariant
--BODY--
State: 0 "[1,7]"
[!0] 0 {0}
[0] 0
[!1] 0 {0}
[1] 0
--END--"""