Fix simplification of "a M true" as Fa.

* src/ltlvisit/simpfg.cc: Typo.
* src/ltltest/reduccmp.test: Add more tests.
This commit is contained in:
Alexandre Duret-Lutz 2010-04-15 11:44:17 +02:00
parent 9a1769fe78
commit 7021e45f70
3 changed files with 13 additions and 2 deletions

View file

@ -1,3 +1,10 @@
2010-04-15 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Fix simplification of "a M true" as Fa.
* src/ltlvisit/simpfg.cc: Typo.
* src/ltltest/reduccmp.test: Add more tests.
2010-04-15 Alexandre Duret-Lutz <adl@lrde.epita.fr>
* HACKING: Bison 2.4.2 has a bugfix we rely on.

View file

@ -66,6 +66,10 @@ for x in ../reduccmp ../reductaustr; do
run 0 $x 'a | (b U a) | a' '(b U a)'
run 0 $x 'a U (b U a)' '(b U a)'
run 0 $x 'a M 1' 'Fa'
run 0 $x 'a W 0' 'Ga'
run 0 $x '1 U a' 'Fa'
run 0 $x '0 R a' 'Ga'
# Basics reduction
run 0 $x 'X(true)' 'true'

View file

@ -78,8 +78,8 @@ namespace spot
return;
/* f1 M true == F(f1) */
case binop::M:
if (f1 == constant::true_instance())
result_ = unop::instance(unop::F, f2);
if (f2 == constant::true_instance())
result_ = unop::instance(unop::F, f1);
else
result_ = binop::instance(binop::M, f1, f2);
return;