Commit 7021e45f authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

Fix simplification of "a M true" as Fa.

* src/ltlvisit/simpfg.cc: Typo.
* src/ltltest/reduccmp.test: Add more tests.
parent 9a1769fe
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> 2010-04-15 Alexandre Duret-Lutz <adl@lrde.epita.fr>
* HACKING: Bison 2.4.2 has a bugfix we rely on. * HACKING: Bison 2.4.2 has a bugfix we rely on.
......
...@@ -66,6 +66,10 @@ for x in ../reduccmp ../reductaustr; do ...@@ -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 | (b U a) | a' '(b U a)'
run 0 $x 'a U (b U 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 # Basics reduction
run 0 $x 'X(true)' 'true' run 0 $x 'X(true)' 'true'
......
...@@ -78,8 +78,8 @@ namespace spot ...@@ -78,8 +78,8 @@ namespace spot
return; return;
/* f1 M true == F(f1) */ /* f1 M true == F(f1) */
case binop::M: case binop::M:
if (f1 == constant::true_instance()) if (f2 == constant::true_instance())
result_ = unop::instance(unop::F, f2); result_ = unop::instance(unop::F, f1);
else else
result_ = binop::instance(binop::M, f1, f2); result_ = binop::instance(binop::M, f1, f2);
return; return;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment