The M in CoPaR
From Partition Refjnement to Minimization Hans-Peter Deifel Oberseminar 09.06.2020
workin progress
1 / 26
workin progress The M in CoPaR From Partition Refjnement to - - PowerPoint PPT Presentation
workin progress The M in CoPaR From Partition Refjnement to Minimization Hans-Peter Deifel Oberseminar 09.06.2020 1 / 26 The M in CoPaR From Partition Refjnement to Minimization Hans-Peter Deifel Oberseminar 09.06.2020 1 / 26 workin
From Partition Refjnement to Minimization Hans-Peter Deifel Oberseminar 09.06.2020
1 / 26
From Partition Refjnement to Minimization Hans-Peter Deifel Oberseminar 09.06.2020
1 / 26
CoPaR Coalgebraic Partition Refjner
2 / 26
3 / 26
3 / 26
3 / 26
3 / 26
3 / 26
Difgerent partition refjnement algorithms: Pajge-Tarjan Hopcroft Markov-Chain lumping Color refjnement ⇒ Used in countless minimization tools
4 / 26
Difgerent partition refjnement algorithms: Pajge-Tarjan Hopcroft Markov-Chain lumping Color refjnement ⇒ Used in countless minimization tools
4 / 26
CoPaR Coalgebraic Partition Refjner
5 / 26
CoM Coalgebraic Minimizer
5 / 26
states successor map type functor
Type Functor Set Set
Labelled Transition Systems Deterministic Automata Markov Chains
6 / 26
states successor map type functor
Type Functor F : Set → Set FX = P(A × X)
Labelled Transition Systems
2 × XA
Deterministic Automata
R(X)
Markov Chains
6 / 26
X FX Y FY c
states successor map type functor
d h
homomorphism
Fh Identifjed by Coalgebra Homomorphism FX = P(A × X)
Bisimilarity
2 × XA
Language Equivalence
R(X)
Weighted Bisimilarity
7 / 26
Generic Algorithm Functor F F-Coalgebra Refjnement Interface for F Partition
8 / 26
Encoding for Functor F
Abstract Type A of labels Encoding map ♭X : FX → B Bags (A × X)
Example: P(−)
A = 1 ♭X({x1, x2, x3}) = {(∗, x1), (∗, x2), (∗, x3)}
9 / 26
Encoding for Functor F
Abstract Type A of labels Encoding map ♭X : FX → B Bags (A × X)
Example: R(−)
A = R ♭X(f) = {(r, x) | x ∈ X, f(x) = r = 0}
9 / 26
Encoding for Functor F
Abstract Type A of labels Encoding map ♭X : FX → B Bags (A × X)
Not Natural
Let f ∈ R2, f(0) = 0.5, f(1) = 0.5 f {(0.5, 0), (0.5, 1)} (∗ → 1.0) {(0.5, 1), (0.5, 1)}
♭2 R(!) B(id,!) ♭1/
9 / 26
Encoding for Functor F
Abstract Type A of labels Encoding map ♭X : FX → B Bags (A × X)
Refjnement Interface
Type W (abstract, could be ints, reals, trees, …) init: F1 × BA → W update: BA × W → W × F3 × W
9 / 26
Input
DX q1: {q2: 0.5, q3: 0.5} q2: {q1: 0.5, q3: 0.5} q3: {q3: 1}
10 / 26
Input
DX q1: {q2: 0.5, q3: 0.5} q2: {q1: 0.5, q3: 0.5} q3: {q3: 1}
Output
Block 0: q1, q2, q3
10 / 26
Input
DX q1: {q2: 0.5, q3: 0.5} q2: {q1: 0.5, q3: 0.5} q3: {q3: 1}
Cooler Output
DX q1: {q1: 1}
10 / 26
Two tasks: Computing the (encoding of) the quotient coalgebra Removing unreachable states
11 / 26
Two tasks: Computing the (encoding of) the quotient coalgebra Removing unreachable states
11 / 26
X FX B(A × X) Y FY B(A × Y )
c d ♭X ♭Y q Fq ?
quotient map input coalgebra
coalgebra encoding
12 / 26
merge: B(A) → B(A) FX B(A) F2 B(A)
filS · ♭ FχS merge fil{1} · ♭
and B(A) 1 B(A)
merge {} {}
filS(t)(a) =
x∈S t(a, x)
13 / 26
Powerset
merge(ℓ)(∗) = min(1, ℓ(∗))
Monoid-Valued
merge(ℓ) =
Σℓ = 0 {}
Polynomial
merge = id
14 / 26
FX B(A × X) B(A × Y ) B(A)(Y ) FY B(A × Y ) B(A)(Y )
♭ B(A×q) group Fq merge(Y ) ♭ ungroup
curry ·B(swap) monoid-valued for B-monoid 15 / 26
Nope! We additionally need the following assumption on ♭: FX B(A × X) B(A) F2 B(A × 2)
♭X Fχ{x} fil{x} ♭2 fil{1}
16 / 26
An encoding for Powerset
A = 1 + 1 ♭2({x1, . . . , xn}) = ({(inj1 ∗, x1) . . . , (inj1 ∗, xn)}) ♭X=2({x1, . . . , xn}) = ({(inj2 ∗, x1) . . . , (inj2 ∗, xn)}) ⇒ Lawful merge possible! But: Ruled out by assumption
17 / 26
An encoding for Powerset
A = 1 + 1 ♭2({x1, . . . , xn}) = ({(inj1 ∗, x1) . . . , (inj1 ∗, xn)}) ♭X=2({x1, . . . , xn}) = ({(inj2 ∗, x1) . . . , (inj2 ∗, xn)}) ⇒ Lawful merge possible! But: Ruled out by assumption
17 / 26
FX B(A × X) B(A × Y ) B(A)(Y ) FY B(A × Y ) B(A)(Y )
♭ Fq B(A×q) group merge(Y ) ♭ ungroup
18 / 26
FX B(A × X) B(A × Y ) B(A)(Y ) FY B(A × Y ) B(A)(Y )
♭ Fq B(A×q) group merge(Y ) ♭ ungroup
18 / 26
Two tasks: Computing the (encoding of) the quotient coalgebra Removing unreachable states
19 / 26
Two tasks: Computing the (encoding of) the quotient coalgebra Removing unreachable states
19 / 26
“Two tasks” all the way down: Pointed Coalgebras Computing the Reachable Subcoalgebra
20 / 26
“Two tasks” all the way down: Pointed Coalgebras Computing the Reachable Subcoalgebra
20 / 26
“Two tasks” all the way down: Pointed Coalgebras ⇒ Simple matter of programming™ Computing the Reachable Subcoalgebra
20 / 26
“Two tasks” all the way down: Pointed Coalgebras ⇒ Simple matter of programming™ Computing the Reachable Subcoalgebra
20 / 26
In Set: Standard graph search on canonical graph
Canonical Graph
does not factorize through For coalgebra:
21 / 26
In Set: Standard graph search on canonical graph
Canonical Graph
τX : FX → PX τX(t) = {x ∈ X | 1 t − → FX does not factorize through F(X \ {x}) Fi − → FX} For coalgebra: C
c
− → FC
τC
− → PC
21 / 26
We want: Canonical graph of original coalgebra and canonical graph of encoded coalgebra to be the same! C FC PC B(A × C)
c τ ♭ τ
22 / 26
Questment: Encoding contains canonical graph? Should be true™
23 / 26
Questment: Encoding contains canonical graph? ⇒ Should be true™
23 / 26
Functor: R(−)
Encoded Coalgebra
a b c d 0.5 0.5
Canonical Graph
a b d
24 / 26
Encoding must be sub-natural: X FX B(A × X) Y FY B(A × Y )
f ♭X Ff B(A×f) ♭Y
now works!
25 / 26
Encoding must be sub-natural: X FX B(A × X) Y FY B(A × Y )
f ♭X Ff B(A×f) ♭Y
⇒ now works!
25 / 26
Assumption 1
FX B(A × X) B(A) F2 B(A × 2)
♭X Fχ{x} fil{x} ♭2 fil{1}
Assumption 2
X FX B(A × X) Y FY B(A × Y )
f ♭X Ff B(A×f) ♭Y
26 / 26