ltlfilt, ltlsynt, ltlmix: add a --part-file option
* bin/common_ioap.cc, bin/common_ioap.hh (read_part_file): New function. * bin/ltlfilt.cc, bin/ltlmix.cc, bin/ltlsynt.cc: Use it. * doc/org/ltlfilt.org, doc/org/ltlmix.org, doc/org/ltlsynt.org: Mention that new option, and improve the links to its description in ltlsynt.org. * NEWS: Mention the new option. * tests/core/ltlfilt.test, tests/core/ltlmix.test, tests/core/ltlsynt.test: Adjust test cases.
This commit is contained in:
parent
388d005635
commit
e6ebbdf65f
12 changed files with 271 additions and 138 deletions
|
|
@ -626,6 +626,18 @@ run 0 ltlfilt -s -u --relabel=io --ins='/[ab]/' --define in >out
|
|||
diff exp out
|
||||
run 0 ltlfilt -s -u --relabel=io --outs='/[^ab]/' --define in >out
|
||||
diff exp out
|
||||
echo '.inputs a b' >rel.part
|
||||
run 0 ltlfilt -s -u --relabel=io --part=rel.part --define in >out
|
||||
diff exp out
|
||||
echo '.inputs /[ab]/ # .output ignored' >rel.part
|
||||
run 0 ltlfilt -s -u --relabel=io --part=rel.part --define in >out
|
||||
diff exp out
|
||||
echo '.outputs /[^ab]/ # .input ignored' >rel.part
|
||||
run 0 ltlfilt -s -u --relabel=io --part=rel.part --define in >out
|
||||
diff exp out
|
||||
echo 'error /[^ab]/' >rel.part
|
||||
run 2 ltlfilt -s -u --relabel=io --part=rel.part --define in 2>err
|
||||
grep "expected '.inputs' or '.outputs'" err
|
||||
|
||||
cat >exp <<EOF
|
||||
#define p0 (a & c)
|
||||
|
|
|
|||
|
|
@ -121,3 +121,19 @@ diff out expected
|
|||
ltlmix -fGa -fFz -A3,3 -C4 -n10 2> err && exit 1
|
||||
cat err
|
||||
grep 'ins.*outs' err
|
||||
|
||||
echo '.inputs a c .outputs b d ' > part.part
|
||||
ltlmix -fXa -fGb -f'c U d' --part-file=part.part -C4 -A3,3 -n10 >out
|
||||
cat >expected <<EOF
|
||||
(i1 U o2) & Go1 & (i0 U o2)
|
||||
Go1 & (i0 U o2) & Xi1 & Go2
|
||||
Go2 & (i2 U o1) & Xi2 & Go0
|
||||
Go2 & Go0 & (i1 U o0) & Xi0
|
||||
Go1 & Xi2 & Xi0 & (i0 U o0)
|
||||
Xi1 & Xi2 & Go0 & (i2 U o0)
|
||||
Xi1 & (i1 U o0) & Xi0 & (i1 U o1)
|
||||
Go2 & Xi2 & (i0 U o0)
|
||||
(i0 U o2) & (i0 U o0) & (i0 U o1)
|
||||
Go1 & Xi0 & (i0 U o0) & (i0 U o1)
|
||||
EOF
|
||||
diff out expected
|
||||
|
|
|
|||
|
|
@ -648,7 +648,7 @@ test $? -eq 2
|
|||
grep "one.*should match 'b'" stderr
|
||||
ltlsynt -f 'GFa | FGb | GFc' 2>stderr && :
|
||||
test $? -eq 2
|
||||
grep "[-]-ins or --outs" stderr
|
||||
grep "[-]-ins.*--outs" stderr
|
||||
|
||||
# Try to find a direct strategy for GFa <-> GFb and a direct strategy for
|
||||
# Gc
|
||||
|
|
@ -1139,11 +1139,15 @@ ltlsynt --decomp=yes -f "$s" --realizability >out
|
|||
ltlsynt --decomp=no --outs='/^o[0-9]*$/' -f "$s" --realizability >>out
|
||||
ltlsynt --decomp=no --outs='/^o[0-9]$/' -f "$s" --realizability >>out && :
|
||||
ltlsynt -f "$s" --ins='/^i[0-9]*$/' --realizability >>out
|
||||
echo ".inputs i1 i2 i3 i4 i5 i6 i7 i8" > part.part
|
||||
echo ".outputs /^o1[0-9]*/ o01 o02 o03 o04 o05 o06 o07 o08 o09" >> part.part
|
||||
ltlsynt -f "$s" --part-file=part.part --realizability >>out
|
||||
cat >expected <<EOF
|
||||
REALIZABLE
|
||||
REALIZABLE
|
||||
UNREALIZABLE
|
||||
REALIZABLE
|
||||
REALIZABLE
|
||||
EOF
|
||||
diff out expected
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue