acc: refactor strip() routines
* src/tgba/acc.cc, src/tgba/acc.hh: Move the strip() routine from acc_cond into acc_cond::mark_t, and the strip() routine from cleanacc.cc into acc_cond::acc_code. Introduce helper functions to create inf()/fin()/t()/f() at the acc_code level. * src/tgbaalgos/cleanacc.cc: Simplify, using the strip() function from acc_code. * src/tgbaalgos/mask.cc (mask_acc_sets): Use the strip() function from acc_code so that it work on non-Buchi acceptance. * src/tgbatest/maskacc.test: Add a test for the latter change. * src/tgbaalgos/sccfilter.cc, src/tgbatest/acc.cc: Adjust the use mark_t::strip().
This commit is contained in:
parent
717c857794
commit
5b2c7b55ed
7 changed files with 267 additions and 165 deletions
|
|
@ -103,7 +103,7 @@ int main()
|
|||
for (auto& v: s)
|
||||
{
|
||||
check(ac, v);
|
||||
check(ac, ac.strip(v, u));
|
||||
check(ac, v.strip(u));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -111,6 +111,51 @@ diff output expect3
|
|||
run 0 ../../bin/autfilt --mask-acc=0 --mask-acc=1 input1 -H >output
|
||||
diff output expect3
|
||||
|
||||
cat >input4 <<EOF
|
||||
HOA: v1
|
||||
States: 4
|
||||
Start: 0
|
||||
AP: 2 "a" "b"
|
||||
acc-name: generalized-Buchi 2
|
||||
Acceptance: 3 Inf(1)|Fin(0)
|
||||
properties: trans-labels explicit-labels trans-acc
|
||||
--BODY--
|
||||
State: 0
|
||||
[0] 1 {0}
|
||||
[1] 2 {1}
|
||||
State: 1
|
||||
[0] 2
|
||||
[0] 3 {1}
|
||||
State: 2
|
||||
[1] 1
|
||||
[1] 3 {0}
|
||||
State: 3
|
||||
[0] 3 {0 1}
|
||||
--END--
|
||||
EOF
|
||||
|
||||
cat >expect4 <<EOF
|
||||
HOA: v1
|
||||
States: 4
|
||||
Start: 0
|
||||
AP: 2 "a" "b"
|
||||
Acceptance: 2 Inf(0)
|
||||
properties: trans-labels explicit-labels trans-acc
|
||||
--BODY--
|
||||
State: 0
|
||||
[1] 1 {0}
|
||||
State: 1
|
||||
[1] 2
|
||||
State: 2
|
||||
[0] 1
|
||||
[0] 3 {0}
|
||||
State: 3
|
||||
--END--
|
||||
EOF
|
||||
|
||||
run 0 ../../bin/autfilt --mask-acc=0 input4 -H >output
|
||||
diff output expect4
|
||||
|
||||
# Errors
|
||||
run 2 ../../bin/autfilt --mask-acc=a3 input1
|
||||
run 2 ../../bin/autfilt --mask-acc=3-2 input1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue