Reimplement basic_reduce()'s rules in ltl_simplifier.
So far I have only checked these rewritings with reduccmp.test. There are probably a few kinks to iron out. * src/ltlvisit/simplify.cc: Reimplement most of the basic rewriting rules, leaving some FIXME comments for dubious ones. * src/ltlast/multop.cc, src/ltlast/multop.hh: Ignore NULL pointers in the vector. * src/ltlvisit/reduce.cc (reduce): Do not call basic_reduce(). * src/ltltest/reduccmp.test: Adjust tests.
This commit is contained in:
parent
e3e0f913b6
commit
ca2fe4f3f8
5 changed files with 1020 additions and 45 deletions
|
|
@ -100,8 +100,10 @@ for x in ../reduccmp ../reductaustr; do
|
|||
run 0 $x '(a U b) | (a U c)' 'a U (b | c)'
|
||||
run 0 $x '(a R b) | (c R b)' '(a | c) R b'
|
||||
|
||||
run 0 $x 'X(a & GFb)' 'Xa & GFb'
|
||||
run 0 $x 'X(a | GFb)' 'Xa | GFb'
|
||||
run 0 $x 'Xa & FGb' 'X(a & FGb)'
|
||||
run 0 $x 'Xa | FGb' 'Xa | FGb' # We'd prefer 'X(a | FGb)'
|
||||
run 0 $x 'Xa & GFb' 'Xa & GFb' # 'X(a & GFb)'
|
||||
run 0 $x 'Xa | GFb' 'X(a | GFb)'
|
||||
# The following is not reduced to F(a) & GFb. because
|
||||
# (1) is does not help the translate the formula into a
|
||||
# smaller automaton, and ...
|
||||
|
|
@ -109,10 +111,9 @@ for x in ../reduccmp ../reductaustr; do
|
|||
# (2) ... it would hinder this useful reduction (that helps to
|
||||
# produce a smaller automaton)
|
||||
run 0 $x 'F(f1 & GF(f2)) | F(a & GF(b))' 'F((f1&GFf2)|(a&GFb))'
|
||||
# FIXME: Don't we want the opposite rewriting
|
||||
run 0 $x 'Fa & GFb' 'Fa & GFb' # We'd prefer 'F(a & GFb)'
|
||||
run 0 $x 'G(a | GFb)' 'Ga | GFb'
|
||||
|
||||
run 0 $x 'X(a & GFb & c)' 'X(a & c) & GFb'
|
||||
run 0 $x 'X(a | GFb | c)' 'X(a | c) | GFb'
|
||||
# The following is not reduced to F(a & c) & GF(b) for the same
|
||||
# reason as above.
|
||||
run 0 $x 'F(a & GFb & c)' 'F(a & GFb & c)'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue