Partial preview of the text
Download Model Checking for Reactive Systems: A Fall 2003 CMSC 631 Course Overview - Prof. Jeffrey and more Study notes Computer Science in PDF only on Docsity!
CMSC 631 – Pr Under Fall 2003ogstaram Analysis anding nd
Slides fr^ Model Checkingom Adam Porter
CMSC 631, Fall 2003 2
R • eactiv T ■w To kinds of systems:ransformational: e Systems Produce outputs from inputs
■ Reactiv - Model checking usualle: Infinite prInput^ ocess,y applied to rP responding to enOueactivtput e systemsvironment
Inputs EnviroPnment Outputs
CMSC 631, Fall 2003 3
Pr • The variables at some point in time ogr state am State of a program is the values of its
• System state changes accor ■ Takes transitions from one state to anotherding to inputs
CMSC 631, Fall 2003 4
Example: Microw ¬¬ ¬CSHltoea av seartt e Oven
¬ ¬^ SCHtaloerseatt^ ¬Error
E Srtraorrt ¬^ ¬^ C^ ¬ESHlorteaseraorttr^ ¬^ C ¬^ HESloetrarseaorttr
C ¬ EHlorerseoart ¬ C ¬^ SEHtloaerserraottr C ¬^ S HEltoearrsearottr
Pr • W (among others): oper e would lik ties e to verify the following properties
■ ■ ■ The oIf the oIt must be possible to corven doesn’ven starts,t heat up until the door is closed it will evrentuallect erry starors t cooking
T • empor Specifi ■ cations in al Oper tempor ator al lo s gic
• • Includes standarPlus path quantifi ■ ⋀ - , ⋁, d logical connectivers, basic temporal operatorses
■ ■ ■ EFpGp (exists a path fr – – p p holds sometime in the futur holds globallom hery (alwae),ys) in the futur A (for all paths fre e om here)
■ ■ XppUq – – p pholds next time holds until q holds
CMSC 631, Fall 2003 7
Pr • W (among others): oper e would lik ties e to verify the following properties
■ ■ The o - If the o (¬Heat) U Closedven doesn’ven starts,t heat up until the door is closed it will eventually start cooking
■ - It m -^ AAG(StarG(Erust be possible to corrort^ ⇒⇒^ AF Heat)AF ¬Error) rect errors
CMSC 631, Fall 2003 8
The Model Checking Pr • Let ■ A.k.a. M be a state transition gra a Kripke structure ph oblem
• • LetFind all states f be the specifi s of cation in temporal logicM such that M, s ⊨ f
CMSC 631, Fall 2003 9
A Model Checking Algor • Goal: ■ lab(s) F = { for each state s,ormulas true in compute s } ithm
• When alg ■ M, s ⊨ f ifforithm terminates f ∋ lab(s)
• Alg out,orithm: computing Iterate o lab(s)ver subformulas of f inside-
CMSC 631, Fall 2003 10
Checking Subformulas • Lemma: expressed in terms of Any CTL (see pa ¬,⋁per) f, EX, ormEU, andula can be EG
• Ther ■ Atomic pr - Ifef p oris true ine, opositionsix cases: s, then ad pd p to lab(s)
■ ■ ■ ¬ff1EX f⋁ f2 – – If– If ther fIf f1lab(s) e exists a successorlab(s), ad dor ¬f f2 to lab(s)lab(s), ad s′d off1 ⋁s such thatf2 to lab(s) f
lab(s′), add EX f to lab(s)
Checking Subformulas (cont • E[f1 U f2] ■ Find all states s for which f2 lab(s) ’d)
■ ■ F can r withLabel each of these states withollo w paths backwareachf1 s on a path in which ed from s, fiE[f1 U f2]nding all states thatvery state is labeled
Checking Subformulas (cont • EG f ■ Idea: Look for an infinite path on which f ’ holds d)
■ Divide - A str - a maximal subgra from e onglM into nontrivial stry-connected component (SCC)veryone other node inph such that eongl Cv y-connected componentseron a diry node in C ected path containedis C is reachable
■ - Compute^ C^ node with a self loop^ is nontrivial if either it has mor^ entirel y withinM′ from^ C M by remoe than one node or it contains aving all states s in which
f lab(s)
Exa • No ■ All states satisfy mple (cont w compute ¬E[true U (Star E[true U (Star ’d) t ⋀t EG ¬Heat)]⋀ EG ¬Heat)]
■ ■ So no states satisfy its negationSo our safety property doesn’t hold!
F • eatur Advantages ■ Completel es of y automatic Model Checking
■ ■ ■ No prFast in practiceGenerates counteroofs -examples
• Disadvantages^ ■^ Handles concurrency
■ ■ State explosion prNo dynamic allocation (heaoblem p), or recursion