Nominal Process Calculi and Modal Logics Johannes Borgstrm Uppsala - - PowerPoint PPT Presentation

nominal process calculi and modal logics
SMART_READER_LITE
LIVE PREVIEW

Nominal Process Calculi and Modal Logics Johannes Borgstrm Uppsala - - PowerPoint PPT Presentation

Nominal Process Calculi and Modal Logics Johannes Borgstrm Uppsala University Based on joint work since 2015 with Ram nas Gutkovas Lars-Henrik Eriksson Joachim Parrow Tjark Weber 1 Introduction to Nominal Process Calculi CCS with


slide-1
SLIDE 1

Nominal Process Calculi and Modal Logics

Johannes Borgström Uppsala University

1

Based on joint work since 2015 with Ramūnas Gutkovas Lars-Henrik Eriksson Joachim Parrow Tjark Weber

slide-2
SLIDE 2

Introduction to Nominal Process Calculi

CCS with restriction

2

slide-3
SLIDE 3

Nominal Process Calculi

  • Process calculus: modelling language for systems of

communicating processes.

  • Three main traditions:
  • CSP (Hoare 1978)
  • CCS (Milner ~1980)
  • ACP (1982) process algebra

3

What is nominal process algebra?

slide-4
SLIDE 4

Calculus of Communicating Systems

  • Binary synchronization
  • Action (input) and coaction (output)

4

(νa)P Restriction P + Q Choice P | Q Parallel Nil a.P Input a.P Output

slide-5
SLIDE 5

Example 1a

Beverage machine M(tea, coffee, coin) M(tea, coffee, coin) := coin.tea.M(tea, coffee, coin) +
 coin.coin.coffee.M(tea, coffee, coin)

5

slide-6
SLIDE 6

Dining philosophers Philo(left,right,eat) Philo(left,right,eat) := left.right.eat.left.right.Philo(…) (ν cs1)(ν cs2)(ν cs3)(Philo(cs1,cs2,eat1)|Philo(cs2,cs3,eat2)| 
 Philo(cs3,cs1,eat3) | cs1 | cs2 | cs3)

Example 1b

6

We write a for a.0, and a for a.0

slide-7
SLIDE 7

Labelled Semantics

7

Com-L P

a

− → P 0 Q

a

− → Q0 P | Q

τ

− → P 0 | Q0

− → − →

Sum-L

P

α

− → P 0 P + Q

α

− → P 0

Par-L

P

α

− → P 0 P | Q

α

− → P 0 | Q

Scope

P

α

− → P 0 (νb)P

α

− → (νb)P 0 b#α

In

a.P

a

− → P

Out

a.P

a

− → P

slide-8
SLIDE 8

Example 2

Dining philosophers Philo(left,right,eat) Philo(left,right,eat) := left.right.eat.left.right.Philo(…) (ν cs1)(ν cs2)(ν cs3)(Philo(cs1,cs2,eat1)|Philo(cs2,cs3,eat2)| 
 Philo(cs3,cs1,eat3) | cs1 | cs2 | cs3) Philo2(left,right,eat) := left.(right.eat.(left |right|Philo(…)
 + left.Philo(…))

8

slide-9
SLIDE 9

Observational Equivalence

  • When can an external observer 


distinguish between two systems?


  • Idea: when either of them can perform an action
  • that the other one cannot perform; or
  • that leads the other system into a state that can be

distinguished from the new state of the first system.


  • An inductive definition!
  • Its negation is coinductive: bisimulation (Park 1981)

9

slide-10
SLIDE 10

Bisimulation

10

A symmetric relation R on processes satisfying: if R(P,Q) then If P

α

→ P 0 an

DEFINITION (Strong Bisimulation) Simulation

P

·

∼ Q if R(P, Q) for some bisimulation R n ∃Q0. Q

α

→ Q0 and R(P 0, Q0) if then

slide-11
SLIDE 11

Examples 3

  • Check that M(tea, coffee, coin) 


and M2(tea, coffee, coin) below are not bisimilar.
 
 


  • Check that the system below is weakly bisimilar to


Spec(eat1,eat2,eat3) := 
 eat1.Spec(…) + eat2.Spec(…) + eat3.Spec(…)

11

(ν cs1)(ν cs2)(ν cs3)(Philo2(cs1,cs2,eat1)
 | Philo2(cs2,cs3,eat2) | Philo2(cs3,cs1,eat3)
 | cs1 | cs2 | cs3) M2(tea, coffee, coin) := coin.(tea.M2(tea, coffee, coin) +
 coin.coffee.M2(tea, coffee, coin))

slide-12
SLIDE 12

Com-po-si-tio-na-li-ty

  • Bisimilarity is an equivalence relation, 


and a congruence for all operators

  • Allows to substitute bisimilar processes in any

context: compositional reasoning
 


  • Structural congruence ≡
  • The smallest congruence relation on processes


containing commutative monoid laws for 
 | (parallel) and + (choice) with 0 as unit.

  • ≡ is a bisimulation

12

slide-13
SLIDE 13

The 𝜌-calculus

Scope extension, scope extrusion, and residuals Milner, Parrow, Walker: A calculus of mobile processes. Information and Computation 100(1) 1992.

13

slide-14
SLIDE 14

The 𝜌-calculus

  • An extension of CCS with name communication
  • Value-passing can be encoded in CCS using 


summation

  • General name-passing needs infinite summation: 


not finitely supported!

  • Turing-complete, can easily encode the untyped

lambda-calculus

  • Current research on behavioural (session) types

14

slide-15
SLIDE 15

Nil a(x).P Input a b.P Output

Syntax of 𝜌

15

(νa)P Restriction P + Q Choice P | Q Parallel

slide-16
SLIDE 16

Examples 1

Truth values (at location l) True(l) := l(t,f).(t | True(l))
 False(l) := l(t,f).(f | False(l))
 Let’s do lists! Nil(l) := l(n,c).(n | Nil(l)) Cons(l,value,tail) := l(n,c).(c value,tail | Cons(…)) 
 What does do?

16

t (νb)a b.P?

We write a for a a.0 and a b,c for a b.a c and a(b,c) for a(b).a(c)

slide-17
SLIDE 17

Labelled Semantics

17

Com-L P

a

− → P 0 Q

a

− → Q0 P | Q

τ

− → P 0 | Q0

In

a(x).P

a b

− − → P b/

x

Out

a b.P

a b

− − → P

  • Sum-L

P

α

− → P 0 P + Q

α

− → P 0

Par-L

P

α

− → P 0 P | Q

α

− → P 0 | Q

In

a.P

a

− → P

Out

a.P

a

− → P

− → | − → |

Com-L P

a b

− − → P 0 Q

a b

− − → Q0 P | Q

τ

− → P 0 | Q0

Scope

P

α

− → P 0 (νb)P

α

− → (νb)P 0 b#α

But what about (νb)a b.P?

slide-18
SLIDE 18

Structural congruence ≡

  • The smallest congruence relation containing
  • commutative monoid laws for 


| (parallel) and + (choice) with 0 as unit;

  • and the scope extension laws

18

P | (νb)Q ≡ (νb)(P | Q) when b#P P + (νb)Q ≡ (νb)(P + Q) when b#P (νa)(νb)P ≡ (νb)(νa)P

slide-19
SLIDE 19

Reduction Semantics

19

≡ |

Struct P ≡ P 0

P 0 → Q Q ≡ Q0 P → Q0 →

Ctx-Par

P → P 0 P | Q → P 0 | Q

Ctx-Res

P → P 0 (νb)P → P 0

| → | →

Red (a(x).P + P 0) | (a b.Q + Q0) → P

b/

x

| Q

slide-20
SLIDE 20

Examples 2

if true then P else Q (ν l)(ν t)(ν f)(True(l) | l(t,f) | t.P | f.Q) case l of Nil -> P | Cons(v,l’) -> Q (ν n)(ν c)( l(n,c) | n.P | c(v,l’).Q)

20

slide-21
SLIDE 21

Set binders

Urban, Kaliszyk: General Bindings and 
 Alpha-Equivalence in Nominal Isabelle. ESOP 2011

21

(as, x) ≈ set

R, fa, p (bs, y)

def

= (i) fa x − as = fa y − bs (ii) fa x − as #∗ p ( (iii) (p·x) R y p (iv) p·as = bs

slide-22
SLIDE 22

NTS Labelled Semantics

22

But what about (νb)a b.P?

In a(x).P ! h;i(a b, P

b/

x

)

Out a b.P ! h;i(a b, P) Sum-L

P ! S P + Q ! S

Par-L

P ! hCi(α, P 0) P | Q ! hCi(α, P 0 | Q)

C#Q Com-L P ! h;i(a b, P 0)

Q ! h;i(a b, Q0) P | Q ! h;i(τ, P 0 | Q0)

Scope

P ! hCi(α, P 0) (νb)P ! hCi(α, (νb)P 0)

b#α

slide-23
SLIDE 23

Sum-L

P ! S P + Q ! S

Par-L

P ! hCi(α, P 0) P | Q ! hCi(α, P 0 | Q)

C#Q Com-L P ! h;i(a b, P 0)

Q ! h;i(a b, Q0) P | Q ! h;i(τ, P 0 | Q0)

Scope

P ! hCi(α, P 0) (νb)P ! hCi(α, (νb)P 0)

b#α Close-L P ! h;i(a b, P 0)

Q ! h{b}i(a b, Q0) P | Q ! h;i(τ, (νb)(P 0 | Q0))

b#P Open

P ! h;i(a b, P 0) (νb)P ! h{b}i(a b, P 0)

b#a

NTS Labelled Semantics

23

Based on Gabbay: The 𝜌-Calculus in FM, 
 in "Thirty Five Years of Automating Mathematics", Kluwer 2004

slide-24
SLIDE 24

Examples 3

24

if true then a else b (ν l)(ν t)(ν f)(True(l) | l(t,f) | t.a | f.b) Connect(c,P(l)) := (ν l)c l.P(l) Connect(c,(l a)(l)) | c(b).b(x).x What are the transitions of (νa)c a | (νc)c a ?

slide-25
SLIDE 25

Bisimulation

A symmetric relation R on processes satisfying: if R(P,Q) then If P

α

→ P 0 and bn(α)#Q then

DEFINITION (Strong Bisimulation) Simulation

P

·

∼ Q if R(P, Q) for some bisimulation R

25

n ∃Q0. Q

α

→ Q0 and R(P 0, Q0)

slide-26
SLIDE 26

Examples 4

  • Check that (νc)c a is bisimilar to 0.
  • Check that (νa)c a is bisimilar to (νa)c a | (νc)c a

26

slide-27
SLIDE 27

Com-po-si-tio-na-li-ty

  • Bisimilarity is an equivalence relation, 


and a congruence for all operators except input

  • Allows to substitute bisimilar processes in any 


non-input context: compositional reasoning
 


  • Structural congruence ≡ is a bisimulation

27

slide-28
SLIDE 28

Nominal Transition Systems

Based on slides by Joachim Parrow, OPCT 2017 (I omit predicates for now.)

28

slide-29
SLIDE 29

Nominal Transition Systems

What are NTS? Why? NTS are a general framework that fits almost all advanced process algebras, by generalising standard transition systems to include binders in actions

29

slide-30
SLIDE 30

States

30

slide-31
SLIDE 31

Transitions

31

slide-32
SLIDE 32

Actions

τ a b ab a(x) ahf(g(a), b)i a(νb) a(νb, c, d) a(x, y, z) ch(i)M

32

slide-33
SLIDE 33

Binding names

τ a b ab a(x) ahf(g(a), b)i a(νb) a(νb, c, d) a(x, y, z) ch(i)M

A c t i

  • n

s c

  • n

t a i n n a m e s States contain names

33

slide-34
SLIDE 34

States and actions

STATES: A nominal set P, Q

34

ACT: A nominal set

α

bn(α) ⊆ supp(α) bn : act → Pfin(N) equivariant

τ a b ab a(x) ahf(g(a), b)i a(νb) a(νb, c, d) a(x, y, z) ch(i)M

slide-35
SLIDE 35

Transitions

→ ⊆ states × [Pfin(N)](act × states) equivariant (P, <˜ b> (α, Q)) ∈ → implies ˜ b = bn(α)

35

τ a b ab a(x) ahf(g(a), b)i a(νb) a(νb, c, d) a(x, y, z) ch(i)M

We write P

α

  • ! Q for (P, hbn(α)i(α, Q)) 2 !
slide-36
SLIDE 36

Bisimulation

A symmetric relation R on processes satisfying: if R(P,Q) then If P

α

→ P 0 and bn(α)#Q then

DEFINITION (Strong Bisimulation) Simulation

P

·

∼ Q if R(P, Q) for some bisimulation R

36

n ∃Q0. Q

α

→ Q0 and R(P 0, Q0)

slide-37
SLIDE 37

Summary

  • Three process calculi: CCSish, pi, fusion
  • Reduction semantics
  • Residual-based labelled semantics
  • Bisimulation
  • Generalization: Nominal Transition Systems (NTS)
  • Saturday: Psi-calculi, modal logic for NTSs
  • Weak bisimilarity, weak logic, effects

37

slide-38
SLIDE 38

The 𝛀-calculus

Jesper Bengtson, Magnus Johansson, Joachim Parrow, Björn Victor, Johannes Åman Pohjola, et al.

38

slide-39
SLIDE 39

(νz)(az) | a(x). [x = b]P (νz)(aM) | a(λ˜ x)N. [x = b]P (νz)(KM) | L(λ˜ x)N. [x = b]P Ordinary pi-calculus Data structures can be sent Pattern matching Channels can be arbitrary structures Tests can be arbitrary predicates (νz)(KM) | L(λ˜ x)N. if ϕ then P arbitrary set of data (νz)(aM) | a(x). [x = b]P arbitrary logic (νz)(KM). ( |Ψ| ) | L(λ˜ x)N. if ϕ then P Facts about data

new construct

From pi to psi

slide-40
SLIDE 40

Cook a psi-calculus

Ψ

Define terms T (data terms, channels) and conditions C (used in case stmt) and assertions A (facts about data) can be any nominal set (not syntactic)

ϕ M, N

40

Define term substitution, and operators: . ↔: T × T → C ⊗ : A × A → A 1 : A ` ✓ A ⇥ C

Channel equivalence Composition Unit assertion Entailment (practically anything)

slide-41
SLIDE 41

Axioms for substitution

41

1: if ˜ a ⊆ n(X) and b ∈ n(˜ T) then b ∈ n(X[˜ a := ˜ T]) 2: if ˜ b#X, ˜ a then X[˜ a := ˜ T] = ((˜ b ˜ a) · X)[˜ b := ˜ T]

˜

Assume all the distinct, all the distinct.

((˜

b

˜

b ˜ a

˜

slide-42
SLIDE 42

Easy as pi!

In

Ψ ⇧ M . ⌅ K Ψ B M(λe y)N.P

K N[e y:=e L]

  • ⇤ P[e

y := e L]

Out

Ψ ⇧ M . ⌅ K Ψ B M N.P

K N

  • ⇤ P

Case Ψ B Pi

α

  • ⇤ P

Ψ ⇧ ϕi Ψ B case e ϕ : e P

α

  • ⇤ P

Com

Ψ⇥ΨP ⇥ΨQ ⇧ M . ⌅ K ΨQ⇥Ψ B P

M (νe a)N

  • ⇤ P

ΨP ⇥Ψ B Q

K N

  • ⇤ Q

Ψ B P | Q

τ

  • ⇤ (νe

a)(P | Q)

e a#Q Par ΨQ⇥Ψ B P

α

  • ⇤ P

Ψ B P|Q

α

  • ⇤ P |Q

bn(α)#Q Scope

Ψ B P

α

  • ⇤ P

Ψ B (νb)P

α

  • ⇤ (νb)P b#α, Ψ

Open

Ψ B P

M (νe a)N

  • ⇤ P

Ψ B (νb)P

M (νe a⇥{b})N

  • ⇤ P

b#e a, Ψ, M b ∈ n(N) Rep Ψ B P | !P

α

  • ⇤ P

Ψ B !P

α

  • ⇤ P

42

slide-43
SLIDE 43

Results

  • Generic results for all instances:
  • compositional semantics
  • bisimulation theory (strong and weak)
  • algebraic properties, congruence

  • Results for many instances
  • symbolic semantics and bisimulation
  • procedure for computing bisimilarity constraint

Machine-checked proofs

LICS’09 LICS’10 LMCS 2011 SOS’09 JLAP 2012

43

slide-44
SLIDE 44

Algebraic properties

) P . ∼Ψ Q = ⇒ P | R . ∼Ψ Q | R. . .

P | (νa)Q ∼ (νa)(P | Q) if a#P

The usual structural laws, in particular Scope extension Compositionality, congruence The usual congruence properties, in particular

(∀e

  • L. P[e

a := e L] . ∼Ψ Q[e a := e L]) = ⇒ M(λe a)N . P . ∼Ψ M(λe a)N . Q

Machine-checked proofs

44

slide-45
SLIDE 45

Nominal Isabelle Formalization

45

Mainly by 
 Jesper Bengtson and Johannes Åman Pohjola

slide-46
SLIDE 46

Making it this simple is hard work!

  • Easy to get things wrong, even when they are

“obviously right”

  • Easy to miss a requirement
  • Easy to miss generalisations
  • Especially true when (name) binding is involved

Easy to get worried!

46

slide-47
SLIDE 47

Isabelle from day 1

  • use Interactive theorem prover Isabelle 


with Nominal package

  • supports nominal datatypes, under active

development, produces readable proofs

  • use during development, not only afterwards!

47

slide-48
SLIDE 48

Adaptable proofs: case example

Old-Case

Ψ ⌅ ϕi Ψ ⇤ case ϕ : P

τ

  • ⇤ Pi

Original rule, tau action: easy induction proofs With Isabelle: took a day

  • e

e

  • Case Ψ ⇤ Pi

α

  • ⇧ P

Ψ ⌦ ϕi Ψ ⇤ case ϕ : P

α

  • ⇧ P

New rule: more standard, can express the above

48

Change requires re-checking all proofs!

slide-49
SLIDE 49

Adaptable proofs: higher-order

{M ⇐ P

run M

tion Ψ ` M ( P

Ψ ⇤ P

α

  • ! P 0

Ψ ⇤ run M

α

  • ! P 0

∧ n(M) ⊇ n(P)

Clauses Invocation agent Invocation rule Now prove all meta-theory again!

To get higher-order psi-calculi, just add the following:

With Isabelle: meta-theory took a day and a night More effort: locales, canonical instances, encodings

Parrow, Borgström, Raabjerg, Åman Pohjola, MSCS 2016

49

slide-50
SLIDE 50

Broadcast: harder

To get broadcast communication: , M . K,

, K . M,

Output connectivity Input connectivity

BrOut Ψ ` M . K Ψ ⇤ M N . P !K N
  • ! P
BrIn Ψ ` K . M Ψ ⇤ M(λe y)N . P ?K N[e y:=e L]
  • ! P[e
y := e L] BrMerge Ψ Q ⌦ Ψ ⇤ P ?K N
  • ! P 0
Ψ P ⌦ Ψ ⇤ Q ?K N
  • ! Q0
Ψ ⇤ P | Q ?K N
  • ! P 0 | Q0
BrCom Ψ Q ⌦ Ψ ⇤ P !K (νe a)N
  • ! P 0
Ψ P ⌦ Ψ ⇤ Q ?K N
  • ! Q0
Ψ ⇤ P | Q !K (νe a)N
  • ! P 0 | Q0
e a#Q BrClose Ψ ⇤ P !K (νe a)N
  • ! P 0
Ψ ⇤ (νb)P τ
  • ! (νb)(νe
a)P 0 b 2 n(K) b#Ψ

Five new semantics rules, two new actions Quite some work getting it right! Adds about 12700 lines of Isabelle proofs, 
 reuses entire Psi codebase of about 20500 lines.

SEFM’11
 SoSyM 2015

Even with Isabelle: two years, seven coauthors

50

slide-51
SLIDE 51

The power of Isabelle

What about combining higher-order and broadcast?

With Isabelle: took HALF a day, mostly waiting!

Re-prove all the 
 meta-theory…

“could be done by a clever shell script”

51

slide-52
SLIDE 52

Effort

  • Theory development is not only about doing

proofs – most time spent elsewhere

  • Doing false proofs is a waste of time
  • Correct proofs make it worthwhile!

It must take a lot of time to use Isabelle, surely?

No worries!

52

slide-53
SLIDE 53

Nominal Transition Systems

Based on slides by Joachim Parrow, OPCT 2017

53

slide-54
SLIDE 54

Nominal Transition Systems

What are NTS? Why? NTS are a general framework that fits almost all advanced process algebras, by generalising standard transition systems to include binders in actions

54

slide-55
SLIDE 55

States

55

slide-56
SLIDE 56

State predicates

x=1 y>z x=2 c=encrypt(m,k) prime(x)

8m, k. c 6= encrypt(m, k)

56

slide-57
SLIDE 57

Transitions

57

slide-58
SLIDE 58

Actions

τ a b ab a(x) ahf(g(a), b)i a(νb) a(νb, c, d) a(x, y, z) ch(i)M

58

slide-59
SLIDE 59

Binding names

τ a b ab a(x) ahf(g(a), b)i a(νb) a(νb, c, d) a(x, y, z) ch(i)M

A c t i

  • n

s c

  • n

t a i n n a m e s States contain names Predicates contain names

59

slide-60
SLIDE 60

States, predicates, and actions

STATES: A nominal set P, Q

60

ACT: A nominal set

α

bn(α) ⊆ supp(α) bn : act → Pfin(N) equivariant

τ a b ab a(x) ahf(g(a), b)i a(νb) a(x, y, z) ch(i)M

PRED: A nominal set

ϕ

` ✓ states ⇥ pred equivariant

x = 1 y > z x = 2 c = encrypt(m,k) prime(x)

8m, k. c 6= encrypt(m, k)

slide-61
SLIDE 61

Transitions

→ ⊆ states × [Pfin(N)](act × states) equivariant (P, <˜ b> (α, Q)) ∈ → implies ˜ b = bn(α)

61

τ a b ab a(x) ahf(g(a), b)i a(νb) a(νb, c, d) a(x, y, z) ch(i)M

We write P

α

  • ! Q for (P, hbn(α)i(α, Q)) 2 !
slide-62
SLIDE 62

Bisimulation

A symmetric relation R on processes satisfying: if R(P,Q) then If P

α

→ P 0 and bn(α)#Q then

DEFINITION (Strong Bisimulation) Simulation

P

·

∼ Q if R(P, Q) for some bisimulation R

62

n ∃Q0. Q

α

→ Q0 and R(P 0, Q0) If P ` ϕ then Q ` ϕ

Static implication

slide-63
SLIDE 63

Modal Logics for Nominal Transition Systems

63

Based on CONCUR 2015 paper with Ramūnas Gutkovas Lars-Henrik Eriksson Joachim Parrow Tjark Weber Presentation based on slides by Joachim Parrow

slide-64
SLIDE 64

Logic

64

Our objectives: A set of formulas A, B A satisfaction relation between states and formulas Expressive wrt existing work

Not objectives: decidability, model checking

P | = A

Fully formal Simple

slide-65
SLIDE 65

Formulas

65

Four basic constructors

A := ϕ | hαiA | ¬A | ^

i∈I

Ai

slide-66
SLIDE 66

State Predicates

66

P | = ϕ P ` ϕ

holds if

P satisfies the formula the state predicate holds in P

slide-67
SLIDE 67

Action modality

67

P | = hαiA

holds if

∃P 0. P

α

→ P 0 and P 0 | = A

we consider formulas up to alpha equivalence, ie

If a ∈ bn(α), b#α, A then hαiA = (a b) · (hαiA) P can do α and then satisfy A

slide-68
SLIDE 68

Negation

68

P | = ¬A

holds if

not P | = A

slide-69
SLIDE 69

Conjunction

69

P | = ^

i∈I

Ai Assume Ai a formula for each i ∈ I if for all i ∈ I it holds P | = Ai

The million dollar question: which such conjunctions should be allowed?

slide-70
SLIDE 70

Finite conjunction

70

P | = ^

i∈I

Ai

Allowed only for finite I Same as binary conjunction A1 ∧ A2 Easy to make fully formal Quite limited expressiveness (suitable only for finite-branching transition systems) S a f e b u t n

  • t

e n

  • u

g h

As in Hennessy Milner 1985

slide-71
SLIDE 71

Arbitrary conjunction

71

P | = ^

i∈I

Ai

Allowed for any I Enormous expressiveness:
 greater than the systems we study! Formulas might not be finitely supported, alpha-conversion might be impossible Needs substantial restrictions

As in Milner 1989

slide-72
SLIDE 72

Uniformly bounded conjunction

72

P | = ^

i∈I

Ai

Allowed for any I such that conjuncts have common finite support for some finite set of names S

∀i ∈ I. supp(Ai) ⊆ S

OK to make fully formal Still of limited expressiveness S t a n d a r d b u t n

  • t

e n

  • u

g h

As in Abramsky 1991

?

slide-73
SLIDE 73

Example: quantifiers

73

holds if

some substitution function

Can this be represented as ?

P | = ∀x ∈ N. A for all z ∈ N it holds P | = A[x := z] ∀x ∈ N. A = ^

z∈N

A[x := z]

slide-74
SLIDE 74

74

Is this conjunction uniformly bounded?

  • No. At least not

if

Quantification cannot be expressed by uniformly bounded conjunction!

∀x ∈ N. A = ^

z∈N

A[x := z] z ∈ supp(A[x := z])

slide-75
SLIDE 75

Finitely supported conjunction

75

^

i∈I

Ai requires that the set of formulas

has finite support S

{Ai | i ∈ I}

O u r c

  • n

t r i b u t i

  • n

Assume F is the set of formulas supported by S. Consider the different formulas ∧{A | A ∈ B}
 where B ranges over the subsets of F.

By Cantor’s Theorem, we have a contradiction.

Solution: cardinality bound on conjunction width

slide-76
SLIDE 76

76

? Is this conjunction finitely supported? Yes! 
 Assuming substitution is equivariant.

∀x ∈ N. A = ^

z∈N

A[x := z]

slide-77
SLIDE 77

Expressiveness

77

Dualities

[α]A = ¬hαi¬A _

i∈I

Ai = ¬ ^

i∈I

¬Ai

slide-78
SLIDE 78

Expressiveness

78

Quantifiers

∀x. A = ^

z∈V

A[x := z]

Assumes V is finitely supported and substitution is equivariant

∃x. A = _

z∈V

A[x := z]

slide-79
SLIDE 79

Expressiveness

79

COF is the set of cofinite sets of names

A if for some n#P it holds P | = (x n) · A N

  • x. A =

_

S∈cof

^

n∈S

(x n) · A

Fresh Quantifier

There is a cofinite set such that 
 A holds for all its members

P | = N

  • x. A i
slide-80
SLIDE 80

Expressiveness

80

Next step modality Fixpoints minimal fixpoint defined as disjunction of all unfoldings With next and fixpoints 
 we get all of CTL* Emerson 1997

hiA = _

α∈act

hαiA

bn(𝛽)#A

slide-81
SLIDE 81

Hennessy, Milner 1985

for concurrent constraint calculus

Buscemi, Montanari 2007

for psi-calculi

Bengtson et al 2011

Applications

81

Hennessy-Milner Logic for CCS

Milner 1989 Abramsky 1991

F A U

for value passing

Hennessy, Liu 1995

F + quantifiers

for pi-calculus

Milner, Parrow, Walker 1993 U

for spi-calculus

Frendrup, Huttel, Jensen 2002

A

for applied pi-calculus

Pedersen, 2006 F

for fusion calculus

Haugstad, Terkelsen, Vindum 2006A

for multi-labelled systems

De Nicola, Loreti 2008 F + quantifiers F Finite conjunction A Arbitrary conjunction U Uniformly bounded conjunction

Y e t n

  • m
  • d

a l l

  • g

i c

slide-82
SLIDE 82

Adequacy

82

If two states ``behave the same´´ then they satisfy exactly the same formulas A kind of sanity check: If two states do not ``behave the same´´ then there is a formula satisfied by one and not the other Most often: bisimulation

slide-83
SLIDE 83

Bisimulation

83

A symmetric relation R on states satisfying: if R(P,Q) then

If P

α

→ P 0 and bn(α)#Q then ∃Q0. Q

α

→ Q0 and R(P 0, Q If P | = ϕ then Q | = ϕ P

·

∼ Q if R(P, Q) for some bisimulation Q

THEOREM (Adequacy)

P

·

∼ Q iff for all formulas A: P | = A iff Q | = A

DEFINITION (Bisimulation)

slide-84
SLIDE 84

84

P

·

∼ Q iff for all formulas A: P | = A iff Q | = A

In direction ⇐ show that is a bisimulation. Assume not, then P has an 𝛽-transition to P’ 
 that Q cannot simulate:
 For each 𝛽-derivative Q’ there is a distinguishing formula A between P’ and Q’.

·

= defined as {(P, Q) | ∀A. P | = A iff Q | = A} Let B be the conjunction of all these A (one for each Q0) Then P | = hαiB and not Q | = hαiB

Contradiction!

logical equivalence

slide-85
SLIDE 85

85

If all the formulas A have 
 a common finite support then uniformly bounded conjunction suffices If the transition system is finitely branching then there are finitely many Q’ so finite conjunction suffices

Eg CCS with guarded recursion

Let B be the conjunction of all these A (one for each Q0)

Can this conjunction be defined in the logic?

Eg pi- calculus

In general use finitely supported conjunction

Arbitrary nominal transition systems

slide-86
SLIDE 86

86

Lemma: Proof idea: 
 Let PERM be the name permutations that fix P’

B = ^

π∈perm

π · A If P 0 | = A ^ Q0 6| = A then

  • 9B. P 0 |

= B ^ Q0 6| = B ^ supp(B) ✓ supp(P 0)

If there is a distinguising formula for P’ and Q’, then there is one with the support bounded by P’

In general use finitely supported conjunction

slide-87
SLIDE 87

Formalisation

87

All definitions and the adequacy 
 theorem formalised in 
 Nominal Isabelle (~2700 loc) Significant new ideas for alpha-equivalence
 and finite support in data types with 
 infinitary constructors. First ever mechanisation of an 
 infinitely branching nominal datatype.

Out of which 150 loc are definitions and theorems

slide-88
SLIDE 88

Equivalences 
 and Modal Logics for Unobservable Actions

88

Based on FORTE 2017 paper with Ramūnas Gutkovas Lars-Henrik Eriksson Joachim Parrow Tjark Weber Presentation based on slides by Joachim Parrow

slide-89
SLIDE 89

Weak = disregard silent transitions

P

τ

→ P 0

P can evolve to P’ without the environment noticing without interacting with the environment spontaneously silently

89

𝜐 action with empty support (implies bn(𝜐)=∅)
 representing an unobservable action

slide-90
SLIDE 90

Weak transitions

P

α

⇒ P 0 P ⇒ P 0 P

ˆ α

⇒ P 0 P ⇒ P 0 P

α

⇒ P 0 if α = τ

P can evolve to P’ through zero or more transitions with observable content 𝛽

{

defined inductively as

P = P 0 _ P

τ

! ) P 0 P )

α

! ) P 0

defined as defined as

  • therwise

90

slide-91
SLIDE 91

A relation R on states satisfying: if R(P,Q) then DEFINITION (simulation)

Simulation

If P

α

→ P 0 and bn(α)#Q then ∃Q0. Q

α

→ Q0 and R(P 0, Q

91

slide-92
SLIDE 92

A relation R on states satisfying: if R(P,Q) then DEFINITION (weak simulation)

If P

α

→ P 0 and bn(α)#Q then ∃Q0. Q

ˆ α

⇒ Q0 and R(P 0, Q0)

Weak simulation

92

slide-93
SLIDE 93

Static implication?

Should P and Q be equivalent? YES!

If P ` ϕ then Q ` ϕ

Can we re-use the static implication NO!

P Q ϕ τ

Example: transition system with two states,

  • ne transition, and 

  • ne state predicate

93

slide-94
SLIDE 94

Weak static implication?

If P ` ϕ then Q ) Q0 ` ϕ

ϕ1 ϕ0 ϕ1 ϕ0 R Q P τ τ

P and Q are weakly similar and satisfy (*) (*)

Observe ϕ1 and then observe ϕ0

No Yes

94

Are P and Q observationally equivalent?

slide-95
SLIDE 95

Weak static implication!

S is a weak static implication if S(P,Q) implies

ϕ1 ϕ0 ϕ1 ϕ0 R Q P τ τ

NOT a WSI

{(P, Q), (P, R)} If P ` ϕ then Q ) Q0 ` ϕ and S(P, Q0)

95

slide-96
SLIDE 96

Weak static implication

P and Q are weakly similar and the relation 
 satisfies (*) (*) No Yes

P P0 P1 Q ϕ ϕ τ α τ α

Observe ϕ and then perform α

Not enough by itself!

{(P, Q), (P, P1)} If P ` ϕ then Q ) Q0 ` ϕ and S(P, Q0)

96

Are P and Q observationally equivalent?

slide-97
SLIDE 97

Weak static implication!

is NOT a WSI

P P0 P1 Q ϕ ϕ τ α τ α

{(P, Q), (P0, P0), (P1, P1)}

is a WSI is a weak simulation is NOT a weak simulation

Must require the relation to be both WSI and weak simulation!

{(P, Q), (P, P1)}

97

slide-98
SLIDE 98

Weak bisimulation

A weak bisimulation is a symmetric relation R on states which is both a weak simulation and a weak static implication DEFINITION

If P

α

→ P 0 and bn(α)#Q then ∃Q0. Q

ˆ α

⇒ Q0 and R(P 0, Q0) R(P, Q) implies: If P ` ϕ then Q ) Q0 ` ϕ and R(P, Q0) P

·

≈ Q if R(P, Q) for some weak bisimulation R

98

slide-99
SLIDE 99

ϕ1 ϕ0 ϕ1 ϕ0 R Q P τ τ

P Q ϕ τ

P P0 P1 Q ϕ ϕ τ α τ α

P

·

≈ Q P 6

·

⇡ Q P 6

·

⇡ Q No relation is a WSI No relation is both a weak simulation and a WSI {(P, Q), (Q, Q)} is a weak simulation and a WSI

99

slide-100
SLIDE 100

Exercise

P0 P1 ϕ0 ϕ1 τ τ Q ϕ0 ϕ1

Which of the three states are weakly bisimilar? All of them! Let U be the universal relation on all three states U is a weak simulation U is a weak static implication

Note: ϕ0 ∧ ϕ1 is not a state predicate

100

slide-101
SLIDE 101

Eliminating state predicates

101

slide-102
SLIDE 102

Eliminating state predicates

α β τ τ ϕ0 ϕ0 ϕ1 ϕ1 T α β τ τ ϕ0 ϕ0 ϕ1 ϕ1

Transformation on transition systems Replace state predicates by self-loop transitions

S(T)

102

slide-103
SLIDE 103


 THEOREM (State predicate elimination)

Result

P

·

≈T Q iff P

·

≈S(T) Q

For a corresponding transformation on formulas, replacing predicates by actions

P | =S(T) A iff P | =T S−1(A)

103

slide-104
SLIDE 104

Conclusion

104

  • Generic HML
  • Suitable for embedding other logics in
  • Guaranteed soundness!
  • A sublogic characterises weak bisimulation
  • A uniform extension/encoding for
  • early bisimulation, early congruence, 


late bisimulation, late congruence, 


  • pen bisimulation, hyperbisimulation