sat-minimize: ignore silly histories
If the target acceptance is Fin(0)&Inf(1), there is no need to
distinguish between an history of {0,1} and an history of {0}, as a
cycle with either history will be rejected. This implements this
simplification. If both the canditate and reference automata
are Rabin automata with n pairs, then we now use at most
Q * Q' * Q * Q' * 3^n * 3^n
variables to encode the partial cycles histories, versus
Q * Q' * Q * Q' * 4^n * 4^n
before.
* src/twaalgos/dtgbasat.cc: Implement this.
* src/tests/satmin2.test: More tests.
This commit is contained in:
parent
9480669e99
commit
91f68ab1d8
2 changed files with 243 additions and 14 deletions
|
|
@ -104,10 +104,48 @@ EOF
|
|||
# easily really check the expected automaton, because different SAT
|
||||
# solver (even different versions of glucose) can return different
|
||||
# automata.
|
||||
$autfilt -H --sat-minimize='acc="Fin(0)|Inf(1)"' test.hoa --stats=%s >output
|
||||
$autfilt --sat-minimize='acc="Fin(0)|Inf(1)"' test.hoa --stats=%s >output
|
||||
test `cat output` = 1
|
||||
|
||||
# How about a state-based DSA?
|
||||
$autfilt -H --sat-minimize='state-based,acc="Fin(0)|Inf(1)"' test.hoa \
|
||||
$autfilt --sat-minimize='state-based,acc="Fin(0)|Inf(1)"' test.hoa \
|
||||
--stats=%s > output
|
||||
test `cat output` = 3
|
||||
|
||||
|
||||
# I get headaches whenever I think about this acceptance condition, so
|
||||
# it should be a good test case.
|
||||
cat >special.hoa <<EOF
|
||||
HOA: v1
|
||||
States: 2
|
||||
Acceptance: 2 Inf(0)&Fin(1) | Fin(0)&Inf(1)
|
||||
Start: 0
|
||||
AP: 1 "a"
|
||||
--BODY--
|
||||
State: 0
|
||||
[0] 0 {0}
|
||||
[!0] 1 {1}
|
||||
State: 1
|
||||
[0] 0 {0}
|
||||
[!0] 1 {1}
|
||||
--END--
|
||||
EOF
|
||||
|
||||
$autfilt -H --sat-minimize special.hoa > output
|
||||
|
||||
cat >expected <<EOF
|
||||
HOA: v1
|
||||
States: 1
|
||||
Start: 0
|
||||
AP: 1 "a"
|
||||
Acceptance: 2 (Fin(1) & Inf(0)) | (Fin(0) & Inf(1))
|
||||
properties: trans-labels explicit-labels trans-acc complete
|
||||
properties: deterministic
|
||||
--BODY--
|
||||
State: 0
|
||||
[0] 0 {0}
|
||||
[!0] 0 {1}
|
||||
--END--
|
||||
EOF
|
||||
|
||||
diff output expected
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue