Bandera: Extracting Finite-state Models from Java Source Code James C. Corbett (Hawai’i) Matthew B. Dwyer, John Hatcliff, Shawn Laubach, Corina S. Păsăreanu,

Slides:



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

Copyright 2000 Cadence Design Systems. Permission is granted to reproduce without modification. Introduction An overview of formal methods for hardware.
Auto-Generation of Test Cases for Infinite States Reactive Systems Based on Symbolic Execution and Formula Rewriting Donghuo Chen School of Computer Science.
M ODEL CHECKING -Vasvi Kakkad University of Sydney.
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking 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.
Model Checking I What are LTL and CTL?. and or dreq q0 dack q0bar.
1 Symbolic Execution for Model Checking and Testing Corina Păsăreanu (Kestrel) Joint work with Sarfraz Khurshid (MIT) and Willem Visser (RIACS)
Carnegie Mellon University Java PathFinder and Model Checking of Programs Guillaume Brat, Dimitra Giannakopoulou, Klaus Havelund, Mike Lowry, Phil Oh,
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
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:
Automated creation of verification models for C-programs Yury Yusupov Saint-Petersburg State Polytechnic University The Second Spring Young Researchers.
An Automata-based Approach to Testing Properties in Event Traces H. Hallal, S. Boroday, A. Ulrich, A. Petrenko Sophia Antipolis, France, May 2003.
10/22/2002© 2002 Hal Perkins & UW CSEG-1 CSE 582 – Compilers Intermediate Representations Hal Perkins Autumn 2002.
1 Carnegie Mellon UniversitySPINFlavio Lerda SPIN An explicit state model checker.
1 Predicate Abstraction of ANSI-C Programs using SAT Edmund Clarke Daniel Kroening Natalia Sharygina Karen Yorav (modified by Zaher Andraus for presentation.
Bandera Tool Set Presented by: Dor Nir. Outline Specification Language (LTL) Software verification problems Introduction to Bandera tool Set Bandera Specification.
Efficient Software Model Checking of Data Structure Properties Paul T. Darga Chandrasekhar Boyapati The University of Michigan.
School of Computer ScienceG53FSP Formal Specification1 Dr. Rong Qu Introduction to Formal Specification
CS 267: Automated Verification Lecture 13: Bounded Model Checking Instructor: Tevfik Bultan.
Formal verification Marco A. Peña Universitat Politècnica de Catalunya.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 4: SMT-based Bounded Model Checking of Concurrent Software.
Dr. Pedro Mejia Alvarez Software Testing Slide 1 Software Testing: Building Test Cases.
A Simple Method for Extracting Models from Protocol Code David Lie, Andy Chou, Dawson Engler and David Dill Computer Systems Laboratory Stanford University.
COP 4620 / 5625 Programming Language Translation / Compiler Writing Fall 2003 Lecture 10, 10/30/2003 Prof. Roy Levow.
Stephen P. Carl - CS 2421 Recursion Reading : Chapter 4.
Institute e-Austria in Timisoara 1 Author: prep. eng. Calin Jebelean Verification of Communication Protocols using SDL ( )
B. Fernández, D. Darvas, E. Blanco Formal methods appliedto PLC code verification Automation seminar CERN – IFAC (CEA) 02/06/2014.
Software Engineering Research paper presentation Ali Ahmad Formal Approaches to Software Testing Hierarchal GUI Test Case Generation Using Automated Planning.
Survey on Trace Analyzer (2) Hong, Shin /34Survey on Trace Analyzer (2) KAIST.
Dynamic Analysis of Multithreaded Java Programs Dr. Abhik Roychoudhury National University of Singapore.
Joseph Cordina 1/11 The Use of Model-Checking for the Verification of Concurrent Algorithms Joseph Cordina Department of C.S.&A.I.
Bandera: Extracting Finite-state Models from Java Source Code James Corbett Matthew Dwyer John Hatcliff Shawn Laubach Corina Pasareanu Robby Hongjun Zheng.
Finding Feasible Counter-examples when Model Checking Abstracted Java Programs Corina S. Pasareanu, Matthew B. Dwyer (Kansas State University) and Willem.
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.
Model construction and verification for dynamic programming languages Radu Iosif
An extensible and highly-modular model checking framework SAnToS Laboratory, Kansas State University, USA Matt Dwyer.
CIS 842: Specification and Verification of Reactive Systems Lecture 1: Course Overview Copyright 2001, Matt Dwyer, John Hatcliff, and Radu Iosif. The.
Semantics In Text: Chapter 3.
1 CSEP590 – Model Checking and Automated Verification Lecture outline for August 6, 2003.
Bandera: Extracting Finite-state Models from Java Source Code. Paper By: James C. Corbett, Mathew Dwyer, John Hatcliff, Shawn Laubach, Corina Pasareanu,
12/18/2015© Hal Perkins & UW CSEG-1 CSE P 501 – Compilers Intermediate Representations Hal Perkins Winter 2008.
Verification & Validation By: Amir Masoud Gharehbaghi
Tool-supported Program Abstraction for Finite-state Verification Matthew Dwyer 1, John Hatcliff 1, Corina Pasareanu 1, Robby 1, Roby Joehanes 1, Shawn.
Model-checking Concurrent Java Software Using the Bandera Tool Set Matthew Dwyer John Hatcliff Radu Iosif Yu Chen Georg Jung Todd Wallentine FacultyStudents.
Using Symbolic PathFinder at NASA Corina Pãsãreanu Carnegie Mellon/NASA Ames.
SAFE KERNEL EXTENSIONS WITHOUT RUN-TIME CHECKING George C. Necula Peter Lee Carnegie Mellon U.
Grigore Rosu Founder, President and CEO Professor of Computer Science, University of Illinois
Static Techniques for V&V. Hierarchy of V&V techniques Static Analysis V&V Dynamic Techniques Model Checking Simulation Symbolic Execution Testing Informal.
These slides are for internal Bandera meetings and are not meant to be publicly disclosed. Bandera Meeting: Sept 9, 2001.
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
Automated Formal Verification of PLC (Programmable Logic Controller) Programs
Tool-supported Program Abstraction for Finite-state Verification Matthew Dwyer 1, John Hatcliff 1, Corina Pasareanu 1, Robby 1, Roby Joehanes 1, Shawn.
R-Verify: Deep Checking of Embedded Code James Ezick † Donald Nguyen † Richard Lethin † Rick Pancoast* (†) Reservoir Labs (*) Lockheed Martin The Eleventh.
From Natural Language to LTL: Difficulties Capturing Natural Language Specification in Formal Languages for Automatic Analysis Elsa L Gunter NJIT.
Model-checking Concurrent Java Software Using the Bandera Tool Set Matthew Dwyer John Hatcliff Radu Iosif Hongjun Zheng Shawn Laubach Corina Pasareanu.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
The Bandera Model Reduction Tools James Corbett Matthew Dwyer John Hatcliff Shawn Laubach Corina Pasareanu Robby Hongjun Zheng Faculty Students and Post-docs.
Presentation Title 2/4/2018 Software Verification using Predicate Abstraction and Iterative Refinement: Part Bug Catching: Automated Program Verification.
SS 2017 Software Verification Bounded Model Checking, Outlook
Authors :John Hatcliff and Mattew Dwyer presented by Slava Yablonovich
Bandera: Extracting Finite-state Models from Java Code
Space-Reduction Strategies for Model Checking Dynamic Software
An explicit state model checker
runtime verification Brief Overview Grigore Rosu
Aspect Validation: Connecting Aspects and Formal Methods
Hongyu Zhang, Jeremy S. Bradbury, James R. Cordy, Juergen Dingel
The Bogor Model Checking Framework
Presentation transcript:

Bandera: Extracting Finite-state Models from Java Source Code James C. Corbett (Hawai’i) Matthew B. Dwyer, John Hatcliff, Shawn Laubach, Corina S. Păsăreanu, Robby, Hongjun Zheng (KSU) Presented by Christian Almazan 18 November 2003 (CMSC 631)

Model Checking in One Slide Automatic specification verification Covers all possible paths in the model Popular in hardware and protocol verification Finite-State Model Temporal Logic Formula Linear Temporal Logic (LTL) Computation Tree Logic (CTL) Verified Counter-Example Model Checker SPIN dSPIN SMV …

Difficulty in Bringing Model Checking to Software State-Explosion Problem States increase exponentially as program size grows Model Construction Problem Development in a general-purpose language Verification tools use an specification language Requirement Specification Problem Specification languages tend to be mathematical Hard to use, read, debug, very lengthy Output Interpretation Problem Counter-example long and complex Hard to map directly to source code

Problems in Previous Efforts Monolithic Approach Model checker for a specific language (Erlang) Difficult to place newer model checking techniques Source Code  Verifier Input Language Translates program directly from source code JCAT or Java PathFinder to PROMELA for SPIN Program Size Increases = Exponential State Growth Combined Problems Keeps developers tied to one technology Limited support for control and data abstraction

Overcoming Obstacles: Bandera Use proven model checkers SPIN, dSPIN, Java PathFinder Automated transformations Compacting number of states Use individual models for each property Design for extensibility Build individual components Create a friendly environment Familiar, uniform, specifications easy to learn Leveraged for testing, debugging, and simulation

Bandera Components

Program Infrastructure Built on top of the Soot compiler framework Uses control-flow graph language Jimple Language used by all middleware components Java-to-Jimple-to-Java Compiler (JJJC) Easily use internal tools and return Java code Allows model checker counter-examples to be mapped back into original Java source code

Property Specification Bandera Specification Language (BSL) Collection of temporal specification patterns in English Parameterized macros  LTL or CTL Defined in source code directly using Javadoc Not mathematical like LTL or CTL

Bounded Buffer Specification If a buffer becomes full, it will eventually become non-full. /** * EXP Full(this): (head == tail); * * FullToNonFull: forall[b:BoundedBuffer]; * {!Full(b)} responds to {Full(b)} globally */ class BoundedBuffer {... }

Static Analysis Bandera Object Flow Analysis (BOFA) Optimizations: data/control analysis Statically collects information about objects that may flow into each program expression at runtime Associates a set of tokens { t 1, …, t n } for a particular expression e. t i is a pair (C,s): C is a class name and s is where object is created Similar to “points to” analysis for imperative languages and “closure analysis” used for functional programming languages

Slicing Given program P and slicing criterion  based on the observables in the specification… Does program dependence-based slicing to get a reduced version of P dependences: data, control, interference, ready, wait backwards slicing Effectiveness based on structure of program Relevant In Property

Abstract Interpretation Further reductions through data abstraction Useful when specification does not need concrete values, but only properties of values Developers aid abstraction libraries: Bandera Abstraction Specification Library (BASL) Utilizes the PVS theorem prover Examples integers to signs: { positive, zero, negative } vector items: { ItemInVector, ItemNotInVector }

Back End Model Generation Bandera Intermediate Representation language (BIR) Jimple-BIR: BIR Constructor Used between Bandera components and model checker input languages Model checker writers only need to write a translator from BIR to their input language BIR contains higher-level constructs to model Java code more efficiently locks, threads, references, heap

Bandera Components

Using Bandera Launch the Bandera User Interface (BUI) from the command line Future runs: save which components you want to use in session files

Counter-Example: Overview Counter-example with a thousand states?!?! Bandera provides debugger-like features: map states to source code program tracing create checkpoints keep track of variables and objects UML-like object displays lock graphs

Counter-Example: Program Tracing

Counter-Example: Lock Graph

Counter-Example: Object Viewer

Mandatory Performance Slide ProblemExtract Time (s) Check Time (s) Check Result States b, r1, n242674true b, r1, s134true3478 b, r1, a154true895 b, r2, s1356true b, r2, a1611true27519 b, p1, s134true2507 b, p1, a154true331 d, r1, s133false88 d, r1, a152false17 Threaded Pipeline b: basic d: defective variant r: response property p: precedence property n: no reductions s: slicing a: slicing + data abstraction

When to Use Model Checking Control-related properties assertions pre- and post-conditions simple data invariants Container objects stacks queues Verifying concurrent behavior Necessity for counter-examples Automatic property verification of source code

Analysis Not Appropriate for Model Checking Data-related properties Verification of sorting algorithms Use other formal methods instead (theorem proving) Where static dataflow analysis is better array-bounds errors buffer overruns null-pointer de-referencing

The Future of Bandera Bandera 0.3b2Summer 2003 Bandera 1.0Summer 2004 No more command line startup Collection of plug-ins for the Eclipse IDE All features re-deigned, re-implemented, re-done Future of Model Checking?: Bogor (KSU) Forget supporting other model checkers in Bandera Bogor is a big step in model checking?

Links and Related Work Try Me! Visit Citeseer for abstraction and slicing papers Model Checkers: SPIN, dSPIN, JPF Source Code Translators: JPF, JCAT Many More! Use Google!

Questions? Learn anything from this talk or the class? Would you use model checking? If so, when? Do you like the push for the original Bandera? Using only Eclipse a good idea? Why stop supporting other model checkers? Support their own tool Bogor? Too time consuming writing BIR translators? A dream writing BIR, universal language?