Overview of Modal -calculus Prof. Susan Older 31 October 2017 - - PowerPoint PPT Presentation

overview of modal calculus
SMART_READER_LITE
LIVE PREVIEW

Overview of Modal -calculus Prof. Susan Older 31 October 2017 - - PowerPoint PPT Presentation

Overview of Modal -calculus Prof. Susan Older 31 October 2017 (CIS 400/632) -calculus 31 October 2017 1 / 13 -Calculus: Syntax Formulas of the logic: Use of meta-variables: represents a formula, K represents a set of actions, Z


slide-1
SLIDE 1

Overview of Modal µ-calculus

  • Prof. Susan Older

31 October 2017

(CIS 400/632) µ-calculus 31 October 2017 1 / 13

slide-2
SLIDE 2

µ-Calculus: Syntax

Formulas of the logic:

Use of meta-variables: ϕ represents a formula, K represents a set of actions, Z represents a propositional variable ϕ ::= tt | ff | ϕ1 ∧ ϕ2 | ϕ1 ∨ ϕ2 | [K]ϕ | Kϕ | Z | µZ.ϕ | νZ.ϕ

(CIS 400/632) µ-calculus 31 October 2017 2 / 13

slide-3
SLIDE 3

µ-Calculus: Syntax

Formulas of the logic:

Use of meta-variables: ϕ represents a formula, K represents a set of actions, Z represents a propositional variable ϕ ::= tt | ff | ϕ1 ∧ ϕ2 | ϕ1 ∨ ϕ2 | [K]ϕ | Kϕ | Z | µZ.ϕ | νZ.ϕ

Intuition behind µ and ν:

µZ.ϕ represents the “smallest” set of processes that satisfies the possibly recursive formula Z = ϕ νZ.ϕ represents the “largest” set of processes that satisfies the possibly recursive formula Z = ϕ

(CIS 400/632) µ-calculus 31 October 2017 2 / 13

slide-4
SLIDE 4

µ-Calculus: Semantics

| |ϕ| |Q

V is set of processes from Q that satisfy ϕ under valuation V :

| |tt| |Q

V = Q

| |ϕ1 ∧ ϕ2| |Q

V = |

|ϕ1| |Q

V ∩ |

|ϕ2| |Q

V

| |ff| |Q

V = ∅

| |ϕ1 ∨ ϕ2| |Q

V = |

|ϕ1| |Q

V ∪ |

|ϕ2| |Q

V

| |Z| |Q

V = V (Z) ∩ Q

| |[K]ϕ| |Q

V = {P ∈ Q | ∀α ∈ K, ∀P′ ∈ Q.(if P α

− → P′ then P′ ∈ | |ϕ| |Q

V )}

= {P ∈ Q | {P′ ∈ Q | P

α

− → P′ and α ∈ K} ⊆ | |ϕ| |Q

V }

| |Kϕ| |Q

V = {P ∈ Q | ∃α ∈ K, ∃P′ ∈ Q.(P α

− → P′ and P′ ∈ | |ϕ| |Q

V )}

| |µZ.ϕ| |Q

V = lfp f , where f (S) = |

|ϕ| |Q

V [S/Z]

| |νZ.ϕ| |Q

V = gfp f , where f (S) = |

|ϕ| |Q

V [S/Z]

(CIS 400/632) µ-calculus 31 October 2017 3 / 13

slide-5
SLIDE 5

Method of Approximants: Greatest Fixed Points

To identify greatest fixed point of monotonic function g : 2P → 2P:

Define a series of approximants as follows (where i ≥ 0): ν0g = P νi+1g = g(νig)

Claim: For each i, gfp g ⊆ νig.

Proof sketch: Note that ν0g = P, so it’s necessarily the case that gfp g ⊆ ν0g. By induction (and monotonicity), for each i, gfp g ⊆ νig.

(CIS 400/632) µ-calculus 31 October 2017 4 / 13

slide-6
SLIDE 6

Method of Approximants: Greatest Fixed Points

To identify greatest fixed point of monotonic function g : 2P → 2P:

Define a series of approximants as follows (where i ≥ 0): ν0g = P νi+1g = g(νig)

Claim: For each i, gfp g ⊆ νig.

Proof sketch: Note that ν0g = P, so it’s necessarily the case that gfp g ⊆ ν0g. By induction (and monotonicity), for each i, gfp g ⊆ νig.

What’s the point?

To calculate gfp g, it suffices to find the first i for which νi+1g = νig: then gfp g = νig!

(CIS 400/632) µ-calculus 31 October 2017 4 / 13

slide-7
SLIDE 7

Method of Approximants: GFP Example

Suppose R = {P1, P2, P3, P4, P5}:

P1

def

= b.P2 + a.P3 P3

def

= b.P1 + c.P4 P4

def

= a.P2 + a.P3 + b.P5 P2

def

= b.P2 + a.P4 P5

def

= a.P4 + a.P5

(CIS 400/632) µ-calculus 31 October 2017 5 / 13

slide-8
SLIDE 8

Method of Approximants: GFP Example

Suppose R = {P1, P2, P3, P4, P5}:

P1

def

= b.P2 + a.P3 P3

def

= b.P1 + c.P4 P4

def

= a.P2 + a.P3 + b.P5 P2

def

= b.P2 + a.P4 P5

def

= a.P4 + a.P5

Let g : 2R → 2R be:

g(Z) = | |[a]Y ∧ btt| |R

V [Z/Y ]

= | |[a]Y | |R

V [Z/Y ]

∩ | |btt| |R

V [Z/Y ]

= {P ∈ R | {P′ | P

a

− → P′} ⊆ Z} ∩ | |btt| |R

V [Z/Y ]

(CIS 400/632) µ-calculus 31 October 2017 5 / 13

slide-9
SLIDE 9

Method of Approximants: GFP Example

Suppose R = {P1, P2, P3, P4, P5}:

P1

def

= b.P2 + a.P3 P3

def

= b.P1 + c.P4 P4

def

= a.P2 + a.P3 + b.P5 P2

def

= b.P2 + a.P4 P5

def

= a.P4 + a.P5

Let g : 2R → 2R be:

g(Z) = | |[a]Y ∧ btt| |R

V [Z/Y ]

= | |[a]Y | |R

V [Z/Y ]

∩ | |btt| |R

V [Z/Y ]

= {P ∈ R | {P′ | P

a

− → P′} ⊆ Z} ∩ | |btt| |R

V [Z/Y ]

= {P ∈ R | {P′ | P

a

− → P′} ⊆ Z} ∩ {P1, P2, P3, P4}

(CIS 400/632) µ-calculus 31 October 2017 5 / 13

slide-10
SLIDE 10

Method of Approximants: GFP Example (Continued)

Suppose R = {P1, P2, P3, P4, P5}:

P1

def

= b.P2 + a.P3 P3

def

= b.P1 + c.P4 P4

def

= a.P2 + a.P3 + b.P5 P2

def

= b.P2 + a.P4 P5

def

= a.P4 + a.P5 g(Z) = {P ∈ R | {P′ | P

a

− → P′} ⊆ Z} ∩ {P1, P2, P3, P4}

(CIS 400/632) µ-calculus 31 October 2017 6 / 13

slide-11
SLIDE 11

Method of Approximants: GFP Example (Continued)

Suppose R = {P1, P2, P3, P4, P5}:

P1

def

= b.P2 + a.P3 P3

def

= b.P1 + c.P4 P4

def

= a.P2 + a.P3 + b.P5 P2

def

= b.P2 + a.P4 P5

def

= a.P4 + a.P5 g(Z) = {P ∈ R | {P′ | P

a

− → P′} ⊆ Z} ∩ {P1, P2, P3, P4} ν0g = R

(CIS 400/632) µ-calculus 31 October 2017 6 / 13

slide-12
SLIDE 12

Method of Approximants: GFP Example (Continued)

Suppose R = {P1, P2, P3, P4, P5}:

P1

def

= b.P2 + a.P3 P3

def

= b.P1 + c.P4 P4

def

= a.P2 + a.P3 + b.P5 P2

def

= b.P2 + a.P4 P5

def

= a.P4 + a.P5 g(Z) = {P ∈ R | {P′ | P

a

− → P′} ⊆ Z} ∩ {P1, P2, P3, P4} ν0g = R ν1g = g(R) = R ∩ {P1, P2, P3, P4} = {P1, P2, P3, P4}

(CIS 400/632) µ-calculus 31 October 2017 6 / 13

slide-13
SLIDE 13

Method of Approximants: GFP Example (Continued)

Suppose R = {P1, P2, P3, P4, P5}:

P1

def

= b.P2 + a.P3 P3

def

= b.P1 + c.P4 P4

def

= a.P2 + a.P3 + b.P5 P2

def

= b.P2 + a.P4 P5

def

= a.P4 + a.P5 g(Z) = {P ∈ R | {P′ | P

a

− → P′} ⊆ Z} ∩ {P1, P2, P3, P4} ν0g = R ν1g = g(R) = R ∩ {P1, P2, P3, P4} = {P1, P2, P3, P4} ν2g = g({P1, P2, P3, P4}) = {P1, P2, P3, P4} ∩ {P1, P2, P3, P4} = {P1, P2, P3, P4} Since ν2g = ν1g = {P1, P2, P3, P4}, the greatest fixed point is {P1, P2, P3, P4}.

(CIS 400/632) µ-calculus 31 October 2017 6 / 13

slide-14
SLIDE 14

Method of Approximants: Least Fixed Points

To identify least fixed point of monotonic function g : 2P → 2P:

Define a series of approximants as follows (where i ≥ 0): µ0g = ∅ µi+1g = g(µig)

Claim: For each i, µig ⊆ lfp g.

Proof sketch: Note that µ0g = ∅, so it’s necessarily the case that µ0g ⊆ lfp g. By induction (and monotonicity), for each i, µig ⊆ lfp g.

(CIS 400/632) µ-calculus 31 October 2017 7 / 13

slide-15
SLIDE 15

Method of Approximants: Least Fixed Points

To identify least fixed point of monotonic function g : 2P → 2P:

Define a series of approximants as follows (where i ≥ 0): µ0g = ∅ µi+1g = g(µig)

Claim: For each i, µig ⊆ lfp g.

Proof sketch: Note that µ0g = ∅, so it’s necessarily the case that µ0g ⊆ lfp g. By induction (and monotonicity), for each i, µig ⊆ lfp g.

What’s the point?

To calculate lfp g, it suffices to find the first i for which µi+1g = µig: then lfp g = µig!

(CIS 400/632) µ-calculus 31 October 2017 7 / 13

slide-16
SLIDE 16

Method of Approximants: LFP Example

Recall R = {P1, P2, P3, P4, P5}:

P1

def

= b.P2 + a.P3 P3

def

= b.P1 + c.P4 P4

def

= a.P2 + a.P3 + b.P5 P2

def

= b.P2 + a.P4 P5

def

= a.P4 + a.P5 g(Z) = {P ∈ R | {P′ | P

a

− → P′} ⊆ Z} ∩ {P1, P2, P3, P4}

(CIS 400/632) µ-calculus 31 October 2017 8 / 13

slide-17
SLIDE 17

Method of Approximants: LFP Example

Recall R = {P1, P2, P3, P4, P5}:

P1

def

= b.P2 + a.P3 P3

def

= b.P1 + c.P4 P4

def

= a.P2 + a.P3 + b.P5 P2

def

= b.P2 + a.P4 P5

def

= a.P4 + a.P5 g(Z) = {P ∈ R | {P′ | P

a

− → P′} ⊆ Z} ∩ {P1, P2, P3, P4} µ0g = ∅

(CIS 400/632) µ-calculus 31 October 2017 8 / 13

slide-18
SLIDE 18

Method of Approximants: LFP Example

Recall R = {P1, P2, P3, P4, P5}:

P1

def

= b.P2 + a.P3 P3

def

= b.P1 + c.P4 P4

def

= a.P2 + a.P3 + b.P5 P2

def

= b.P2 + a.P4 P5

def

= a.P4 + a.P5 g(Z) = {P ∈ R | {P′ | P

a

− → P′} ⊆ Z} ∩ {P1, P2, P3, P4} µ0g = ∅ µ1g = g(∅) = {P3} ∩ {P1, P2, P3, P4} = {P3}

(CIS 400/632) µ-calculus 31 October 2017 8 / 13

slide-19
SLIDE 19

Method of Approximants: LFP Example

Recall R = {P1, P2, P3, P4, P5}:

P1

def

= b.P2 + a.P3 P3

def

= b.P1 + c.P4 P4

def

= a.P2 + a.P3 + b.P5 P2

def

= b.P2 + a.P4 P5

def

= a.P4 + a.P5 g(Z) = {P ∈ R | {P′ | P

a

− → P′} ⊆ Z} ∩ {P1, P2, P3, P4} µ0g = ∅ µ1g = g(∅) = {P3} ∩ {P1, P2, P3, P4} = {P3} µ2g = g({P3}) = {P1, P3} ∩ {P1, P2, P3, P4} = {P1, P3}

(CIS 400/632) µ-calculus 31 October 2017 8 / 13

slide-20
SLIDE 20

Method of Approximants: LFP Example

Recall R = {P1, P2, P3, P4, P5}:

P1

def

= b.P2 + a.P3 P3

def

= b.P1 + c.P4 P4

def

= a.P2 + a.P3 + b.P5 P2

def

= b.P2 + a.P4 P5

def

= a.P4 + a.P5 g(Z) = {P ∈ R | {P′ | P

a

− → P′} ⊆ Z} ∩ {P1, P2, P3, P4} µ0g = ∅ µ1g = g(∅) = {P3} ∩ {P1, P2, P3, P4} = {P3} µ2g = g({P3}) = {P1, P3} ∩ {P1, P2, P3, P4} = {P1, P3} µ3g = g({P1, P3}) = {P1, P3} ∩ {P1, P2, P3, P4} = {P1, P3} Since µ2g = µ3g = {P1, P3}, the least fixed point is {P1, P3}.

(CIS 400/632) µ-calculus 31 October 2017 8 / 13

slide-21
SLIDE 21

Syntactic Approximations: Greatest Fixed Point

A process P satisfies the closed formula νZ.ϕ if and only if P satisfies the conjunction

  • i≥0

ϕi, where: ϕ0 = tt ϕi+1 = ϕ[ϕi/Z]

(CIS 400/632) µ-calculus 31 October 2017 9 / 13

slide-22
SLIDE 22

Syntactic Approximations: Greatest Fixed Point

A process P satisfies the closed formula νZ.ϕ if and only if P satisfies the conjunction

  • i≥0

ϕi, where: ϕ0 = tt ϕi+1 = ϕ[ϕi/Z]

Consider formula νY .([a]Y ∧ btt):

ϕ0 = tt ϕ1 = ([a]Y ∧ btt)[ϕ0/Y ] = [a]tt ∧ btt = btt ϕ2 = ([a]Y ∧ btt)[ϕ1/Y ] = [a]btt ∧ btt ϕ3 = ([a]Y ∧ btt)[ϕ2/Y ] = [a] ([a]btt ∧ btt) ∧ btt . . .

(CIS 400/632) µ-calculus 31 October 2017 9 / 13

slide-23
SLIDE 23

Syntactic Approximations: Least Fixed Point

A process P satisfies the closed formula µZ.ϕ if and only if P satisfies the disjunction

  • i≥0

ϕ′

i, where:

ϕ0 = ff ϕ′

i+1 = ϕ[ϕ′ i/Z]

(CIS 400/632) µ-calculus 31 October 2017 10 / 13

slide-24
SLIDE 24

Syntactic Approximations: Least Fixed Point

A process P satisfies the closed formula µZ.ϕ if and only if P satisfies the disjunction

  • i≥0

ϕ′

i, where:

ϕ0 = ff ϕ′

i+1 = ϕ[ϕ′ i/Z]

Consider formula µY .([a]Y ∧ btt):

ϕ′

0 = ff

ϕ′

1 = ([a]Y ∧ btt)[ϕ′ 0/Y ] = [a]ff ∧ btt

ϕ′

2 = ([a]Y ∧ btt)[ϕ′ 1/Y ] = [a]([a]ff ∧ btt) ∧ btt

ϕ′

3 = ([a]Y ∧ btt)[ϕ′ 2/Y ] = [a]([a]([a]ff ∧ btt) ∧ btt) ∧ btt

. . .

(CIS 400/632) µ-calculus 31 October 2017 10 / 13

slide-25
SLIDE 25

So... What’s Really Going On?

Look at the differences between the syntactic approximations:

νY .([a]Y ∧ btt) µY .([a]Y ∧ btt) ϕ1 = btt ϕ′

1 = [a]ff ∧ btt

ϕ2 = [a]btt ∧ btt ϕ′

2 = [a]([a]ff ∧ btt) ∧ btt

ϕ3 = [a] ([a]btt ∧ btt) ∧ btt ϕ′

3 = [a]([a]([a]ff ∧ btt) ∧ btt)

∧ btt

(CIS 400/632) µ-calculus 31 October 2017 11 / 13

slide-26
SLIDE 26

So... What’s Really Going On?

Look at the differences between the syntactic approximations:

νY .([a]Y ∧ btt) µY .([a]Y ∧ btt) ϕ1 = btt ϕ′

1 = [a]ff ∧ btt

ϕ2 = [a]btt ∧ btt ϕ′

2 = [a]([a]ff ∧ btt) ∧ btt

ϕ3 = [a] ([a]btt ∧ btt) ∧ btt ϕ′

3 = [a]([a]([a]ff ∧ btt) ∧ btt)

∧ btt Each ϕ′

i allows only finite number of a’s before a becomes impossible.

(CIS 400/632) µ-calculus 31 October 2017 11 / 13

slide-27
SLIDE 27

So... What’s Really Going On?

Look at the differences between the syntactic approximations:

νY .([a]Y ∧ btt) µY .([a]Y ∧ btt) ϕ1 = btt ϕ′

1 = [a]ff ∧ btt

ϕ2 = [a]btt ∧ btt ϕ′

2 = [a]([a]ff ∧ btt) ∧ btt

ϕ3 = [a] ([a]btt ∧ btt) ∧ btt ϕ′

3 = [a]([a]([a]ff ∧ btt) ∧ btt)

∧ btt Each ϕ′

i allows only finite number of a’s before a becomes impossible.

Each ϕi is silent regarding impossibility of a.

(CIS 400/632) µ-calculus 31 October 2017 11 / 13

slide-28
SLIDE 28

So... What’s Really Going On?

Look at the differences between the syntactic approximations:

νY .([a]Y ∧ btt) µY .([a]Y ∧ btt) ϕ1 = btt ϕ′

1 = [a]ff ∧ btt

ϕ2 = [a]btt ∧ btt ϕ′

2 = [a]([a]ff ∧ btt) ∧ btt

ϕ3 = [a] ([a]btt ∧ btt) ∧ btt ϕ′

3 = [a]([a]([a]ff ∧ btt) ∧ btt)

∧ btt Each ϕ′

i allows only finite number of a’s before a becomes impossible.

Each ϕi is silent regarding impossibility of a. ⋆ Intuition: Greatest fixed point can be satisfied via infinite paths.

(CIS 400/632) µ-calculus 31 October 2017 11 / 13

slide-29
SLIDE 29

µ-Calculus: Some Common Idioms

Suppose ϕ is a closed formula:

“ϕ is an invariant (always true)”: νZ.(ϕ ∧ [−]Z)

(CIS 400/632) µ-calculus 31 October 2017 12 / 13

slide-30
SLIDE 30

µ-Calculus: Some Common Idioms

Suppose ϕ is a closed formula:

“ϕ is an invariant (always true)”: νZ.(ϕ ∧ [−]Z) “ϕ is eventually true”: µZ.(ϕ ∨ (−tt ∧ [−]Z))

(CIS 400/632) µ-calculus 31 October 2017 12 / 13

slide-31
SLIDE 31

µ-Calculus: Some Common Idioms

Suppose ϕ is a closed formula:

“ϕ is an invariant (always true)”: νZ.(ϕ ∧ [−]Z) “ϕ is eventually true”: µZ.(ϕ ∨ (−tt ∧ [−]Z)) µZ.(KZ ∨ ϕ) “It’s possible to do a finite sequence of K-actions and arrive at a state that satisifies ϕ.”

(CIS 400/632) µ-calculus 31 October 2017 12 / 13

slide-32
SLIDE 32

µ-Calculus: Some Common Idioms

Suppose ϕ is a closed formula:

“ϕ is an invariant (always true)”: νZ.(ϕ ∧ [−]Z) “ϕ is eventually true”: µZ.(ϕ ∨ (−tt ∧ [−]Z)) µZ.(KZ ∨ ϕ) “It’s possible to do a finite sequence of K-actions and arrive at a state that satisifies ϕ.” νZ.(KZ ∨ ϕ) “It’s possible to do a finite sequence of K-actions and arrive at a state that satisifies ϕ or do an infinite sequence of K-actions.”

(CIS 400/632) µ-calculus 31 October 2017 12 / 13

slide-33
SLIDE 33

µ-Calculus: Some Common Idioms

Suppose ϕ is a closed formula:

“ϕ is an invariant (always true)”: νZ.(ϕ ∧ [−]Z) “ϕ is eventually true”: µZ.(ϕ ∨ (−tt ∧ [−]Z)) µZ.(KZ ∨ ϕ) “It’s possible to do a finite sequence of K-actions and arrive at a state that satisifies ϕ.” νZ.(KZ ∨ ϕ) “It’s possible to do a finite sequence of K-actions and arrive at a state that satisifies ϕ or do an infinite sequence of K-actions.” νZ.([K]Z ∧ ϕ) “ϕ is an invariant with respect to K-actions.”

(CIS 400/632) µ-calculus 31 October 2017 12 / 13

slide-34
SLIDE 34

µ-Calculus: Some Common Idioms

Suppose ϕ is a closed formula:

“ϕ is an invariant (always true)”: νZ.(ϕ ∧ [−]Z) “ϕ is eventually true”: µZ.(ϕ ∨ (−tt ∧ [−]Z)) µZ.(KZ ∨ ϕ) “It’s possible to do a finite sequence of K-actions and arrive at a state that satisifies ϕ.” νZ.(KZ ∨ ϕ) “It’s possible to do a finite sequence of K-actions and arrive at a state that satisifies ϕ or do an infinite sequence of K-actions.” νZ.([K]Z ∧ ϕ) “ϕ is an invariant with respect to K-actions.” µZ.([K]Z ∧ ϕ) “ϕ is an invariant with respect to K-actions, and eventually no K-actions will be possible.”

(CIS 400/632) µ-calculus 31 October 2017 12 / 13

slide-35
SLIDE 35

µ-Calculus: Strong and Weak Until

Suppose ϕ, ψ are closed formulas:

Strong until: µZ.(ψ ∨ (ϕ ∧ −tt ∧ [−]Z)) “ϕ will remain true at least until ψ becomes true (and ψ will eventually be true).” Weak until: νZ.(ψ ∨ (ϕ ∧ [−]Z)) “ϕ will remain true at least until ψ becomes true (which may or may not happen).” ⋆ Note that the guarantee that ϕ will be true expires when ψ becomes true, but ϕ itself may continue to be true.

(CIS 400/632) µ-calculus 31 October 2017 13 / 13