Synergy: A New Algorithm for Property Checking Bhargav S. Gulavani (IIT Bombay)‏ Yamini Kannan (Microsoft Research India)‏ Thomas A. Henzinger (EPFL)‏

Slides:



Advertisements
Similar presentations
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Advertisements

Modular and Verified Automatic Program Repair Francesco Logozzo, Thomas Ball RiSE - Microsoft Research Redmond.
© 2006 Carnegie Mellon University Combining Predicate and Numeric Abstraction for Software Model Checking Software Engineering Institute Carnegie Mellon.
Alan Shaffer, Mikhail Auguston, Cynthia Irvine, Tim Levin The 7th OOPSLA Workshop on Domain-Specific Modeling October 21-22, 2007 Toward a Security Domain.
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)
50.530: Software Engineering Sun Jun SUTD. Week 10: Invariant Generation.
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
Annoucements  Next labs 9 and 10 are paired for everyone. So don’t miss the lab.  There is a review session for the quiz on Monday, November 4, at 8:00.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 13.
Introducing BLAST Software Verification John Gallagher CS4117.
1 Thorough Static Analysis of Device Drivers Byron Cook – Microsoft Research Joint work with: Tom Ball, Vladimir Levin, Jakob Lichtenberg,
Rahul Sharma, Saurabh Gupta, Bharath Hariharan, Alex Aiken, and Aditya Nori (Stanford, UC Berkeley, Microsoft Research India) Verification as Learning.
Thomas Ball, Rupak Majumdar, Todd Millstein, Sriram K. Rajamani Presented by Yifan Li November 22nd In PLDI 01: Programming Language.
Multiple Shooting, CEGAR-based Falsification for Hybrid Systems
Concolic Modularity Testing Derrick Coetzee University of California, Berkeley CS 265 Final Project Presentation.
Dual Analysis for Proving Safety and Finding Bugs Corneliu Popeea Wei-Ngan Chin Technische Universität MünchenNational University of Singapore Symposium.
Proofs from Tests Nels E. Beckman Aditya V. Nori Sriram K. Rajamani Robert J. Simmons Carnegie Mellon UniversityMicrosoft Research India Carnegie Mellon.
Verification of parameterised systems
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.
The Software Model Checker BLAST by Dirk Beyer, Thomas A. Henzinger, Ranjit Jhala and Rupak Majumdar Presented by Yunho Kim Provable Software Lab, KAIST.
Termination Proofs for Systems Code Andrey Rybalchenko, EPFL/MPI joint work with Byron Cook, MSR and Andreas Podelski, MPI PLDI’2006, Ottawa.
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.
Abstractions. Outline Informal intuition Why do we need abstraction? What is an abstraction and what is not an abstraction A framework for abstractions.
Synergy: A New Algorithm for Property Checking
Alternation for Termination William Harris, Akash Lal, Aditya Nori Sriram Rajamani
Counter Example Guided Refinement CEGAR Mooly Sagiv.
CS 267: Automated Verification Lectures 14: Predicate Abstraction, Counter- Example Guided Abstraction Refinement, Abstract Interpretation Instructor:
Transaction Ordering Verification using Trace Inclusion Refinement Mike Jones 11 January 2000.
Predicate Abstraction for Software and Hardware Verification Himanshu Jain Model checking seminar April 22, 2005.
1 Software Testing and Quality Assurance Lecture 6 - Software Testing Techniques.
Transaction Ordering Verification using Trace Inclusion Refinement Mike Jones 11 January 2000.
1 Formal Engineering of Reliable Software LASER 2004 school Tutorial, Lecture1 Natasha Sharygina Carnegie Mellon University.
Lazy Abstraction Tom Henzinger Ranjit Jhala Rupak Majumdar Grégoire Sutre.
1 Reducing Verification Complexity of a Multicore Coherence Protocol Using Assume/Guarantee Xiaofang Chen 1, Yu Yang 1, Ganesh Gopalakrishnan 1, Ching-Tsun.
Formal Verification of SpecC Programs using Predicate Abstraction Himanshu Jain Daniel Kroening Edmund Clarke Carnegie Mellon University.
By D. Beyer et. al. Simon Fraser University (Spring 09) Presentation By: Pashootan Vaezipoor.
Thread-modular Abstraction Refinement Thomas A. Henzinger, et al. CAV 2003 Seonggun Kim KAIST CS750b.
CSC2108 Lazy Abstraction on Software Model Checking Wai Sum Mong.
Automating Software Testing Using Program Analysis -Patrice Godefroid, Peli de Halleux, Aditya V. Nori, Sriram K. Rajamani,Wolfram Schulte, and Nikolai.
Chapter 3 (Part 3): Mathematical Reasoning, Induction & Recursion  Recursive Algorithms (3.5)  Program Correctness (3.6)
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 4 (Part 3): Mathematical Reasoning, Induction.
1 Testing, Abstraction, Theorem Proving: Better Together! Greta Yorsh joint work with Thomas Ball and Mooly Sagiv.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 3: Modular Verification with Magic, Predicate Abstraction.
Rule Checking SLAM Checking Temporal Properties of Software with Boolean Programs Thomas Ball, Sriram K. Rajamani Microsoft Research Presented by Okan.
Aditya V. Nori, Sriram K. Rajamani Microsoft Research India.
Parameterized Verification of Thread-safe Libraries Thomas Ball Sagar Chaki Sriram K. Rajamani.
Quantitative Abstraction Refinement Pavol Černý IST Austria joint work with Thomas Henzinger, Arjun Radhakrishna Haifa, Israel November 2012 TexPoint fonts.
Symbolic Execution with Abstract Subsumption Checking Saswat Anand College of Computing, Georgia Institute of Technology Corina Păsăreanu QSS, NASA Ames.
1 Predicate Abstraction and Refinement for Verifying Hardware Designs Himanshu Jain Joint work with Daniel Kroening, Natasha Sharygina, Edmund M. Clarke.
Ch. 13 Ch. 131 jcmt CSE 3302 Programming Languages CSE3302 Programming Languages (notes?) Dr. Carter Tiernan.
Proving Non-Termination Gupta, Henzinger, Majumdar, Rybalchenko, Ru-Gang Xu presentation by erkan.
Model Checking C Programs Zijiang (James) Yang Department of Computer Science Western Michigan University In collaboration with NEC Laboratories America.
Model Checking for Simple Java Programs Taehoon Lee, Gihwon Kwon Department of Computer Science Kyonggi University, Korea IWFST, Shanghai, China,
The Yogi Project Software property checking via static analysis and testing Aditya V. Nori, Sriram K. Rajamani, Sai Deep Tetali, Aditya V. Thakur Microsoft.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
CS357 Lecture 13: Symbolic model checking without BDDs Alex Aiken David Dill 1.
/ PSWLAB Thread Modular Model Checking by Cormac Flanagan and Shaz Qadeer (published in Spin’03) Hong,Shin Thread Modular Model.
Boolean Programs: A Model and Process For Software Analysis By Thomas Ball and Sriram K. Rajamani Microsoft technical paper MSR-TR Presented by.
© Anvesh Komuravelli Spacer Model Checking with Proofs and Counterexamples Anvesh Komuravelli Carnegie Mellon University Joint work with Arie Gurfinkel,
Abstraction and Abstract Interpretation. Abstraction (a simplified view) Abstraction is an effective tool in verification Given a transition system, we.
The software model checker BLAST Dirk Beyer, Thomas A. Henzinger, Ranjit Jhala, Rupak Majumdar Presented by Yunho Kim TexPoint fonts used in EMF. Read.
Program Analysis via Satisfiability Modulo Path Programs
Lecture 8 Functional synthesis
Over-Approximating Boolean Programs with Unbounded Thread Creation
Automated Extraction of Inductive Invariants to Aid Model Checking
Example (C code) int double(int x) { return 2 * x; }
CSE 1020:Software Development
Predicate Abstraction
BLAST: A Software Verification Tool for C programs
Presentation transcript:

Synergy: A New Algorithm for Property Checking Bhargav S. Gulavani (IIT Bombay)‏ Yamini Kannan (Microsoft Research India)‏ Thomas A. Henzinger (EPFL)‏ Aditya V. Nori (Microsoft Research India)‏ Sriram K. Rajamani (Microsoft Research India)‏ Note: I modified the original ppt file for my presentation - Erkan

Problem statement Check if a program satisfies a given safety property: –API usage rules –Protocols on objects Interesting programs have infinite state spaces ranging over infinite domains –This problem in general is undecidable

Two approaches to property checking Testing: find inputs and executions that demonstrate effectively violations of a property -> Search for bugs Verification: find a proof that all executions of the program satisfy a property -> Proof for the absence of bugs

Tests: presence of bugs void foo(int a)‏ { 0: i = 0; 1: c = 0; 2: while (i < 1000) { 3: c = c + i; 4: i = i + 1; } 5: assume (a <= 0); 6: assert (false); } × × × × × × × × × × × × × × × × (a=-5)‏

Proofs: absence of bugs void foo(int y1, int y2)‏ { 0: state = 1; 1: if (y1) { 2: x0 = x0 + 1; } else { 3: x0 = x0 – 1; } 4: if (y2) { 5: x1 = x1 + 1; } else { 6: x1 = x1 – 1; } 7: assert (state == 1); } O: state=1 1: state=1 2: state=13: state=1 4: state=1 5: state=16: state=1 7: state=1 Error exponential number of tests required linear proof exists!

Key insights Testing works when errors are easy to find and is inefficient for finding proofs Verification works when proofs are easy to find and is inefficient for finding errors

Questions Can we combine “systematically” testing with verification? How does one generate/direct test cases? –Can abstraction help? Given a spurious abstract error trace, how does one perform refinement? –Can testing help?

Solution: Synergy Combines under- and over-approximation reasoning (testing and verification) of programs. Unifies several disparate existing algorithms in the literature: – Counterexample driven refinement approaches for verification (SLAM, BLAST)‏ – Directed testing approaches (DART)‏ – Partition refinement algorithms (Lee-Yannakakis, Paige-Tarjan)‏

Synergy – sketch Can extend test beyond frontier? Refine proof Construct random tests Construct initial proof Input: Program P Property ψ Test succeeded? Bug! Proof succeeded? τ = error path in failed proof f = frontier of error path yes no yes no Proof! yes no

Example void foo(int y)‏ { 1: do { 2: lock.state = L; 3: x = y; 4: if (*) { 5: lock.state = U; 6: y = y + 1; } 7: } while (x != y); 8: if(lock.state != L)‏ 9: error(); } Does this program obey the locking rule?

Example void foo(int y)‏ { 1: do { 2: lock.state = L; 3: x = y; 4: if (*) { 5: lock.state = U; 6: y = y + 1; } 7: } while (x != y); 8: if(lock.state != L ); 9: error }

no Example void foo(int y)‏ { 1: do { 2: lock.state = L; 3: x = y; 4: if (*) { 5: lock.state = U; 6: y = y + 1; } 7: } while (x != y); 8: if(lock.state != L)‏ 9: error(); } Can extend test beyond frontier? Refine proof Construct random tests Construct initial proof Input: Program P Property ψ Test succeeded? Bug! Proof succeeded? τ = error path in failed proof f = frontier of error path yes no yes no Proof! yes

Example y = 1 Can extend test beyond frontier? Refine proof Construct random tests Construct initial proof Input: Program P Property ψ Test succeeded? Bug! Proof succeeded? τ = error path in failed proof f = frontier of error path yes no yes no Proof! yes no void foo(int y)‏ { 1: do { 2: lock.state = L; 3: x = y; 4: if (*) { 5: lock.state = U; 6: y = y + 1; } 7: } while (x != y); 8: if(lock.state != L)‏ 9: error(); } × × × × × × × × × × × × × ×

Example Can extend test beyond frontier? Refine proof Construct random tests Construct initial proof Input: Program P Property ψ Test succeeded? Bug! Proof succeeded? τ = error path in failed proof f = frontier of error path yes no yes no Proof! yes no void foo(int y)‏ { 1: do { 2: lock.state = L; 3: x = y; 4: if (*) { 5: lock.state = U; 6: y = y + 1; } 7: } while (x != y); 8: if(lock.state != L)‏ 9: error(); } × × × × × × × × × × × × × × y = 1 τ=(0,1,2,3,4,7,8,9)‏ frontier

Example Can extend test beyond frontier? Refine proof Construct random tests Construct initial proof Input: Program P Property ψ Test succeeded? Bug! Proof succeeded? τ = error path in failed proof f = frontier of error path yes no yes no Proof! yes no void foo(int y)‏ { 1: do { 2: lock.state = L; 3: x = y; 4: if (*) { 5: lock.state = U; 6: y = y + 1; } 7: } while (x != y); 8: if(lock.state != L)‏ 9: error(); } ⋀¬p 9 × × × × × × × × × × × × × × 8⋀p × split into two regions wrt p=(lock.state != L)‏

Example Can extend test beyond frontier? Refine proof Construct random tests Construct initial proof Input: Program P Property ψ Test succeeded? Bug! Proof succeeded? τ = error path in failed proof f = frontier of error path yes no yes no Proof! yes no void foo(int y)‏ { 1: do { 2: lock.state = L; 3: x = y; 4: if (*) { 5: lock.state = U; 6: y = y + 1; } 7: } while (x != y); 8: if(lock.state != L)‏ 9: error(); } ⋀¬p 9 × × × × × × × × × × × × × × 8⋀p × τ=(0,1,2,3,4,7,,9)‏ frontier

Correct, the program is void foo(int y)‏ { 1: do { 2: lock.state = L; 3: x = y; 4: if (*) { 5: lock.state = U; 6: y = y + 1; } 7: } while (x != y); 8: if(lock.state != L)‏ 9: error(); } ⋀¬s 5⋀¬s 6⋀¬r 9 × × × × × × × × × × × 7⋀¬q × 8⋀¬p × 4⋀s 5⋀s 6⋀r 7⋀q 8⋀p ×

Example Can extend test beyond frontier? Refine proof Construct random tests Construct initial proof Input: Program P Property ψ Test succeeded? Bug! Proof succeeded? τ = error path in failed proof f = frontier of error path yes no yes no Proof! yes no void foo(int a)‏ { 0: i = 0; 1: c = 0; 2: while (i < 1000)‏ { 3: c = c + i; 4: i = i + 1; } 5: if (a <= 0)‏ 6: error(); }

Example Can extend test beyond frontier? Refine proof Construct random tests Construct initial proof Input: Program P Property ψ Test succeeded? Bug! Proof succeeded? τ = error path in failed proof f = frontier of error path yes no yes no Proof! yes no void foo(int a)‏ { 0: i = 0; 1: c = 0; 2: while (i < 1000)‏ { 3: c = c + i; 4: i = i + 1; } 5: if (a <= 0)‏ 6: error(); } × × × × × × × × × × × × a = 45

Example Can extend test beyond frontier? Refine proof Construct random tests Construct initial proof Input: Program P Property ψ Test succeeded? Bug! Proof succeeded? τ = error path in failed proof f = frontier of error path yes no yes no Proof! yes no void foo(int a)‏ { 0: i = 0; 1: c = 0; 2: while (i < 1000)‏ { 3: c = c + i; 4: i = i + 1; } 5: if (a <= 0)‏ 6: error(); } × × × × × × × × × × × × τ=(0,1,2,(3,4,2) 1000,5,6)‏ frontier

Example Can extend test beyond frontier? Refine proof Construct random tests Construct initial proof Input: Program P Property ψ Test succeeded? Bug! Proof succeeded? τ = error path in failed proof f = frontier of error path yes no yes no Proof! yes no void foo(int a)‏ { 0: i = 0; 1: c = 0; 2: while (i < 1000)‏ { 3: c = c + i; 4: i = i + 1; } 5: if (a <= 0)‏ 6: error(); } × × × × × × × × × × × × × a = -5

Experimental Evaluation