sat-minimize: allow different acceptances as input and output
* src/twaalgos/dtgbasat.cc (sat_minimize): Use any arbitrary acceptance condition passed via the "acc" option. * src/twa/acc.hh (mark_t::max_set): New method. * src/tests/satmin2.test: Add two test cases with DRA as input and DSA as output.
This commit is contained in:
parent
3efeacb61b
commit
0ede968760
3 changed files with 88 additions and 3 deletions
|
|
@ -24,6 +24,8 @@ set -e
|
|||
# Skip if $SATSOLVE is not installed.
|
||||
(${SATSOLVER-glucose} --help >/dev/null 2>&1) || exit 77
|
||||
|
||||
autfilt=../../bin/autfilt
|
||||
ltlfilt=../../bin/ltlfilt
|
||||
|
||||
# This is a counterexample for one of the optimization idea we had for
|
||||
# the SAT-based minimization.
|
||||
|
|
@ -63,3 +65,49 @@ diff output expected
|
|||
../../bin/ltl2tgba -BD -x sat-minimize "GF(a <-> XXb)" -H >out
|
||||
grep 'properties:.*state-acc' out
|
||||
grep 'properties:.*deterministic' out
|
||||
|
||||
|
||||
# DRA produced by ltl2dstar for GFp0 -> GFp1
|
||||
cat >test.hoa <<EOF
|
||||
HOA: v1
|
||||
States: 4
|
||||
properties: implicit-labels trans-labels no-univ-branch deterministic complete
|
||||
acc-name: Rabin 2
|
||||
Acceptance: 4 (Fin(0)&Inf(1))|(Fin(2)&Inf(3))
|
||||
Start: 0
|
||||
AP: 2 "p0" "p1"
|
||||
--BODY--
|
||||
State: 0 {0}
|
||||
1
|
||||
0
|
||||
3
|
||||
2
|
||||
State: 1 {1}
|
||||
1
|
||||
0
|
||||
3
|
||||
2
|
||||
State: 2 {0 3}
|
||||
1
|
||||
0
|
||||
3
|
||||
2
|
||||
State: 3 {1 3}
|
||||
1
|
||||
0
|
||||
3
|
||||
2
|
||||
--END--
|
||||
EOF
|
||||
|
||||
# Let's try to find a smaller transition-based Streett automaton We
|
||||
# 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
|
||||
test `cat output` = 1
|
||||
|
||||
# How about a state-based DSA?
|
||||
$autfilt -H --sat-minimize='state-based,acc="Fin(0)|Inf(1)"' test.hoa \
|
||||
--stats=%s > output
|
||||
test `cat output` = 3
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue