You are on page 1of 24

Temporal Logic

CSE 510

Stanley Bak

[Some slides from Sayan Mitra and Sridhar Duggirala]


Turing Awards
1996 - Amir Pnueli - “for seminal work introducing
temporal logic into computing science and for
outstanding contributions to program and system
verification.”

2007 - Ed Clarke, E. Allen Emerson and Joseph Sifakis


- “for their role in developing model checking into a
highly effective verification technology that is widely
adopted in the hardware and software industries.”

2
Why Temporal Logic?
Properties over infinite executions

The state of a system changes over time

3
Why Temporal Logic?
Properties over infinite executions

The state of a system changes over time


Discrete time vs continuous time
Linear view of time vs branching view of time

4
Why Temporal Logic?
User creates a model (and defines initial states)
User creates a property
Model-checking automatically checks:

5
Note on Temporal Logic
Understanding the semantics of a temporal logic
formula can be difficult

Industrial applications often instead use structured


English expressions, which behind-the-scenes map to
temporal logic expressions

6
Temporal Logic Setup
User creates a model (and defines initial states)
User creates a property
Model-checking automatically checks:

7
Temporal Logic Setup
User creates a model (and defines initial states)
User creates a property
Model-checking automatically checks:

? ?

8
What is a Model (and start state)?

9
Infinite Execution Paths
Model + Start States + infinite executions is called a
Kripke Structure

Note: we assume the model executes forever (no


deadlocks)

Practically not much of a difference since we can add


self-loops

A path is an infinite sequence of states

10
Infinite Execution Tree

11
Mutual Exclusion Properties
Two processes, each with three states:

ni: non-critical section


ti: trying to enter critical section
ci: in critical section

Temporal Logic Requirements:


Safety: One process in the critical section at a time
Liveness: Whenever a process tries to enter the critical section,
it eventually does
Non-blocking: A process can always try to enter its critical
section 12
Mutual Exclusion Properties
Safety: One process in the critical section at a time
Liveness: Whenever a process tries to enter the critical section,
it eventually does
Non-blocking: A process can always try to enter its critical
section

13
Mutual Exclusion Trial 2

14
Linear Temporal Logic
(LTL) Introduction Slides

15
LTL Example #1

16
LTL Example #1

17
LTL Example #2

18
LTL Example #2

19
Mini Assignment - write in LTL

20
Mini Assignment - write in LTL

21
Mini Assignment - write in LTL

22
Mini Assignment - write in LTL

23
Things you cannot express in LTL

Why not?

24

You might also like