Lazy Abstraction Jinseong Jeon ARCS, KAIST. 2006-11-07CS750b, KAIST2/26 References Lazy Abstraction –Thomas A. Henzinger et al., POPL ’02 Software verification.

Slides:



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

Abstraction in Model Checking Nishant Sinha. Model Checking Given a: –Finite transition system M –A temporal property p The model checking problem: –Does.
Data-Flow Analysis II CS 671 March 13, CS 671 – Spring Data-Flow Analysis Gather conservative, approximate information about what a program.
Introduction to Formal Methods for SW and HW Development 09: SAT Based Abstraction/Refinement in Model-Checking Roberto Sebastiani Based on work and slides.
Verification of Evolving Software Natasha Sharygina Joint work with Sagar Chaki and Nishant Sinha Carnegie Mellon University.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
Data-Flow Analysis Framework Domain – What kind of solution is the analysis looking for? Ex. Variables have not yet been defined – Algorithm assigns a.
Lecture #21 Software Model Checking: predicate abstraction Thomas Ball Testing, Verification and Measurement Microsoft Research.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 13.
CS 267: Automated Verification Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking.
Introducing BLAST Software Verification John Gallagher CS4117.
Pushdown Systems Koushik Sen EECS, UC Berkeley Slide Source: Sanjit A. Seshia.
Software Verification with BLAST Tom Henzinger Ranjit Jhala Rupak Majumdar.
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.
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.
Permissive Interfaces Tom Henzinger Ranjit Jhala Rupak Majumdar.
Software Verification with Blast Thomas A. Henzinger, Ranjit Jhala, Rupak Majumdar, George Necula, Grégoire Sutre, Wes Weimer UC Berkeley.
Discrete Abstractions of Hybrid Systems Rajeev Alur, Thomas A. Henzinger, Gerardo Lafferriere and George J. Pappas.
Scalable Program Verification by Lazy Abstraction Ranjit Jhala U.C. Berkeley.
Lazy Abstraction Thomas A. Henzinger Ranjit Jhala Rupak Majumdar Grégoire Sutre UC Berkeley.
Program Verification by Lazy Abstraction Ranjit Jhala UC San Diego Lecture 1 With: Tom Henzinger, Rupak Majumdar, Ken McMillan, Gregoire Sutre.
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.
Thread-modular Abstraction Refinement Tom Henzinger Ranjit Jhala Rupak Majumdar [UC Berkeley] Shaz Qadeer [Microsoft Research]
Lazy Predicate Abstraction in BLAST John Gallagher CS4117.
Synergy: A New Algorithm for Property Checking
Speeding Up Dataflow Analysis Using Flow- Insensitive Pointer Analysis Stephen Adams, Tom Ball, Manuvir Das Sorin Lerner, Mark Seigle Westley Weimer Microsoft.
Counter Example Guided Refinement CEGAR Mooly Sagiv.
CS 267: Automated Verification Lectures 14: Predicate Abstraction, Counter- Example Guided Abstraction Refinement, Abstract Interpretation Instructor:
Automatically Validating Temporal Safety Properties of Interfaces Thomas Ball and Sriram K. Rajamani Software Productivity Tools, Microsoft Research Presented.
Race Checking by Context Inference Tom Henzinger Ranjit Jhala Rupak Majumdar UC Berkeley.
Software Reliability Methods Sorin Lerner. Software reliability methods: issues What are the issues?
Predicate Abstraction for Software and Hardware Verification Himanshu Jain Model checking seminar April 22, 2005.
Temporal-Safety Proofs for Systems Code Thomas A. Henzinger Ranjit Jhala Rupak Majumdar George Necula Westley Weimer Grégoire Sutre UC Berkeley.
Lazy Abstraction with Interpolants Yakir Vizel (based on the work and slides of K. L. McMillan at CAV06)
Software Verification with BLAST Tom Henzinger Ranjit Jhala Rupak Majumdar.
Path Slicing Presentation by Massimiliano Menarini Ranjit Jhala and Rupak Majumdar, “Path Slicing” PLDI 05 (June 2005, Chicago, Illinois)
Lazy Abstraction Tom Henzinger Ranjit Jhala Rupak Majumdar Grégoire Sutre.
Improving Error Discovery using Guided Search Neha Rungta & Eric Mercer Computer Science Department Brigham Young University, Provo UT.
Lazy Abstraction Lecture 3 : Partial Analysis Ranjit Jhala UC San Diego With: Tom Henzinger, Rupak Majumdar, Ken McMillan, Gregoire Sutre.
Program Verification by Lazy Abstraction Ranjit Jhala UC San Diego Lecture 1 With: Tom Henzinger, Rupak Majumdar, Ken McMillan, Gregoire Sutre, Adam Chlipala.
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.
Program Analysis with Dynamic Change of Precision Dirk Beyer Tom Henzinger Grégory Théoduloz Presented by: Pashootan Vaezipoor Directed Reading ASE 2008.
Race Checking by Context Inference Tom Henzinger Ranjit Jhala Rupak Majumdar UC Berkeley.
Convergence of Model Checking & Program Analysis Philippe Giabbanelli CMPT 894 – Spring 2008.
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.
Localization and Register Sharing for Predicate Abstraction Himanshu Jain Franjo Ivančić Aarti Gupta Malay Ganai.
11 Counter-Example Based Predicate Discovery in Predicate Abstraction Satyaki Das and David L. Dill Computer Systems Lab Stanford University
SMT and Its Application in Software Verification (Part II) Yu-Fang Chen IIS, Academia Sinica Based on the slides of Barrett, Sanjit, Kroening, Rummer,
Symbolic Algorithms for Infinite-state Systems Rupak Majumdar (UC Berkeley) Joint work with Luca de Alfaro (UC Santa Cruz) Thomas A. Henzinger (UC Berkeley)
Concrete Model Checking with Abstract Matching and Refinement Corina Păsăreanu QSS, NASA Ames Research Center Radek Pelánek Masaryk University, Brno, Czech.
Ranjit Jhala Rupak Majumdar Interprocedural Analysis of Asynchronous Programs.
Counter Example Guided Refinement CEGAR Mooly Sagiv.
Verifying Component Substitutability Nishant Sinha Sagar Chaki Edmund Clarke Natasha Sharygina Carnegie Mellon University.
#1 Having a BLAST with SLAM. #2 Software Model Checking via Counter-Example Guided Abstraction Refinement Topic: Software Model Checking via Counter-Example.
The software model checker BLAST Dirk Beyer, Thomas A. Henzinger, Ranjit Jhala, Rupak Majumdar Presented by Yunho Kim TexPoint fonts used in EMF. Read.
Presentation Title 2/4/2018 Software Verification using Predicate Abstraction and Iterative Refinement: Part Bug Catching: Automated Program Verification.
Abstraction and Refinement for Large Scale Model Checking
Having a BLAST with SLAM
Abstractions from Proofs
Program Verification by Lazy Abstraction
Abstraction, Verification & Refinement
Software Verification with BLAST
Predicate Abstraction
BLAST: A Software Verification Tool for C programs
Presentation transcript:

Lazy Abstraction Jinseong Jeon ARCS, KAIST

CS750b, KAIST2/26 References Lazy Abstraction –Thomas A. Henzinger et al., POPL ’02 Software verification with BLAST –and tutorial slide (SPIN ’05) plus, BLAST slide –presented by Tai Hyo Kim (KPRG)

CS750b, KAIST3/26 Program’s Behaviors State transition pc  3 old  2 new  2 pc  4 old  2 new  3 new++;

CS750b, KAIST4/26 Safety Verification Initial Error Safe for s 2 Initial, s’ 2 Error 9 . s !  s’ ?

CS750b, KAIST5/26 Size does matter! Problem: Infinite state graph Solution: Abstraction! How? Galois connection, Predicate abstraction, etc.

CS750b, KAIST6/26 Predicate Abstraction Predicate old == new, etc. Predicate ' states « p ¬ = { s 2 S | s ² p } #abstract states is finite

CS750b, KAIST7/26 Abstraction State transition pc  3 old  2 new  2 pc  4 old  2 new  3 new++; transition p : p p, (old == new)

CS750b, KAIST8/26 Abstraction (cont’)

CS750b, KAIST9/26 Analysis on Abstraction Analyze finite graph Over Approximate: Safe ) System Safe No false negatives Problem: Spurious counter.ex. vS  S (over approximate) E  vE (soundness of verifier) vE  E (completeness of verifier) vE  S (false positive) vS  E (false negative) VerifierReal System vSS vEE

CS750b, KAIST10/26 Counter ex. -guided Refinement Solution: Use spurious counter ex. to refine abstraction imprecision due to merge 1. Add predicates to distinguish states across cut 2. Build refined abstraction

CS750b, KAIST11/26 Iterative Abstract-Refine 1. Add predicates to distinguish states across cut 2. Build refined abstraction 3. Repeat search till real counter ex. or system proved safe

CS750b, KAIST12/26 Software Model-checking AbstractionVerificationRefinement Program Property safe C.E. unsafe real error [error-free] [too coarse abstraction] BLAST

CS750b, KAIST13/26 BLAST –Berkeley Lazy Abstraction Software verification Tool Lazy Abstraction –tightly integrates verifying 3 steps –increases granularity on demand –reuses what the previous iterations calculate

CS750b, KAIST14/26 Abstraction Cost Reachable Problem #abstract states = 2 #predicates Observe Fraction of state space reachable #Preds ~ 100’s, #States ~ 2 100, #Reach ~ 1000’s

CS750b, KAIST15/26 S1: Only Abstract Reachable States Solution Build abstraction during search Reachable

CS750b, KAIST16/26 S2: Don’t Refine Error-Free Regions Solution Don’t refine error-free regions Error Free

CS750b, KAIST17/26 A Locking Example Example() { 1: if (*) { 7: do { get_lock = 0; 8: if (*) { 9: lock(); get_lock++; } 10: if (get_lock) { 11: unlock(); } 12: } while (*) } 2: do { lock(); old = new; 3: if (*) { 4: unlock(); new++; } 5: } while (new != old); 6: unlock(); return; } lock() { if (LOCK == 0) { LOCK = 1; } else { ERROR } unlock() { if (LOCK == 1) { LOCK = 0; } else { ERROR } lock unlock

CS750b, KAIST18/26 Control Flow Automaton Example() { 1: if (*) { 7: do { get_lock = 0; 8: if (*) { 9: lock(); get_lock++; } 10: if (get_lock) { 11: unlock(); } 12: } while (*) } 2: do { lock(); old = new; 3: if (*) { 4: unlock(); new++; } 5: } while (new != old); 6: unlock(); return; } ret [T] [new!=old] [new==old] [get_lock!=0] [get_lock==0] lock() old=new unlock() new++ get_lock=0 lock() get_lock++ unlock()

CS750b, KAIST19/26 Lazy Abstraction Framework 1.Forward search Approximate forward symbolic transition Generate reachability tree in depth-first order 2.Backwards c.e. analysis Precise backward computation to a pivot node 3.Search with new predicates Add a minimal set of new predicates to refine Continue Step 1 from the pivot node

CS750b, KAIST20/26 Forward Search 2: do { lock(); old = new; 3: if (*) { 4: unlock(); new++; } 5: } while (new != old); 6: unlock(); return; Predicates: LOCK 1 1 Reachability Tree err LOCK = 0 [T] lock() old=new LOCK = 0 LOCK = 1 [T] unlock() new++ LOCK = 1 LOCK = 0 [new==old] unlock() LOCK =

CS750b, KAIST21/26 Backwards C.E. Analysis err LOCK = 0 lock() old=new LOCK = 0 LOCK = 1 unlock() new++ LOCK = 1 LOCK = 0 unlock() LOCK = 0 [new == old] {LOCK = 0 } {LOCK = 0, new==old } {LOCK = 1, new+1==old } {LOCK = 0, new+1==new } WP(p,op): Weakest Preconditions = { p’ 2 P | n ! op  n’, n ² p’ ) n’ ² p } « p ¬« p ¬ n’ OP « WP(p,op) ¬ n « p ¬ = { s 2 S | s ² p } p n’ [c] c Æ p n p n’ x=e p[e/x] n n’  n r r’= post(r,  ) E E ’= pre( E,  ) r’ Å E  ; r Å E ’ = ;

CS750b, KAIST22/26 Search with new Predicates 2: do { lock(); old = new; 3: if (*) { 4: unlock(); new++; } 5: } while (new != old); 6: unlock(); return; Predicates: LOCK, new = old LOCK = 0 lock() old=new LOCK = 0 LOCK = 1 Æ new = old [T] unlock() new++ LOCK = 1 Æ new = old LOCK = 0 Æ new  old FALSE [new!=old] LOCK = 0 Æ new  old < LOCK = 0 5 [T] LOCK = 1 Æ new = old 26 6 [new==old] FALSE LOCK = 1 Æ new = old ret unlock() LOCK = 0 Æ new = old Safe!

CS750b, KAIST23/26 Savings 1 2 LOCK = 0 7 err new pred get_lock = LOCK = 0 Æ... COVERED! new pred get_lock = 0 new pred new = old

CS750b, KAIST24/26 Local Predicate Use Use predicates needed at location #Preds. grows with program size #Preds per location small Local Predicate use Ex: 2n states Global Predicate use Ex: 2 n states

CS750b, KAIST25/26 Experiments funlock: the locking example read: serial driver floppy: floppy driver

CS750b, KAIST26/26 Conclusions Lazy Abstraction –iterates the abstract-check-refine loop tightly –avoids redundant abstraction and checking by adding predicates in case of need by remaining prior results as possible Something interesting(?), but omitted here: –generic design of the algorithm –several formalisms and correctness theorems