acc: implement to_dnf() using BDDs
This way we have for instance (Inf(1) | Fin(2)) & (Fin(1) | Inf(3)) & Inf(0) converted into just (Fin(1) & Fin(2) & Inf(0)) | (Inf(0)&Inf(1)&Inf(3)) while previously we would produce 4 terms: (Fin(2) & Fin(1) & Inf(0)) | (Fin(2) & (Inf(0)&Inf(3))) | (Fin(1) & (Inf(0)&Inf(1))) | (Inf(0)&Inf(1)&Inf(3)) * src/tgba/acc.cc (to_dnf): Recode it. * src/tgbatest/acc2.test: Adjust.
This commit is contained in:
parent
ebe4ffc507
commit
518de8d5eb
2 changed files with 81 additions and 49 deletions
|
|
@ -48,17 +48,16 @@ State: 0
|
|||
EOF
|
||||
|
||||
|
||||
res="(Fin(2) & Fin(1) & Inf(0)) | (Fin(2) & (Inf(0)&Inf(3)))"
|
||||
res="$res | (Fin(1) & (Inf(0)&Inf(1))) | (Inf(0)&Inf(1)&Inf(3))"
|
||||
res="(Fin(1) & Fin(2) & Inf(0)) | (Inf(0)&Inf(1)&Inf(3))"
|
||||
cat >acceptances<<EOF
|
||||
2 Inf(0)&Inf(1), 2 Inf(0)&Inf(1)
|
||||
2 Fin(0) & Inf(1), 2 Fin(0) & Inf(1)
|
||||
2 t, 2 t
|
||||
2 f, 2 f
|
||||
3 (Inf(1) | Fin(2)) & Inf(0), 3 (Fin(2) & Inf(0)) | (Inf(0)&Inf(1))
|
||||
3 (Inf(1) | Fin(2)) & Inf(0), 3 (Inf(0)&Inf(1)) | (Fin(2) & Inf(0))
|
||||
4 (Inf(1) | Fin(2)) & (Fin(1) | Inf(3)) & Inf(0), 4 $res
|
||||
4 $res, 4 $res
|
||||
3 (Fin(0)|Fin(1)) & Fin(2), 3 (Fin(1) & Fin(2)) | (Fin(0) & Fin(2))
|
||||
3 (Fin(0)|Fin(1)) & Fin(2), 3 (Fin(0) & Fin(2)) | (Fin(1) & Fin(2))
|
||||
EOF
|
||||
|
||||
while IFS=, read a b
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue