unabbreviate_wm: fix a segfault.

* src/ltlvisit/wmunabbrev.cc: Fix clone() order.
* src/ltltest/equals.cc: Add a mode for unabbreviate_wm().
* src/ltltest/unabbrevwm.test: New file.
* src/ltltest/Makefile.am: Add it.
This commit is contained in:
Alexandre Duret-Lutz 2012-10-23 22:00:17 +02:00
parent aede62d123
commit 1f12ad8765
4 changed files with 50 additions and 6 deletions

View file

@ -62,14 +62,16 @@ namespace spot
case binop::W:
// f1 W f2 = f2 R (f2 | f1)
result_ =
binop::instance(binop::R, f2->clone(),
multop::instance(multop::Or, f2, f1));
binop::instance(binop::R, f2,
multop::instance(multop::Or,
f2->clone(), f1));
break;
case binop::M:
// f1 M f2 = f2 U (g2 & f1)
result_ =
binop::instance(binop::U, f2->clone(),
multop::instance(multop::And, f2, f1));
binop::instance(binop::U, f2,
multop::instance(multop::And,
f2->clone(), f1));
break;
}
}