autfilt: add a --simplify-exclusive-ap option

* src/bin/autfilt.cc: Add option.
* src/ltlvisit/exclusive.cc, src/ltlvisit/exclusive.hh: implement it.
* src/tgbatest/exclusive.test: Test it.
* src/misc/minato.cc, src/misc/minato.hh: Add an interface to
simplify a Boolean function with don't care.
This commit is contained in:
Alexandre Duret-Lutz 2015-03-30 11:37:32 +02:00
parent 25de479e12
commit 75328f1a21
6 changed files with 115 additions and 18 deletions

View file

@ -35,7 +35,7 @@ State: 0
[0] 1
State: 1
[1] 2
[2] 2
[2&!1] 2
State: 2 {0}
[1] 2
[0&1] 1
@ -64,11 +64,34 @@ State: 2 {0}
--END--
EOF
cat >expected-simpl <<EOF
HOA: v1
States: 3
Start: 0
AP: 3 "a" "b" "c"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels state-acc deterministic
--BODY--
State: 0
[0] 1
State: 1
[1 | 2] 2
State: 2 {0}
[1] 2
--END--
EOF
run 0 ../../bin/autfilt -H --exclusive-ap=a,b,c --exclusive-ap=d,e \
automaton >out
cat out
diff out expected
run 0 ../../bin/autfilt -H --exclusive-ap=a,b,c --exclusive-ap=d,e \
--simplify-exclusive-ap automaton >out2
cat out2
diff out2 expected-simpl
cat >automaton <<EOF
HOA: v1
States: 4
@ -81,7 +104,7 @@ State: 0
[0] 1
State: 1
[1] 2
[0] 2
[0&!1] 2
State: 2 {0}
[1] 2
[0&1] 1
@ -110,7 +133,30 @@ State: 2 {0}
--END--
EOF
cat >expected-simpl <<EOF
HOA: v1
States: 3
Start: 0
AP: 2 "a" "b"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels state-acc deterministic
--BODY--
State: 0
[0] 1
State: 1
[0 | 1] 2
State: 2 {0}
[1] 2
--END--
EOF
run 0 ../../bin/autfilt -H --exclusive-ap=a,b,c --exclusive-ap=d,e \
automaton >out
cat out
diff out expected
run 0 ../../bin/autfilt -H --exclusive-ap=a,b,c --exclusive-ap=d,e \
--simplify-exclusive-ap automaton >out2
cat out2
diff out2 expected-simpl