workin progress The M in CoPaR From Partition Refjnement to - - PowerPoint PPT Presentation

workin progress
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

The M in CoPaR

From Partition Refjnement to Minimization Hans-Peter Deifel Oberseminar 09.06.2020

workin progress

1 / 26

slide-2
SLIDE 2

The M in CoPaR

From Partition Refjnement to Minimization Hans-Peter Deifel Oberseminar 09.06.2020

workin progress

1 / 26

slide-3
SLIDE 3

CoPaR Coalgebraic Partition Refjner

2 / 26

slide-4
SLIDE 4

Partition Refjnement

3 / 26

slide-5
SLIDE 5

Partition Refjnement

3 / 26

slide-6
SLIDE 6

Partition Refjnement

3 / 26

slide-7
SLIDE 7

Partition Refjnement

3 / 26

slide-8
SLIDE 8

Partition Refjnement

3 / 26

slide-9
SLIDE 9

Partition Refjnement

Difgerent partition refjnement algorithms: Pajge-Tarjan Hopcroft Markov-Chain lumping Color refjnement ⇒ Used in countless minimization tools

4 / 26

slide-10
SLIDE 10

Partition Refjnement

Difgerent partition refjnement algorithms: Pajge-Tarjan Hopcroft Markov-Chain lumping Color refjnement ⇒ Used in countless minimization tools

4 / 26

slide-11
SLIDE 11

CoPaR Coalgebraic Partition Refjner

5 / 26

slide-12
SLIDE 12

CoM Coalgebraic Minimizer

5 / 26

slide-13
SLIDE 13

Coalgebras X FX c

states successor map type functor

Type Functor Set Set

Labelled Transition Systems Deterministic Automata Markov Chains

6 / 26

slide-14
SLIDE 14

Coalgebras X FX c

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

slide-15
SLIDE 15

Behavioural Equivalence

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

slide-16
SLIDE 16

Coalgebraic Partition Refjnement

Generic Algorithm Functor F F-Coalgebra Refjnement Interface for F Partition

8 / 26

slide-17
SLIDE 17

Functor Encoding

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

slide-18
SLIDE 18

Functor Encoding

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

slide-19
SLIDE 19

Functor Encoding

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

slide-20
SLIDE 20

Functor Encoding

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

slide-21
SLIDE 21

Syntax

Input

DX q1: {q2: 0.5, q3: 0.5} q2: {q1: 0.5, q3: 0.5} q3: {q3: 1}

10 / 26

slide-22
SLIDE 22

Syntax

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

slide-23
SLIDE 23

Syntax

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

slide-24
SLIDE 24

Minimization

Two tasks: Computing the (encoding of) the quotient coalgebra Removing unreachable states

11 / 26

slide-25
SLIDE 25

Minimization

Two tasks: Computing the (encoding of) the quotient coalgebra Removing unreachable states

11 / 26

slide-26
SLIDE 26

Quotient Encoding: Goal

X FX B(A × X) Y FY B(A × Y )

c d ♭X ♭Y q Fq ?

quotient map input coalgebra

  • utput

coalgebra encoding

12 / 26

slide-27
SLIDE 27

Solution: Minimization Interface

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

slide-28
SLIDE 28

Minimization Interface: Examples

Powerset

merge(ℓ)(∗) = min(1, ℓ(∗))

Monoid-Valued

merge(ℓ) =

  • {Σℓ}

Σℓ = 0 {}

  • therwise

Polynomial

merge = id

14 / 26

slide-29
SLIDE 29

Victory?

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

slide-30
SLIDE 30

Encoding Assumption

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

slide-31
SLIDE 31

Encoding Assumption: Counterexample

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

slide-32
SLIDE 32

Encoding Assumption: Counterexample

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

slide-33
SLIDE 33

Victory!

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

slide-34
SLIDE 34

Victory!

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

slide-35
SLIDE 35

Minimization

Two tasks: Computing the (encoding of) the quotient coalgebra Removing unreachable states

19 / 26

slide-36
SLIDE 36

Minimization

Two tasks: Computing the (encoding of) the quotient coalgebra Removing unreachable states

19 / 26

slide-37
SLIDE 37

Reachability: Problems

“Two tasks” all the way down: Pointed Coalgebras Computing the Reachable Subcoalgebra

20 / 26

slide-38
SLIDE 38

Reachability: Problems

“Two tasks” all the way down: Pointed Coalgebras Computing the Reachable Subcoalgebra

20 / 26

slide-39
SLIDE 39

Reachability: Problems

“Two tasks” all the way down: Pointed Coalgebras ⇒ Simple matter of programming™ Computing the Reachable Subcoalgebra

20 / 26

slide-40
SLIDE 40

Reachability: Problems

“Two tasks” all the way down: Pointed Coalgebras ⇒ Simple matter of programming™ Computing the Reachable Subcoalgebra

20 / 26

slide-41
SLIDE 41

Computing the Reachable Subcoalgebra

In Set: Standard graph search on canonical graph

Canonical Graph

does not factorize through For coalgebra:

21 / 26

slide-42
SLIDE 42

Computing the Reachable Subcoalgebra

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

slide-43
SLIDE 43

Goal

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

slide-44
SLIDE 44

Direction: τ(t) ⊆ τ(♭(t))

Questment: Encoding contains canonical graph? Should be true™

23 / 26

slide-45
SLIDE 45

Direction: τ(t) ⊆ τ(♭(t))

Questment: Encoding contains canonical graph? ⇒ Should be true™

23 / 26

slide-46
SLIDE 46

Counterexample for τ(t) ⊇ τ(♭(t))

Functor: R(−)

Encoded Coalgebra

a b c d 0.5 0.5

Canonical Graph

a b d

24 / 26

slide-47
SLIDE 47

Requirement: Sub-Naturality

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

slide-48
SLIDE 48

Requirement: Sub-Naturality

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

slide-49
SLIDE 49

Question: Connection?

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