Implement dual rewritings rules for <>->.
* src/ltlvisit/simplify.cc (reduce_sere_ltl): New function, to factor the code of the []-> and <>-> rewrittings. * src/ltltest/reduccmp.test: Add more tests. * doc/tl/tl.tex: Document these rewritings.
This commit is contained in:
parent
6f46345c3a
commit
d6587cf531
3 changed files with 307 additions and 248 deletions
|
|
@ -270,28 +270,20 @@ for x in ../reduccmp ../reductaustr; do
|
|||
run 0 $x '{a && {b*;c:e}} <>-> d' 'a & c & d & e'
|
||||
run 0 $x '{a && {b;c*}} <>-> d' 'a & b & d'
|
||||
run 0 $x '{a && {b;c*:e}} <>-> d' 'a & b & d & e'
|
||||
run 0 $x '{{b1;r1*}&&{b2;r2*}} <>-> x' \
|
||||
'{{b1&&b2};{r1*&&r2*}} <>-> x'
|
||||
run 0 $x '{{b1:r1*}&&{b2:r2*}} <>-> x' \
|
||||
'{{b1&&b2}:{r1*&&r2*}} <>-> x'
|
||||
run 0 $x '{{r1*;b1}&&{r2*;b2}} <>-> x' \
|
||||
'{{r1*&&r2*};{b1&&b2}} <>-> x'
|
||||
run 0 $x '{{r1*:b1}&&{r2*:b2}} <>-> x' \
|
||||
'{{r1*&&r2*}:{b1&&b2}} <>-> x'
|
||||
run 0 $x '{{a;b*;c}&&{d;e*}&&{f*;g}&&{h*}} <>-> x' \
|
||||
'{{f*;g}&&{h*}&&{{a&&d};{e* && {b*;c}}}} <>-> x'
|
||||
run 0 $x '{{b1;r1*}&{b2;r2*}} <>-> x' \
|
||||
'{{b1&&b2};{r1*&r2*}} <>-> x'
|
||||
run 0 $x '{{b1:r1*}&{b2:r2*}} <>-> x' \
|
||||
'{{b1&&b2}:{r1*&r2*}} <>-> x'
|
||||
run 0 $x '{{r1*;b1}&{r2*;b2}} <>-> x' \
|
||||
'{{r1*&r2*};{b1&&b2}} <>-> x'
|
||||
run 0 $x '{{r1*:b1}&{r2*:b2}} <>-> x' \
|
||||
'{{r1*&r2*}:{b1&&b2}} <>-> x'
|
||||
run 0 $x '{{a;b*;c}&{d;e*}&{f*;g}&{h*}} <>-> x' \
|
||||
'{{f*;g}&{h*}&{{a&&d};{e* & {b*;c}}}} <>-> x'
|
||||
run 0 $x '{a&b&c*}|->!Xb' '(X!b | !(a & b)) & (!(a & b) | !c | X(!c R !b))'
|
||||
run 0 $x '{{b1;r1*}&&{b2;r2*}}' '{{b1&&b2};{r1*&&r2*}}'
|
||||
run 0 $x '{{b1:r1*}&&{b2:r2*}}' '{{b1&&b2}:{r1*&&r2*}}'
|
||||
run 0 $x '{{r1*;b1}&&{r2*;b2}}' '{{r1*&&r2*};{b1&&b2}}'
|
||||
run 0 $x '{{r1*:b1}&&{r2*:b2}}' '{{r1*&&r2*}:{b1&&b2}}'
|
||||
run 0 $x '{{a;b*;c}&&{d;e*}&&{f*;g}&&{h*}}' \
|
||||
'{{f*;g}&&{h*}&&{{a&&d};{e* && {b*;c}}}}'
|
||||
run 0 $x '{{b1;r1*}&{b2;r2*}}' '{{b1&&b2};{r1*&r2*}}'
|
||||
run 0 $x '{{b1:r1*}&{b2:r2*}}' '{{b1&&b2}:{r1*&r2*}}'
|
||||
run 0 $x '{{r1*;b1}&{r2*;b2}}' '{{r1*&r2*};{b1&&b2}}'
|
||||
run 0 $x '{{r1*:b1}&{r2*:b2}}' '{{r1*&r2*}:{b1&&b2}}'
|
||||
run 0 $x '{{a;b*;c}&{d;e*}&{f*;g}&{h*}}' \
|
||||
'{{f*;g}&{h*}&{{a&&d};{e* & {b*;c}}}}'
|
||||
run 0 $x '{a;(b*;c*;([*0]+{d;e}))*}!' '{a;{b|c|{d;e}}*}!'
|
||||
run 0 $x '{a&b&c*}|->!Xb' '(X!b | !(a & b)) & (!(a & b) | !c | X(!c R !b))'
|
||||
run 0 $x '{[*]}[]->b' 'Gb'
|
||||
run 0 $x '{a;[*]}[]->b' 'Gb | !a'
|
||||
run 0 $x '{[*];a}[]->b' 'G(b | !a)'
|
||||
|
|
@ -306,6 +298,21 @@ for x in ../reduccmp ../reductaustr; do
|
|||
run 0 $x '{{[*0] | a};b;{[*0] | a};c;e[*]} []-> f' \
|
||||
'{{[*0] | a};b;{[*0] | a}} []-> X((f & X(f W !e)) | !c)'
|
||||
|
||||
run 0 $x '{a&b&c*}<>->!Xb' '(a & b & X!b) | (a & b & c & X(c U !b))'
|
||||
run 0 $x '{[*]}<>->b' 'Fb'
|
||||
run 0 $x '{a;[*]}<>->b' 'Fb & a'
|
||||
run 0 $x '{[*];a}<>->b' 'F(a & b)'
|
||||
run 0 $x '{a;b;[*]}<>->c' 'a & X(b & Fc)'
|
||||
run 0 $x '{a;a;[*]}<>->c' 'a & X(a & Fc)'
|
||||
run 0 $x '{s[*]}<>->b' 'b M s'
|
||||
run 0 $x '{s[+]}<>->b' 'b M s'
|
||||
run 0 $x '{s[*2..]}<>->b' 's & X(b M s)'
|
||||
run 0 $x '{a;b*;c;d*}<>->e' 'a & X(b U (c & (e | X(e M d))))'
|
||||
run 0 $x '{a:b*:c:d*}<>->e' 'a & ((c & (e M d)) M b)'
|
||||
run 0 $x '{a|b*|c|d*}<>->e' '((a | c) & e) | (e M b) | (e M d)'
|
||||
run 0 $x '{{[*0] | a};b;{[*0] | a};c;e[*]} <>-> f' \
|
||||
'{{[*0] | a};b;{[*0] | a}} <>-> X(c & (f | X(f M e)))'
|
||||
|
||||
# not reduced
|
||||
run 0 $x '{a;(b[*2..4];c*;([*0]+{d;e}))*}!' \
|
||||
'{a;(b[*2..4];c*;([*0]+{d;e}))*}!'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue