Efficient Generation of Small Interpolants in CNF (for Model Checking)

Slides:



Advertisements
Similar presentations
Model Checking Base on Interoplation
Advertisements

The behavior of SAT solvers in model checking applications K. L. McMillan Cadence Berkeley Labs.
Exploiting SAT solvers in unbounded model checking
Exploiting SAT solvers in unbounded model checking K. L. McMillan Cadence Berkeley Labs.
Hybrid BDD and All-SAT Method for Model Checking Orna Grumberg Joint work with Assaf Schuster and Avi Yadgar Technion – Israel Institute of Technology.
Yakir Vizel 1,2 and Orna Grumberg 1 1.Computer Science Department, The Technion, Haifa, Israel. 2.Architecture, System Level and Validation Solutions,
50.530: Software Engineering
I NTERPOLANT S TRENGTH presenter 志瑋. O UTLINE Introduction Preliminaries Comparison of Interpolation Systems Labelled Interpolation Systems Proof Transformation.
Introduction to Formal Methods for SW and HW Development 09: SAT Based Abstraction/Refinement in Model-Checking Roberto Sebastiani Based on work and slides.
SAT Based Abstraction/Refinement in Model-Checking Based on work by E. Clarke, A. Gupta, J. Kukula, O. Strichman (CAV’02)
Proofs from SAT Solvers Yeting Ge ACSys NYU Nov
Aaron Bradley University of Colorado, Boulder
Towards More Efficient SAT-Based Model Checking Joao Marques-Silva Electronics & Computer Science University of Southampton LAA C&V Workshop, Isaac Newton.
© Anvesh Komuravelli IC3/PDR Overview of IC3/PDR Anvesh Komuravelli Carnegie Mellon University.
ULTIMATELY INCREMENTAL SAT Alexander Nadel 1, Vadim Ryvchin 1,2, and Ofer Strichman 2 1 – Intel, Haifa, Israel 2 – Technion, Haifa, Israel SAT’14, Vienna,
Reduction of Interpolants for Logic Synthesis John Backes Marc Riedel University of Minnesota Dept.
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:
Weizmann Institute Tuning SAT-checkers for Bounded Model-Checking A bounded guided tour Ofer Shtrichman Weizmann Institute & IBM (HRL)
Proof-based Abstraction Presented by Roman Gershman Ken McMillan, Nina Amla.
1 Quantified Formulas Acknowledgement: QBF slides borrowed from S. Malik.
Complexity 19-1 Complexity Andrei Bulatov More Probabilistic Algorithms.
Formal Verification Group © Copyright IBM Corporation 2008 IBM Haifa Labs SAT-based unbounded model checking using interpolation Based on a paper “Interpolation.
Computability and Complexity 24-1 Computability and Complexity Andrei Bulatov Approximation.
Weizmann Institute Tuning SAT-checkers for Bounded Model-Checking A bounded guided tour Ofer Shtrichman Weizmann Institute & IBM-HRL.
© 2015 Carnegie Mellon University Interpolating Property Directed Reachability Software Engineering Institute Carnegie Mellon University Pittsburgh, PA.
Quantified Formulas - Decision Procedure Daniel Kroening, Ofer Strichman Presented by Changki Hong 07 NOV 08.
SAT-based Model Checking Yakir Vizel Computer Science Department, Technion, Israel Based on slides from K.L. McMillan, A.R. Bradley and Yakir Vizel.
CHAPTERS 7, 8 Oliver Schulte Logical Inference: Through Proof to Truth.
Incremental formal verification of hardware Hana Chockler Alexander Ivrii Arie Matsliah Shiri Moran Ziv Nevo IBM Research - Haifa.
Lazy Annotation for Program Testing and Verification Speaker: Chen-Hsuan Adonis Lin Advisor: Jie-Hong Roland Jiang November 26,
Hwajung Lee. The State-transition model The set of global states = s 0 x s 1 x … x s m {s k is the set of local states of process k} S0  S1  S2  Each.
Boolean Satisfiability Present and Future
February 22-25, 2010 Designers Work Less with Quality Formal Equivalence Checking by Orly Cohen, Moran Gordon, Michael Lifshits, Alexander Nadel, and Vadim.
Efficient SAT Solving Under Assumptions Alexander Nadel 1 and Vadim Ryvchin 1,2 1 – Intel, Haifa, Israel 2 – Technion, Haifa, Israel SAT’12, Trento, Italy.
Planning as Satisfiability (SAT-Plan). SAT-Plan Translate the planning problem into a satisfiability problem for length n of Plan garb 0 (proposition)present.
Preprocessing in Incremental SAT Alexander Nadel 1, Vadim Ryvchin 1,2, and Ofer Strichman 2 1 – Intel, Haifa, Israel 2 – Technion, Haifa, Israel SAT’12,
SAT-Based Model Checking Without Unrolling Aaron R. Bradley.
CS357 Lecture 13: Symbolic model checking without BDDs Alex Aiken David Dill 1.
1 Alan Mishchenko Research Update June-September 2008.
Trading-off SAT search and Variable Quantifications for effective Unbounded Model Checking G. Cabodi P. Camurati L. Garcia M. Murciano S. Nocco S. Quer.
2009/6/30 CAV Quantifier Elimination via Functional Composition Jie-Hong Roland Jiang Dept. of Electrical Eng. / Grad. Inst. of Electronics Eng.
Bit-Vector Optimization ALEXANDER NADER AND VADIM RYVCHIN INTEL TACAS 2016.
The NP class. NP-completeness
אימות אוטומטי Intertwined Forward-Backward Reachability Analysis Using Interpolants Work by: Yakir Vizel, Orna Grumberg and Sharon Shoham (TACAS 2013)
Inference in Propositional Logic (and Intro to SAT)
Hybrid BDD and All-SAT Method for Model Checking
Introduction to Software Verification
Logical Inference 1 introduction
Interpolating Property Directed Reachability
EA C461 – Artificial Intelligence Logical Agent
Recovering and Exploiting Structural Knowledge from CNF Formulas
Alan Mishchenko UC Berkeley
Solving Linear Arithmetic with SAT-based MC
Introduction to Software Verification
Enhancing PDR/IC3 with Localization Abstraction
Applying Logic Synthesis for Speeding Up SAT
Mining backbone literals in incremental SAT
Where Can We Draw The Line?
Property Directed Reachability with Word-Level Abstraction
Introduction to Formal Verification
ITEC452 Distributed Computing Lecture 5 Program Correctness
Canonical Computation without Canonical Data Structure
Canonical Computation Without Canonical Data Structure
Canonical Computation without Canonical Data Structure
Scalability in Model Checking
Canonical Computation without Canonical Data Structure
SAT/SMT seminar 18/02/2018 Computing multiple MUSes (Minimal Unsatisfiable Subformulas) and MSISes (Minimal Safe Inductive Subsets) Alexander Ivrii IBM.
SAT Based Abstraction/Refinement in Model-Checking
Faster Extraction of High-Level Minimal Unsatisfiable Cores
Verifying Clausal Proofs, DRUPing and Interpolants SAT/SMT Seminar
Presentation transcript:

Efficient Generation of Small Interpolants in CNF (for Model Checking) Yakir Vizel1 Vadim Ryvchin2,3 Alexander Nadel3 Today’s talk is about … CAV 2013 St. Petersburg, Russia 1. Computer Science Department, Technion, Israel 2. Information Systems Engineering Department, Technion, Israel 3. Design Technology Solutions Group, Intel Corporation, Israel

Reachability Analysis Does an invariant P hold? …Rn R2 R1 Bad=¬P INIT

Interpolants Given an unsatisfiable pair (A,B) of propositional formulas There exists a formula I such that: A  I I ∧ B is unsatisfiable I is over the common variables of A and B

ITP – Interpolation-based MC McMillan, CAV 2003 A B INIT(V) ∧T(V,V1) ∧ T(V1,V2)∧T(V2,V3)∧(¬P(V1) ∨… ∨¬P(V3)) I I over-approximates the states reachable from INIT in one transition It satisfies P and cannot reach a bad state in two transitions or less

ITP – Interpolation-based MC McMillan, CAV 2003 A B I(V) ∧T(V,V1) ∧ T(V1,V2)∧T(V2,V3)∧(¬P(V1) ∨… ∨¬P(V3)) I’ I is fed back to the formula A new interpolant is computed I’ Iterative process

Motivation In ITP, a computed interpolant is fed back into the BMC problem BMC problem is solved with a SAT solver “Big” interpolant causes the BMC problem to be hard to solve Non-CNF interpolant needs to be translated to CNF

A B g3 g3 g2 g2  g3 a1 a1  g2  g3 A-local variables: a1 Global variables: g1, g2, g3 g4 a1  g2  g3 g2  g4 A B g1 a1 a1  g1  g2 a1  g1  g3 a1  g2  g3  g4 a1  g2 a1  g4 g2  g3 g3 g1

McMillan’s Method I g3 I g3 I = [(g1  g2)  (g1  g3)]  [(g2  g3  g4)  (g2  g4)] g2 g2  g3 a1 (g2  g3  g4)  (g2  g4) a1  g2  g3 (g1  g2)  (g1  g3) g2  g4 g4 a1  g2  g3 g2  g4 g1 a1 g1  g2 g1  g3 g2  g3  g4 g2 g4 T T a1  g1  g2 a1  g1  g3 a1  g2  g3  g4 a1  g2 a1  g4 g2  g3 g3

Our Method A two-phase method: Step one: Use both Quantifier Elimination (QE) and the Resolution Graph (RG) to compute an “almost” interpolant Step two: Specifically for Model Checking - use the structure of the formula to apply inductive reasoning

Step One Use both QE and RG to compute an “almost” interpolant For A(X,Y) ∧B(Y,Z) (∃X)(A(X,Y)) is an interpolant Quantifier elimination In SAT, eliminating existential quantifier amounts to Variable Elimination (VE) Use the RG to guide VE More efficient than pure VE Yet, may be hard to compute Relax VE with RG

I g3 I g3 g2 I = [(g1  g2  g3  g4)  (g1  g2  g3  g4)]  (g2  g4)] g2  g3 a1 (a1  g2  g3  g4)  (g2  g4) a1  g2  g3 (a1  g1  g2)  (a1  g1  g3) g2  g4 g4 a1  g2  g3 g2  g4 g1 a1 a1  g1  g2 a1  g1  g3 a1  g2  g3  g4 a1  g2 a1  g4 a1  g1  g2 a1  g1  g3 a1  g2  g3  g4 a1  g2 a1  g4 g2  g3 g3

A-local variable elimination: I = (g1  g2  g3  g4)  (g1  g2)  (g1  g2  g3  g4)  (g1  g2  g3)  (g2  g4) Resolution-driven variable elimination: I = (g1  g2  g3  g4)  (g1  g2  g3  g4)  (g2  g4) g3 g3 Saved! g2 g2  g3 a1 a1  g2  g3 g4 g1  g2 g1  g2  g3 a1  g2  g3 g2  g4 g1 a1 a1  g1  g2 a1  g1  g3 a1  g2  g3  g4 a1  g2 a1  g4 g2  g3 g3

Almost an Interpolant Bweak interpolant is a formula Iw s.t.: I is over the common variables of A and B Iw ∧ B is not necessarily unsatisfiable Non-global interpolant is a formula In s.t.: A  In In ∧ B is unsatisfiable In may contain variables local to A

Find Bweak Interpolant Apply resolution-driven variable elimination but: Eliminate only when intermediate interpolant does not grow as a result Apply incomplete A-local variable elimination to I Eliminate A-local variables, but apply resolution only to some of the pairs each input clause contributes to at least one output clause

B I I is a non-global interpolant Variable elimination is skipped, since it would increase the number of clauses I g5 I = (a1  g1  g2)  (a1  g2  g4)  (a1  g3  g4)  (a1  g6  g5)  (a1  g6) g4 g4  g5 a1 (a1  g1  g2)  (a1  g2  g4)  (a1  g3  g4) B a1  g4 g5 (a1  g1  g2)  (a1  g2  g4) g3 a1  g3  g4 (a1  g6  g5)  (a1  g6) a1  g5 g4  g5 a1  g1  g2 g2 a1  g2  g3 g6 g1 a1  g1  g2 a1  g2  g4 a1  g3  g4 a1  g6  g5 a1  g6 a1  g1  g2 a1  g2  g4 a1  g3  g4 a1  g6  g5 g1  g3 a1  g6

I’ is a Bweak interpolant! Incomplete variable elimination example: each input clause contributes to the output I’ = (g1  g2  g6  g5)  (g2  g4  g6)  (g3  g4  g6  g5) I = (a1  g1  g2)  (a1  g2  g4)  (a1  g3  g4)  (a1  g6  g5)  (a1  g6)

Our Method A two-fold method: Step one: Use both Quantifier Elimination (QE) and the Resolution Graph (GR) to compute an “almost” interpolant Step two: Specifically for Model Checking - use the structure of the formula to apply inductive reasoning

Backward reachable from ¬P Step Two Backward reachable from ¬P in k-1 steps …… I ¬P F s Iw

Strengthening Generalize using inductive generalization (a-la IC3) a state s in Iw that can reach Bad Need to remove it Remove a set of states Find a new state s …… I ¬P F …… Iw F(V) => ¬s(V) F(V) ∧T(V,V’) => ¬s(V’) s cannot be in F(V) ∧T(V,V’) s cannot be in F I’m an Interpolant! Yay!!

CNF-ITP k=1; while(BMC(INIT,k,Bad) = false) { R = INIT; n=0; do { n++; Iw = ExtractBweakItp(); PushInductiveClauses(Iw); // Push forward Iw = Iw ∧ nIk-1 // Incremental nIk = Strengthen(R, Iw, k); // R is strengthened as well if (nIk => R) return valid; R = R ∨ nIk; } while(BMC(nIk,k,Bad) = false); k++; return cex;

Conclusions Interpolants computed efficiently in CNF Specific for MC CNF used to optimize the MC algorithm Brings ITP and IC3 together More can be done in this direction

Thank You