improve cleanup_parity() and colorize_parity()

Fixes #384.

* spot/twaalgos/parity.cc: Here.
* tests/core/parity2.test, tests/python/highlighting.ipynb,
tests/python/parity.py: Adjust test cases.
* tests/python/parity.ipynb: Improve the presentation.
* NEWS: Mention the change.
This commit is contained in:
Alexandre Duret-Lutz 2019-06-11 14:04:51 +02:00
parent f0b77e21c8
commit f6575d2ec5
6 changed files with 4042 additions and 1837 deletions

View file

@ -245,12 +245,12 @@ name: "(p0 W XXGp0) & G(Fp1 & FGp2)"
States: 5
Start: 0
AP: 3 "p0" "p1" "p2"
acc-name: parity max even 3
Acceptance: 3 Inf(2) | (Fin(1) & Inf(0))
acc-name: Streett 1
Acceptance: 2 Fin(0) | Inf(1)
properties: trans-labels explicit-labels trans-acc colored
--BODY--
State: 0
[0] 0 {1}
[0] 0 {0}
[!0] 1 {0}
[0&1&2] 2 {0}
State: 1
@ -258,14 +258,14 @@ State: 1
[1&2] 4 {0}
State: 2
[!0] 1 {0}
[0&!1&2] 2 {1}
[0&1&2] 2 {2}
[0&!1&2] 2 {0}
[0&1&2] 2 {1}
State: 3
[0] 3 {1}
[0] 3 {0}
[0&1&2] 4 {0}
State: 4
[0&!1&2] 4 {1}
[0&1&2] 4 {2}
[0&!1&2] 4 {0}
[0&1&2] 4 {1}
--END--
HOA: v1
name: "FGa"
@ -304,24 +304,24 @@ name: "(p0 W XXGp0) & G(Fp1 & FGp2)"
States: 5
Start: 0
AP: 3 "p0" "p1" "p2"
acc-name: parity min odd 4
Acceptance: 4 Fin(0) & (Inf(1) | (Fin(2) & Inf(3)))
acc-name: parity min odd 3
Acceptance: 3 Fin(0) & (Inf(1) | Fin(2))
properties: trans-labels explicit-labels trans-acc colored
--BODY--
State: 0
[0] 0 {2}
[!0] 1 {3}
[0&1&2] 2 {3}
[!0] 1 {2}
[0&1&2] 2 {2}
State: 1
[t] 3 {3}
[1&2] 4 {3}
[t] 3 {2}
[1&2] 4 {2}
State: 2
[!0] 1 {3}
[!0] 1 {2}
[0&1&2] 2 {1}
[0&!1&2] 2 {2}
State: 3
[0] 3 {2}
[0&1&2] 4 {3}
[0&1&2] 4 {2}
State: 4
[0&1&2] 4 {1}
[0&!1&2] 4 {2}
@ -980,21 +980,21 @@ name: "(p0 W XXGp0) & G(Fp1 & FGp2)"
States: 5
Start: 0
AP: 3 "p0" "p1" "p2"
acc-name: parity min odd 4
Acceptance: 4 Fin(0) & (Inf(1) | (Fin(2) & Inf(3)))
acc-name: parity min odd 3
Acceptance: 3 Fin(0) & (Inf(1) | Fin(2))
properties: trans-labels explicit-labels trans-acc colored
properties: deterministic
--BODY--
State: 0
[0&!1 | 0&!2] 0 {2}
[!0] 1 {3}
[!0] 1 {2}
[0&1&2] 2 {1}
State: 1
[!1 | !2] 3 {3}
[1&2] 4 {3}
[!1 | !2] 3 {2}
[1&2] 4 {2}
State: 2
[0&!2] 0 {0}
[!0] 1 {3}
[!0] 1 {2}
[0&1&2] 2 {1}
[0&!1&2] 2 {2}
State: 3
@ -1042,21 +1042,21 @@ name: "(p0 W XXGp0) & G(Fp1 & FGp2)"
States: 5
Start: 0
AP: 3 "p0" "p1" "p2"
acc-name: parity min odd 4
Acceptance: 4 Fin(0) & (Inf(1) | (Fin(2) & Inf(3)))
acc-name: parity min odd 3
Acceptance: 3 Fin(0) & (Inf(1) | Fin(2))
properties: trans-labels explicit-labels trans-acc colored
properties: deterministic
--BODY--
State: 0
[0&!1 | 0&!2] 0 {2}
[!0] 1 {3}
[!0] 1 {2}
[0&1&2] 2 {1}
State: 1
[!1 | !2] 3 {3}
[1&2] 4 {3}
[!1 | !2] 3 {2}
[1&2] 4 {2}
State: 2
[0&!2] 0 {0}
[!0] 1 {3}
[!0] 1 {2}
[0&1&2] 2 {1}
[0&!1&2] 2 {2}
State: 3
@ -1527,7 +1527,6 @@ ltlcross 'ltl2tgba -P' 'ltl2tgba -P"odd max"' 'ltl2tgba -P"even min"' \
'ltl2tgba -p' 'ltl2tgba -p"odd max"' 'ltl2tgba -p"even min"' \
-f FGa -f 'GFa&GFb' -f 'GF(a <-> XXXb)' -f '(p0 W XXGp0) & GFp1 & FGp2'
# Test the behavior of our determinization on Max Michel automata.
# Any change to Spot that lowers the output.states is welcome :-)
genaut --m-nba=1..4 | autcross --language-preserved 'autfilt -D' --csv=out.csv