fix a memory leak in basic LTL simplifications
When something like XFa & FXa is reduced, the subformulae XFa and FXa
are both rewritten separately to XFa, and then the vector of arguments
of the And operators, [XFa,XFa], is passed through a specialized loop
that searches of the form X(...) that can potentially be simplified with
some other terms. This loop converts the vector [XFa,XFa] into the set
{XFa,XFa}={XFa} and forgot to deal with the case where the insertion
would actually not add an existing subformula.
* src/ltlvisit/simplify.cc: Fix the code for Or, and And.
* src/ltltest/reduc0.test: New file, to test it.
* src/ltltest/Makefile.am (TESTS): Add it.
* src/ltltest/reduccmp.test: Add an extra test that does not
trigger the bug (because reduccmp.test uses more than basic
optimizations, and the implication-based simplifications are
already able to detect that XFa and FXa are equivalent).
This commit is contained in:
parent
4b70453d74
commit
a9fc213a44
4 changed files with 72 additions and 15 deletions
|
|
@ -95,6 +95,7 @@ TESTS = \
|
|||
isop.test \
|
||||
syntimpl.test \
|
||||
reduc.test \
|
||||
reduc0.test \
|
||||
reducpsl.test \
|
||||
reduccmp.test \
|
||||
uwrm.test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue