CSE507 Computer-Aided Reasoning for Software Model Checking I - - PowerPoint PPT Presentation

cse507
SMART_READER_LITE
LIVE PREVIEW

CSE507 Computer-Aided Reasoning for Software Model Checking I - - PowerPoint PPT Presentation

CSE507 Computer-Aided Reasoning for Software Model Checking I courses.cs.washington.edu/courses/cse507/14au/ Emina Torlak emina@cs.washington.edu Today 2 Today Last lecture Symbolic execution and concolic testing 2 Today Last lecture


slide-1
SLIDE 1

CSE507

Emina Torlak

emina@cs.washington.edu

courses.cs.washington.edu/courses/cse507/14au/

Computer-Aided Reasoning for Software

Model Checking I

slide-2
SLIDE 2

Today

2
slide-3
SLIDE 3

Today

2

Last lecture

  • Symbolic execution and concolic testing
slide-4
SLIDE 4

Today

2

Last lecture

  • Symbolic execution and concolic testing

Today

  • Introduction to model checking
slide-5
SLIDE 5

Today

2

Last lecture

  • Symbolic execution and concolic testing

Today

  • Introduction to model checking

Reminders

  • Homework 3 is due on Tuesday, November 18, at 11pm
slide-6
SLIDE 6

You are already half- way through your final project, right?

Today

2

Last lecture

  • Symbolic execution and concolic testing

Today

  • Introduction to model checking

Reminders

  • Homework 3 is due on Tuesday, November 18, at 11pm
slide-7
SLIDE 7

What is model checking?

3

An automated technique for verifying that a concurrent finite state system satisfies a given temporal property. M, s ⊨ P

slide-8
SLIDE 8

What is model checking?

3

An automated technique for verifying that a concurrent finite state system satisfies a given temporal property. M, s ⊨ P

A mathematical model of the system, given as a Kripke structure (a finite state machine).

slide-9
SLIDE 9

What is model checking?

3

An automated technique for verifying that a concurrent finite state system satisfies a given temporal property. M, s ⊨ P

A mathematical model of the system, given as a Kripke structure (a finite state machine). A state of the system (e.g., an initial state).

slide-10
SLIDE 10

What is model checking?

3

An automated technique for verifying that a concurrent finite state system satisfies a given temporal property. M, s ⊨ P

A mathematical model of the system, given as a Kripke structure (a finite state machine). A temporal logic formula (e.g., a request is eventually acknowledged). A state of the system (e.g., an initial state).

slide-11
SLIDE 11

Why model checking?

4

Classic & bounded verification

  • Deterministic, single-threaded,

possibly infinite-state, terminating programs.

  • Fully described by their input/
  • utput behavior.
  • Semi-automatic or bounded-

automatic checking of properties in expressive logics (e.g., FOL). Model checking

  • Reactive systems: concurrent

finite-state programs with

  • ngoing input/output behavior.
  • Control-intensive but without a lot
  • f data manipulation.
  • Fully automatic checking of

properties in less expressive (temporal) logics.

slide-12
SLIDE 12

Why model checking?

4

Classic & bounded verification

  • Deterministic, single-threaded,

possibly infinite-state, terminating programs.

  • Fully described by their input/
  • utput behavior.
  • Semi-automatic or bounded-

automatic checking of properties in expressive logics (e.g., FOL). Model checking

  • Reactive systems: concurrent

finite-state programs with

  • ngoing input/output behavior.
  • Control-intensive but without a lot
  • f data manipulation.
  • Fully automatic checking of

properties in less expressive (temporal) logics.

slide-13
SLIDE 13

Why model checking?

4

Classic & bounded verification

  • Deterministic, single-threaded,

possibly infinite-state, terminating programs.

  • Fully described by their input/
  • utput behavior.
  • Semi-automatic or bounded-

automatic checking of properties in expressive logics (e.g., FOL). Model checking

  • Reactive systems: concurrent

finite-state programs with

  • ngoing input/output behavior.
  • Control-intensive but without a lot
  • f data manipulation.
  • Fully automatic checking of

properties in less expressive (temporal) logics.

slide-14
SLIDE 14

Why model checking?

4

Classic & bounded verification

  • Deterministic, single-threaded,

possibly infinite-state, terminating programs.

  • Fully described by their input/
  • utput behavior.
  • Semi-automatic or bounded-

automatic checking of properties in expressive logics (e.g., FOL). Model checking

  • Reactive systems: concurrent

finite-state programs with

  • ngoing input/output behavior.
  • Control-intensive but without a lot
  • f data manipulation.
  • Fully automatic checking of

properties in less expressive (temporal) logics.

  • Microprocessors and device drivers
  • Embedded controllers (e.g., cars, planes)
  • Protocols (e.g., cache coherence)
slide-15
SLIDE 15

Why model checking?

4

Classic & bounded verification

  • Deterministic, single-threaded,

possibly infinite-state, terminating programs.

  • Fully described by their input/
  • utput behavior.
  • Semi-automatic or bounded-

automatic checking of properties in expressive logics (e.g., FOL). Model checking

  • Reactive systems: concurrent

finite-state programs with

  • ngoing input/output behavior.
  • Control-intensive but without a lot
  • f data manipulation.
  • Fully automatic checking of

properties in less expressive (temporal) logics.

  • Microprocessors and device drivers
  • Embedded controllers (e.g., cars, planes)
  • Protocols (e.g., cache coherence)
  • Libraries and ADT implementations
  • Heap-manipulating programs (e.g., OO)
  • Tricky deterministic algorithms
slide-16
SLIDE 16

A brief history of model checking

5

1930 1960 1980 1990 2010

slide-17
SLIDE 17

A brief history of model checking

5

1930 1960 1980 1990 2010

Modern modal logic (Lewis).

slide-18
SLIDE 18

A brief history of model checking

5

1930 1960 1980 1990 2010

Modern modal logic (Lewis). Standard semantics for modal logics (Kripke). Temporal logic (Prior).

slide-19
SLIDE 19

1977: Using LTL to reason about concurrent programs (Pnueli). 1981-82: Explicit-state model checking for CTL (Emerson & Clarke; Queille & Sifakis). 1985: Automata-theoretic approach for LTL model checking (Vardi & Wolper). 1987: Symbolic model checking for CTL (McMillan).

A brief history of model checking

5

1930 1960 1980 1990 2010

Modern modal logic (Lewis). Standard semantics for modal logics (Kripke). Temporal logic (Prior).

slide-20
SLIDE 20

1977: Using LTL to reason about concurrent programs (Pnueli). 1981-82: Explicit-state model checking for CTL (Emerson & Clarke; Queille & Sifakis). 1985: Automata-theoretic approach for LTL model checking (Vardi & Wolper). 1987: Symbolic model checking for CTL (McMillan).

A brief history of model checking

5

1930 1960 1980 1990 2010

Modern modal logic (Lewis). Standard semantics for modal logics (Kripke). Temporal logic (Prior). 1989: SPIN (Holzmann) 1992: SMV (McMillan) 1994: Pentium bug 1995: Futurebus+ verified

slide-21
SLIDE 21

1996: Pnueli wins the Turing award “for seminal work introducing temporal logic into computing science and for

  • utstanding contributions

to program and system verification.” 2007: Clarke, Emerson and Sifakis jointly win the Turing award “for their role in developing Model- Checking into a highly effective verification technology that is widely adopted in the hardware and software industries.”

A brief history of model checking

5

1930 1960 1980 1990 2010

slide-22
SLIDE 22

Kripke structures

6
slide-23
SLIDE 23

Kripke structures

6

A Kripke structure is a tuple M = ⟨S, S0, R, L⟩

slide-24
SLIDE 24

Kripke structures

6

A Kripke structure is a tuple M = ⟨S, S0, R, L⟩

  • S is a finite set of states.
slide-25
SLIDE 25

Kripke structures

6

A Kripke structure is a tuple M = ⟨S, S0, R, L⟩

  • S is a finite set of states.
  • S0 ⊆ S is the set of initial states.
slide-26
SLIDE 26

Kripke structures

6

A Kripke structure is a tuple M = ⟨S, S0, R, L⟩

  • S is a finite set of states.
  • S0 ⊆ S is the set of initial states.
  • R ⊆ S × S is the transition relation, which

must be total.

slide-27
SLIDE 27

Kripke structures

6

A Kripke structure is a tuple M = ⟨S, S0, R, L⟩

  • S is a finite set of states.
  • S0 ⊆ S is the set of initial states.
  • R ⊆ S × S is the transition relation, which

must be total.

  • L : S ➝ 2AP is a function that labels each state

with a set of atomic propositions true in that state.

b c c a b

slide-28
SLIDE 28

Kripke structures

6

A Kripke structure is a tuple M = ⟨S, S0, R, L⟩

  • S is a finite set of states.
  • S0 ⊆ S is the set of initial states.
  • R ⊆ S × S is the transition relation, which

must be total.

  • L : S ➝ 2AP is a function that labels each state

with a set of atomic propositions true in that state. A path in M is an infinite sequence of states π = s0s1… such that for all i ≥ 0, (si, si+1) ∈ R.

b c c a b b c a b a b

slide-29
SLIDE 29
  • In a finite-state program, system

variables V range over a finite domain D: V = {x, y} and D = {0, 1}.

  • A state of the system is a valuation

s : V → D.

  • Use FOL to describe the (initial)

states and the transition relation.

  • Extract a Kripke structure from the

FOL description.

Modeling systems with Kripke structures

7 // x==1, y==1 x := (x + y) % 2
slide-30
SLIDE 30

S ≡ (x = 0 ∨ x = 1) ∧ (y = 0 ∨ y = 1) S0 ≡ (x = 1) ∧ (y = 1) R(x, y, x′, y′) ≡ (x′ = (x + y) % 2) ∧ (y′ = y)

  • In a finite-state program, system

variables V range over a finite domain D: V = {x, y} and D = {0, 1}.

  • A state of the system is a valuation

s : V → D.

  • Use FOL to describe the (initial)

states and the transition relation.

  • Extract a Kripke structure from the

FOL description.

Modeling systems with Kripke structures

7 // x==1, y==1 x := (x + y) % 2
slide-31
SLIDE 31

S ≡ (x = 0 ∨ x = 1) ∧ (y = 0 ∨ y = 1) S0 ≡ (x = 1) ∧ (y = 1) R(x, y, x′, y′) ≡ (x′ = (x + y) % 2) ∧ (y′ = y)

  • In a finite-state program, system

variables V range over a finite domain D: V = {x, y} and D = {0, 1}.

  • A state of the system is a valuation

s : V → D.

  • Use FOL to describe the (initial)

states and the transition relation.

  • Extract a Kripke structure from the

FOL description.

Modeling systems with Kripke structures

7 // x==1, y==1 x := (x + y) % 2
slide-32
SLIDE 32

S ≡ (x = 0 ∨ x = 1) ∧ (y = 0 ∨ y = 1) S0 ≡ (x = 1) ∧ (y = 1) R(x, y, x′, y′) ≡ (x′ = (x + y) % 2) ∧ (y′ = y)

  • In a finite-state program, system

variables V range over a finite domain D: V = {x, y} and D = {0, 1}.

  • A state of the system is a valuation

s : V → D.

  • Use FOL to describe the (initial)

states and the transition relation.

  • Extract a Kripke structure from the

FOL description. x=1, y=1

Modeling systems with Kripke structures

7 // x==1, y==1 x := (x + y) % 2

x=0, y=0 x=0, y=1 x=1, y=0

slide-33
SLIDE 33

S ≡ (x = 0 ∨ x = 1) ∧ (y = 0 ∨ y = 1) S0 ≡ (x = 1) ∧ (y = 1) R(x, y, x′, y′) ≡ (x′ = (x + y) % 2) ∧ (y′ = y)

  • In a finite-state program, system

variables V range over a finite domain D: V = {x, y} and D = {0, 1}.

  • A state of the system is a valuation

s : V → D.

  • Use FOL to describe the (initial)

states and the transition relation.

  • Extract a Kripke structure from the

FOL description. x=1, y=1

Modeling systems with Kripke structures

7 // x==1, y==1 x := (x + y) % 2

x=0, y=0 x=1, y=1 x=0, y=1 x=1, y=0

slide-34
SLIDE 34

S ≡ (x = 0 ∨ x = 1) ∧ (y = 0 ∨ y = 1) S0 ≡ (x = 1) ∧ (y = 1) R(x, y, x′, y′) ≡ (x′ = (x + y) % 2) ∧ (y′ = y)

  • In a finite-state program, system

variables V range over a finite domain D: V = {x, y} and D = {0, 1}.

  • A state of the system is a valuation

s : V → D.

  • Use FOL to describe the (initial)

states and the transition relation.

  • Extract a Kripke structure from the

FOL description. x=1, y=1

Modeling systems with Kripke structures

7 // x==1, y==1 x := (x + y) % 2

x=0, y=0 x=1, y=1 x=0, y=1 x=1, y=0

slide-35
SLIDE 35

S ≡ (x = 0 ∨ x = 1) ∧ (y = 0 ∨ y = 1) S0 ≡ (x = 1) ∧ (y = 1) R(x, y, x′, y′) ≡ (x′ = (x + y) % 2) ∧ (y′ = y)

  • In a finite-state program, system

variables V range over a finite domain D: V = {x, y} and D = {0, 1}.

  • A state of the system is a valuation

s : V → D.

  • Use FOL to describe the (initial)

states and the transition relation.

  • Extract a Kripke structure from the

FOL description. x=1, y=1

Modeling systems with Kripke structures

7 // x==1, y==1 x := (x + y) % 2

x=0, y=0 x=1, y=1 x=0, y=1 x=1, y=0 State explosion: Kripke structure usually exponential in the size of the program.

slide-36
SLIDE 36

A Kripke structure for a concurrent program

8 10 while (true) { 11 wait(turn == 0); // critical section 12 turn := 1; 13 } 20 while (true) { 21 wait(turn == 1); // critical section 22 turn := 0; 23 }

P1 P2

Two processes executing concurrently and asynchronously, using the shared variable turn to ensure mutual exclusion: They are never in the critical section at the same time.

slide-37
SLIDE 37

A Kripke structure for a concurrent program

8 10 while (true) { 11 wait(turn == 0); // critical section 12 turn := 1; 13 } 20 while (true) { 21 wait(turn == 1); // critical section 22 turn := 0; 23 }

P1 P2

Two processes executing concurrently and asynchronously, using the shared variable turn to ensure mutual exclusion: They are never in the critical section at the same time. State of the program described by the variable turn and the program counters for the two processes.

slide-38
SLIDE 38

A Kripke structure for a concurrent program

9 10 while (true) { 11 wait(turn == 0); // critical section 12 turn := 1; 13 } 20 while (true) { 21 wait(turn == 1); // critical section 22 turn := 0; 23 }

P1 P2

slide-39
SLIDE 39

A Kripke structure for a concurrent program

9 10 while (true) { 11 wait(turn == 0); // critical section 12 turn := 1; 13 } 20 while (true) { 21 wait(turn == 1); // critical section 22 turn := 0; 23 }

P1 P2

turn=0, 10, 20 turn=1, 10, 20
slide-40
SLIDE 40

A Kripke structure for a concurrent program

9 10 while (true) { 11 wait(turn == 0); // critical section 12 turn := 1; 13 } 20 while (true) { 21 wait(turn == 1); // critical section 22 turn := 0; 23 }

P1 P2

turn=0, 10, 20 turn=1, 10, 20 turn=0, 10, 21 turn=0, 11, 20 turn=0, 11, 21 turn=0, 12, 20 turn=0, 12, 21 turn=1, 10, 21 turn=1, 11, 20 turn=1, 10, 22 turn=1, 11, 21 turn=1, 11, 22
slide-41
SLIDE 41

A Kripke structure for a concurrent program

9 10 while (true) { 11 wait(turn == 0); // critical section 12 turn := 1; 13 } 20 while (true) { 21 wait(turn == 1); // critical section 22 turn := 0; 23 }

P1 P2

turn=0, 10, 20 turn=1, 10, 20 turn=0, 10, 21 turn=0, 11, 20 turn=0, 11, 21 turn=0, 12, 20 turn=0, 12, 21 turn=1, 10, 21 turn=1, 11, 20 turn=1, 10, 22 turn=1, 11, 21 turn=1, 11, 22
slide-42
SLIDE 42

A Kripke structure for a concurrent program

9 10 while (true) { 11 wait(turn == 0); // critical section 12 turn := 1; 13 } 20 while (true) { 21 wait(turn == 1); // critical section 22 turn := 0; 23 }

P1 P2

turn=0, 10, 20 turn=1, 10, 20 turn=0, 10, 21 turn=0, 11, 20 turn=0, 11, 21 turn=0, 12, 20 turn=0, 12, 21 turn=1, 10, 21 turn=1, 11, 20 turn=1, 10, 22 turn=1, 11, 21 turn=1, 11, 22
slide-43
SLIDE 43

A Kripke structure for a concurrent program

9 10 while (true) { 11 wait(turn == 0); // critical section 12 turn := 1; 13 } 20 while (true) { 21 wait(turn == 1); // critical section 22 turn := 0; 23 }

P1 P2

turn=0, 10, 20 turn=1, 10, 20 turn=0, 10, 21 turn=0, 11, 20 turn=0, 11, 21 turn=0, 12, 20 turn=0, 12, 21 turn=1, 10, 21 turn=1, 11, 20 turn=1, 10, 22 turn=1, 11, 21 turn=1, 11, 22
slide-44
SLIDE 44

Safety & liveness properties of reactive systems

10

Safety

  • “Nothing bad will happen.”
  • φ is a safety property iff every

infinite path π violating φ has a finite prefix π' such that every extension of π' violates φ. Liveness

  • “Something good will happen.”
  • ψ is a liveness property iff every

finite path (prefix) π can be extended so that it satisfies ψ.

slide-45
SLIDE 45

Safety & liveness properties of reactive systems

10

Safety

  • “Nothing bad will happen.”
  • φ is a safety property iff every

infinite path π violating φ has a finite prefix π' such that every extension of π' violates φ. Liveness

  • “Something good will happen.”
  • ψ is a liveness property iff every

finite path (prefix) π can be extended so that it satisfies ψ.

Finite witnesses (counterexamples). Reducible to checking reachability in the state transition graph.

slide-46
SLIDE 46

Safety & liveness properties of reactive systems

10

Safety

  • “Nothing bad will happen.”
  • φ is a safety property iff every

infinite path π violating φ has a finite prefix π' such that every extension of π' violates φ. Liveness

  • “Something good will happen.”
  • ψ is a liveness property iff every

finite path (prefix) π can be extended so that it satisfies ψ.

Finite witnesses (counterexamples). Reducible to checking reachability in the state transition graph. No finite witnesses (counterexamples).

slide-47
SLIDE 47

Safety & liveness properties of reactive systems

10

Safety

  • “Nothing bad will happen.”
  • φ is a safety property iff every

infinite path π violating φ has a finite prefix π' such that every extension of π' violates φ. Liveness

  • “Something good will happen.”
  • ψ is a liveness property iff every

finite path (prefix) π can be extended so that it satisfies ψ.

Mutual exclusion: P1 and P2 will never be in their critical regions simultaneously.

slide-48
SLIDE 48

Safety & liveness properties of reactive systems

10

Safety

  • “Nothing bad will happen.”
  • φ is a safety property iff every

infinite path π violating φ has a finite prefix π' such that every extension of π' violates φ. Liveness

  • “Something good will happen.”
  • ψ is a liveness property iff every

finite path (prefix) π can be extended so that it satisfies ψ.

Mutual exclusion: P1 and P2 will never be in their critical regions simultaneously. Starvation freedom: whenever P1 is ready to enter its critical section, it will eventually succeed (provided that the scheduler is fair and does not let P2 stay in its critical section forever).

slide-49
SLIDE 49

c a b b c

Expressing properties in temporal logics

11

Linear time: properties of computation paths

b c a b a b

Branching time: properties of computation trees

c a b b c a b c c b c

… … …

c a b c

slide-50
SLIDE 50

Computation tree logic CTL*

12

c a b b c c a b b c c

… … … Path quantifiers describe the branching structure of the computation tree:

  • A (for all paths)
  • E (there exists a path)

Temporal operators describe properties

  • f a path through a tree:
  • Xp (p holds “next time”)
  • Fp (p holds “eventually” or “in the future”)
  • Gp (p holds “always” or “globally”)
  • p U q (p holds “until” q holds)
slide-51
SLIDE 51

Syntax of CTL*

13

State formulas

  • Atomic propositions: a ∈ AP
  • ¬f, f ∧ g, f ∨ g, where f and g are state formulas
  • Ap and Ep, where p is a path formula

Path formulas

  • f, where f is a state formula
  • ¬p, p ∧ p, p ∨ q, where p and q are path formulas
  • Xp, Fp, Gp, p U q, where p and q are path formulas

c a b b c c a b b c c

… … …

slide-52
SLIDE 52

Semantics of CTL*

14

State formulas

  • M, s ⊨ a iff a ∈ L(s)
  • M, s ⊨ Ap iff M, π ⊨ p for all paths π that start at s
  • M, s ⊨ Ep iff M, π ⊨ p for some path π that starts at s

Path formulas (πk is suffix of π starting at sk)

  • M, π ⊨ f iff M, s ⊨ f and s is the first state of π
  • M, π ⊨ Xp iff M, π1 ⊨ p
  • M, π ⊨ Fp iff M, πk ⊨ p for some k ≥ 0
  • M, π ⊨ Gp iff M, πk ⊨ p for all k ≥ 0
  • M, π ⊨ p U q iff M, πk ⊨ q and M, πj ⊨ q for some k

≥ 0 and for all 0 ≤ j < k

c a b b c c a b b c c

… … …

slide-53
SLIDE 53

CTL and Linear Temporal Logic (LTL)

15

Computation Tree Logic (CTL)

  • Fragment of CTL* in which each

temporal operator is prefixed with a path quantifier.

  • AG(EF p): From any state, it is

possible to get to a state where p holds. Linear Temporal Logic (LTL)

  • Fragment of CTL* with formulas
  • f the form Ap, where p contains

no path quantifiers.

  • A(FG p): Along every path, there

is some state from which p will hold forever.

slide-54
SLIDE 54

CTL and Linear Temporal Logic (LTL)

15

Computation Tree Logic (CTL)

  • Fragment of CTL* in which each

temporal operator is prefixed with a path quantifier.

  • AG(EF p): From any state, it is

possible to get to a state where p holds. Linear Temporal Logic (LTL)

  • Fragment of CTL* with formulas
  • f the form Ap, where p contains

no path quantifiers.

  • A(FG p): Along every path, there

is some state from which p will hold forever.

slide-55
SLIDE 55

CTL and Linear Temporal Logic (LTL)

15

Computation Tree Logic (CTL)

  • Fragment of CTL* in which each

temporal operator is prefixed with a path quantifier.

  • AG(EF p): From any state, it is

possible to get to a state where p holds. Linear Temporal Logic (LTL)

  • Fragment of CTL* with formulas
  • f the form Ap, where p contains

no path quantifiers.

  • A(FG p): Along every path, there

is some state from which p will hold forever.

slide-56
SLIDE 56

Expressive power of CTL, LTL, and CTL*

16

CTL LTL CTL* AG(EF p) A(FG p)

slide-57
SLIDE 57

Cannot be expressed in CTL

  • Handled by changing the

semantics to use fair Kripke structures.

  • A fair Kripke structure M = ⟨S, S0,

R, L, F⟩ includes an additional set

  • f sets of states F ⊆2S.
  • For each P ∈ F, a fair path π

includes some states from P infinitely often.

  • Path quantifiers interpreted only

with respect to fair paths.

Fairness

17

Can be expressed in LTL

  • Absolute fairness: A(GF pexec)
  • Strong fairness:

A((GF pready) ⇒ (GF pready ∧ pexec))

  • Weak fairness:

A((FG pready) ⇒ (GF pready ∧ pexec))

slide-58
SLIDE 58

Cannot be expressed in CTL

  • Handled by changing the

semantics to use fair Kripke structures.

  • A fair Kripke structure M = ⟨S, S0,

R, L, F⟩ includes an additional set

  • f sets of states F ⊆2S.
  • For each P ∈ F, a fair path π

includes some states from P infinitely often.

  • Path quantifiers interpreted only

with respect to fair paths.

Fairness

17

Can be expressed in LTL

  • Absolute fairness: A(GF pexec)
  • Strong fairness:

A((GF pready) ⇒ (GF pready ∧ pexec))

  • Weak fairness:

A((FG pready) ⇒ (GF pready ∧ pexec))

slide-59
SLIDE 59

Cannot be expressed in CTL

  • Handled by changing the

semantics to use fair Kripke structures.

  • A fair Kripke structure M = ⟨S, S0,

R, L, F⟩ includes an additional set

  • f sets of states F ⊆2S.
  • For each P ∈ F, a fair path π

includes some states from P infinitely often.

  • Path quantifiers interpreted only

with respect to fair paths.

Fairness

17

Can be expressed in LTL

  • Absolute fairness: A(GF pexec)
  • Strong fairness:

A((GF pready) ⇒ (GF pready ∧ pexec))

  • Weak fairness:

A((FG pready) ⇒ (GF pready ∧ pexec))

slide-60
SLIDE 60

Model checking complexity for CTL, LTL, CTL*

18

M, s ⊨ f

Polynomial Time for CTL

  • Best known algorithm: O(|M| * |f|)

PSPACE-complete for LTL

  • Best known algorithm: O(|M| * 2|f|)

PSPACE-complete for CTL*

  • Best known algorithm: O(|M| * 2|f|)
slide-61
SLIDE 61

Model checking techniques for CTL and LTL

19

CTL

  • Graph-theoretic explicit-state model checking (EMC)
  • Symbolic model checking with Ordered Binary

Decision Diagrams (SMV, NuSMV)

  • Bounded model checking based on SAT (NuSMV)

LTL

  • Automata-theoretic model checking:
  • Explicit-state (SPIN) or
  • Symbolic (NuSMV)
slide-62
SLIDE 62

Summary

20

Today

  • Basics of model checking:
  • Kripke structures
  • Temporal logics (CTL, LTL,CTL*)
  • Model checking techniques

Next lecture

  • Software model checking