Temporal Logic and the NuSMV Model Checker CS 680 Formal Methods Jeremy Johnson.

Slides:



Advertisements
Similar presentations
1 Verification by Model Checking. 2 Part 1 : Motivation.
Advertisements

Model Checking Lecture 1.
Model Checking Lecture 2. Three important decisions when choosing system properties: 1automata vs. logic 2branching vs. linear time 3safety vs. liveness.
1 Reasoning with Promela Safety properties bad things do not happen can check by inspecting finite behaviours Liveness properties good things do eventually.
Tutorial I – An Introduction to Model Checking Peng WU INRIA Futurs LIX, École Polytechnique.
Metodi formali dello sviluppo software a.a.2013/2014 Prof.Anna Labella.
CS 267: Automated Verification Lecture 2: Linear vs. Branching time. Temporal Logics: CTL, CTL*. CTL model checking algorithm. Counter-example generation.
M ODEL CHECKING -Vasvi Kakkad University of Sydney.
Algorithmic Software Verification VII. Computation tree logic and bisimulations.
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
Partial Order Reduction: Main Idea
Part 3: Safety and liveness
1 Model checking. 2 And now... the system How do we model a reactive system with an automaton ? It is convenient to model systems with Transition systems.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
ECE Synthesis & Verification - L271 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Model Checking basics.
François Fages MPRI Bio-info 2006 Formal Biology of the Cell Modeling, Computing and Reasoning with Constraints François Fages, Constraints Group, INRIA.
Model Checking I What are LTL and CTL?. and or dreq q0 dack q0bar.
CS6133 Software Specification and Verification
UPPAAL Introduction Chien-Liang Chen.
Model Checking Inputs: A design (in some HDL) and a property (in some temporal logic) Outputs: Decision about whether or not the property always holds.
卜磊 Transition System. Part I: Introduction  Chapter 0: Preliminaries  Chapter 1: Language and Computation Part II: Models  Chapter.
Model Checking I What are LTL and CTL?. and or dreq q0 dack q0bar D D.
Digitaalsüsteemide verifitseerimise kursus1 Formal verification: Property checking Property checking.
SAT and Model Checking. Bounded Model Checking (BMC) A.I. Planning problems: can we reach a desired state in k steps? Verification of safety properties:
1 Temporal Logic u Classical logic:  Good for describing static conditions u Temporal logic:  Adds temporal operators  Describe how static conditions.
© Katz, 2007CS Formal SpecificationsLecture - Temporal logic 1 Temporal Logic Formal Specifications CS Shmuel Katz The Technion.
CSE 555 Protocol Engineering Dr. Mohammed H. Sqalli Computer Engineering Department King Fahd University of Petroleum & Minerals Credits: Dr. Abdul Waheed.
1 Carnegie Mellon UniversitySPINFlavio Lerda SPIN An explicit state model checker.
Lecture 4&5: Model Checking: A quick introduction Professor Aditya Ghose Director, Decision Systems Lab School of IT and Computer Science University of.
Specification Formalisms Book: Chapter 5. Properties of formalisms Formal. Unique interpretation. Intuitive. Simple to understand (visual). Succinct.
Review of the automata-theoretic approach to model-checking.
Embedded Systems Laboratory Department of Computer and Information Science Linköping University Sweden Formal Verification and Model Checking Traian Pop.
ESE601: Hybrid Systems Introduction to verification Spring 2006.
1 Formal Engineering of Reliable Software LASER 2004 school Tutorial, Lecture1 Natasha Sharygina Carnegie Mellon University.
CS 267: Automated Verification Lecture 13: Bounded Model Checking Instructor: Tevfik Bultan.
1 Temporal Logic-Overview FM Temporal Logic u Classical logic: Good for describing static conditions u Temporal logic: Adds temporal operators Describe.
1 Carnegie Mellon UniversitySPINFlavio Lerda Bug Catching SPIN An explicit state model checker.
Verification by Model Checking1 Formal Methods Laboratory University of Tehran Based on the chapter 3 of “Logic in Computer Science”, Huth & Ryan.
1 Introduction to SMV and Model Checking Mostly by: Ken McMillan Cadence Berkeley Labs Small parts by: Brandon Eames ISIS/Vanderbilt.
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
Copyright 2001, Matt Dwyer, John Hatcliff, and Radu Iosif. The syllabus and all lectures for this course are copyrighted materials and may not be used.
10/19/2015COSC , Lecture 171 Real-Time Systems, COSC , Lecture 17 Stefan Andrei.
Automatic Verification of Finite-State Concurrent Systems Using Temporal Logic Specifications 1.
Recognizing safety and liveness Presented by Qian Huang.
Verification & Validation By: Amir Masoud Gharehbaghi
VIS Technology Transfer Course Session 7 Fairness Constraints and Monitors Serdar Tasiran.
Symbolic Algorithms for Infinite-state Systems Rupak Majumdar (UC Berkeley) Joint work with Luca de Alfaro (UC Santa Cruz) Thomas A. Henzinger (UC Berkeley)
1 CSEP590 – Model Checking and Automated Verification Lecture outline for July 9, 2003.
1 Temporal logic. 2 Prop. logic: model and reason about static situations. Example: Are there truth values that can be assigned to x,y simultaneously.
Software Systems Verification and Validation Laboratory Assignment 4 Model checking Assignment date: Lab 4 Delivery date: Lab 4, 5.
6/12/20161 a.a.2015/2016 Prof. Anna Labella Formal Methods in software development.
Model Checking Lecture 2. Model-Checking Problem I |= S System modelSystem property.
CIS 842: Specification and Verification of Reactive Systems
Semantically Equivalent Formulas
Software Verification 2 Automated Verification
CSCI1600: Embedded and Real Time Software
IS 2935: Developing Secure Systems
CSEP590 – Model Checking and Automated Verification
Formal Methods in software development
Formal Methods in software development
Formal Methods in software development
Formal Methods in software development
CSCI1600: Embedded and Real Time Software
Formal Methods in software development
Introduction to verification
Formal Methods in software development
Formal Methods in software development
COMP60621 Designing for Parallelism
CSE 503 – Software Engineering
Presentation transcript:

Temporal Logic and the NuSMV Model Checker CS 680 Formal Methods Jeremy Johnson

Formal Verification  Framework for modelling systems  A specification language for describing properties to be verified  A verification method to establish whether the description of the system satisfies its specification

Approaches to Verification  Proof based vs model based  Degree of automation  Full vs. property verification  Intended domain of application  Pre vs post development

Model Checking  Describe a model for the system  Describe properties using temporal logic  Run the model checker to see if the property is satisfied in the model  Contrast to Alloy

Linear-Time Temporal Logic

Transition System p,q q,rr S0S0 S1S1 S2S2

Tree of Computation Paths p,q S0S0 r S2S2 r S2S2 q,r S1S1 r S2S2 r S2S2 p,q S0S0 r S2S2 q,r S1S1 … … … … …

Semantics of LTL

Examples p,q S0S0 r S2S2 r S2S2 q,r S1S1 r S2S2 r S2S2 p,q S0S0 r S2S2 q,r S1S1 … … … … …

Examples

Practical Examples  It is impossible to get to a state where started holds, but ready does not hold  G  (started  ready)  Negation says it is possible but only interpreted on paths. Does not say for all states there exists a path to get to such a state

Practical Examples  For any state, if a request occurs then it will eventually be acknowledged  G(requested  F acknowledged)  A certain process is enabled infinitely often  GF enabled

Practical Examples  Whatever happens a certain process will eventually be permantently deadlocked  F G deadlocked  If a process is enabled infinitely often it runs infinitely often  GF enabled  GF running

Practical Examples  An upwards travelling elevator at the second floor does not change its direction when it has passengers wishing to go to the 5 th floor  G(floor2  up  Button5Pressed  (up U floor5)

What can’t you say  From any state it is possible to get to a restart state  An elevator can remain idle on the third floor  LT can not assert the existence of paths.  CTL can

Equivalent Formulas  Negation   G   F    F   G    X   X    (  U  )  (   R   )   (  R  )  (   U   )

Equivalent Formulas  Distributivity  F(    )  F   F   G(    )  G   G   What about the other way?

Equivalent Formulas

Mutual Exlcusion  Critical section (c, t, n)  Two processes that can be interleaved  Safety (only one process is in its critical section at a time)  G  (c 1  c 2 )  Liveness (whenever a process requests to enter its critical section it will eventually be permitted to do so)  G(t 1  F c 1 )

Mutual Exclusion  Critical section (c, t, n)  Non-blocking (a process can always request to enter its critical section)  Every state satisfying n there is a path satisfying t  No strict sequencing (processes need not enter their critical section in strict sequence)  There is a path with two distinct states satisfying c1 [not expressible in LTL]  Complement (all paths having c1 can not have further c1 until c2 occurs  G(c1  c1W(  c1   c1 W c2))

First Attempt n1n2n1n2 t1n2t1n2 n1t2n1t2 t1t2t1t2 c1n2c1n2 c1t2c1t2 n1c2n1c2 t1c2t1c2 s0s0 s1s1 s2s2 s3s3 s4s4 s5s5 s6s6 s7s7

Second Attempt n1n2n1n2 t1n2t1n2 n1t2n1t2 t1t2t1t2 c1n2c1n2 c1t2c1t2 n1c2n1c2 t1c2t1c2 s0s0 s1s1 s2s2 s3s3 s5s5 s6s6 s7s7 s4s4 t1t2t1t2 s9s9

Branching-Time Logic  In LTL a state of a system satisfies  iff for all paths from that state  is satisfied  Implicit universal quantifier  Properties which assert the existence of a path can not be expressed (partially solved by considering negation     Branching-time logic solve this problem by allowing quantifiers over paths

Computation Tree Logic (CTL)  Branching time logic where model of time is tree-like: there are different paths in the future, any of which might be the actual path

Computation Tree Logic (CTL)

Examples  There is a reachable state satisfying q  EF q  From all reachable states satisfying p, it is possible to maintain p continuously until reaching a state satisfying q  AG(p  E(p U q))

Examples  Whenever a state satisfying p is reached, the system can exhibit q continuously forevermore  AG (p  EG q)  There is a reachable state from which all reachable states satisfy p  EF AG p

Mutual Exclusion Revisited  Critical section (c, t, n)  Non-blocking (a process can always request to enter its critical section)  Every state satisfying n there is a path satisfying t  AG( n 1  EX t 1 )  No strict sequencing (processes need not enter their critical section in strict sequence)  There is a path with two distinct states satisfying c1 [not expressible in LTL]  EF(c1  E[c1 U (  c1  E[  c2 U c1])])

Second Attempt n1n2n1n2 t1n2t1n2 n1t2n1t2 t1t2t1t2 c1n2c1n2 c1t2c1t2 n1c2n1c2 t1c2t1c2 s0s0 s1s1 s2s2 s3s3 s5s5 s6s6 s7s7 s4s4 t1t2t1t2 s9s9

Semantics of CTL