0% found this document useful (0 votes)
37 views60 pages

Unit9 Module2

Uploaded by

John Doe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views60 pages

Unit9 Module2

Uploaded by

John Doe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

Unit-9: Computation Tree Logic

B. Srivathsan

Chennai Mathematical Institute

NPTEL-course

July - November 2015

1/25
Module 2:
CTL∗

2/25
Recap

É Path formulae
É Express properties of paths
É LTL

É Properties on trees
É A and E operators
É Mixing A and E

3/25
Recap

É Path formulae
É Express properties of paths
É LTL

É Properties on trees
É A and E operators
É Mixing A and E

Coming next: A logic for expressing properties on trees

3/25
State formulae

φ :=

.. .. .. .. ..
. . . . .
4/25
State formulae

φ := true |

.. .. .. .. ..
. . . . .
4/25
State formulae

φ := true | pi |

pi ∈ AP

.. .. .. .. ..
. . . . .
4/25
State formulae

φ := true | pi | φ1 ∧ φ2 |

pi ∈ AP φ1 , φ2 : State formulae

.. .. .. .. ..
. . . . .
4/25
State formulae

φ := true | pi | φ1 ∧ φ2 | ¬φ1

pi ∈ AP φ1 , φ2 : State formulae

.. .. .. .. ..
. . . . .
4/25
Path formulae

α :=

.. .. .. .. ..
. . . . .
5/25
Path formulae

α := φ |

φ : State formula

.. .. .. .. ..
. . . . .
5/25
Path formulae

α := φ | α1 ∧ α2 |

φ : State formula α1 , α2 : Path formulae

.. .. .. .. ..
. . . . .
5/25
Path formulae

α := φ | α1 ∧ α2 | ¬α1 |

φ : State formula α1 , α2 : Path formulae

.. .. .. .. ..
. . . . .
5/25
Path formulae

α := φ | α1 ∧ α2 | ¬α1 | X α1 |

φ : State formula α1 , α2 : Path formulae

.. .. .. .. ..
. . . . .
5/25
Path formulae

α := φ | α1 ∧ α2 | ¬α1 | X α1 | α1 U α2 |

φ : State formula α1 , α2 : Path formulae

.. .. .. .. ..
. . . . .
5/25
Path formulae

α := φ | α1 ∧ α2 | ¬α1 | X α1 | α1 U α2 | F α1 |

φ : State formula α1 , α2 : Path formulae

.. .. .. .. ..
. . . . .
5/25
Path formulae

α := φ | α1 ∧ α2 | ¬α1 | X α1 | α1 U α2 | F α1 | G α1

φ : State formula α1 , α2 : Path formulae

.. .. .. .. ..
. . . . .
5/25
State formulae

φ := true | pi | φ1 ∧ φ2 | ¬φ1

pi ∈ AP φ1 , φ2 : State formulae

.. .. .. .. ..
. . . . .
6/25
State formulae

φ := true | pi | φ1 ∧ φ2 | ¬φ1 | E α |

pi ∈ AP φ1 , φ2 : State formulae α : Path formula

.. .. .. .. ..
. . . . .
6/25
State formulae

φ := true | pi | φ1 ∧ φ2 | ¬φ1 | E α | A α

pi ∈ AP φ1 , φ2 : State formulae α : Path formula

.. .. .. .. ..
. . . . .
6/25
CTL∗

State formulae

:= true | pi | 1 ^ 2 | ¬ 1 |E↵ | A↵

pi 2 AP 1, 2 : State formulae ↵ : Path formula

Path formulae

↵ := | ↵1 ^ ↵2 | ¬↵1 | X ↵1 | ↵1 U ↵2 | F ↵1 | G ↵1

: State formula ↵1 , ↵2 : Path formulae

7/25
CTL∗

State formulae

:= true | pi | 1 ^ 2 | ¬ 1 |E↵ | A↵

pi 2 AP 1, 2 : State formulae ↵ : Path formula

Path formulae

↵ := | ↵1 ^ ↵2 | ¬↵1 | X ↵1 | ↵1 U ↵2 | F ↵1 | G ↵1

: State formula ↵1 , ↵2 : Path formulae

Examples: E F p1 , A F A G p1 , A F G p2 , A p1 , A E p1

7/25
State formulae

:= true | pi | 1 ^ 2 |
When does a state in a tree satisfy a state formula?
pi 2 AP 1, 2 : State formulae

.. .. .. .. ..
. . . . .
4/14

8/25
State formulae

:= true | pi | 1 ^ 2 | ¬ 1 |E↵ | A↵

pi 2 AP 1, 2 : State formulae ↵ : Path formula

.. .. .. .. ..
. . . . .
6/13

9/25
State formulae

:= true | pi | 1 ^ 2 | ¬ 1 |E↵ | A↵

pi 2 AP 1, 2 : State formulae ↵ : Path formula

É Every state satisfies true

.. .. .. .. ..
. . . . .
6/13

9/25
State formulae

:= true | pi | 1 ^ 2 | ¬ 1 |E↵ | A↵

pi 2 AP 1, 2 : State formulae ↵ : Path formula

É Every state satisfies true

É State satisfies pi if its label contains pi

.. .. .. .. ..
. . . . .
6/13

9/25
State formulae

:= true | pi | 1 ^ 2 | ¬ 1 |E↵ | A↵

pi 2 AP 1, 2 : State formulae ↵ : Path formula

É Every state satisfies true

É State satisfies pi if its label contains pi

É State satisfies φ1 ∧ φ2 if it satisfies both φ1 and φ2

.. .. .. .. ..
. . . . .
6/13

9/25
State formulae

:= true | pi | 1 ^ 2 | ¬ 1 |E↵ | A↵

pi 2 AP 1, 2 : State formulae ↵ : Path formula

É Every state satisfies true

É State satisfies pi if its label contains pi

É State satisfies φ1 ∧ φ2 if it satisfies both φ1 and φ2

É State satisfies ¬ φ if it does not satisfy φ

.. .. .. .. ..
. . . . .
6/13

9/25
State formulae

:= true | pi | 1 ^ 2 | ¬ 1 |E↵ | A↵

pi 2 AP 1, 2 : State formulae ↵ : Path formula

É Every state satisfies true

É State satisfies pi if its label contains pi

É State satisfies φ1 ∧ φ2 if it satisfies both φ1 and φ2

É State satisfies ¬ φ if it does not satisfy φ

.. E α if there
State satisfies .. exists a... path starting
.. from the
.. state
É
. . . .
satisfying α
6/13

9/25
State formulae

:= true | pi | 1 ^ 2 | ¬ 1 |E↵ | A↵

pi 2 AP 1, 2 : State formulae ↵ : Path formula

É Every state satisfies true

É State satisfies pi if its label contains pi

É State satisfies φ1 ∧ φ2 if it satisfies both φ1 and φ2

É State satisfies ¬ φ if it does not satisfy φ

.. E α if there
State satisfies .. exists a... path starting
.. from the
.. state
É
. . . .
satisfying α
6/13

É State satisfies A α if all paths starting from the state satisfy α

9/25
Path formulae

:= a path in a tree satisfy a path formula?


When↵does

.. .. .. .. ..
. . . . .
5/14

10/25
Path formulae

↵ := | ↵1 ^ ↵2 | ¬↵1 | X ↵1 | ↵1 U ↵2 | F ↵1 | G ↵1

: State formula ↵1 , ↵2 : Path formulae

.. .. .. .. ..
. . . . .
5/13

11/25
Path formulae

↵ := | ↵1 ^ ↵2 | ¬↵1 | X ↵1 | ↵1 U ↵2 | F ↵1 | G ↵1

: State formula ↵1 , ↵2 : Path formulae

É Path satisfies φ if the initial state of the path satisfies φ

.. .. .. .. ..
. . . . .
5/13

11/25
Path formulae

↵ := | ↵1 ^ ↵2 | ¬↵1 | X ↵1 | ↵1 U ↵2 | F ↵1 | G ↵1

: State formula ↵1 , ↵2 : Path formulae

É Path satisfies φ if the initial state of the path satisfies φ

É Rest standard semantics like LTL

.. .. .. .. ..
. . . . .
5/13

11/25
:= true | p |
i 1^ 2 |
A tree satisfies state formula φ if its root satisfies φ
pi 2 AP 1, 2 : State formulae

.. .. .. .. ..
. . . . .
4/17

12/25
É E F p1 : Exists a path where p1 is true sometime

13/25
É E F p1 : Exists a path where p1 is true sometime

É A F A G p1 :

13/25
É E F p1 : Exists a path where p1 is true sometime

É A F A G p1 :

É In all paths, there exists a state where A G p1 is true

13/25
É E F p1 : Exists a path where p1 is true sometime

É A F A G p1 :

É In all paths, there exists a state where A G p1 is true


É In all paths, there exists a state from which all paths satisfy G p1

13/25
É E F p1 : Exists a path where p1 is true sometime

É A F A G p1 :

É In all paths, there exists a state where A G p1 is true


É In all paths, there exists a state from which all paths satisfy G p1
É In all paths, there exists a state such that every state in the
subtree below it contains p1

13/25
É E F p1 : Exists a path where p1 is true sometime

É A F A G p1 :

É In all paths, there exists a state where A G p1 is true


É In all paths, there exists a state from which all paths satisfy G p1
É In all paths, there exists a state such that every state in the
subtree below it contains p1

É A F G p2 : In all paths, there exists a state from which p2 is true


forever

13/25
É E F p1 : Exists a path where p1 is true sometime

É A F A G p1 :

É In all paths, there exists a state where A G p1 is true


É In all paths, there exists a state from which all paths satisfy G p1
É In all paths, there exists a state such that every state in the
subtree below it contains p1

É A F G p2 : In all paths, there exists a state from which p2 is true


forever

É A p1 :

13/25
É E F p1 : Exists a path where p1 is true sometime

É A F A G p1 :

É In all paths, there exists a state where A G p1 is true


É In all paths, there exists a state from which all paths satisfy G p1
É In all paths, there exists a state such that every state in the
subtree below it contains p1

É A F G p2 : In all paths, there exists a state from which p2 is true


forever

É A p1 :
É All paths satisfy p1

13/25
É E F p1 : Exists a path where p1 is true sometime

É A F A G p1 :

É In all paths, there exists a state where A G p1 is true


É In all paths, there exists a state from which all paths satisfy G p1
É In all paths, there exists a state such that every state in the
subtree below it contains p1

É A F G p2 : In all paths, there exists a state from which p2 is true


forever

É A p1 :
É All paths satisfy p1
É All paths start with p1

13/25
É E F p1 : Exists a path where p1 is true sometime

É A F A G p1 :

É In all paths, there exists a state where A G p1 is true


É In all paths, there exists a state from which all paths satisfy G p1
É In all paths, there exists a state such that every state in the
subtree below it contains p1

É A F G p2 : In all paths, there exists a state from which p2 is true


forever

É A p1 :
É All paths satisfy p1
É All paths start with p1
É Same as p1 !

13/25
E F A G (red)

.. .. .. .. ..
. . . . .

14/25
A F A G (red)

.. .. .. .. ..
. . . . .

15/25
E G E X (red)

.. .. .. .. ..
. . . . .

16/25
E G E X (red)

.. .. .. .. ..
. . . . .

17/25
E (E X blue) U (A G red)

.. .. .. .. ..
. . . . .

18/25
When does a transition system satisfy a CTL∗ formula?

{p1 } {p2 }
s0 s1

Transition System

s3 s2

{p1 , p3 } {p2 }

Paths s0 s1 s3 s3 s3 s3 ...
s0 s1 s2 s3 s2 s3 ...
19/25
Transition system satisfies CTL∗ formula φ if its
computation tree satisfies φ

{p1 } {p2 }
s0
s0 s1

ion System s1

s3 s2
s3 s2
{p1 , p3 } {p2 }

s3 s2 s3
s0 s1 s3 s3 s3 s3 ...
s0 s1 s2 s3 s2 s3 s3 s2 ... s3 s3 s2

s { p1 }{ p2 }{ p1 , p3 }{ p1 , p3 }{ p1 , p3 }{ p1 , p3 } . . . .. .. .. .. ..
. . . . .
{ p1 }{ p2 }{ p2 }{ p1 , p3 }{p2 }{ p1 , p3 }{p2 }{ p1 , p3 } . . .

20/25
Can LTL properties be written using CTL∗ ?

21/25
Transition System (TS) satisfies LTL formula φ if

Traces(TS) ⊆ Words(φ)

22/25
Transition System (TS) satisfies LTL formula φ if

Traces(TS) ⊆ Words(φ)

All paths in the computation tree of TS satisfy path formula


φ

22/25
Transition System (TS) satisfies LTL formula φ if

Traces(TS) ⊆ Words(φ)

All paths in the computation tree of TS satisfy path formula


φ

Equivalent CTL∗ formula: Aφ

22/25
Can CTL∗ properties be written using LTL?

23/25
Can CTL∗ properties be written using LTL?

Answer: No

23/25
E F A G (red)

.. .. .. .. ..
. . . . .

Cannot be expressed in LTL


24/25
Summary

CTL∗
Syntax and semantics

State formulae, Path formulae

LTL properties ⊆ CTL∗ properties

25/25

You might also like