acc: make &= and |= symmetrical

Operator &= used to always move Fin to the front, it does not anymore.
The only thing it does now is to merge Inf(x)&Inf(y) as Inf({x,y}).
Operator |= is now symmetrical and merges Fin()s.

Fixes #253.

* spot/twa/acc.cc, spot/twa/acc.hh: Simplify &= and make |= symmetrical.
* spot/twaalgos/cleanacc.cc: Fix conjunction order.
* tests/core/acc.test, tests/core/acc2.test, tests/core/parseaut.test,
tests/core/readsave.test, tests/core/satmin2.test,
tests/core/sccdot.test, tests/python/acc_cond.ipynb,
tests/python/accparse.ipynb, tests/python/automata.ipynb,
tests/python/product.ipynb, tests/python/randaut.ipynb: Adjust test
cases.
This commit is contained in:
Alexandre Duret-Lutz 2017-07-25 17:38:24 +02:00
parent 8e685e00c9
commit abe2c08b78
15 changed files with 254 additions and 295 deletions

View file

@ -2508,7 +2508,7 @@ HOA: v1
States: 1
Start: 0
AP: 2 "a" "b"
Acceptance: 4 (Fin(1) & Inf(0)) | (Fin(3) & Inf(2))
Acceptance: 4 (Inf(0) & Fin(1)) | (Inf(2) & Fin(3))
properties: trans-labels explicit-labels trans-acc complete
properties: deterministic
--BODY--
@ -2522,7 +2522,7 @@ HOA: v1
States: 1
Start: 0
AP: 2 "a" "b"
Acceptance: 4 (Fin(3) & Inf(2)) | (Fin(1) & Inf(0))
Acceptance: 4 (Fin(3) & Inf(2)) | (Inf(0) & Fin(1))
properties: trans-labels explicit-labels trans-acc complete
properties: deterministic
--BODY--
@ -2536,7 +2536,7 @@ HOA: v1
States: 1
Start: 0
AP: 2 "a" "b"
Acceptance: 6 (Inf(1) | (Fin(2)|Fin(3))) & (Inf(4) | Fin(5)) & Inf(0)
Acceptance: 6 Inf(0) & (Inf(1) | (Fin(2)|Fin(3))) & (Inf(4) | Fin(5))
properties: trans-labels explicit-labels trans-acc complete
properties: deterministic
--BODY--
@ -2550,7 +2550,7 @@ HOA: v1
States: 1
Start: 0
AP: 2 "a" "b"
Acceptance: 6 (Inf(4) | Fin(5)) & (Inf(1) | (Fin(2)|Fin(3))) & Inf(0)
Acceptance: 6 (Fin(5) | Inf(4)) & Inf(0) & ((Fin(2)|Fin(3)) | Inf(1))
properties: trans-labels explicit-labels trans-acc complete
properties: deterministic
--BODY--
@ -2624,7 +2624,7 @@ HOA: v1
States: 1
Start: 0
AP: 2 "a" "b"
Acceptance: 4 Fin(0) & ((Fin(2) & Inf(3)) | Inf(1))
Acceptance: 4 Fin(0) & ((Inf(3) & Fin(2)) | Inf(1))
properties: trans-labels explicit-labels trans-acc complete
properties: deterministic
--BODY--