Path Slicing Presentation by Massimiliano Menarini Ranjit Jhala and Rupak Majumdar, “Path Slicing” PLDI 05 (June 2005, Chicago, Illinois)

Slides:



Advertisements
Similar presentations
Auto-Generation of Test Cases for Infinite States Reactive Systems Based on Symbolic Execution and Formula Rewriting Donghuo Chen School of Computer Science.
Advertisements

A Survey of Runtime Verification Jonathan Amir 2004.
A Survey of Program Slicing Techniques A Survey of Program Slicing Techniques Sections 3.1,3.6 Swathy Shankar
Constraint Based Reasoning over Mutex Relations in Graphplan Algorithm Pavel Surynek Charles University, Prague Czech Republic.
PLDI’2005Page 1June 2005 Example (C code) int double(int x) { return 2 * x; } void test_me(int x, int y) { int z = double(x); if (z==y) { if (y == x+10)
Context-Sensitive Interprocedural Points-to Analysis in the Presence of Function Pointers Presentation by Patrick Kaleem Justin.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Data-Flow Analysis Framework Domain – What kind of solution is the analysis looking for? Ex. Variables have not yet been defined – Algorithm assigns a.
Control Flow Analysis (Chapter 7) Mooly Sagiv (with Contributions by Hanne Riis Nielson)
Timed Automata.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 13.
Introducing BLAST Software Verification John Gallagher CS4117.
A survey of techniques for precise program slicing Komondoor V. Raghavan Indian Institute of Science, Bangalore.
Presented By: Krishna Balasubramanian
Digitaalsüsteemide verifitseerimise kursus1 Formal verification: Property checking Property checking.
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.
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:
Some Improvements for More Precise Model Checking Zhi Zhang State Key Laboratory for Novel Software Technology Nanjing University, China.
The Software Model Checker BLAST by Dirk Beyer, Thomas A. Henzinger, Ranjit Jhala and Rupak Majumdar Presented by Yunho Kim Provable Software Lab, KAIST.
The Out of Kilter Algorithm in Introduction The out of kilter algorithm is an example of a primal-dual algorithm. It works on both the primal.
Tirgul 12 Algorithm for Single-Source-Shortest-Paths (s-s-s-p) Problem Application of s-s-s-p for Solving a System of Difference Constraints.
Permissive Interfaces Tom Henzinger Ranjit Jhala Rupak Majumdar.
Lazy Abstraction Thomas A. Henzinger Ranjit Jhala Rupak Majumdar Grégoire Sutre UC Berkeley.
Lazy Predicate Abstraction in BLAST John Gallagher CS4117.
Counter Example Guided Refinement CEGAR Mooly Sagiv.
White Box Testing and Symbolic Execution Written by Michael Beder.
Race Checking by Context Inference Tom Henzinger Ranjit Jhala Rupak Majumdar UC Berkeley.
Validating High-Level Synthesis Sudipta Kundu, Sorin Lerner, Rajesh Gupta Department of Computer Science and Engineering, University of California, San.
Temporal-Safety Proofs for Systems Code Thomas A. Henzinger Ranjit Jhala Rupak Majumdar George Necula Westley Weimer Grégoire Sutre UC Berkeley.
Software Verification with BLAST Tom Henzinger Ranjit Jhala Rupak Majumdar.
1 Completeness and Complexity of Bounded Model Checking.
Lazy Abstraction Tom Henzinger Ranjit Jhala Rupak Majumdar Grégoire Sutre.
Prof. Bodik CS 164 Lecture 16, Fall Global Optimization Lecture 16.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 4: SMT-based Bounded Model Checking of Concurrent Software.
Thread-modular Abstraction Refinement Thomas A. Henzinger, et al. CAV 2003 Seonggun Kim KAIST CS750b.
1/20 Symbolic Execution and Program Testing Charngki PSWLAB Symbolic Execution and Program Testing James C.King IBM Thomas J.Watson Research Center.
Design Space Exploration
CAFE router: A Fast Connectivity Aware Multiple Nets Routing Algorithm for Routing Grid with Obstacles Y. Kohira and A. Takahashi School of Computer Science.
Chapter 19: Binary Trees. Objectives In this chapter, you will: – Learn about binary trees – Explore various binary tree traversal algorithms – Organize.
1 Exploring Custom Instruction Synthesis for Application-Specific Instruction Set Processors with Multiple Design Objectives Lin, Hai Fei, Yunsi ACM/IEEE.
Race Checking by Context Inference Tom Henzinger Ranjit Jhala Rupak Majumdar UC Berkeley.
Lazy Abstraction Jinseong Jeon ARCS, KAIST CS750b, KAIST2/26 References Lazy Abstraction –Thomas A. Henzinger et al., POPL ’02 Software verification.
Lazy Annotation for Program Testing and Verification Speaker: Chen-Hsuan Adonis Lin Advisor: Jie-Hong Roland Jiang November 26,
Learning Symbolic Interfaces of Software Components Zvonimir Rakamarić.
CIS 842: Specification and Verification of Reactive Systems Lecture INTRO-Examples: Simple BIR-Lite Examples Copyright 2004, Matt Dwyer, John Hatcliff,
Localization and Register Sharing for Predicate Abstraction Himanshu Jain Franjo Ivančić Aarti Gupta Malay Ganai.
Verification & Validation By: Amir Masoud Gharehbaghi
SAT-Based Model Checking Without Unrolling Aaron R. Bradley.
Automated Debugging with Error Invariants TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAA A A A AA A A Chanseok Oh.
CUTE: A Concolic Unit Testing Engine for C Koushik SenDarko MarinovGul Agha University of Illinois Urbana-Champaign.
CS357 Lecture 13: Symbolic model checking without BDDs Alex Aiken David Dill 1.
Error Explanation with Distance Metrics Authors: Alex Groce, Sagar Chaki, Daniel Kroening, and Ofer Strichman International Journal on Software Tools for.
Graphs + Shortest Paths David Kauchak cs302 Spring 2013.
Diagnostic Information for Control-Flow Analysis of Workflow Graphs (aka Free-Choice Workflow Nets) Cédric Favre(1,2), Hagen Völzer(1), Peter Müller(2)
The software model checker BLAST Dirk Beyer, Thomas A. Henzinger, Ranjit Jhala, Rupak Majumdar Presented by Yunho Kim TexPoint fonts used in EMF. Read.
Abstraction and Refinement for Large Scale Model Checking
SS 2017 Software Verification Bounded Model Checking, Outlook
Software Testing and Maintenance 1
Reasoning about code CSE 331 University of Washington.
Amir Kamil and Katherine Yelick
Over-Approximating Boolean Programs with Unbounded Thread Creation
Estimating Timing Profiles for Simulation of Embedded Systems
Producing short counterexamples using “crucial events”
Amir Kamil and Katherine Yelick
Abstractions from Proofs
CUTE: A Concolic Unit Testing Engine for C
Software Verification with BLAST
Predicate Abstraction
BLAST: A Software Verification Tool for C programs
Presentation transcript:

Path Slicing Presentation by Massimiliano Menarini Ranjit Jhala and Rupak Majumdar, “Path Slicing” PLDI 05 (June 2005, Chicago, Illinois)

Outline Use of Path Slices  Model checking and counter examples Control Flow Automata Weakest Preconditions Properties of Path Slices  Completeness  Soundness Path Slice Algorithm Experimental Results Conclusion

Use of Path Slices Model checking  Allow for the exploration of the execution space of an application to find some error  Return a counter example: an execution path form the start state to an error state Motivation for using Path Slicing techniques  The returned counter example can be very long For example the paper presents an experiment where a property checked on gcc returned a 82,695 basic blocks counter example  Obtain understandable counter examples We are interested in only the operations that affect the reachability of the error state (potentially a fraction of the full counter example)

Example of CFA Source Ex() { 0: if(a>0) 1: x=1; 2: c=0; 3: for(i=1;i<1000;i++) 4: c=c+f(i); 5: if(a>0){ 6: if(x==0){ ERR: }}... } CFA ’4 5 6 ErrExit [a>0] [a≤0] x=1 c=0 i=1[i<1000] [i≥1000] c=c+f(i) i++ [a>0] [a≤0] [x==0]

Control Flow Automata It is a CFG with operations on the edges and program counter on the vertexes Formally  Operations (Ops) of 2 types Assignment: l:=e assume: assume(p)  CFA C f =(PC f, pc 0, pc out, E f, V f )  PC f is a set of locations (program counters)  pc 0  PC f is the start location  pc out  PC f is the exit location  E f set of edges, E f  PC f  Ops  PC f  V f set of variables (?)

Weakest Preconditions Given a logical formula  over a set of variables X.   represents all X-states where the values of X satisfy  The weakest precondition (WP) of  with regard to the operation op  Ops (WP. .op) is the set of states that can reach a state in  after executing op X={a} Ops={a=0, a=1}  =[a==1] Therefore  identifies {a=1} WP. .(a=1)={all} WP. .(a=0)={Ø}

Example of Paths CFA ’4 5 6 ErrExit [a>0] [a≤0] x=1 c=0 i=1[i<1000] [i≥1000] c=c+f(i) i++ [a>0] [a≤0] [x==0] Path to pc= ’ 5 6 [a>0] x=1 c=0 i=1 [i≥1000] [a>0] Trace [a>0] x=1 c=0 i=1 [i≥1000] [a>0] Variables a c i x Cannot execute: this is an unfeasible path To execute must be a>0 (  )

Paths and Slices A path  from pc to pc’ is a sequence of edges of the CFA such that: the destination of one and the source of the next coincide, the source of the first edge is pc and the destination of the last is pc’ A trace is the sequence of operations on the edges of a path A path is feasible if there is some state that can execute it A state s can reach a location pc if there exist a path from pc 0 to pc that can be executed by s A Path Slice  ’ is a subsequence of a path 

Completeness  ’ is a complete slice of  (path from pc 0 to an error location pc  ) if for every s  WP.true.Tr.  ’ either:  there exist a program path  ’’ from pc 0 to pc  such that s can execute  ’’, or  S cannot reach pc out Therefore if there is a complete slice to an error location and it is feasible (therefore executable for some state), we are guaranteed that for each state that can execute the slice there exist an executable path that reach the error location

Soundness A path slice  ’ of  is a sound slice if WP.true.(Tr.  )  WP.true.(Tr.  ’) So a state that can execute the trace of a path can execute the trace if a sound slice of it

Example CFA ’4 5 6 ErrExit [a>0] [a≤0] x=0 c=0 i=1[i<1000] [i≥1000] c=c+f(i) i++ [a>0] [a≤0] [x==0] Slice ’ 5 6 Err [a>0] x=0 c=0 i=1 [i≥1000] [a>0] [x==0] 4 [i<1000] c=c+f(i) i++ Slice ’ 5 6 Err [a>0] x=0 c=0 i=1 [i≥1000] [a>0] [x==0] 4 [i<1000] c=c+f(i) i++ Not Sound slice The path could execute in s={a>0} the slice only in s’={a>0, x=0} Complete and Sound Slice

Path Slice Algorithm Backward traversal of the CFA Keep 2 information  lvalues set L (the set of lives values)  Step location pc s An edge is added to the slice if  It assign one of the lvalues  If there is a branch that can bypass the current step  If there is a path from the current edge to the step edge that assign one of the lvalues

Experimental Results Tested correctens of files handling in real programs (fcron, wuftpd, make, privoxy, ijpeg, openssh, gcc) In average the length of the Slice was 5% of the length of the original trace In case of longer traces the slices where much shorter (0.1%) Examples  Shortest trace 47 operations: output 27 operations (57%)  Longest trace 82,695 operations: output 43 operations (less that 0.1%)

Conclusion Path Slicing is an interesting technique to reduce the size of a counter example An linear algorithm that return a Sound and Complete path slice is provided Implemented in the Blast model checker Experimental results on real programs proved the benefit of that approach Limitations  The implementation use a depth first search for counter examples that returns very long traces  Imprecise model of the heap creates problems in the verification of certain programs  Slow implementation of WrBt and By functions used by the algorithm, don’t scale well