1 CSEP590 – Model Checking and Automated Verification Lecture outline for August 6, 2003.

Slides:



Advertisements
Similar presentations
Copyright 2000 Cadence Design Systems. Permission is granted to reproduce without modification. Introduction An overview of formal methods for hardware.
Advertisements

CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
Partial Order Reduction: Main Idea
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
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.
CS 290C: Formal Models for Web Software Lecture 3: Verification of Navigation Models with the Spin Model Checker Instructor: Tevfik Bultan.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
UPPAAL Introduction Chien-Liang Chen.
Timed Automata.
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
Hydra (A General Framework for Formalizing UML with Formal Languages for Embedded Systems*) *from the Ph.D. thesis of William E. McUmber Software Engineering.
CS 267: Automated Verification Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking.
PSWLAB S PIN Search Algorithm from “THE SPIN MODEL CHECKER” by G Holzmann Presented by Hong,Shin 9 th Nov SPIN Search Algorithm.
1 Temporal Claims A temporal claim is defined in Promela by the syntax: never { … body … } never is a keyword, like proctype. The body is the same as for.
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
1 Formal Methods in SE Qaisar Javaid Assistant Professor Lecture 05.
1 Spin Model Checker Samaneh Navabpour Electrical and Computer Engineering Department University of Waterloo SE-464 Summer 2011.
Software Model Checking for Embedded Systems PIs: Matthew Dwyer 1, John Hatcliff 1, and George Avrunin 2 Post-docs: Steven Seigel 2, Radu Iosif 1 Students:
An Automata-based Approach to Testing Properties in Event Traces H. Hallal, S. Boroday, A. Ulrich, A. Petrenko Sophia Antipolis, France, May 2003.
Spin Tutorial (some verification options). Assertion is always executable and has no other effect on the state of the system than to change the local.
1 Carnegie Mellon UniversitySPINFlavio Lerda SPIN An explicit state model checker.
CSE 555 Protocol Engineering Dr. Mohammed H. Sqalli Computer Engineering Department King Fahd University of Petroleum & Minerals Credits: Dr. Abdul Waheed.
Temporal Logic Model- checking with SPIN COMP6004 Stéphane Lo Presti Part 4: Specifications.
Model Checking. Used in studying behaviors of reactive systems Typically involves three steps: Create a finite state model (FSM) of the system design.
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.
Developing Verifiable Concurrent Software Tevfik Bultan Department of Computer Science University of California, Santa Barbara
Review of the automata-theoretic approach to model-checking.
Describing Syntax and Semantics
Automata and Formal Lanugages Büchi Automata and Model Checking Ralf Möller based on slides by Chang-Beom Choi Provable Software Lab, KAIST.
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.
The Model Checker SPIN Written by Gerard J. Holzmann Presented by Chris Jensen.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 4: SMT-based Bounded Model Checking of Concurrent Software.
Lecture 6 Template Semantics CS6133 Fall 2011 Software Specification and Verification.
1 Carnegie Mellon UniversitySPINFlavio Lerda Bug Catching SPIN An explicit state model checker.
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
Cheng/Dillon-Software Engineering: Formal Methods Model Checking.
Regular Model Checking Ahmed Bouajjani,Benget Jonsson, Marcus Nillson and Tayssir Touili Moran Ben Tulila
Parallel and Distributed Computing in Model Checking Diana DUBU (UVT) Dana PETCU (IeAT, UVT)
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
Scientific Computing By: Fatima Hallak To: Dr. Guy Tel-Zur.
Software Engineering Research paper presentation Ali Ahmad Formal Approaches to Software Testing Hierarchal GUI Test Case Generation Using Automated Planning.
CS6133 Software Specification and Verification
CIS 842: Specification and Verification of Reactive Systems Lecture Specifications: LTL Model Checking Copyright , Matt Dwyer, John Hatcliff,
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Chapter 3 Part II Describing Syntax and Semantics.
1 Checking Interaction Consistency in MARMOT Component Refinements Yunja Choi School of Electrical Engineering and Computer Science Kyungpook National.
Constraints Assisted Modeling and Validation Presented in CS294-5 (Spring 2007) Thomas Huining Feng Based on: [1]Constraints Assisted Modeling and Validation.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
/ PSWLAB S PIN Search Optimization from “THE SPIN MODEL CHECKER” by G. Holzmann Presented by Hong,Shin 23 th Nov SPIN Search.
Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
Software Systems Verification and Validation Laboratory Assignment 4 Model checking Assignment date: Lab 4 Delivery date: Lab 4, 5.
From Natural Language to LTL: Difficulties Capturing Natural Language Specification in Formal Languages for Automatic Analysis Elsa L Gunter NJIT.
Today’s Agenda  Quiz 4  Temporal Logic Formal Methods in Software Engineering1.
Symbolic Model Checking of Software Nishant Sinha with Edmund Clarke, Flavio Lerda, Michael Theobald Carnegie Mellon University.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Copyright 1999 G.v. Bochmann ELG 7186C ch.1 1 Course Notes ELG 7186C Formal Methods for the Development of Real-Time System Applications Gregor v. Bochmann.
Complexity Relief Techniques for Model Checking METU, Aug SOFTWARE VERIFICATION WORKSHOP Hüsnü Yenigün Sabanci University Informatics Institute,
Automatic Verification
An explicit state model checker
Logical architecture refinement
Aspect Validation: Connecting Aspects and Formal Methods
CSEP590 – Model Checking and Automated Verification
Reachability testing for concurrent programs
An explicit state model checker
Presentation transcript:

1 CSEP590 – Model Checking and Automated Verification Lecture outline for August 6, 2003

2 -First, we’ll discuss Abstraction Techniques from the last lecture… -Today, we’ll be primarily concerned with discussing the model checker SPIN, and if time permits, the very interesting Bandera system for Java -SPIN -Developed by G.J. Holzmann at Bell Labs -It is the topic of an annual workshop since Designed for the simulation and verification of distributed algorithms, focusing on asynchronous control in software systems -Different than other approaches (synchronized hardware systems) -Systems are described in the Promela modeling language -Allows for describing each process in the system + the interactions between processes -Communication: processes use FIFO comm. Channels, shared variables, rendez-vous comm. (see manual for this)

3 -The models are bounded and have countably many distinct behaviors -=> correctness properties are formally decidable, subject to constraints of computational resources (time, memory) -SPIN seeks to address some of these constraints, how do you deal with them? -We’ll see a diagram in class of the basic SPIN architecture -Why is compilation used? -Allows for generation of highly optimized models, specific to property -SPIN framework -Models specified in Promela -Process templates + instantiation of processes -Templates define process behavior -Templates translated into a finite automaton -Global behavior of system created by computing an asynchronous interleaving product of automata, 1 automata per process behavior

4 -Global system: represented by automaton (state space of system, or reachability graph of system) -LTL formula specs translated in a Buchi automaton -Computes asynchronous product of Buchi automaton and global automaton to get another Buchi automaton, B -If language accepted by B is empty +> original spec claim is not satisfied for given system. Nonempty => B contains all behaviors that satisfy spec -However, size of global reachability graph can grow exponentially with # of processes -SPIN uses complexity management techniques to solve/help -What are Buchi automata? A quick defn… -Variant of an NFA for processing words of infinite length -Accepts a string iff execution of automaton goes thru an accepting state infinite # of times while processing the string -Automata generated formally accept only those infinite system executions that satisfy the corresponding LTL formula

5 -SPIN uses a nested depth-first search technique to look for these acceptance cycles in the automata -LTL formula’s are specified in Promela according to the following grammar: -f = p | true | false | (f) | f binop f | unop f -unop = [] (always), <> (eventually), ! (negation) -binop = U (until), && (and), || (or), -> (implies), (equiv) -Ex: [](pUq) means “always guaranteed that p is true until at least q is true” -Partial Order Reduction -SPIN uses this method to reduce the # of reachable states that must be explored to complete a verification -Reduction: based on the fact that the validity of a LTL formula is often insensitive to the order in which concurrent and independently executed events are interleaved in the depth-first search

6 -Thus, we can generate a reduced state space with representative classes of execution sequences => collapse equivalent sequence orderings! -What about memory management in SPIN? -The size of interleaving processes is worst case exponential in the # of processes -How fix? -1) state compression – new method added in 1995 allows for a 60-80% memory reduction in practice with only a 10-20% increase in CPU time -2) bit-state hashing – 2 bits of memory are used to store a reachable state. Bit addresses are computed using 2 statistically independent hash functions -Good for when exhaustive verification isn’t possible but you still want a good approximation

7 -Let’s discuss the Promela language syntax and semantics -Refer to the Promela language manual for this part of the lecture -Now, we’ll see a SPIN demo, highlighting the main features of the software and showing a number of demo verifications -This should be enough to get you familiar with SPIN to be able to use it on the next problem set -If time permits, we will discuss Bandera next -Bandera -Seeks to bridge the gap between research and practice in model checking software -Integrated collection of program analysis and transformation components enabling automatic extraction of safe, compact finite-state models from program source code (Java) -From Java code  SMV or SPIN model, then map verifier output back to the Java source code -Why is this a good idea?

8 -Alleviates the need to construct models by hand -Has optimizations to deal with state space explosion problem automatically -Bandera philosophy -1) reuse existing checking technologies -2) automated abstractions -3) customize model based on spec/property -4) open design for ease of extensibility -5) integration with existing software testing/debugging techniques -What techniques does Bandera use to build tractable models from software? -1) irrelevant component elimination -Many program components (classes, threads, vars, code) might be irrelevant to the property being verified -Ex: clicking on a menu brings up a certain dialog box is independent of application code

9 -2) Data abstraction -Vars may record more detail than necessary for property being tested -Ex: items in a vector, but if property is only concerned with the existence of a certain item in the vector, then the # of vector states can be abstracted to just 2: {ItemInVec, ItemNotInVec} -3) Component Restriction -If 1) and 2) fail, create a restricted model -Limit # of components, limit range of vars -Idea: many design errors are manifest in small versions of a system => can still be useful for find errors in the actual system -How does Bandera do it though? -Uses slicing to automate irrelevant component elimination -Abstract interpretation module for data abstraction -Model generator with built-in flexibility

10 -Data structures for mapping between model checker error traces and the original source code + a graphical tool for navigating these traces -Includes a menu-driven library for helping the user to create logic specifications -Irrelevant components are sliced away from the program -Data abstractions are applied on the remaining model -The back-end generates a SPIN or SMV model -The translator maps back from the verifier to the source code -What’s a slicer? -Given a program P and program statements C = {s 1 …s k } of interest from P called the slicing criterion, the slicer computes a reduced version of P by removing statements of P that do not affect computation of the criterion statements C -Bandera slices to remove statements that do not affect the satisfaction of the given property 

11 -Recent work has shown that slicing criterion can be based only on the primitive properties in  -Slicers are hard to build, especially for Java’s concurrency model! -Bandera’s Abstraction-Based Specializer (BABS) -Automates the model reduction via data abstraction -Useful when the specification depends only on the properties of data values, NOT the actual concrete data values themselves -User can guide abstractions as well with built in libraries and a user input mode