Embedded Systems Laboratory Department of Computer and Information Science Linköping University Sweden Formal Verification and Model Checking Traian Pop.

Slides:



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

The Quest for Correctness Joseph Sifakis VERIMAG Laboratory 2nd Sogeti Testing Academy April 29th 2009.
Copyright 2000 Cadence Design Systems. Permission is granted to reproduce without modification. Introduction An overview of formal methods for hardware.
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Auto-Generation of Test Cases for Infinite States Reactive Systems Based on Symbolic Execution and Formula Rewriting Donghuo Chen School of Computer Science.
1 Verification of Parameterized Systems Reducing Model Checking of the Few to the One. E. Allen Emerson, Richard J. Trefler and Thomas Wahl Junaid Surve.
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.
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Planning based on Model Checking Dept. of Information Systems and Applied CS Bamberg University Seminar Paper Svetlana Balinova.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
An Introduction to the Model Verifier verds Wenhui Zhang September 15 th, 2010.
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.
Temporal Logic and the NuSMV Model Checker CS 680 Formal Methods Jeremy Johnson.
Game-theoretic approach to the simulation checking problem Peter Bulychev Vladimir Zakharov Lomonosov Moscow State University.
UPPAAL Introduction Chien-Liang Chen.
Efficient Reachability Analysis for Verification of Asynchronous Systems Nishant Sinha.
Verification of Hybrid Systems An Assessment of Current Techniques Holly Bowen.
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.
SYMBOLIC MODEL CHECKING: STATES AND BEYOND J.R. Burch E.M. Clarke K.L. McMillan D. L. Dill L. J. Hwang Presented by Rehana Begam.
Digitaalsüsteemide verifitseerimise kursus1 Formal verification: Property checking Property checking.
1/22 Programs : Semantics and Verification Charngki PSWLAB Programs: Semantics and Verification Mordechai Ben-Ari Mathematical Logic for Computer.
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:
Formal Methods in Software Engineering Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor Formal Methods in Software Engineering1.
Discrete Abstractions of Hybrid Systems Rajeev Alur, Thomas A. Henzinger, Gerardo Lafferriere and George J. Pappas.
Lecture 4&5: Model Checking: A quick introduction Professor Aditya Ghose Director, Decision Systems Lab School of IT and Computer Science University of.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 18 Program Correctness To treat programming.
ESE601: Hybrid Systems Introduction to verification Spring 2006.
Witness and Counterexample Li Tan Oct. 15, 2002.
*Department of Computing Science University of Newcastle upon Tyne **Institut für Informatik, Universität Augsburg Canonical Prefixes of Petri Net Unfoldings.
1 Formal Engineering of Reliable Software LASER 2004 school Tutorial, Lecture1 Natasha Sharygina Carnegie Mellon University.
Formal verification Marco A. Peña Universitat Politècnica de Catalunya.
Abstract Verification is traditionally done by determining the truth of a temporal formula (the specification) with respect to a timed transition system.
1 Introduction to SMV and Model Checking Mostly by: Ken McMillan Cadence Berkeley Labs Small parts by: Brandon Eames ISIS/Vanderbilt.
Binary Decision Diagrams (BDDs)
Model Checking Lecture 4 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
Institute e-Austria in Timisoara 1 Author: prep. eng. Calin Jebelean Verification of Communication Protocols using SDL ( )
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.
CS6133 Software Specification and Verification
Model Based Testing Group 7  Nishanth Chandradas ( )  George Stavrinides ( )  Jeyhan Hizli ( )  Talvinder Judge ( )  Saajan.
Automatic Verification of Finite-State Concurrent Systems Using Temporal Logic Specifications 1.
On Reducing the Global State Graph for Verification of Distributed Computations Vijay K. Garg, Arindam Chakraborty Parallel and Distributed Systems Laboratory.
School of Computer Science, The University of Adelaide© The University of Adelaide, Australian Computer Science Week 2005 Selected papers from: ACSC.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 05/06 Universität Dortmund Validation - Formal verification -
Lecture 5 1 CSP tools for verification of Sec Prot Overview of the lecture The Casper interface Refinement checking and FDR Model checking Theorem proving.
Verification & Validation By: Amir Masoud Gharehbaghi
Quality Assurance in the Presence of Variability Kim Lauenroth, Andreas Metzger, Klaus Pohl Institute for Computer Science and Business Information Systems.
Bounded Model Checking A. Biere, A. Cimatti, E. Clarke, Y. Zhu, Symbolic Model Checking without BDDs, TACAS’99 Presented by Daniel Choi Provable Software.
Complexity of Compositional Model Checking of Computation Tree Logic on Simple Structures Krishnendu Chatterjee Pallab Dasgupta P.P. Chakrabarti IWDC 2004,
Basic concepts of Model Checking
Formal Methods: Model Checkers and Theorem Provers
CIS 842: Specification and Verification of Reactive Systems
Formal Methods in Software Engineering 1
Software Design Methodology
Lecture 5 Floyd-Hoare Style Verification
CSCI1600: Embedded and Real Time Software
Programming Languages 2nd edition Tucker and Noonan
Software Verification 2 Automated Verification
CSEP590 – Model Checking and Automated Verification
Automatic Verification of Industrial Designs
Albert M. K. Cheng Real-Time Systems Laboratory University of Houston
CSCI1600: Embedded and Real Time Software
Introduction to verification
Programming Languages 2nd edition Tucker and Noonan
Presentation transcript:

Embedded Systems Laboratory Department of Computer and Information Science Linköping University Sweden Formal Verification and Model Checking Traian Pop

-2- Formal Verification and Model Checking Traian Pop 2 of Oct 2001 System Validation n System Validation Techniques o Simulation o Testing o Formal Verification o Model Checking

-3- Formal Verification and Model Checking Traian Pop 3 of Oct 2001 Simulation n Based on executable model of the system n permits a quick and shallow evaluation of the design quality n not suitable for finding subtle errors

-4- Formal Verification and Model Checking Traian Pop 4 of Oct 2001 Testing n based on the real implementation of the system not on a model n it is the only way of (partially) validating a design when: o the construction of a valid and reliable model of the system is difficult (due to complexity) o system parts cannot be formally modelled o the model is proprietary

-5- Formal Verification and Model Checking Traian Pop 5 of Oct 2001 Formal Verification Formal Verification requires: n A model of the system n A specification method n A set of proof rules

-6- Formal Verification and Model Checking Traian Pop 6 of Oct 2001 Formal Verification (cont’d) n Verification of sequential programs  pre- and post-conditions: {} S {} (Hoare’s triple) {} S {} is partially correct if any terminating computation S that starts in a state satisfying ,terminates in a state satisfying   {} S {} is totally correct if any computation S that starts in a state satisfying ,terminates and finishes in a state satisfying  

-7- Formal Verification and Model Checking Traian Pop 7 of Oct 2001 Formal Verification (cont’d)

-8- Formal Verification and Model Checking Traian Pop 8 of Oct 2001 Formal Verification (cont’d) n Formal verification of parallel systems introduces non-determinsm problems n Tools in formal verification o Proof assistants o Proof checkers o Theorem provers

-9- Formal Verification and Model Checking Traian Pop 9 of Oct 2001 Model Checking n Automated technique n Verifies whether the required properties hold for a model

-10- Formal Verification and Model Checking Traian Pop 10 of Oct 2001 Model Checking (cont’d) n Typical algorithm: exhaustive state-space search n Approaches (depending on requirement specificaton) o Heterogeneous (logic based) o Homogeneous (behavior based) n Bisimulation (A and B are bisimilar if A can simulate every step of B and vice-versa) n Two bisimilar models satisfy the same CTL formulas

-11- Formal Verification and Model Checking Traian Pop 11 of Oct 2001 Computational Tree Logic (CTL) n Specification language for finite–state systems n Each formula describes properties of computation paths (which are infinite sequences of states) n Logical operators: NOT, AND n Operators for temporal relationships: X (next- state), G(global), U(until), F(future) n Path quantifiers: E, A

-12- Formal Verification and Model Checking Traian Pop 12 of Oct 2001 Computational Tree Logic (cont’d) Descriptions n Xf holds for a path p iff it holds for succ(first(p)) n Gf =>f holds in all states of a computational path n Ff => f will hold sometime in the future n fUg holds for p if there exists a state s on p where g holds while f holds in all states preceding s n AXf holds in a state if f holds in all possible next states

-13- Formal Verification and Model Checking Traian Pop 13 of Oct 2001 Binary Decision Diagrams (BDD) n Rooted, acyclic graphs representing boolean functions n Capture some of the regularities in the state- space n Total ordering on variables is needed n Support AND, OR, NOT and functional composition

-14- Formal Verification and Model Checking Traian Pop 14 of Oct 2001 Model Checking with BDDs and CTL f V gBDD(f) V BDD(g) NOT fNOT BDD(f) BDD(EX, f, R)(v i )  v f [R(v i, v f )  BDD(f,R)(v f )] E[f U g] z = g V [f  EXz] EGf z = f  EXz

-15- Formal Verification and Model Checking Traian Pop 15 of Oct 2001 Fairness n Fairness constraint = an arbitrary formula of the logic n A path is fair with respect to a set of fairness constraints if each constraint holds infinitely often along the path n CTL F – enhanced for dealing with fair paths n Ex. o Fair = EG true o EX f  EX(f  Fair) o EG f with B  Z = f  EX(E[Z U (Z  B)])

-16- Formal Verification and Model Checking Traian Pop 16 of Oct 2001 Model Checking for RTS n Extend both the state-transition graph and the logical formulas, with quantitative timing information o TCTL (Timed CTL) – expresses desired behavior o Timed graphs – express possible behavior

-17- Formal Verification and Model Checking Traian Pop 17 of Oct 2001 Timed CTL n E f U ~c g n A f U ~c g n ~{, , , , } n E f U  c g – for some computational path p there is an initial prefix of time less than c such that g holds at the last state and f holds in all intermediate states n ! No X operator for time in real domain R, as there is no unique next-state/next-time

-18- Formal Verification and Model Checking Traian Pop 18 of Oct 2001 Timed graphs n Model finite-state RT systems n Composed of o Finite set of nodes o Finite set of clocks

-19- Formal Verification and Model Checking Traian Pop 19 of Oct 2001 Model Checking for RTS (cont’d) n The problem consists of deciding whether a finite- state RTS modelled as a timed graph meets its specification given as a TCTL-formula  System model: G = (S, , s 0, E, C, , )  TCTL-structure: M G = (S x (G), ’, f) For a TCTL-formula f, G satisfies f iff ( M G,,(s 0,  0 )) satisfies f, where  0 (x) = 0,  x  C

-20- Formal Verification and Model Checking Traian Pop 20 of Oct 2001 Model Checking - Conclusions n Advantages o General approach o Supports partial verification o Relatively easy to use (as compared to theorem provers) o Can provide a significant increase in the level of confidence of a system n Disadvantages o Appropriate mainly to control intensive applications o Verifies the model, not the system o Only stated requirements are checked o State-space explosion problem -> complexity issues