simplify: improve the logic of some implication checks

Fixes #293.

* spot/tl/simplify.cc: Test implications that would yield tt or ff
first.  In rules of the form "if a => b, a op b = b" also check
if b => a, and in this case return smallest(a,b).
* tests/core/reduccmp.test: Add a test.
* NEWS: Mention it.
This commit is contained in:
Alexandre Duret-Lutz 2017-10-11 21:47:31 +02:00
parent 689aa7fdc0
commit 0a2bca1377
3 changed files with 96 additions and 31 deletions

View file

@ -114,6 +114,15 @@ GFa R Fa, GFa
FGa R Fa, GFa
FGa R a, FGa R a
Ga R a, Ga
# issue 293
F(G!p1 | p1) W Fp1, 1
F(p1 | G!p1) W Fp1, 1
F(Fp1 -> p1) W Fp1, 1
G(Fp0 | (p0 M (Fp0 W p0))), GFp0
G((p0 M (Fp0 W p0)) | Fp0), GFp0
G((Fp0) W ((p0 M (Fp0 W p0)))), GFp0
!G((Fp0) W ((p0 M (Fp0 W p0)))), FG!p0
EOF
cp common.txt nottau.txt