Efficient Software Model Checking of Data Structure Properties Paul T. Darga Chandrasekhar Boyapati The University of Michigan.

Slides:



Advertisements
Similar presentations
Model Checking Lecture 4. Outline 1 Specifications: logic vs. automata, linear vs. branching, safety vs. liveness 2 Graph algorithms for model checking.
Advertisements

Copyright 2000 Cadence Design Systems. Permission is granted to reproduce without modification. Introduction An overview of formal methods for hardware.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 18 Program Correctness To treat programming.
Hybrid BDD and All-SAT Method for Model Checking Orna Grumberg Joint work with Assaf Schuster and Avi Yadgar Technion – Israel Institute of Technology.
Korat Automated Testing Based on Java Predicates Chandrasekhar Boyapati, Sarfraz Khurshid, Darko Marinov MIT ISSTA 2002 Rome, Italy.
Representing Boolean Functions for Symbolic Model Checking Supratik Chakraborty IIT Bombay.
M ODEL CHECKING -Vasvi Kakkad University of Sydney.
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:
An Introduction to the Model Verifier verds Wenhui Zhang September 15 th, 2010.
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
1 Symbolic Execution for Model Checking and Testing Corina Păsăreanu (Kestrel) Joint work with Sarfraz Khurshid (MIT) and Willem Visser (RIACS)
1/20 Generalized Symbolic Execution for Model Checking and Testing Charngki PSWLAB Generalized Symbolic Execution for Model Checking and Testing.
Bebop: A Symbolic Model Checker for Boolean Programs Thomas Ball Sriram K. Rajamani
Efficient Reachability Analysis for Verification of Asynchronous Systems Nishant Sinha.
Introducing BLAST Software Verification John Gallagher CS4117.
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.
Automatic Predicate Abstraction of C-Programs T. Ball, R. Majumdar T. Millstein, S. Rajamani.
BLAST-A Model Checker for C Developed by Thomas A. Henzinger (EPFL) Rupak Majumdar (UC Los Angeles) Ranjit Jhala (UC San Diego) Dirk Beyer (Simon Fraser.
Demonstration Of SPIN By Mitra Purandare
The Software Model Checker BLAST by Dirk Beyer, Thomas A. Henzinger, Ranjit Jhala and Rupak Majumdar Presented by Yunho Kim Provable Software Lab, KAIST.
Thread-modular Abstraction Refinement Tom Henzinger Ranjit Jhala Rupak Majumdar Shaz Qadeer.
Using Statically Computed Invariants Inside the Predicate Abstraction and Refinement Loop Himanshu Jain Franjo Ivančić Aarti Gupta Ilya Shlyakhter Chao.
Lazy Abstraction Thomas A. Henzinger Ranjit Jhala Rupak Majumdar Grégoire Sutre UC Berkeley.
Counterexample-Guided Focus TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAA A A A AA A A Thomas Wies Institute of.
Thread-modular Abstraction Refinement Tom Henzinger Ranjit Jhala Rupak Majumdar [UC Berkeley] Shaz Qadeer [Microsoft Research]
Synergy: A New Algorithm for Property Checking
Automatically Validating Temporal Safety Properties of Interfaces Thomas Ball and Sriram K. Rajamani Software Productivity Tools, Microsoft Research Presented.
Temporal-Safety Proofs for Systems Code Thomas A. Henzinger Ranjit Jhala Rupak Majumdar George Necula Westley Weimer Grégoire Sutre UC Berkeley.
Efficient Software Model Checking of Soundness of Type Systems Michael Roberson, Melanie Harries, Paul T. Darga, Chandrasekhar Boyapati University of Michigan.
Embedded Systems Laboratory Department of Computer and Information Science Linköping University Sweden Formal Verification and Model Checking Traian Pop.
Efficient Modular Glass Box Software Model Checking Michael Roberson Chandrasekhar Boyapati The University of Michigan.
Lazy Abstraction Tom Henzinger Ranjit Jhala Rupak Majumdar Grégoire Sutre.
Formal Verification of SpecC Programs using Predicate Abstraction Himanshu Jain Daniel Kroening Edmund Clarke Carnegie Mellon University.
1/23/2003University of Virginia1 Korat: Automated Testing Based on Java Predicates CS751 Presentation by Radu Stoleru C.Boyapaty, S.Khurshid, D.Marinov.
Korat: Automated Testing Based on Java Predicates Chandrasekhar Boyapati 1, Sarfraz Khurshid 2, and Darko Marinov 3 1 University of Michigan Ann Arbor.
Formal Techniques for Verification Using SystemC By Nasir Mahmood.
MCAI 2.0 Model Checking in Ten Minutes Edmund Clarke School of Computer Science Carnegie Mellon University.
CSC2108 Lazy Abstraction on Software Model Checking Wai Sum Mong.
Lecture 1: Model Checking
Software Engineering Prof. Dr. Bertrand Meyer March 2007 – June 2007 Chair of Software Engineering Static program checking and verification Slides: Based.
Korat: Automated Testing Based on Java Predicates
Parallel and Distributed Computing in Model Checking Diana DUBU (UVT) Dana PETCU (IeAT, UVT)
Software Verification 2 Automated Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität and Fraunhofer Institut für.
Author: Graham Hughes, Tevfik Bultan Computer Science Department, University of California, Santa Barbara, CA 93106, USA Source: International Journal.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 6: Exhaustive Bounded Testing and Feedback-Directed Random Testing.
Inferring Specifications to Detect Errors in Code Mana Taghdiri Presented by: Robert Seater MIT Computer Science & AI Lab.
Victor Kuliamin Institute for System Programming Russian Academy of Sciences Moscow.
Finding Feasible Counter-examples when Model Checking Abstracted Java Programs Corina S. Pasareanu, Matthew B. Dwyer (Kansas State University) and Willem.
Model construction and verification for dynamic programming languages Radu Iosif
Verification of obstruction-free algorithm with contention management Niloufar Shafiei.
Model Checking Java Programs using Structural Heuristics
Symbolic Execution with Abstract Subsumption Checking Saswat Anand College of Computing, Georgia Institute of Technology Corina Păsăreanu QSS, NASA Ames.
Bandera: Extracting Finite-state Models from Java Source Code. Paper By: James C. Corbett, Mathew Dwyer, John Hatcliff, Shawn Laubach, Corina Pasareanu,
On the Relation between SAT and BDDs for Equivalence Checking Sherief Reda Rolf Drechsler Alex Orailoglu Computer Science & Engineering Dept. University.
11 Counter-Example Based Predicate Discovery in Predicate Abstraction Satyaki Das and David L. Dill Computer Systems Lab Stanford University
Verification & Validation By: Amir Masoud Gharehbaghi
November 2005Scott Stoller, Stony Brook University1 Software Model Checking: Where It Is, and Where It’s Headed Scott D. Stoller.
SAT-Based Model Checking Without Unrolling Aaron R. Bradley.
Concrete Model Checking with Abstract Matching and Refinement Corina Păsăreanu QSS, NASA Ames Research Center Radek Pelánek Masaryk University, Brno, Czech.
Symstra: A Framework for Generating Object-Oriented Unit Tests using Symbolic Execution Tao Xie, Darko Marinov, Wolfram Schulte, and David Notkin University.
Symbolic Model Checking of Software Nishant Sinha with Edmund Clarke, Flavio Lerda, Michael Theobald Carnegie Mellon University.
Complexity Relief Techniques for Model Checking METU, Aug SOFTWARE VERIFICATION WORKSHOP Hüsnü Yenigün Sabanci University Informatics Institute,
Counterexample-Guided Abstraction Refinement By Edmund Clarke, Orna Grumberg, Somesh Jha, Yuan Lu, and Helmut Veith Presented by Yunho Kim Provable Software.
Presentation Title 2/4/2018 Software Verification using Predicate Abstraction and Iterative Refinement: Part Bug Catching: Automated Program Verification.
Partially Disjunctive Heap Abstraction
Space-Reduction Strategies for Model Checking Dynamic Software
Discrete Controller Synthesis
Symbolic Execution and Test-input Generation
Presentation transcript:

Efficient Software Model Checking of Data Structure Properties Paul T. Darga Chandrasekhar Boyapati The University of Michigan

Software Model Checking Exhaustively test code Exhaustively test code –On all possible schedules –On all possible inputs –Within a bounded finite domain

Software Model Checking Initial State State Space Explosion! Transitions

State Space Reduction Many software model checkers Many software model checkers –Verisoft, JPF, CMC, SLAM, Blast, Magic, … Many state space reduction techniques Many state space reduction techniques –Partial order reduction –Predicate abstraction Effective for control-oriented properties Effective for control-oriented properties Our work focuses on data-oriented properties Our work focuses on data-oriented properties

Our Approach: Tree Example Our system detects that it suffices to check: Our system detects that it suffices to check: –Every operation on every tree path –Rather than every operation on every tree Red-black tree: O(n 3 ) paths, O(n n ) trees Red-black tree: O(n 3 ) paths, O(n n ) trees Significant speedup to model checking Significant speedup to model checking

O(n 2 ) statesO(n) states Glass Box Model Checking backfrontenqueuedequeue Glass Box model checkerTraditional (black-box) model checker O(n 2 ) transitionsO(n) transitions 0, 1 0, 0 3, 0 0, 2 1, 0 2, 0 2, 1 1, 1 1, 2 0, 3 4, 0 3, 1 2, 2 1, 3 0, 4 0, 1 0, 0 3, 0 0, 2 1, 0 2, 0 2, 1 1, 1 1, 2 0, 3 4, 0 3, 1 2, 2 1, 3 0, 4

Outline Introduction to glass box model checking Introduction to glass box model checking Challenges Challenges Experimental results Experimental results Related work Related work Future work and conclusion Future work and conclusion

Glass Box: Challenges State space organization State space organization

State Space Reachability We cannot use reachability through transitions (black-box approach) We cannot use reachability through transitions (black-box approach) Programmers must provide a class invariant Programmers must provide a class invariant State space: the set of all type-correct states within a specified bound which satisfy the invariant State space: the set of all type-correct states within a specified bound which satisfy the invariant State is disconnected, but we still need to check one of its transitions!

class LinkedList { static class Node { Node next; Object value; } Node head; boolean repOk() { Set visited = new java.util.HashSet(); for (Node n = head; n != null; n = n.next) { if (!visited.add(n)) return false; } return true; } } class LinkedList { static class Node { tree Node next; Object value; } tree Node head; boolean repOk() { // writing invariants is easy and fun! return true; } Invariants: Specification Singly-linked list: absence of cycles Singly-linked list: absence of cycles java.util.TreeMap 1670 lines of code 20 lines of invariant

Glass Box: Search Algorithm I = states satisfying the invariant S = I × { transitions } while (S is not empty) { t = any transition in S t = any transition in S run t run t verify the post-condition verify the post-condition T = { transitions similar to t } T = { transitions similar to t } S = S – T S = S – T} How do we represent these sets, and perform operations on them, efficiently?

Glass Box: Challenges State space organization State space organization –Class invariants State space representation State space representation –Binary decision diagrams

Binary Decision Diagrams Compact representation of exponentially large yet structured sets Perform set operations directly root is null left is null right is null root is red left is red root is red  left is red right is red      

BDDs: Red-Black Trees Max Height Set Size BDD Size

Glass Box: Challenges State space organization State space organization –Class invariants State space representation State space representation –Binary decision diagrams State space reduction State space reduction –Monitoring field access –Monitoring information flow –Pruning isomorphic structures –Ensuring soundness

Monitoring Field Access t := op = pop ۸ head = n 0 ۸ n 0.value = 3 ۸ n 0.next = n 1 ۸ n 1.value = 7 ۸ n 1.next = n 2 ۸ n 2.value = 4 ۸ n 2.next = n 3 ۸ n 3.value = 2 ۸ n 3.next = null Object pop() { if (head == null) return null; Object v = head.value; head = head.next; return v; } n0n0 n1n1 n2n2 n3n head ۸head = n 0 ۸ n 0.value = 3 ۸ n 0.next = n 1 T := op = pop ۸ head = n 0 ۸ n 0.value = 3 ۸ n 0.next = n 1 ۸head = n 0 ۸ n 0.next = n 1 T := op = pop ۸ head = n 0 ۸ n 0.next = n 1

Outline Introduction to glass box model checking Introduction to glass box model checking Challenges Challenges Experimental results Experimental results Related work Related work Future work and conclusion Future work and conclusion

Performance: Stack Max Size BDD Nodes Transitions Glass Box JPF Black Box

Performance: Stack Max Size BDD Nodes Time (s) Glass Box JPF Black Box

Performance: Queue Max Size BDD Nodes Transitions Glass Box JPF Black Box

Performance: Queue Max Size BDD Nodes Time (s) Glass Box JPF Black Box

Performance: Red-Black Tree Max Height BDD Nodes Transitions Glass Box JPF Black Box Only 10 seconds to verify over 2 70 red-black trees!

Performance: Red-Black Tree Max Height BDD Nodes Time (s) Glass Box JPF Black Box Only 10 seconds to verify over 2 70 red-black trees!

Performance: File System Max Height BDD Nodes Transitions Glass Box JPF Black Box

Performance: File System Max Height BDD Nodes Time (s) Glass Box JPF Black Box

Outline Introduction to glass box model checking Introduction to glass box model checking Challenges Challenges Experimental results Experimental results Related work Related work Future work and conclusion Future work and conclusion

Related Work Software model checkers Software model checkers –Verisoft [Godefroid] –Java PathFinder [Visser et al] –CMC [Musuvathi, Park, Chou, Engler, Dill] –Bandera [Corbett, Dwyer, Hatcliff, Robby, et al] –Bogor [Dwyer, Hatcliff, Hoosier, Robby] –SLAM [Ball, Majumdar, Millstein, Rajamani] –Blast [Henzinger, Jhala, Majumdar] –Magic [Chaki, Clarke, Groce, Jha, Veith] –XRT [Grieskamp, Tillmann, Shulte] –JCAT [DeMartini, Iosif, Sisto]

Related Work State space reduction techniques State space reduction techniques –Abstraction & refinement [SLAM; Blast; Magic] –Partial order reduction [Godefroid; Flanagan] –Heap canonicalization [Musuvathi, Dill; Iosif] –Symmetry reduction [Ip, Dill]

Related Work Static analysis tools Static analysis tools –TVLA [Sagiv, Reps, Wilhelm] –PALE [Moeller, Schwartzbach] Formal verification using theorem provers Formal verification using theorem provers –ESC/Java [Nelson et al] –ACL2 [Kaufmann, Moore, et al]

Outline Introduction to glass box model checking Introduction to glass box model checking Challenges Challenges Experimental results Experimental results Related work Related work Future work and conclusion Future work and conclusion

Future Work Data structures are just the beginning Data structures are just the beginning Applicable to any system where we can: Applicable to any system where we can: –Describe the state space using invariants –Transitions depend on a small part of the state Can significantly speedup model checking Can significantly speedup model checking