© 2010 Carnegie Mellon University B OXES : A Symbolic Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki Software Engineering Institute Carnegie Mellon.

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

Carnegie Mellon University Software Engineering Institute CERT® Knowledgebase Copyright © 1997 Carnegie Mellon University VU#14202 UNIX rlogin with stack.
© 2013 Carnegie Mellon University UFO: From Underapproximations to Overapproximations and Back! Arie Gurfinkel (SEI/CMU) with Aws Albarghouthi and Marsha.
© 2006 Carnegie Mellon University Combining Predicate and Numeric Abstraction for Software Model Checking Software Engineering Institute Carnegie Mellon.
An Introduction to the Model Verifier verds Wenhui Zhang September 15 th, 2010.
UNCLASSIFIED © 2011 Carnegie Mellon University Building Malware Infection Trees Jose Andre Morales 1, Michael Main 2, Weilang Luo 3, Shouhuai Xu 2,3, Ravi.
Inferring Disjunctive Postconditions Corneliu Popeea and Wei-Ngan Chin School of Computing National University of Singapore - ASIAN
© 2014 Microsoft Corporation. All rights reserved.
© 2011 Carnegie Mellon University SPIN: Part /614 Bug Catching: Automated Program Verification Sagar Chaki April 21, 2014.
© 2011 Carnegie Mellon University SPIN: Part /614 Bug Catching: Automated Program Verification Sagar Chaki April 21, 2014.
© 2011 Carnegie Mellon University System of Systems V&V John B. Goodenough October 19, 2011.
© 2011 Carnegie Mellon University B OXES : Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki Software Engineering Institute Carnegie Mellon University.
© 2013 Carnegie Mellon University Vinta: Verification with INTerpolation and Abstract interpretation Arie Gurfinkel (SEI/CMU) with Aws Albarghouthi and.
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.
© 2013 Carnegie Mellon University Academy for Software Engineering Education and Training, 2013 Session Architect: Tony Cowling Session Chair: Nancy Mead.
© 2013 Carnegie Mellon University Measuring Assurance Case Confidence using Baconian Probabilities Charles B. Weinstock John B. Goodenough Ari Z. Klein.
© 2010 Carnegie Mellon University ® CMMI is registered in the U.S. Patent and Trademark Office by Carnegie Mellon University. V&V Principles Verification.
© Carnegie Mellon University The CERT Insider Threat Center.
© 2011 Carnegie Mellon University Time Bounded Analysis of Real-Time Systems Arie Gurfinkel, Sagar Chaki, and Ofer Strichman Software Engineering Institute.
© 2012 Carnegie Mellon University UFO: Verification with Interpolants and Abstract Interpretation Arie Gurfinkel and Sagar Chaki Software Engineering Institute.
© 2010 Carnegie Mellon University Acquisition Implications of SOA Adoption Software Engineering Institute Carnegie Mellon University Pittsburgh, PA
© 2015 Carnegie Mellon University Property Directed Polyhedral Abstraction Nikolaj Bjørner and Arie Gurfinkel VMCAI 2015.
Review of topics Final exam : -May 2nd to May 7 th - Projects due on May 7th.
© 2013 Carnegie Mellon University Static Analysis of Real-Time Embedded Systems with REK Arie Gurfinkel 1 joint work with Sagar Chaki 1, Ofer Strichman.
Using Statically Computed Invariants Inside the Predicate Abstraction and Refinement Loop Himanshu Jain Franjo Ivančić Aarti Gupta Ilya Shlyakhter Chao.
© 2011 Carnegie Mellon University Binary Decision Diagrams Part Bug Catching: Automated Program Verification and Testing Sagar Chaki September.
© 2011 Carnegie Mellon University SPIN: Part Bug Catching: Automated Program Verification and Testing Sagar Chaki November 2, 2011.
© 2011 Carnegie Mellon University Binary Decision Diagrams Part Bug Catching: Automated Program Verification and Testing Sagar Chaki September.
© 2011 Carnegie Mellon University Should-Cost: A Use for Parametric Estimates Additional uses for estimation tools Presenters:Bob Ferguson (SEMA) Date:November.
Sanjit A. Seshia and Randal E. Bryant Computer Science Department
A Numerical Abstract Domain based on Expression Abstraction + Max Operator with Application in Timing Analysis Sumit Gulwani (MSR Redmond) Bhargav Gulavani.
© 2011 Carnegie Mellon University QUELCE: Quantifying Uncertainty in Early Lifecycle Cost Estimation Presenters:Dave Zubrow PhD Bob Ferguson (SEMA) Date:November.
1 A propositional world Ofer Strichman School of Computer Science, Carnegie Mellon University.
Jul The New Geant4 License J. Perl The New Geant4 License Makes clear the user’s wide- ranging freedom to use, extend or redistribute Geant4, even.
Fast Spectral Transforms and Logic Synthesis DoRon Motter August 2, 2001.
© 2013 Carnegie Mellon University Vinta: Verification with INTerpolation and Abstract iterpretation Arie Gurfinkel Software Engineering Institute Carnegie.
Ipek Ozkaya, COCOMO Forum © 2012 Carnegie Mellon University Affordability and the Value of Architecting Ipek Ozkaya Research, Technology.
© 2010 Carnegie Mellon University Team Software Process.
Pentagons: A Weakly Relational Abstract Domain for the Efficient Validation of Array Accesses Francesco Logozzo, Manuel Fahndrich Microsoft Research, Redmond.
© 2013 Carnegie Mellon University Verifying Periodic Programs with Priority Inheritance Locks Sagar Chaki 1, Arie Gurfinkel 1, Ofer Strichman 2 FMCAD,
Conditions and Terms of Use
Model Checking Lecture 4 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
© 2013 Carnegie Mellon University Vinta: Verification with INTerpolation and Abstract iterpretation Arie Gurfinkel (SEI/CMU) with Aws Albarghouthi and.
CS 267: Automated Verification Lecture 6: Binary Decision Diagrams Instructor: Tevfik Bultan.
© 2008 Carnegie Mellon University Combining Predicate and Numeric Abstraction for Software Model Checking Software Engineering Institute Carnegie Mellon.
© 2014 Carnegie Mellon University Synthesizing Safe Bit-Precise Invariants Arie Gurfinkel (SEI / CMU) Anton Belov (UCD / Synopsys) Joao Marques-Silva (UCD)
Author Software Engineering Institute
© 2015 Carnegie Mellon University Parametric Symbolic Reachability Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Arie.
© 2015 Carnegie Mellon University COCOMO 2015 November 17, 2015 Distribution Statement A: Approved for Public Release; Distribution is Unlimited Causal.
© 2006 Carnegie Mellon University Introduction to CBMC: Part 1 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Arie Gurfinkel,
2009/6/30 CAV Quantifier Elimination via Functional Composition Jie-Hong Roland Jiang Dept. of Electrical Eng. / Grad. Inst. of Electronics Eng.
© 2006 Carnegie Mellon University Introduction to CBMC: Part 1 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Arie Gurfinkel,
RTAS 2014 Bounding Memory Interference Delay in COTS-based Multi-Core Systems Hyoseung Kim Dionisio de Niz Bj ӧ rn Andersson Mark Klein Onur Mutlu Raj.
1 CERT BFF: From Start To PoC June 09, 2016 © 2016 Carnegie Mellon University This material has been approved for public release and unlimited distribution.
How CTL model checking works
Secure Software Workforce Development Panel Session
Using Parallelspace TEAM Models to Design and Create Custom Profiles
Author Software Engineering Institute
Michael Spiegel, Esq Timothy Shimeall, Ph.D.
Parametric Symbolic Reachability
Metrics-Focused Analysis of Network Flow Data
Parallelspace PowerPoint Template for ArchiMate® 2.1 version 1.1
Parallelspace PowerPoint Template for ArchiMate® 2.1 version 2.0
Iterative Program Analysis Abstract Interpretation
SAT-Based Area Recovery in Technology Mapping
Binary Decision Diagrams
QUELCE: Quantifying Uncertainty in Early Lifecycle Cost Estimation
Formal Methods in software development
Verifying Periodic Programs with Priority Inheritance Locks
© Healthcare Inspirations. All rights reserved
Presentation transcript:

© 2010 Carnegie Mellon University B OXES : A Symbolic Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki Software Engineering Institute Carnegie Mellon University September 16 th, 2010 SAS 2010

2 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Disjunctive Refinement of an Abstract Domain Bounded disjunctions extend base domain with disjunctions of size at most k all operations are done by lifting corresponding base domain operations easy to implement by modifying program control flow graph Finite Powerset Domain [Bagnara et al.] extend base domain with all finite disjunctions most operations are done by lifting corresponding base domain opertions finding a good widening is complex (and often tricky) Predicate Abstraction extend finite base domain with all disjunctions domain elements are represented by BDDs no widening required OUR WORK OUR WORK

3 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Outline Boxes: semantics, representation, operations Widening Experiments Conclusion

4 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Boxes: Semantic View Boxes are “finite union of box values” (alternatively) Boxes are “Boolean formulas over interval constraints” Boxes are “finite union of box values” (alternatively) Boxes are “Boolean formulas over interval constraints”

5 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Boxes: Representation Represented by (Interval) Linear Decision Diagrams (LDD) BDDs + non-terminal nodes are labeled by interval constraints + extra rules retain complexity of BDD operations canonical for Boxes available at LDD Semantics

6 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Domain Operations Additional operations set difference f ∖ g implemented by f ⋀¬g BoxHull (f) – smallest Box containing f BoxJoin (f, g) – smallest Box containing the union of Box f and Box g OperationComplexity f ⋀ g O(|f||g|) ITE(h, f, g)O(|h||f||g|) ¬ f O(1) OperationComplexity f ⋁ g O(|f||g|) f ⇒ g O(|f||g|) ∃U. f O(|f| 2 |U| ) Basic domain operations are implemented by LDD operations meet join order (semantic) order (semantic) used to compare Box and Boxes used to compare Box and Boxes used to compare Box and Boxes used to compare Box and Boxes All operations are polynomial in the size of the representation projection

7 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Transfer Functions x := x + 1 expensive boxes box polynomial

8 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Outline Boxes: semantics, representation, operations Widening Experiments Conclusion

9 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Step Function A function on the reals ℝ is a step function if it can be written as a finite linear combination of semi-open intervals f(x) = α 1 f 1 (x) +  + α n f n (x) where f i 2 ℝ and α i (x )=1 if x 2 [ a i, b i ) and 0 otherwise, for i=1,…,n Weisstein, Eric W.Weisstein, Eric W. "Step Function." From MathWorld--A Wolfram Web Resource.MathWorld

10 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Step Functions as an Abstract Domain 1 23 x

11 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Step Functions as an Abstract Domain STEP(D) an abstract domain of step functions over an abstract domain D elements are step functions ℝ→ D order is pointwise: f ⊑ g iff 8 x. f(x) ⊑ D g(x) join is pointwise: f ⊔ g is ¸ x. f(x) ⊔ D g(x) meet is pointwise: f ⊓ g is ¸ x. f(x) ⊓ D g (x) widen is pointwise: f ∇ g is ¸ x. f(x) ∇ D g(x) ???? [0,3] [0,0][1,10] x interval

12 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Pointwise Extension of Widen Diverges [0,3] [0,0][1,9] [0,5] [0,0][1,10][1,9] [0,∞] [0,0][1,∞][1,9] [0,∞] [0,0][1,∞][1,9] [1,10][0,∞] [0,0][1,∞][1,9] [0,∞] [0,0][1,∞][1,9] [1,10] WDN

13 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Widening for Step Functions [0,3] [0,0][1,9] [0,5] [0,0][1,10][1,9] [0,∞] [0,0][1,∞][1,9] [0,∞] [0,0][1,∞] [0,∞] [0,0][1,∞] Step 1 Step 2 Step 3

14 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Back to Boxes Boxes are Step functions! 1-dim Boxes are STEP({ ⊥,⊤ }) ℝ→ { ⊥,⊤ } 2-dim Boxes are STEP (STEP ({ ⊥,⊤ }) ℝ→ℝ→ { ⊥,⊤ } n-dim Boxes are STEP n ({ ⊥,⊤ }) ℝ n → { ⊥,⊤ } Widen for { ⊥,⊤ } is trivial Widen for n-dim Boxes is defined recursively on dimensions In the paper, a polynomial time algorithm that implements this widen operator directly on LDDs.

15 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Widen: An Example widen

16 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Boxes versus Finite Powersets BoxesFinite Powerset Base domainBoxAny RepresentationDecision DiagramSet / DNF Domain ordersemanticsyntactic Complexity polynomial in representation Singleton WidenBoxbase domain WidenStep FunctionMultiple Choices

17 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Experiments: Invariant Computation Abstract Domains LDD Box – Box domain using LDDs LDD Boxes – Our Boxes domain using LDDs PPL Box – Rational_Box of Parma Polyhedra Library (PPL) PPL Boxes – Pointset_Powerset of PPL Analyzer custom analyzer on top of LLVM compiler infrustructure computes loop invariants for all loops over all SSA variables in a function Benchmark from open source software: mplayer, CUDD, make, … Stats: 5,727 functions 9 – 9,052 variables (avg. 238, std. 492) 0 – 241 loops (avg. 7, std. 12)

18 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Results: Time Domain %Solved (w/ 60s TO) Time (m)% in Basic% in Image % in Widen LDD Box99.8%477%23%0% PPL Box96.1%11786%14%0% LDD Boxes 87.9%11861%38%1% PPL Boxes14.2%20195%1%3%

19 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Results: Precision 56% 1% 20% 23% PPLLDD x 19 =0 x 19 =1 x 23 =1 x 19 =2 x 23 =2 x 19 =3 x 23 =3 x 19 >3 x 19 =0 x 19 =1 x 23 =1 x 19 =2 x 23 =2 3≤x 19 <65536 x 23 =3 3≤x 19 <65536 x 23 ≥4 x 19 ≥65536 x 23 =3 x 19 ≥65536 x 23 ≥65536

20 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Widening: PPL vs LDD x = 0; y = 0 while (1){ x++; y++; } x = 0; y = 0 while (1){ x++; y++; } x=0 y=0 x=1 y=1 x=0 y=0 x=1 y=1 x=0 y=0 x=1 y=1 x=0 y=0 x=1 y=1 x=0 y=0 x=1 y=1 1<x x=0 y=0 x=1 y=1 1<x x=0 y=0 1 ≤x y=1 x=0 y=0 1 ≤x y=1 x=0 y=0 1 ≤x y=1 2 ≤x y=2 x=0 y=0 1 ≤x y=1 2 ≤x y=2 x=0 y=0 1 ≤x y=1 1 ≤x 2 ≤y x=0 y=0 1 ≤x y=1 1 ≤x 2 ≤y PPL LDD Iteration 1 Iteration 2 Widen 1 Iteration 3 Widen 2 ≡ ≡ ⊇

21 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Results: Precision w/ Tuned Widening 56% 1% 20% 23% 32% 44%

22 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Conclusion Boxes: A new disjunctive abstract domain of sets of boxes efficient representation based on Linear Decision Diagrams semantic order relation efficient operations and widening more precise and efficient than finite powersets of box A new widening scheme lifting widening from a base domain to the domain of step functions Future Work applications extending the technique to richer base domains, i.e., octagons, TVPI – representation and base operations are easy (already exist in LDD) – widening?

© 2010 Carnegie Mellon University THE END

24 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Transfer Functions: PPL vs LDD PPL x=1 x=2 y := x x=1 y=1 x=2 y=2 1 ≤ x ≤ 2 y := x 1 ≤ x ≤ 2, 1 ≤ y ≤ 2 ≡ ⊇ LDD

25 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Contact Information Presenter Arie Gurfinkel RTSS Telephone: U.S. mail: Software Engineering Institute Customer Relations 4500 Fifth Avenue Pittsburgh, PA USA Web: Customer Relations Telephone: SEI Phone: SEI Fax:

26 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University NO WARRANTY THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE ENGINEERING INSTITUTE MATERIAL IS FURNISHED ON AN “AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT. Use of any trademarks in this presentation is not intended in any way to infringe on the rights of the trademark holder. This Presentation may be reproduced in its entirety, without modification, and freely distributed in written or electronic form without requesting formal permission. Permission is required for any other use. Requests for permission should be directed to the Software Engineering Institute at This work was created in the performance of Federal Government Contract Number FA C-0003 with Carnegie Mellon University for the operation of the Software Engineering Institute, a federally funded research and development center. The Government of the United States has a royalty-free government-purpose license to use, duplicate, or disclose the work, in whole or in part and in any manner, and to have or permit others to do so, for government purposes pursuant to the copyright license under the clause at

27 Boxes: An Abstract Domain of Boxes Arie Gurfinkel and Sagar Chaki © 2010 Carnegie Mellon University Boxes: Representation Represented by (Interval) Linear Decision Diagrams (LDD) BDDs + non-terminal nodes are labeled by interval constraints + extra rules retain complexity of BDD operations canonical for Boxes available at x ≤1 1 0 x < 2 y < 1 y ≤ 3