Operational Semantics Coalgebraically Bartek Klin University of - - PowerPoint PPT Presentation

operational semantics coalgebraically
SMART_READER_LITE
LIVE PREVIEW

Operational Semantics Coalgebraically Bartek Klin University of - - PowerPoint PPT Presentation

Operational Semantics Coalgebraically Bartek Klin University of Cambridge, Warsaw University CMCS, Paphos, 27/03/10 Summary Structural Operational Semantics is about Defining transition relations by induction CMCS, Paphos, 27/03/10 2 / 37


slide-1
SLIDE 1

Operational Semantics Coalgebraically

Bartek Klin University of Cambridge, Warsaw University

CMCS, Paphos, 27/03/10

slide-2
SLIDE 2

CMCS, Paphos, 27/03/10

/ 37

Summary

2

Structural Operational Semantics is about Defining transition relations by induction

slide-3
SLIDE 3

CMCS, Paphos, 27/03/10

/ 37

Summary

2

Structural Operational Semantics is about Defining transition relations by induction

slide-4
SLIDE 4

CMCS, Paphos, 27/03/10

/ 37

Summary

2

Structural Operational Semantics Distributing syntax over behaviour is about

slide-5
SLIDE 5

CMCS, Paphos, 27/03/10

/ 37 3

I. FROM COINDUCTIVE DEFINITIONS TO BIALGEBRAS

slide-6
SLIDE 6

CMCS, Paphos, 27/03/10

/ 37

A coinductive definition

4

Example: streams

BX = A × X

slide-7
SLIDE 7

CMCS, Paphos, 27/03/10

/ 37

A coinductive definition

4

Example: streams

BX = A × X Z = Aω z = hd, tl : Z → BZ

slide-8
SLIDE 8

CMCS, Paphos, 27/03/10

/ 37

A coinductive definition

4

Example: streams

BX = A × X Z = Aω z = hd, tl : Z → BZ alt : Z2 → Z

Define:

slide-9
SLIDE 9

CMCS, Paphos, 27/03/10

/ 37

A coinductive definition

4

Example: streams

BX = A × X Z = Aω z = hd, tl : Z → BZ alt : Z2 → Z

Define:

a1, a2, a3, a4, a5, . . . b1, b2, b3, b4, b5, . . .

slide-10
SLIDE 10

CMCS, Paphos, 27/03/10

/ 37

A coinductive definition

4

Example: streams

BX = A × X Z = Aω z = hd, tl : Z → BZ alt : Z2 → Z

Define:

a1, a2, a3, a4, a5, . . . b1, b2, b3, b4, b5, . . .

slide-11
SLIDE 11

CMCS, Paphos, 27/03/10

/ 37

A coinductive definition

4

Example: streams

BX = A × X Z = Aω z = hd, tl : Z → BZ alt : Z2 → Z

Define:

a1, a2, a3, a4, a5, . . . b1, b2, b3, b4, b5, . . . alt a1, b2, a3, b4, a5, . . .

slide-12
SLIDE 12

CMCS, Paphos, 27/03/10

/ 37

A coinductive definition

4

Example: streams

BX = A × X Z = Aω z = hd, tl : Z → BZ alt : Z2 → Z

Define:

a1, a2, a3, a4, a5, . . . b1, b2, b3, b4, b5, . . . alt a1, b2, a3, b4, a5, . . . Z2

h

  • alt
  • B(Z2)

B(alt)

  • Z

z

BZ

slide-13
SLIDE 13

CMCS, Paphos, 27/03/10

/ 37

A coinductive definition

4

Example: streams

BX = A × X Z = Aω z = hd, tl : Z → BZ alt : Z2 → Z

Define:

a1, a2, a3, a4, a5, . . . b1, b2, b3, b4, b5, . . . alt a1, b2, a3, b4, a5, . . . Z2

h

  • alt
  • B(Z2)

B(alt)

  • Z

z

BZ = h(σ, τ) hd(σ), (tl(τ), tl(σ))

slide-14
SLIDE 14

CMCS, Paphos, 27/03/10

/ 37

A coinductive definition

4

Example: streams

BX = A × X Z = Aω z = hd, tl : Z → BZ alt : Z2 → Z

Define:

a1, a2, a3, a4, a5, . . . b1, b2, b3, b4, b5, . . . alt a1, b2, a3, b4, a5, . . . = Z2

alt

  • z2 (BZ)2

λ

B(Z2)

B(alt)

  • Z

z

BZ h(σ, τ) hd(σ), (tl(τ), tl(σ))

slide-15
SLIDE 15

CMCS, Paphos, 27/03/10

/ 37

A coinductive definition

4

Example: streams

BX = A × X Z = Aω z = hd, tl : Z → BZ alt : Z2 → Z

Define:

a1, a2, a3, a4, a5, . . . b1, b2, b3, b4, b5, . . . alt a1, b2, a3, b4, a5, . . . = Z2

alt

  • z2 (BZ)2

λ

B(Z2)

B(alt)

  • Z

z

BZ λ(a, σ, b, τ) a, (τ, σ)

slide-16
SLIDE 16

CMCS, Paphos, 27/03/10

/ 37

A coinductive definition

4

Example: streams

BX = A × X Z = Aω z = hd, tl : Z → BZ alt : Z2 → Z

Define:

a1, a2, a3, a4, a5, . . . b1, b2, b3, b4, b5, . . . alt a1, b2, a3, b4, a5, . . . = Z2

alt

  • z2 (BZ)2

λ

B(Z2)

B(alt)

  • Z

z

BZ λ(a, σ, b, τ) a, (τ, σ)

is natural.

λ : (B−)2 = ⇒ B(−)2

slide-17
SLIDE 17

CMCS, Paphos, 27/03/10

/ 37

Another example

5

BX = A × X Z = Aω

slide-18
SLIDE 18

CMCS, Paphos, 27/03/10

/ 37

Another example

5

BX = A × X Z = Aω

Define:

+ : A2 → A

Assume:

⊕ : Z2 → Z

as pointwise

+

slide-19
SLIDE 19

CMCS, Paphos, 27/03/10

/ 37

Another example

5

BX = A × X Z = Aω

Define:

+ : A2 → A

Assume:

⊕ : Z2 → Z

as pointwise

+ Z2

h

  • B(Z2)

B(⊕)

  • Z

z

BZ

slide-20
SLIDE 20

CMCS, Paphos, 27/03/10

/ 37

Another example

5

BX = A × X = Z = Aω

Define:

+ : A2 → A

Assume:

⊕ : Z2 → Z

as pointwise

+ Z2

h

  • B(Z2)

B(⊕)

  • Z

z

BZ h(σ, τ) hd(σ) + hd(τ), (tl(σ), tl(τ))

slide-21
SLIDE 21

CMCS, Paphos, 27/03/10

/ 37

Another example

5

BX = A × X = Z = Aω

Define:

+ : A2 → A

Assume:

⊕ : Z2 → Z

as pointwise

+ Z2

  • z2 (BZ)2

λ

B(Z2)

B(⊕)

  • Z

z

BZ h(σ, τ) hd(σ) + hd(τ), (tl(σ), tl(τ))

slide-22
SLIDE 22

CMCS, Paphos, 27/03/10

/ 37

Another example

5

BX = A × X = Z = Aω

Define:

+ : A2 → A

Assume:

⊕ : Z2 → Z

as pointwise

+ Z2

  • z2 (BZ)2

λ

B(Z2)

B(⊕)

  • Z

z

BZ λ(a, σ, b, τ) a + b, (σ, τ)

slide-23
SLIDE 23

CMCS, Paphos, 27/03/10

/ 37

Another example

5

BX = A × X = Z = Aω

Define:

+ : A2 → A

Assume:

⊕ : Z2 → Z

as pointwise

+ Z2

  • z2 (BZ)2

λ

B(Z2)

B(⊕)

  • Z

z

BZ λ(a, σ, b, τ) a + b, (σ, τ)

Again, natural.

λ : (B−)2 = ⇒ B(−)2

slide-24
SLIDE 24

CMCS, Paphos, 27/03/10

/ 37

Distributive laws

6

To define g : ΣZ → Z provide λ : ΣB =

⇒ BΣ

slide-25
SLIDE 25

CMCS, Paphos, 27/03/10

/ 37

Distributive laws

6

To define g : ΣZ → Z provide λ : ΣB =

⇒ BΣ

a distributive law

slide-26
SLIDE 26

CMCS, Paphos, 27/03/10

/ 37

Distributive laws

6

To define g : ΣZ → Z provide λ : ΣB =

⇒ BΣ

slide-27
SLIDE 27

CMCS, Paphos, 27/03/10

/ 37

Distributive laws

6

To define g : ΣZ → Z provide λ : ΣB =

⇒ BΣ ΣZ

g

  • Σz ΣBZ

λZ BΣZ Bg

  • Z

z

BZ

slide-28
SLIDE 28

CMCS, Paphos, 27/03/10

/ 37

Distributive laws

6

To define g : ΣZ → Z provide λ : ΣB =

⇒ BΣ ΣZ

g

  • Σz ΣBZ

λZ BΣZ Bg

  • Z

z

BZ X

h BX

ΣX

Σh ΣBX λX BΣX

Σλ

Benefits of naturality:

slide-29
SLIDE 29

CMCS, Paphos, 27/03/10

/ 37

More benefits

7

ΣZ

g

  • Σz ΣBZ

λZ BΣZ Bg

  • Z

z

BZ λ : ΣB = ⇒ BΣ

  • perations
  • n final -coalgebras

B

slide-30
SLIDE 30

CMCS, Paphos, 27/03/10

/ 37

More benefits

7

ΣZ

g

  • Σz ΣBZ

λZ BΣZ Bg

  • Z

z

BZ λ : ΣB = ⇒ BΣ

  • perations
  • n final -coalgebras

B

but also:

ΣA

a

  • Σh
  • A

h

  • ΣBA

λA

BΣA

Ba

BA

behaviour

  • f initial -algebras

Σ

slide-31
SLIDE 31

CMCS, Paphos, 27/03/10

/ 37

Behaviour of terms

8

BX = A × X ΣX = A + X2 alt a

binary constant, for a ∈ A

slide-32
SLIDE 32

CMCS, Paphos, 27/03/10

/ 37

Behaviour of terms

8

BX = A × X ΣX = A + X2 alt a

binary constant, for a ∈ A

(a, x′, b, y′) → a, (y′, x′) () → a, () λa

X : 1 → BΣX

λalt

X : (BX)2 → BΣX

λX : ΣBX → BΣX

slide-33
SLIDE 33

CMCS, Paphos, 27/03/10

/ 37

Behaviour of terms

8

BX = A × X ΣX = A + X2 alt a

binary constant, for a ∈ A

x

a

→ x′ y

b

→ y′ alt(x, y)

a

→ alt(y′, x′) a

a

→ a (a, x′, b, y′) → a, (y′, x′) () → a, () λa

X : 1 → BΣX

λalt

X : (BX)2 → BΣX

λX : ΣBX → BΣX

slide-34
SLIDE 34

CMCS, Paphos, 27/03/10

/ 37

Behaviour of terms

8

BX = A × X ΣX = A + X2 alt a

binary constant, for a ∈ A

x

a

→ x′ y

b

→ y′ alt(x, y)

a

→ alt(y′, x′) a

a

→ a

Then, e.g.,

alt(a, b)

a

→ alt(b, a)

etc.

(a, x′, b, y′) → a, (y′, x′) () → a, () λa

X : 1 → BΣX

λalt

X : (BX)2 → BΣX

λX : ΣBX → BΣX

slide-35
SLIDE 35

CMCS, Paphos, 27/03/10

/ 37

More benefits

9

ΣZ

g

  • Σz ΣBZ

λZ BΣZ Bg

  • Z

z

BZ λ : ΣB = ⇒ BΣ

  • perations
  • n final -coalgebras

B

but also:

ΣA

a

  • Σh
  • A

h

  • ΣBA

λA

BΣA

Ba

BA

behaviour

  • f initial -algebras

Σ

slide-36
SLIDE 36

CMCS, Paphos, 27/03/10

/ 37

More benefits

9

ΣZ

g

  • Σz ΣBZ

λZ BΣZ Bg

  • Z

z

BZ λ : ΣB = ⇒ BΣ

  • perations
  • n final -coalgebras

B

but also:

ΣA

a

  • Σh
  • A

h

  • ΣBA

λA

BΣA

Ba

BA

behaviour

  • f initial -algebras

Σ

slide-37
SLIDE 37

CMCS, Paphos, 27/03/10

/ 37

Bialgebras

10

  • bialgebra:

λ ΣX

Σh

  • g

X

h

BX ΣBX

λX

BΣX

Bg

slide-38
SLIDE 38

CMCS, Paphos, 27/03/10

/ 37

Bialgebras

10

  • bialgebra:

λ

morphisms:

ΣX

Σh

  • g

X

h

BX ΣBX

λX

BΣX

Bg

slide-39
SLIDE 39

CMCS, Paphos, 27/03/10

/ 37

Bialgebras

10

  • bialgebra:

λ

morphisms:

ΣX

g

X

h BX

ΣY

k

Y

l

BY ΣX

Σh

  • g

X

h

BX ΣBX

λX

BΣX

Bg

slide-40
SLIDE 40

CMCS, Paphos, 27/03/10

/ 37

Bialgebras

10

  • bialgebra:

λ

morphisms:

ΣX

g

X

h f

  • BX

ΣY

k

Y

l

BY ΣX

Σh

  • g

X

h

BX ΣBX

λX

BΣX

Bg

slide-41
SLIDE 41

CMCS, Paphos, 27/03/10

/ 37

Bialgebras

10

  • bialgebra:

λ

morphisms:

ΣX

g

  • Σf
  • X

h f

  • BX

Bf

  • ΣY

k

Y

l

BY ΣX

Σh

  • g

X

h

BX ΣBX

λX

BΣX

Bg

slide-42
SLIDE 42

CMCS, Paphos, 27/03/10

/ 37

Bialgebras

10

  • bialgebra:

λ

morphisms:

ΣX

g

  • Σf
  • X

h f

  • BX

Bf

  • ΣY

k

Y

l

BY

Bialgebras are (co)algebras:

λ-bialg ∼ = Σλ-alg ΣX

Σh

  • g

X

h

BX ΣBX

λX

BΣX

Bg

slide-43
SLIDE 43

CMCS, Paphos, 27/03/10

/ 37

Bialgebras

10

  • bialgebra:

λ

morphisms:

ΣX

g

  • Σf
  • X

h f

  • BX

Bf

  • ΣY

k

Y

l

BY

Bialgebras are (co)algebras:

λ-bialg ∼ = Σλ-alg ∼ = Bλ-coalg ΣX

Σh

  • g

X

h

BX ΣBX

λX

BΣX

Bg

slide-44
SLIDE 44

CMCS, Paphos, 27/03/10

/ 37

More benefits

11

ΣZ

g

  • Σz ΣBZ

λZ BΣZ Bg

  • Z

z

BZ λ : ΣB = ⇒ BΣ ΣA

a

  • Σh
  • A

h

  • ΣBA

λA

BΣA

Ba

BA

slide-45
SLIDE 45

CMCS, Paphos, 27/03/10

/ 37

More benefits

11

ΣZ

g

  • Σz ΣBZ

λZ BΣZ Bg

  • Z

z

BZ λ : ΣB = ⇒ BΣ ΣA

a

  • Σh
  • A

h

  • ΣBA

λA

BΣA

Ba

BA

the final bialgebra the initial bialgebra

slide-46
SLIDE 46

CMCS, Paphos, 27/03/10

/ 37

Bisimilarity as a congruence

12

ΣA

a ∼ =

  • Σf
  • A

h f

  • BA

Bf

  • ΣZ

g

Z

z ∼ = BZ

The kernel relation of is:

  • bisimilarity on ,
  • a congruence on .

f h a

slide-47
SLIDE 47

CMCS, Paphos, 27/03/10

/ 37

Bisimilarity as a congruence

12

ΣA

a ∼ =

  • Σf
  • A

h f

  • BA

Bf

  • ΣZ

g

Z

z ∼ = BZ

The kernel relation of is:

  • bisimilarity on ,
  • a congruence on .

f h a

Bisimilarity is a congruence

slide-48
SLIDE 48

CMCS, Paphos, 27/03/10

/ 37

Bisimilarity as a congruence

12

ΣA

a ∼ =

  • Σf
  • A

h f

  • BA

Bf

  • ΣZ

g

Z

z ∼ = BZ

The kernel relation of is:

  • bisimilarity on ,
  • a congruence on .

f h a

Bisimilarity is a congruence For example,

alt(a, a) ≈ a

hence

C[alt(a, a)] ≈ C[a]

slide-49
SLIDE 49

CMCS, Paphos, 27/03/10

/ 37 13

II. MORE DISTRIBUTIVE LAWS

slide-50
SLIDE 50

CMCS, Paphos, 27/03/10

/ 37

Another coinductive definition

14

BX = A × X Z = Aω

slide-51
SLIDE 51

CMCS, Paphos, 27/03/10

/ 37

Another coinductive definition

14

BX = A × X Z = Aω

Define: zip : Z2 → Z

slide-52
SLIDE 52

CMCS, Paphos, 27/03/10

/ 37

Another coinductive definition

14

BX = A × X Z = Aω a1, a2, a3, a4, a5, . . . b1, b2, b3, b4, b5, . . .

Define: zip : Z2 → Z

slide-53
SLIDE 53

CMCS, Paphos, 27/03/10

/ 37

Another coinductive definition

14

BX = A × X Z = Aω a1, a2, a3, a4, a5, . . . b1, b2, b3, b4, b5, . . .

Define: zip : Z2 → Z

slide-54
SLIDE 54

CMCS, Paphos, 27/03/10

/ 37

Another coinductive definition

14

BX = A × X Z = Aω a1, a2, a3, a4, a5, . . . b1, b2, b3, b4, b5, . . .

Define: zip : Z2 → Z

zip a1, b1, a2, b2, a3, . . .

slide-55
SLIDE 55

CMCS, Paphos, 27/03/10

/ 37

Another coinductive definition

14

BX = A × X Z = Aω a1, a2, a3, a4, a5, . . . b1, b2, b3, b4, b5, . . .

Define: zip : Z2 → Z

Z2

zip

  • z2 (BZ)2

λ

B(Z2)

B(zip)

  • Z

z

BZ zip a1, b1, a2, b2, a3, . . .

slide-56
SLIDE 56

CMCS, Paphos, 27/03/10

/ 37

Another coinductive definition

14

BX = A × X Z = Aω a1, a2, a3, a4, a5, . . . b1, b2, b3, b4, b5, . . .

Define: zip : Z2 → Z

Z2

zip

  • z2 (BZ)2

λ

B(Z2)

B(zip)

  • Z

z

BZ λ(a, σ, b, τ) a, (b :: τ, σ) = zip a1, b1, a2, b2, a3, . . .

slide-57
SLIDE 57

CMCS, Paphos, 27/03/10

/ 37

Another coinductive definition

14

BX = A × X Z = Aω a1, a2, a3, a4, a5, . . . b1, b2, b3, b4, b5, . . .

Define: zip : Z2 → Z

Z2

zip

  • z2 (BZ)2

λ

B(Z2)

B(zip)

  • Z

z

BZ λ(a, σ, b, τ) a, (b :: τ, σ) = x

a

→ x′ zip(x, y)

a

→ zip(y, x′) zip a1, b1, a2, b2, a3, . . .

slide-58
SLIDE 58

CMCS, Paphos, 27/03/10

/ 37

Another coinductive definition

14

BX = A × X Z = Aω a1, a2, a3, a4, a5, . . . b1, b2, b3, b4, b5, . . .

Define: zip : Z2 → Z

Z2

zip

  • z2 (BZ)2

λ

B(Z2)

B(zip)

  • Z

z

BZ λ(a, σ, b, τ) a, (b :: τ, σ) = x

a

→ x′ zip(x, y)

a

→ zip(y, x′)

But this is not natural!

zip a1, b1, a2, b2, a3, . . .

slide-59
SLIDE 59

CMCS, Paphos, 27/03/10

/ 37

Copointed coalgebras

15

A distributive law definition of :

zip Z2

zip

  • id,z2 (Z × BZ)2

λ

B(Z2)

B(zip)

  • Z

z

BZ (x, a, x′, y, b, y′) → a, (y, x′) x

a

→ x′ zip(x, y)

a

→ zip(y, x′)

slide-60
SLIDE 60

CMCS, Paphos, 27/03/10

/ 37

Copointed coalgebras

15

A distributive law definition of :

zip Z2

zip

  • id,z2 (Z × BZ)2

λ

B(Z2)

B(zip)

  • Z

z

BZ (x, a, x′, y, b, y′) → a, (y, x′) x

a

→ x′ zip(x, y)

a

→ zip(y, x′) λ : Σ(Id × B) = ⇒ BΣ

slide-61
SLIDE 61

CMCS, Paphos, 27/03/10

/ 37

Copointed coalgebras

15

A distributive law definition of :

zip Z2

zip

  • id,z2 (Z × BZ)2

λ

B(Z2)

B(zip)

  • Z

z

BZ (x, a, x′, y, b, y′) → a, (y, x′) x

a

→ x′ zip(x, y)

a

→ zip(y, x′) λ : Σ(Id × B) = ⇒ BΣ

To gain the benefits, work with copointed coalgebras.

slide-62
SLIDE 62

CMCS, Paphos, 27/03/10

/ 37

Pointed algebras

16

a/− : Z → Z b1, b2, b3, b4, b5, . . . a, b2, b3, b4, b5, . . . a/−

slide-63
SLIDE 63

CMCS, Paphos, 27/03/10

/ 37

Pointed algebras

16

a/− : Z → Z b1, b2, b3, b4, b5, . . . a, b2, b3, b4, b5, . . . a/−

?

Z

a/−

  • BZ

B(a/−)

  • Z

z

BZ

slide-64
SLIDE 64

CMCS, Paphos, 27/03/10

/ 37

Pointed algebras

16

a/− : Z → Z b1, b2, b3, b4, b5, . . . a, b2, b3, b4, b5, . . . a/−

slide-65
SLIDE 65

CMCS, Paphos, 27/03/10

/ 37

Pointed algebras

16

a/− : Z → Z b1, b2, b3, b4, b5, . . . a, b2, b3, b4, b5, . . . a/− ΣZ

g

  • Σz ΣBZ

λ

B(Z + ΣZ)

B[id,g]

  • Z

z

BZ

slide-66
SLIDE 66

CMCS, Paphos, 27/03/10

/ 37

Pointed algebras

16

a/− : Z → Z b1, b2, b3, b4, b5, . . . a, b2, b3, b4, b5, . . . a/− ΣZ

g

  • Σz ΣBZ

λ

B(Z + ΣZ)

B[id,g]

  • Z

z

BZ λ : BZ → B(Z + Z) x

b

− → x′ a/x

a

− → x′ b, x′ → a, ι1(x′)

slide-67
SLIDE 67

CMCS, Paphos, 27/03/10

/ 37

Pointed algebras

16

a/− : Z → Z b1, b2, b3, b4, b5, . . . a, b2, b3, b4, b5, . . . a/− ΣZ

g

  • Σz ΣBZ

λ

B(Z + ΣZ)

B[id,g]

  • Z

z

BZ λ : BZ → B(Z + Z) x

b

− → x′ a/x

a

− → x′ b, x′ → a, ι1(x′)

To gain the benefits, work with pointed algebras.

slide-68
SLIDE 68

CMCS, Paphos, 27/03/10

/ 37

Complex successors

17

x

a

− → x′ f(x)

a

− → zip(a, f(x′))

slide-69
SLIDE 69

CMCS, Paphos, 27/03/10

/ 37

Complex successors

17

x

a

− → x′ f(x)

a

− → zip(a, f(x′)) λ : ΣB = ⇒ BTΣ

free monad over Σ

slide-70
SLIDE 70

CMCS, Paphos, 27/03/10

/ 37

Complex successors

17

x

a

− → x′ f(x)

a

− → zip(a, f(x′)) λ : ΣB = ⇒ BTΣ

free monad over Σ

ΣZ

g

  • Σz ΣBZ

λ

BTΣ

Bg♯

  • Z

z

BZ

slide-71
SLIDE 71

CMCS, Paphos, 27/03/10

/ 37

Complex successors

17

x

a

− → x′ f(x)

a

− → zip(a, f(x′)) λ : ΣB = ⇒ BTΣ

free monad over Σ

ΣZ

g

  • Σz ΣBZ

λ

BTΣ

Bg♯

  • Z

z

BZ

Here, work with E-M algebras for the monad TΣ

slide-72
SLIDE 72

CMCS, Paphos, 27/03/10

/ 37

Complex successors

17

x

a

− → x′ f(x)

a

− → zip(a, f(x′)) λ : ΣB = ⇒ BTΣ

free monad over Σ Together with :

zip λ : Σ(Id × B) = ⇒ BTΣ ΣZ

g

  • Σz ΣBZ

λ

BTΣ

Bg♯

  • Z

z

BZ

Here, work with E-M algebras for the monad TΣ

slide-73
SLIDE 73

CMCS, Paphos, 27/03/10

/ 37

Look-ahead

18

slide-74
SLIDE 74

CMCS, Paphos, 27/03/10

/ 37

Look-ahead

18

  • dd : Z → Z

a1, a2, a3, a4, a5, . . . a1, a3, a5, a7, ...

  • dd
slide-75
SLIDE 75

CMCS, Paphos, 27/03/10

/ 37

Look-ahead

18

  • dd : Z → Z

a1, a2, a3, a4, a5, . . . a1, a3, a5, a7, ...

  • dd

x

a

− → y

b

− → z

  • dd(x)

a

− → odd(z)

slide-76
SLIDE 76

CMCS, Paphos, 27/03/10

/ 37

Look-ahead

18

  • dd : Z → Z

a1, a2, a3, a4, a5, . . . a1, a3, a5, a7, ...

  • dd

x

a

− → y

b

− → z

  • dd(x)

a

− → odd(z) λ : ΣDB = ⇒ BΣ

slide-77
SLIDE 77

CMCS, Paphos, 27/03/10

/ 37

Look-ahead

18

  • dd : Z → Z

a1, a2, a3, a4, a5, . . . a1, a3, a5, a7, ...

  • dd

x

a

− → y

b

− → z

  • dd(x)

a

− → odd(z) λ : ΣDB = ⇒ BΣ

cofree comonad over B

slide-78
SLIDE 78

CMCS, Paphos, 27/03/10

/ 37

Look-ahead

18

  • dd : Z → Z

a1, a2, a3, a4, a5, . . . a1, a3, a5, a7, ...

  • dd

x

a

− → y

b

− → z

  • dd(x)

a

− → odd(z) λ : ΣDB = ⇒ BΣ

cofree comonad over B

ΣZ

g

  • Σz♭ ΣDBZ

λZ

BΣZ

Bg

  • Z

z

BZ

slide-79
SLIDE 79

CMCS, Paphos, 27/03/10

/ 37

Monad over comonad

19

The general case:

λ : TΣDB = ⇒ DBTΣ

subject to laws

TΣZ

g

  • TΣz TΣDBZ

λz

DBTΣZ

DBg

  • Z

z

DBZ

slide-80
SLIDE 80

CMCS, Paphos, 27/03/10

/ 37

Monad over comonad

19

The general case:

λ : TΣDB = ⇒ DBTΣ

subject to laws This subsumes all previous cases.

TΣZ

g

  • TΣz TΣDBZ

λz

DBTΣZ

DBg

  • Z

z

DBZ

slide-81
SLIDE 81

CMCS, Paphos, 27/03/10

/ 37 20

III. STRUCTURAL OPERATIONAL SEMANTICS

slide-82
SLIDE 82

CMCS, Paphos, 27/03/10

/ 37 20

III. STRUCTURAL OPERATIONAL SEMANTICS

BX = (PωX)A

slide-83
SLIDE 83

CMCS, Paphos, 27/03/10

/ 37

Toy SOS example

21

a

a

− → nil ΣX = 1 + A + X2 BX = (PωX)A x

a

− → x′ y

a

− → y′ x ⊗ y

a

− → x′ ⊗ y′

This defines: λ : ΣB =

⇒ BΣ

slide-84
SLIDE 84

CMCS, Paphos, 27/03/10

/ 37

Toy SOS example

21

a

a

− → nil ΣX = 1 + A + X2 BX = (PωX)A x

a

− → x′ y

a

− → y′ x ⊗ y

a

− → x′ ⊗ y′

This defines: λ : ΣB =

⇒ BΣ

Fact: the LTS induced by the rules is the initial -bialgebra.

λ

Hence, bisimilarity on it is a congruence.

slide-85
SLIDE 85

CMCS, Paphos, 27/03/10

/ 37

GSOS

22

Laws correspond to rules:

λ : Σ(Id × B) = ⇒ BTΣ

  • , are all distinct

{xi

aij

− → yij}1≤i≤n

1≤j≤mi

{xi

bik

− →}1≤i≤n

1≤k≤li

f(x1, . . . , xn)

c

− → t xi yij

  • no other variables occur in t

where

  • there are finitely many rules for every ,

f c

slide-86
SLIDE 86

CMCS, Paphos, 27/03/10

/ 37

GSOS

22

Laws correspond to rules:

λ : Σ(Id × B) = ⇒ BTΣ

  • , are all distinct

{xi

aij

− → yij}1≤i≤n

1≤j≤mi

{xi

bik

− →}1≤i≤n

1≤k≤li

f(x1, . . . , xn)

c

− → t xi yij

  • no other variables occur in t

where

  • there are finitely many rules for every ,

f c

no lookahead

slide-87
SLIDE 87

CMCS, Paphos, 27/03/10

/ 37

GSOS

22

Laws correspond to rules:

λ : Σ(Id × B) = ⇒ BTΣ

  • , are all distinct

{xi

aij

− → yij}1≤i≤n

1≤j≤mi

{xi

bik

− →}1≤i≤n

1≤k≤li

f(x1, . . . , xn)

c

− → t xi yij

  • no other variables occur in t

where

  • there are finitely many rules for every ,

f c

slide-88
SLIDE 88

CMCS, Paphos, 27/03/10

/ 37

GSOS

22

Laws correspond to rules:

λ : Σ(Id × B) = ⇒ BTΣ

  • , are all distinct

{xi

aij

− → yij}1≤i≤n

1≤j≤mi

{xi

bik

− →}1≤i≤n

1≤k≤li

f(x1, . . . , xn)

c

− → t xi yij

  • no other variables occur in t

where

  • there are finitely many rules for every ,

f c

This is GSOS, where bisimilarity is a congruence.

slide-89
SLIDE 89

CMCS, Paphos, 27/03/10

/ 37

Safe ntree

23

Laws correspond to rules:

λ : ΣDB = ⇒ B(Id + Σ)

  • , are all distinct

xi

  • no other variables occur in the rule

where

  • there are finitely many rules for every ,

f c

  • has depth at most

{zi

ai

− → yi}i∈I {wj

bj

− →}j∈J f(x1, . . . , xn)

c

− → t t 1 yi

  • the graph of premises is well-founded
slide-90
SLIDE 90

CMCS, Paphos, 27/03/10

/ 37

Safe ntree

23

Laws correspond to rules:

λ : ΣDB = ⇒ B(Id + Σ)

  • , are all distinct

xi

  • no other variables occur in the rule

where

  • there are finitely many rules for every ,

f c

  • has depth at most

{zi

ai

− → yi}i∈I {wj

bj

− →}j∈J f(x1, . . . , xn)

c

− → t t 1 yi

  • the graph of premises is well-founded

This is the “safe” ntree format.

slide-91
SLIDE 91

CMCS, Paphos, 27/03/10

/ 37

Monad over comonad?

24

λ : Σ(Id × B) = ⇒ BTΣ

complex successors

λ : ΣDB = ⇒ B(Id + Σ)

look-ahead

λ : TΣDB = ⇒ DBTΣ

both?

slide-92
SLIDE 92

CMCS, Paphos, 27/03/10

/ 37

Monad over comonad?

24

λ : Σ(Id × B) = ⇒ BTΣ

complex successors

λ : ΣDB = ⇒ B(Id + Σ)

look-ahead

λ : TΣDB = ⇒ DBTΣ

both?

x

a

− → y y

b

− → f(x)

b

− → k k

a

− → f(k)

But: does not induce an LTS!

slide-93
SLIDE 93

CMCS, Paphos, 27/03/10

/ 37 25

IV . FURTHER DEVELOPMENTS

slide-94
SLIDE 94

CMCS, Paphos, 27/03/10

/ 37

Probabilistic (reactive) GSOS

26

λ : Σ(Id × B) = ⇒ BTΣ

Probabilistic bisimilarity is a congruence.

⇐ ⇒ BX = (1 + DωX)A DωX = {φ : X → R+

0 | ♯supp(φ) < ω, x φ(x) = 1}

  • xi

a

− →

  • a∈Di
  • xi

a

− →

  • a∈Bi
  • xij

bj

− → yj

  • 1≤j≤k

f(x1, . . . , xn)

c,w

− → t

slide-95
SLIDE 95

CMCS, Paphos, 27/03/10

/ 37

Stochastic GSOS

27

BX = (FX)A FX = {φ : X → R+

0 | ♯supp(φ) < ω}

λ : Σ(Id × B) = ⇒ BTΣ

  • xi

a@wai

− →

  • a∈Di,1≤i≤n
  • xij

bj

− → yj

  • 1≤j≤k

f(x1, . . . , xn)

c,w

− → t

Stochastic bisimilarity is a congruence.

⇐ ⇒

slide-96
SLIDE 96

CMCS, Paphos, 27/03/10

/ 37

Weighted GSOS

28

BX = (FX)A λ : Σ(Id × B) = ⇒ BTΣ

Weighted bisimilarity is a congruence.

FX = {φ : X → W | ♯supp(φ) < ω}

  • xi

a

− → wa,i

  • a∈Di,1≤i≤n
  • xij

bj

− → yj

  • 1≤j≤k

f(x1, . . . , xn)

c,β

− → t = ⇒

slide-97
SLIDE 97

CMCS, Paphos, 27/03/10

/ 37

Weighted GSOS

28

BX = (FX)A λ : Σ(Id × B) = ⇒ BTΣ

Weighted bisimilarity is a congruence.

FX = {φ : X → W | ♯supp(φ) < ω}

any comm. monoid

  • xi

a

− → wa,i

  • a∈Di,1≤i≤n
  • xij

bj

− → yj

  • 1≤j≤k

f(x1, . . . , xn)

c,β

− → t = ⇒

slide-98
SLIDE 98

CMCS, Paphos, 27/03/10

/ 37

Timed SOS

29

BX = {T ⇀ X | . . .} T a time domain

(a comm. monoid with cancellation and linear specialization order)

λ : TΣDB = ⇒ DBTΣ ⇐ ⇒ {xi(0)

ti

− → xi(ti) | ti ∈ T ∧ xi(ti)↓}1≤i≤n f(x1(0), . . . , xn(0))

t

− → θt

slide-99
SLIDE 99

CMCS, Paphos, 27/03/10

/ 37

Name-passing GSOS

30

Another underlying category: Nom (actually a bit more complicated...)

λ : Σ(| −|× B| −| ) = ⇒ BTΣ| −| = ⇒

“Wide open” bisimilarity a congruence.

x

c!d

− → x′ y

c?(a)

− → y′ x||y

τ

− → y||([d/a]y′)

slide-100
SLIDE 100

CMCS, Paphos, 27/03/10

/ 37

Other work

31

  • The “microcosm” interpretation

GSOS rules

  • perations on coalgebras
slide-101
SLIDE 101

CMCS, Paphos, 27/03/10

/ 37

Other work

31

  • The “microcosm” interpretation

GSOS rules

  • perations on coalgebras

Parallel composition of states vs. Parallel composition of coalgebras

slide-102
SLIDE 102

CMCS, Paphos, 27/03/10

/ 37

Other work

31

  • The “microcosm” interpretation

GSOS rules

  • perations on coalgebras

Parallel composition of states vs. Parallel composition of coalgebras

  • tyft/tyxt categorically

t1

a1

− → u1 t2

a2

− → u2 f(x1, . . . , xn)

a

− → t

slide-103
SLIDE 103

CMCS, Paphos, 27/03/10

/ 37 32

V . SELECTED OPEN PROBLEMS

slide-104
SLIDE 104

CMCS, Paphos, 27/03/10

/ 37

Rules/premises/conclusions

33

collection of rules distributive law

rule

?

slide-105
SLIDE 105

CMCS, Paphos, 27/03/10

/ 37

Rules/premises/conclusions

33

collection of rules distributive law

rule

?

x

a

− → x′ y

b

− → f(x, y)

c

− → g(x′, y)

slide-106
SLIDE 106

CMCS, Paphos, 27/03/10

/ 37

x | = ax′ y | = [b]ff

Rules/premises/conclusions

33

collection of rules distributive law

rule

?

x

a

− → x′ y

b

− → f(x, y)

c

− → g(x′, y)

slide-107
SLIDE 107

CMCS, Paphos, 27/03/10

/ 37

x | = ax′ y | = [b]ff

Rules/premises/conclusions

33

collection of rules distributive law

rule

?

x

a

− → x′ y

b

− → f(x, y)

c

− → g(x′, y)

premise

modal formula conclusion

?

slide-108
SLIDE 108

CMCS, Paphos, 27/03/10

/ 37

Connections to modal logic

34

Distributive law bisimilarity a congruence.

= ⇒

What about other equivalences?

slide-109
SLIDE 109

CMCS, Paphos, 27/03/10

/ 37

Connections to modal logic

34

Distributive law bisimilarity a congruence.

= ⇒

What about other equivalences? Idea: see them as logical equivalences, use the logic.

⊤ = T aT = a ∨ [⊗]a⊤ a⊤ = a ∨ [⊗]a⊤ a(b ∨ [⊗]x) = [⊗]ax a[⊗]x = [⊗]ax

slide-110
SLIDE 110

CMCS, Paphos, 27/03/10

/ 37

Translations

35

Morphisms of ditributive laws:

  • well understood abstractly
  • very few examples worked out
slide-111
SLIDE 111

CMCS, Paphos, 27/03/10

/ 37

Translations

35

Morphisms of ditributive laws:

  • well understood abstractly
  • very few examples worked out

What is a translation of GSOS specifications?

slide-112
SLIDE 112

CMCS, Paphos, 27/03/10

/ 37

Translations

35

Morphisms of ditributive laws:

  • well understood abstractly
  • very few examples worked out

What is a translation of GSOS specifications? How to translate CCS into timed CCS? Or into -calculus?

π

slide-113
SLIDE 113

CMCS, Paphos, 27/03/10

/ 37

Translations

35

Morphisms of ditributive laws:

  • well understood abstractly
  • very few examples worked out

What is a translation of GSOS specifications? How to translate CCS into timed CCS? Or into -calculus?

π

Logics can be translated too!

slide-114
SLIDE 114

CMCS, Paphos, 27/03/10

/ 37

Parametricity

36

Various form of parametricity:

slide-115
SLIDE 115

CMCS, Paphos, 27/03/10

/ 37

Parametricity

36

Various form of parametricity:

  • parametrized by :

x

a

− → x′ loop(x)

a

− → x′; loop(x) loop ;

slide-116
SLIDE 116

CMCS, Paphos, 27/03/10

/ 37

Parametricity

36

Various form of parametricity:

  • parametrized by :

x

a

− → x′ loop(x)

a

− → x′; loop(x) loop ;

  • CCS parametrized by a set of actions
slide-117
SLIDE 117

CMCS, Paphos, 27/03/10

/ 37

Parametricity

36

Various form of parametricity:

  • parametrized by :

x

a

− → x′ loop(x)

a

− → x′; loop(x) loop ;

  • CCS parametrized by a set of actions

What is a parametric specification?

slide-118
SLIDE 118

CMCS, Paphos, 27/03/10

/ 37

Parametricity

36

Various form of parametricity:

  • parametrized by :

x

a

− → x′ loop(x)

a

− → x′; loop(x) loop ;

  • CCS parametrized by a set of actions

What is a parametric specification? E.g. pushout parametricity:

slide-119
SLIDE 119

CMCS, Paphos, 27/03/10

/ 37

Parametricity

36

Various form of parametricity:

  • parametrized by :

x

a

− → x′ loop(x)

a

− → x′; loop(x) loop ;

  • CCS parametrized by a set of actions

What is a parametric specification? E.g. pushout parametricity:

λp

  • λb
slide-120
SLIDE 120

CMCS, Paphos, 27/03/10

/ 37

Parametricity

36

Various form of parametricity:

  • parametrized by :

x

a

− → x′ loop(x)

a

− → x′; loop(x) loop ;

  • CCS parametrized by a set of actions

What is a parametric specification? E.g. pushout parametricity:

λp

  • λb

parameter body

slide-121
SLIDE 121

CMCS, Paphos, 27/03/10

/ 37

Parametricity

36

Various form of parametricity:

  • parametrized by :

x

a

− → x′ loop(x)

a

− → x′; loop(x) loop ;

  • CCS parametrized by a set of actions

What is a parametric specification? E.g. pushout parametricity:

λp

  • λa

λb

parameter body

slide-122
SLIDE 122

CMCS, Paphos, 27/03/10

/ 37

Parametricity

36

Various form of parametricity:

  • parametrized by :

x

a

− → x′ loop(x)

a

− → x′; loop(x) loop ;

  • CCS parametrized by a set of actions

What is a parametric specification? E.g. pushout parametricity:

λp

  • λa

λb

parameter body argument

slide-123
SLIDE 123

CMCS, Paphos, 27/03/10

/ 37

Parametricity

36

Various form of parametricity:

  • parametrized by :

x

a

− → x′ loop(x)

a

− → x′; loop(x) loop ;

  • CCS parametrized by a set of actions

What is a parametric specification? E.g. pushout parametricity:

λp

  • λa
  • λb

λ

parameter body argument

slide-124
SLIDE 124

CMCS, Paphos, 27/03/10

/ 37

Modular SOS formalism

37

Language for defining SOS specifications

  • building blocks: distributive laws
  • ways of combining them:

= translation = parametricity / instantiation = ways of writing them down (rules?)