Transcript
Page 1: CTL Model Checking - sayanmitracode.github.io

CTL Model Checking

Sayan MitraVerifying cyberphysical systems

[email protected]

Page 2: CTL Model Checking - sayanmitracode.github.io

Verification thus far: Invariants and safety

Given a hybrid automaton ๐’œ = โŸจ๐‘‹, ฮ˜, ๐ด,๐““, ๐‘ปโŸฉ and a candidate invariant ๐ผ โŠ† ๐‘ฃ๐‘Ž๐‘™(๐‘‹) we can check whether ๐ผ is an inductive invariant.

In which case ๐‘…๐‘’๐‘Ž๐‘โ„Ž๐’œ ฮ˜ โŠ† ๐ผ

Given an unsafe set ๐‘ˆ โŠ† ๐‘ฃ๐‘Ž๐‘™(๐‘‹) we can check whether ๐ผ โˆฉ ๐‘ˆ = โˆ… to infer that ๐‘…๐‘’๐‘Ž๐‘โ„Ž๐’œ ฮ˜ โˆฉ ๐‘ˆ = โˆ…

Lecture Slides by Sayan Mitra [email protected]

Page 3: CTL Model Checking - sayanmitracode.github.io

What about more general types of requirements, e.g.,

โ€œEventually the light turns red and prior to that the orange light blinksโ€

โ€œAfter failures, eventually there is just one token in the systemโ€

How to express and verify such properties?

Lecture Slides by Sayan Mitra [email protected]

Page 4: CTL Model Checking - sayanmitracode.github.io

Outline

โ€ข Temporal logicsโ€ข Computational Tree Logic (CTL)

โ€ข CTL model checkingโ€ข Setupโ€ข CTL syntax and semanticsโ€ข Model checking algorithmsโ€ข Example

โ€ข References: Model Checking, Second Edition, by Edmund M. Clarke, Jr., Orna Grumberg, Daniel Kroening, Doron Peled and Helmut Veith

โ€ข Principles of Model Checking, by Christel Baier and Joost-Pieter Katoen

Lecture Slides by Sayan Mitra [email protected]

Page 5: CTL Model Checking - sayanmitracode.github.io

Introduction to temporal logicsTemporal logics give a formal language for representing, and reasoning about, propositions qualified in terms of time or in a sequence

Amir Pnueli received the ACM Turing Award (1996) for seminal work introducing temporal logic into computer science and for outstanding contributions to program and systems verification.

Large follow-up literature, e.g., different temporal logics MTL, MITL, PCTL, ACTL, STL, applications in synthesis and monitoring

Lecture Slides by Sayan Mitra [email protected]

Page 6: CTL Model Checking - sayanmitracode.github.io

Setup: States are labeled

We have a set of atomic propositions (AP)

These are the properties that hold in each state, e.g., โ€œlight is greenโ€, โ€œhas 2 tokensโ€

We have a labeling function that assigns to each state, a set of propositions that hold at that state

๐ฟ: ๐‘„ โ†’ 2>?

Lecture Slides by Sayan Mitra [email protected]

Page 7: CTL Model Checking - sayanmitracode.github.io

Notations

Automata with state labels but no action labels

๐’œ = ๐‘„,๐‘„@, ๐‘‡, ๐ฟ

Executions (have no actions) ๐›ผ = ๐‘ž@ ๐‘žD โ€ฆ๐‘žF = ๐›ผ. ๐‘™๐‘ ๐‘ก๐‘Ž๐‘ก๐‘’

๐›ผ[๐‘–] = ๐‘žM๐ธ๐‘ฅ๐‘’๐‘๐’œ set of all executions

๐ด๐‘ƒ = ๐‘Ž, ๐‘, ๐‘

๐ฟ ๐‘ž@ = {๐‘Ž, ๐‘}

๐‘ž@{๐‘Ž, ๐‘}

๐‘žD{๐‘, ๐‘}

๐‘žT{๐‘}

Lecture Slides by Sayan Mitra [email protected]

Page 8: CTL Model Checking - sayanmitracode.github.io

Computational tree logic (CTL)

Unfolding the automaton

We get a tree

A CTL formula allows us to specify subsets of paths in this tree

๐‘ž@{๐‘Ž, ๐‘}

๐‘žD{๐‘, ๐‘}

๐‘žT{๐‘}

{๐‘Ž, ๐‘}

{๐‘, ๐‘} {๐‘}

{๐‘Ž, ๐‘} {๐‘} {๐‘}

{๐‘, ๐‘} {๐‘} {๐‘} {๐‘}Lecture Slides by Sayan Mitra [email protected]

Page 9: CTL Model Checking - sayanmitracode.github.io

CTL quantifiers

Path quantifiersE: Exists some pathA: All paths

Temporal operatorsX: Next stateU: UntilF: EventuallyG: Globally (Always)

Lecture Slides by Sayan Mitra [email protected]

Page 10: CTL Model Checking - sayanmitracode.github.io

CTL syntaxCTL syntax๐‘†๐‘ก๐‘Ž๐‘ก๐‘’ ๐น๐‘œ๐‘Ÿ๐‘š๐‘ข๐‘™๐‘Ž ๐‘†๐น โˆท= ๐‘ก๐‘Ÿ๐‘ข๐‘’ ๐‘ ยฌ๐‘“D ๐‘“D โˆง ๐‘“T ๐ธ ๐œ™ | ๐ด ๐œ™๐‘ƒ๐‘Ž๐‘กโ„Ž ๐น๐‘œ๐‘Ÿ๐‘š๐‘ข๐‘™๐‘Ž ๐‘ƒ๐น โˆท= ๐‘‹๐‘“D ๐‘“D๐‘ˆ ๐‘“T ๐บ๐‘“D| ๐น ๐‘“D

where ๐‘ โˆˆ ๐ด๐‘ƒ, ๐‘“D, ๐‘“T โˆˆ ๐‘†๐น, ๐œ™ โˆˆ ๐‘ƒ๐น

Depth of formula: number of production rules used

Examples (depth)E๐‘‹ ๐‘Ž; AXE๐‘‹ ๐‘Ž; AXE๐‘‹๐‘Ž U b; AG AF green; AF AG single tokenDepth 3, 5, โ€ฆ

Non-examplesAX๐‘‹ ๐‘Ž; path and state operators must alternate in CTL

Lecture Slides by Sayan Mitra [email protected]

Page 11: CTL Model Checking - sayanmitracode.github.io

CTL semanticsGiven automaton ๐’œ = ๐‘„,Q@, ๐‘‡, ๐ฟ , ๐‘ž โˆˆ ๐‘„ and a CTL formula ๐œ™, ๐‘ž โŠจ ๐œ™denotes that ๐‘ž satisfies ๐œ™; ๐›ผ โŠจ ๐œ™ denotes that path (execution) ๐›ผ satisfies ๐œ™.The relation โŠจ is defined inductively as:

๐’œ, ๐‘ž โŠจ ๐‘ โ‡” ๐‘ โˆˆ ๐ฟ(๐‘ž) for ๐‘ โˆˆ ๐ด๐‘ƒ๐’œ, ๐‘ž โŠจ ยฌ๐‘“D โ‡” ๐’œ, ๐‘ž โŠจ ๐‘“D๐’œ, ๐‘ž โŠจ ๐‘“D โˆง ๐‘“T โ‡” ๐’œ, ๐‘ž โŠจ ๐‘“D โˆง ๐’œ, ๐‘ž โŠจ ๐‘“T๐’œ, ๐‘ž โŠจ ๐ธ๐œ™ โ‡” โˆƒ ๐›ผ, ๐›ผ. ๐‘“๐‘ ๐‘ก๐‘Ž๐‘ก๐‘’ = ๐‘ž,๐’œ, ๐›ผ โŠจ ๐œ™๐’œ, ๐‘ž โŠจ ๐ด๐œ™ โ‡” โˆ€ ๐›ผ, ๐›ผ. ๐‘“๐‘ ๐‘ก๐‘Ž๐‘ก๐‘’ = ๐‘ž,๐’œ, ๐›ผ โŠจ ๐œ™๐’œ, ๐‘ž โŠจ ๐‘‹๐‘“ โ‡” ๐’œ, ๐›ผ 1 โŠจ ๐‘“๐’œ, ๐›ผ โŠจ ๐‘“D ๐‘ˆ ๐‘“T โ‡” โˆƒ๐‘– โ‰ฅ 0,๐’œ, ๐›ผ ๐‘– โŠจ ๐‘“T ๐‘Ž๐‘›๐‘‘ โˆ€๐‘— < ๐‘– ๐›ผ ๐‘— โŠจ ๐‘“D๐’œ, ๐›ผ โŠจ ๐น ๐‘“D โ‡” โˆƒ๐‘– โ‰ฅ 0,๐’œ, ๐›ผ ๐‘– โŠจ ๐‘“D๐’œ, ๐›ผ โŠจ ๐บ ๐‘“D โ‡” โˆ€๐‘– โ‰ฅ 0,๐’œ, ๐›ผ ๐‘– โŠจ ๐‘“D

Automaton satisfies property: ๐’œ โŠจ ๐‘“ iff โˆ€๐‘ž โˆˆ ๐‘„@,๐’œ, ๐‘ž โŠจ ๐‘“Lecture Slides by Sayan Mitra [email protected]

Page 12: CTL Model Checking - sayanmitracode.github.io

Universal CTL operators๐‘ฟ,๐‘ผ, ๐‘ฎ can be used to derive other operators

๐‘ก๐‘Ÿ๐‘ข๐‘’ ๐‘ˆ ๐‘“ โ‰ก ๐น ๐‘“

๐บ๐‘“ โ‰ก ยฌ๐น(ยฌ๐‘“)

All ten combinations can be expressed using ๐‘ฌ๐‘ฟ, ๐‘ฌ๐‘ผ, ๐‘ฌ๐‘ฎ

๐ด๐‘‹๐‘“ ๐ด๐บ๐‘“ ๐ด๐น๐‘“ ๐ด๐‘ˆ๐‘“ ๐ด๐‘…๐‘“ยฌ๐ธ๐‘‹(ยฌ๐‘“) ยฌ๐ธ๐น(ยฌ๐‘“) ยฌ๐ธ๐บ(ยฌ๐‘“)

๐ธ๐‘‹ ๐ธ๐บ ๐ธ๐น ๐ธ๐‘ˆ ๐ธ๐‘…๐ธ๐‘‹ ๐ธ๐บ ๐ธ(๐‘ก๐‘Ÿ๐‘ข๐‘’ ๐‘ˆ ๐‘“) ๐ธ๐‘ˆ

Lecture Slides by Sayan Mitra [email protected]

Page 13: CTL Model Checking - sayanmitracode.github.io

Visualizing semantics

๐‘ž ๐‘ž

๐‘ž๐‘ž

๐‘ž โŠจ ๐ด๐บ ๐‘Ÿ๐‘’๐‘‘

๐‘ž โŠจ ๐ธ๐บ ๐‘Ÿ๐‘’๐‘‘

๐‘ž โŠจ ๐ด๐น ๐‘Ÿ๐‘’๐‘‘

๐‘ž โŠจ ๐ธ๐น ๐‘Ÿ๐‘’๐‘‘

Lecture Slides by Sayan Mitra [email protected]

Page 14: CTL Model Checking - sayanmitracode.github.io

Algorithm for deciding ๐’œ โŠจ ๐‘“

Algorithm works by structural induction on the depth of the formula

Explicit state model checking

Compute the subset ๐‘„๏ฟฝ โŠ† ๐‘„ such that โˆ€๐‘ž โˆˆ ๐‘„๏ฟฝ ๐‘ค๐‘’ โ„Ž๐‘Ž๐‘ฃ๐‘’ ๐’œ, q โŠจ ๐‘“

If ๐‘„@โŠ† ๐‘„๏ฟฝ then we can conclude ๐’œ โŠจ ๐‘“

Lecture Slides by Sayan Mitra [email protected]

Page 15: CTL Model Checking - sayanmitracode.github.io

Induction on depth of formula

Algorithm computes a function ๐‘™๐‘Ž๐‘๐‘’๐‘™: ๐‘„ โ†’ ๐ถ๐‘‡๐ฟ(๐ด๐‘ƒ) that labels each state with a CTL formula

โ€ข Initially, ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž = ๐ฟ(๐‘ž) for each ๐‘ž โˆˆ Q

โ€ข At ๐‘–๏ฟฝ๏ฟฝ iteration ๐‘™๐‘Ž๐‘๐‘’๐‘™(๐‘ž) contains all sub-formulas of ๐‘“ of depth (๐‘– โˆ’ 1) that ๐‘žsatisfies

At termination ๐‘“ โˆˆ ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โ‡” ๐’œ, ๐‘ž โŠจ ๐‘“

Lecture Slides by Sayan Mitra [email protected]

Page 16: CTL Model Checking - sayanmitracode.github.io

Structural induction on formulaSix cases to consider based on structure of ๐‘“

Lecture Slides by Sayan Mitra [email protected]

๐‘“ = ๐‘, for some ๐‘ โˆˆ ๐ด๐‘ƒ, โˆ€๐‘ž, ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โ‰” ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โˆช ๐‘“๐‘“ = ยฌ๐‘“D if ๐‘“D โˆ‰ ๐‘™๐‘Ž๐‘๐‘’๐‘™(๐‘ž) then ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โ‰” ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โˆช ๐‘“๐‘“ = ๐‘“D โˆง ๐‘“T if ๐‘“D, ๐‘“T โˆˆ ๐‘™๐‘Ž๐‘๐‘’๐‘™(๐‘ž) then ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โ‰” ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โˆช ๐‘“๐‘“ = ๐ธ๐‘‹๐‘“D if โˆƒ๐‘ž๏ฟฝ โˆˆ Q such that ๐‘ž, ๐‘ž๏ฟฝ โˆˆ ๐‘‡ and ๐‘“D โˆˆ ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž๏ฟฝ then ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โ‰” ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โˆช ๐‘“

๐‘“ = ๐ธ ๐‘“D๐‘ˆ๐‘“T ๐ถโ„Ž๐‘’๐‘๐‘˜๐ธ๐‘ˆ(๐‘“D, ๐‘“T, ๐‘„, ๐‘‡, ๐ฟ) [next slide]๐‘“ = ๐ธ๐บ๐‘“D ๐ถโ„Ž๐‘’๐‘๐‘˜๐ธ๐บ(๐‘“D, ๐‘„, ๐‘‡, ๐ฟ) [next slide]

Page 17: CTL Model Checking - sayanmitracode.github.io

๐ถโ„Ž๐‘’๐‘๐‘˜๐ธ๐‘ˆ(๐‘“D, ๐‘“T, ๐‘„, ๐‘‡, ๐ฟ)Let ๐‘† = ๐‘ž โˆˆ ๐‘„ ๐‘“T โˆˆ ๐‘™๐‘Ž๐‘๐‘’๐‘™(๐‘ž)}for each ๐‘ž โˆˆ ๐‘†๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โ‰” ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โˆช {๐ธ[๐‘“D๐‘ˆ๐‘“T]}

while ๐‘† โ‰  โˆ…for each ๐‘žโ€ฒ โˆˆ ๐‘†๐‘† โ‰” ๐‘† โˆ– ๐‘ž๏ฟฝ

for each ๐‘ž โˆˆ ๐‘‡๏ฟฝD(๐‘ž๏ฟฝ)if ๐‘“D โˆˆ ๐‘™๐‘Ž๐‘๐‘’๐‘™(๐‘ž) then ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โ‰” ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โˆช {๐ธ[๐‘“D๐‘ˆ๐‘“T]}

๐‘† โ‰” ๐‘† โˆช {๐‘ž}

Proposition. For any state ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โˆ‹ ๐ธ[๐‘“D๐‘ˆ๐‘“T] iff ๐‘ž โŠจ ๐ธ[๐‘“D๐‘ˆ๐‘“T].

Proposition. Finite ๐‘„ therefore terminates and in ๐‘‚ ๐‘„ + ๐‘‡ steps.

Lecture Slides by Sayan Mitra [email protected]

Page 18: CTL Model Checking - sayanmitracode.github.io

๐ถโ„Ž๐‘’๐‘๐‘˜๐ธ๐บ(๐‘“D, ๐‘„, ๐‘‡, ๐ฟ)

From ๐’œ we construct a new automaton ๐’œ๏ฟฝ = โŸจ๐‘„๏ฟฝ, ๐‘‡๏ฟฝ, ๐ฟ๏ฟฝโŸฉ such that

๐‘„๏ฟฝ = ๐‘ž โˆˆ ๐‘„ ๐‘“D โˆˆ ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž }

๐‘‡๏ฟฝ = ๐‘žD, ๐‘žT โˆˆ ๐‘‡ ๐‘žD โˆˆ ๐‘„๏ฟฝ} = ๐‘‡ | ๐‘„๏ฟฝ

๐ฟ๏ฟฝ: ๐‘„๏ฟฝ โ†’ 2>? โˆ€ ๐‘ž๏ฟฝ โˆˆ ๐‘„๏ฟฝ, ๐ฟ๏ฟฝ ๐‘ž๏ฟฝ : = ๐ฟ ๐‘ž๏ฟฝ

Claim. ๐’œ, q โŠจ ๐ธ๐บ๐‘“D iff(1) ๐‘ž โˆˆ ๐‘„๏ฟฝ(2) โˆƒ๐›ผ โˆˆ ๐ธ๐‘ฅ๐‘’๐‘๐‘ ๐’œ๏ฟฝ with ๐›ผ. ๐‘“๐‘ ๐‘ก๐‘Ž๐‘ก๐‘’ = ๐‘ž and ๐›ผ. ๐‘™๐‘ ๐‘ก๐‘Ž๐‘ก๐‘’ is in a nontrivial Strongly Connected

Components ๐ถ of the graph โŸจ๐‘„๏ฟฝ, ๐‘‡๏ฟฝโŸฉ

Lecture Slides by Sayan Mitra [email protected]

Page 19: CTL Model Checking - sayanmitracode.github.io

Claim. ๐’œ, q โŠจ ๐ธ๐บ๐‘“D iff(1) ๐‘ž โˆˆ ๐‘„๏ฟฝ and(2) โˆƒ๐›ผ โˆˆ ๐ธ๐‘ฅ๐‘’๐‘๐‘ ๐’œ๏ฟฝ with ๐›ผ. ๐‘“๐‘ ๐‘ก๐‘Ž๐‘ก๐‘’ = ๐‘ž and ๐›ผ. ๐‘™๐‘ ๐‘ก๐‘Ž๐‘ก๐‘’ is in a nontrivial SCC ๐ถ of the

graph ๐‘„๏ฟฝ, ๐‘‡๏ฟฝ

Proof. Suppose ๐’œ, q โŠจ ๐ธ๐บ๐‘“DConsider any execution ๐›ผ with ๐›ผ. ๐‘“๐‘ ๐‘ก๐‘Ž๐‘ก๐‘’ = ๐‘ž. Obviously, ๐‘ž โŠจ ๐‘“D and so, ๐‘ž โˆˆ ๐‘„๏ฟฝ.Since ๐‘„ is finite ๐›ผ can be written as ๐›ผ = ๐›ผ@๐›ผD where ๐›ผ@ is finite and every state in ๐›ผDrepeats infinitely many times. Let ๐ถ be the states in ๐›ผD. ๐ถ โˆˆ ๐‘„๏ฟฝ.Consider any two ๐‘žD and ๐‘žT states in ๐ถ, we observe that ๐‘žD โ‡„ ๐‘žT, and therefore ๐ถ is a SCC.

Consider (1) and (2). We will construct a path ๐›ผ = ๐›ผ@๐›ผD such that ๐›ผ@. ๐‘“๐‘ ๐‘ก๐‘Ž๐‘ก๐‘’ = ๐‘ž and ๐›ผ@ โˆˆ ๐‘„๏ฟฝand ๐›ผDvisits some states infinitely often.

Lecture Slides by Sayan Mitra [email protected]

Page 20: CTL Model Checking - sayanmitracode.github.io

๐ถโ„Ž๐‘’๐‘๐‘˜๐ธ๐บ(๐‘“D, ๐‘„, ๐‘‡, ๐ฟ)Let ๐‘„โ€ฒ = ๐‘ž โˆˆ ๐‘„ ๐‘“D โˆˆ ๐‘™๐‘Ž๐‘๐‘’๐‘™(๐‘ž)}Let โ„‚ be the set of nontrivial SCCs of โŸจ๐‘„๏ฟฝ, ๐‘‡๏ฟฝโŸฉ๐‘ป = โˆช๏ฟฝ โˆˆ โ„‚ ๐‘ž ๐‘ž โˆˆ ๐ถ}for each ๐‘ž โˆˆ ๐‘ป๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โ‰” ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โˆช {๐ธ๐บ๐‘“D}

while ๐‘ป โ‰  โˆ…for each ๐‘žโ€ฒ โˆˆ ๐‘ป๐‘ป โ‰” ๐‘ป โˆ– ๐‘ž๏ฟฝ

for each ๐‘žโ€ฒ โˆˆ ๐‘„๏ฟฝ such that ๐‘ž๏ฟฝ, ๐‘ž โˆˆ ๐‘‡โ€ฒif E๐บ๐‘“D โˆ‰ ๐‘™๐‘Ž๐‘๐‘’๐‘™(๐‘žโ€ฒ) then ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘žโ€ฒ โ‰” ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž๏ฟฝ โˆช {๐ธ๐บ๐‘“D}

๐‘ป โ‰” ๐‘ป โˆช {๐‘ž}

Proposition. For any state ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โˆ‹ ๐ธ๐บ๐‘“D iff ๐‘ž โŠจ ๐ธ๐บ๐‘“D.

Proposition. Finite ๐‘„ therefore terminates and in ๐‘‚ ๐‘„ + ๐‘‡ steps.Lecture Slides by Sayan Mitra [email protected]

Page 21: CTL Model Checking - sayanmitracode.github.io

Summary

๐‘“ = ๐‘, for some ๐‘ โˆˆ ๐ด๐‘ƒ, โˆ€๐‘ž, ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โ‰” ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โˆช {๐‘}๐‘“ = ยฌ๐‘“D if ๐‘“D โˆ‰ ๐‘™๐‘Ž๐‘๐‘’๐‘™(๐‘ž) then ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โ‰” ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โˆช ๐‘“๐‘“ = ๐‘“D โˆง ๐‘“T if ๐‘“D, ๐‘“T โˆˆ ๐‘™๐‘Ž๐‘๐‘’๐‘™(๐‘ž) then ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โ‰” ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โˆช ๐‘“๐‘“ = ๐ธ๐‘‹๐‘“D if โˆƒ๐‘ž๏ฟฝ โˆˆ Q such that ๐‘ž, ๐‘ž๏ฟฝ โˆˆ ๐‘‡ and ๐‘“D โˆˆ ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž๏ฟฝ

then ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โ‰” ๐‘™๐‘Ž๐‘๐‘’๐‘™ ๐‘ž โˆช ๐‘“๐‘“ = ๐ธ ๐‘“D๐‘ˆ๐‘“T ๐ถโ„Ž๐‘’๐‘๐‘˜๐ธ๐‘ˆ(๐‘“D, ๐‘“T, ๐‘„, ๐‘‡, ๐ฟ)๐‘“ = ๐ธ๐บ๐‘“D ๐ถโ„Ž๐‘’๐‘๐‘˜๐ธ๐บ(๐‘“D, ๐‘„, ๐‘‡, ๐ฟ)

Explicit model checking algorithm input๐’œ โŠจ ๐‘“?Structural induction over CTL formula

Proposition. Overall complexity of CTL model checkign ๐‘‚( ๐‘“ ๐‘„ + ๐‘‡ ) steps.

Lecture Slides by Sayan Mitra [email protected]

Page 22: CTL Model Checking - sayanmitracode.github.io

1!Start!Close!Heat !Error

2Start

!Close!Heat Error

3! StartClose!Heat !Error

4!StartCloseHeat !Error

6StartClose!Heat !Error

5StartClose!Heat Error

7StartCloseHeat !Error

Start oven Open door

Close doorOpen door

Start oven

Warmup

Start cookingReset

Open door

Close door

Page 23: CTL Model Checking - sayanmitracode.github.io

1!Start!Close!Heat !Error

2Start

!Close!Heat Error

3! StartClose!Heat !Error

4!StartCloseHeat !Error

6StartClose!Heat !Error

5StartClose!Heat Error

7StartCloseHeat !Error

Start oven Open door

Close doorOpen door

Start oven

Warmup

Start cookingReset

Open door

Close door

AG (Start -> AF Heat)

Page 24: CTL Model Checking - sayanmitracode.github.io

1!Start!Close!Heat !Error

2Start

!Close!Heat Error

3! StartClose!Heat !Error

4!StartCloseHeat !Error

6StartClose!Heat !Error

5StartClose!Heat Error

7StartCloseHeat !Error

Start oven Open door

Close doorOpen door

Start oven

Warmup

Start cookingReset

Open door

Close door

! EF (Start โˆง EG ! Heat)

! [True EU (Start โˆง EG ! Heat)]

Page 25: CTL Model Checking - sayanmitracode.github.io

1!Start!Close!Heat !Error

2Start

!Close!Heat Error

3! StartClose!Heat !Error

4!StartCloseHeat !Error

6StartClose!Heat !Error

5StartClose!Heat Error

7StartCloseHeat !Error

Start oven Open door

Close doorOpen door

Start oven

Warmup

Start cookingReset

Open door

Close door

! EF (Start โˆง EG ! Heat)

! [True EU (Start โˆง EG ! Heat)]

Page 26: CTL Model Checking - sayanmitracode.github.io

1!Start!Close!Heat !Error

2Start

!Close!Heat Error

3! StartClose!Heat !Error

4!StartCloseHeat !Error

6StartClose!Heat !Error

5StartClose!Heat Error

7StartCloseHeat !Error

Start oven Open door

Close doorOpen door

Start oven

Warmup

Start cookingReset

Open door

Close door

! EF (Start โˆง EG ! Heat)Start, ! HeatEG ! Heat

Nontrivial SCC of ! Heat

Page 27: CTL Model Checking - sayanmitracode.github.io

1!Start!Close!Heat !Error

2Start

!Close!Heat Error

3! StartClose!Heat !Error

4!StartCloseHeat !Error

6StartClose!Heat !Error

5StartClose!Heat Error

7StartCloseHeat !Error

Start oven Open door

Close doorOpen door

Start oven

Warmup

Start cookingReset

Open door

Close door

! EF (Start โˆง EG ! Heat)Start, ! HeatEG ! Heat

Set of states that can reach nnontrivial SCC of ! Heat

EG ! Heat

EG ! Heat

EG ! Heat

EG ! Heat

Start โˆง EG ! Heat

Page 28: CTL Model Checking - sayanmitracode.github.io

1!Start!Close!Heat !Error

2Start

!Close!Heat Error

3! StartClose!Heat !Error

4!StartCloseHeat !Error

6StartClose!Heat !Error

5StartClose!Heat Error

7StartCloseHeat !Error

Start oven Open door

Close doorOpen door

Start oven

Warmup

Start cookingReset

Open door

Close door

! EF (Start โˆง EG ! Heat)Start, ! HeatEG ! Heat

EG ! Heat

EG ! Heat

EG ! Heat

EG ! Heat

Start โˆง EG ! Heat

Start โˆง EG ! Heat

Start โˆง EG ! Heat

Page 29: CTL Model Checking - sayanmitracode.github.io

1!Start!Close!Heat !Error

2Start

!Close!Heat Error

3! StartClose!Heat !Error

4!StartCloseHeat !Error

6StartClose!Heat !Error

5StartClose!Heat Error

7StartCloseHeat !Error

Start oven Open door

Close doorOpen door

Start oven

Warmup

Start cookingReset

Open door

Close door

! EF (Start โˆง EG ! Heat)Start, ! HeatEG ! Heat

EG ! Heat

EG ! Heat

EG ! Heat

EG ! Heat

Start โˆง EG ! Heat

Start โˆง EG ! Heat

Start โˆง EG ! Heat

EF (Start โˆง EG ! Heat)

Page 30: CTL Model Checking - sayanmitracode.github.io

1!Start!Close!Heat !Error

2Start

!Close!Heat Error

3! StartClose!Heat !Error

4!StartCloseHeat !Error

6StartClose!Heat !Error

5StartClose!Heat Error

7StartCloseHeat !Error

Start oven Open door

Close doorOpen door

Start oven

Warmup

Start cookingReset

Open door

Close door

! EF (Start โˆง EG ! Heat)Start, ! HeatEG ! Heat

EG ! Heat

EG ! Heat

EG ! Heat

EG ! Heat

Start โˆง EG ! Heat

Start โˆง EG ! Heat

Start โˆง EG ! Heat

EF (Start โˆง EG ! Heat)

Page 31: CTL Model Checking - sayanmitracode.github.io

1!Start!Close!Heat !Error

2Start

!Close!Heat Error

3! StartClose!Heat !Error

4!StartCloseHeat !Error

6StartClose!Heat !Error

5StartClose!Heat Error

7StartCloseHeat !Error

Start oven Open door

Close doorOpen door

Start oven

Warmup

Start cookingReset

Open door

Close door

! EF (Start โˆง EG ! Heat)Start, ! HeatEG ! Heat

EG ! Heat

EG ! Heat

EG ! Heat

EG ! Heat

Start โˆง EG ! Heat

Start โˆง EG ! Heat

Start โˆง EG ! Heat

EF (Start โˆง EG ! Heat)

EF (Start โˆง EG ! Heat)

EF (Start โˆง EG ! Heat)

EF (Start โˆง EG ! Heat)

EF (Start โˆง EG ! Heat)EF (Start โˆง EG ! Heat)

EF (Start โˆง EG ! Heat)EF (Start โˆง EG ! Heat)

Set of states that can reach Start โˆง EG ! Heat

Page 32: CTL Model Checking - sayanmitracode.github.io

1!Start!Close!Heat !Error

2Start

!Close!Heat Error

3! StartClose!Heat !Error

4!StartCloseHeat !Error

6StartClose!Heat !Error

5StartClose!Heat Error

7StartCloseHeat !Error

Start oven Open door

Close doorOpen door

Start oven

Warmup

Start cookingReset

Open door

Close door

! EF (Start โˆง EG ! Heat)Start, ! HeatEG ! Heat

EG ! Heat

EG ! Heat

EG ! Heat

EG ! Heat

Start โˆง EG ! Heat

Start โˆง EG ! Heat

Start โˆง EG ! Heat

EF (Start โˆง EG ! Heat)

EF (Start โˆง EG ! Heat)

EF (Start โˆง EG ! Heat)

EF (Start โˆง EG ! Heat)

EF (Start โˆง EG ! Heat)EF (Start โˆง EG ! Heat)

EF (Start โˆง EG ! Heat)EF (Start โˆง EG ! Heat)

None of the states are labeled with ! EF (Start โˆง EG ! Heat)


Top Related