Rahul Sharma, Eric Schkufza, Berkeley Churchill, Alex Aiken.

Slides:



Advertisements
Similar presentations
A Polynomial-Time Algorithm for Global Value Numbering SAS 2004 Sumit Gulwani George C. Necula.
Advertisements

Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Termination Proofs from Tests
Static and User-Extensible Proof Checking Antonis StampoulisZhong Shao Yale University POPL 2012.
Binary Translation Using Peephole Superoptimizers Sorav Bansal, Alex Aiken Stanford University.
50.530: Software Engineering Sun Jun SUTD. Week 10: Invariant Generation.
1 Regression-Verification Benny Godlin Ofer Strichman Technion.
1 1 Regression Verification for Multi-Threaded Programs Sagar Chaki, SEI-Pittsburgh Arie Gurfinkel, SEI-Pittsburgh Ofer Strichman, Technion-Haifa Originally.
SymDiff: Leveraging Program Verification for Comparing Programs Shuvendu Lahiri Research in Software Engineering (RiSE), Microsoft Research, Redmond Contributors:
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Rahul Sharma, Saurabh Gupta, Bharath Hariharan, Alex Aiken, and Aditya Nori (Stanford, UC Berkeley, Microsoft Research India) Verification as Learning.
Hybrid Concolic Testing Rupak Majumdar Koushik Sen UC Los Angeles UC Berkeley.
Technology from seed Automatic Synthesis of Weakest Preconditions for Compiler Optimizations Nuno Lopes Advisor: José Monteiro.
Michael Ernst, page 1 Learning and repair tools background Michael Ernst MIT Lab for Computer Science Joint work with Jake.
Ross Tate, Juan Chen, Chris Hawblitzel. Typed Assembly Languages Compilers are great but they make mistakes and can introduce vulnerabilities Typed assembly.
Rahul Sharma Işil Dillig, Thomas Dillig, and Alex Aiken Stanford University Simplifying Loop Invariant Generation Using Splitter Predicates.
Discovering Affine Equalities Using Random Interpretation Sumit Gulwani George Necula EECS Department University of California, Berkeley.
Using Statically Computed Invariants Inside the Predicate Abstraction and Refinement Loop Himanshu Jain Franjo Ivančić Aarti Gupta Ilya Shlyakhter Chao.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Constraint Problems in Program Analysis from the sublime to the ridiculous Alex Aiken Stanford University.
Using and Building an Automatic Program Verifier K. Rustan M. Leino Research in Software Engineering (RiSE) Microsoft Research, Redmond Lecture 1 LASER.
Alternation for Termination William Harris, Akash Lal, Aditya Nori Sriram Rajamani
Program Analysis Using Randomization Sumit Gulwani, George Necula (U.C. Berkeley)
Dynamically Discovering Likely Program Invariants to Support Program Evolution Michael Ernst, Jake Cockrell, William Griswold, David Notkin Presented by.
Language-Based Security Proof-Carrying Code Greg Morrisett Cornell University Thanks to G.Necula & P.Lee.
Zichao Qi, Fan Long, Sara Achour, and Martin Rinard MIT CSAIL
Query Processing Presented by Aung S. Win.
Relational Verification to SIMD Loop Synthesis Mark Marron – IMDEA & Microsoft Research Sumit Gulwani – Microsoft Research Gilles Barthe, Juan M. Crespo,
Dr. Pedro Mejia Alvarez Software Testing Slide 1 Software Testing: Building Test Cases.
Rahul Sharma (Stanford) Michael Bauer (NVIDIA Research) Alex Aiken (Stanford) Verification of Producer-Consumer Synchronization in GPU Programs June 15,
Have Your Verified Compiler And Extend It Too Zachary Tatlock Sorin Lerner UC San Diego.
Verification and Validation Yonsei University 2 nd Semester, 2014 Sanghyun Park.
Mark Marron IMDEA-Software (Madrid, Spain) 1.
CMSC 345 Fall 2000 Unit Testing. The testing process.
Software Engineering Prof. Dr. Bertrand Meyer March 2007 – June 2007 Chair of Software Engineering Static program checking and verification Slides: Based.
1 Employing decision procedures for automatic analysis and verification of heap-manipulating programs Greta Yorsh under the supervision of Mooly Sagiv.
1 Testing, Abstraction, Theorem Proving: Better Together! Greta Yorsh joint work with Thomas Ball and Mooly Sagiv.
School of Electrical Engineering and Computer Science University of Central Florida Anomaly-Based Bug Prediction, Isolation, and Validation: An Automated.
Rahul Sharma Joint work with Aditya Nori (MSR India) and Alex Aiken (Stanford)
Introduction to Satisfiability Modulo Theories
Type Systems CS Definitions Program analysis Discovering facts about programs. Dynamic analysis Program analysis by using program executions.
Rahul Sharma, Aditya V. Nori, Alex Aiken Stanford MSR India Stanford.
Unit Testing 101 Black Box v. White Box. Definition of V&V Verification - is the product correct Validation - is it the correct product.
1 MVD 2010 University of Iowa New York University Comparing Proof Systems for Linear Real Arithmetic Using LFSC Andrew Reynolds September 17, 2010.
Proving Non-Termination Gupta, Henzinger, Majumdar, Rybalchenko, Ru-Gang Xu presentation by erkan.
Chapter 2.11 Program Validation. Reliable System = Reliable Hardware AND Reliable Software AND Compatible Hardware and Software.
1 First order theories (Chapter 1, Sections 1.4 – 1.5) From the slides for the book “Decision procedures” by D.Kroening and O.Strichman.
Learning Universally Quantified Invariants of Linear Data Structures Pranav Garg 1, Christof Loding, 2 P. Madhusudan 1 and Daniel Neider 2 1 University.
Superoptimization Venkatesh Karthik Srinivasan Guest Lecture in CS 701, Nov. 10, 2015.
Introduction to Software Analysis CS Why Take This Course? Learn methods to improve software quality – reliability, security, performance, etc.
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
Translation Validation via Linear Recursion Schemes Master Seminar Tobias Tebbi.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Property-Guided Shape Analysis S.Itzhaky, T.Reps, M.Sagiv, A.Thakur and T.Weiss Slides by Tomer Weiss Submitted to TACAS 2014.
Rahul Sharma, Eric Schkufza, Berkeley Churchill, Alex Aiken.
Finding and Understanding Bugs in C Compilers Xuejun Yang Yang Chen Eric Eide John Regehr University of Utah.
Conditionally Correct Superoptimization Rahul Sharma, Eric Schkufza, Berkeley Churchill, Alex Aiken (Stanford University)
Rahul Sharma and Alex Aiken (Stanford University) 1.
© Bertrand Meyer and Yishai Feldman Notice Some of the material is taken from Object-Oriented Software Construction, 2nd edition, by Bertrand Meyer (Prentice.
Credible Compilation With Pointers Martin Rinard and Darko Marinov Laboratory for Computer Science Massachusetts Institute of Technology.
Stefan Heule, Eric Schkufza, Rahul Sharma, Alex Aiken
Software Testing.
State your reasons or how to keep proofs while optimizing code
Software Testing (Lecture 11-a)
Lecture 09:Software Testing
Knowledge Inference for Optimizing Secure Multi-party Computation
Software Verification and Validation
Software Verification and Validation
Software Verification and Validation
Carnegie Mellon Ithaca College
Presentation transcript:

Rahul Sharma, Eric Schkufza, Berkeley Churchill, Alex Aiken

 Prove two programs are equivalent  Compiler optimizations  Validate refactorings  Cross checking different implementations  Old and well studied problem  Undecidable in general  Major challenge: prove equivalence of loops  Straight line programs relatively easy

 Prove equivalence of two binaries … while … … while … … Trustworthy Compiler CompCert, gcc –O0 Optimizing Compiler gcc –O3, icc –O3

 Decompose proof movq 8(rsp), rdi #rdi != 0 movq 8(rsp), rdi decq rdi movq rdi, 8(rsp) retq movq 8(rsp), r9 #r9 != 0 decq r9retq a a’ bb’ cc’

 Given a simulation relation, proofs for loops reduce to proofs for loop free fragments  Use decision procedures  Main challenge: infer a simulation relation  Infer synchronization points  Infer invariants  We use compilers as black boxes  Mine relations from concrete executions

 Attempt to detect synchronization points  Number of times program points are executed movq 8(rsp), rdi #rdi != 0 movq 8(rsp), rdi decq rdi movq rdi, 8(rsp) retq movq 8(rsp), r9 #r9 != 0 decq r9retq n 1n n+1 n

 Invariants are restricted to equalities  Infer invariants from observed data values 8(rsp)rdi movq 8(rsp), rdi #rdi != 0 movq 8(rsp), rdi decq rdi movq rdi, 8(rsp) retq

 Invariants are restricted to equalities  Infer invariants from observed data values 8(rsp)rdir9’ movq 8(rsp), r9 #r9 != 0 decq r9retq

 Query SMT solvers  Incorporate counter-examples in relations  Sound but not complete  If checking succeeds then equivalent  Can fail to infer a sound simulation relation

 Prove equivalence of loops in two stages  Infer simulation relation  Check the inferred relation using SMT solvers  Use runtime data for inference  No change required to the compilers

 M. D. Ernst, J. H. Perkins, P. J. Guo, S. McCamant, C. Pacheco, M. S. Tschantz, and C. Xiao. The Daikon system for dynamic detection of likely invariants. Sci. Comput. Program., 69(1-3):35–45, 2007  T. Nguyen, D. Kapur, W. Weimer, and S. Forrest. Using dynamic analysis to discover polynomial and array invariants. ICSE 2012  R. Sharma, A. V. Nori, A. Aiken: Interpolants as Classifiers. In CAV, 2012  E. Schkufza, R. Sharma, Alex Aiken: Stochastic Superoptimization. In ASPLOS,  A.V. Nori, R. Sharma: Termination proofs from tests. ESEC/SIGSOFT FSE 2013  R. Sharma, A. Nori, A. Aiken: Bias-Variance Tradeoffs in Program Analysis. In POPL, 2014 (To appear).