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:

Slides:



Advertisements
Similar presentations
Model Checking Base on Interoplation
Advertisements

Model Checking Lecture 4. Outline 1 Specifications: logic vs. automata, linear vs. branching, safety vs. liveness 2 Graph algorithms for model checking.
Automated abstraction refinement II Heuristic aspects Ken McMillan Cadence Berkeley Labs.
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.
SAT-based Bounded and Unbounded Model Checking Edmund M. Clarke Carnegie Mellon University Joint research with C. Bartzis, A. Biere, P. Chauhan, A. Cimatti,
The Project Problem formulation (one page) Literature review –“Related work" section of final paper, –Go to writing center, –Present paper(s) to class.
CS 267: Automated Verification Lecture 2: Linear vs. Branching time. Temporal Logics: CTL, CTL*. CTL model checking algorithm. Counter-example generation.
M ODEL CHECKING -Vasvi Kakkad University of Sydney.
Algorithmic Software Verification VII. Computation tree logic and bisimulations.
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)
ECE Synthesis & Verification - L271 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Model Checking basics.
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Proofs from SAT Solvers Yeting Ge ACSys NYU Nov
Aaron Bradley University of Colorado, Boulder
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View SAT.
Towards More Efficient SAT-Based Model Checking Joao Marques-Silva Electronics & Computer Science University of Southampton LAA C&V Workshop, Isaac Newton.
SAT-based verification: underlying methods Mary Sheeran Chalmers University of Technology and Prover Technology AB.
© Anvesh Komuravelli IC3/PDR Overview of IC3/PDR Anvesh Komuravelli Carnegie Mellon University.
Reduction of Interpolants for Logic Synthesis John Backes Marc Riedel University of Minnesota Dept.
Tuning SAT-checkers for Bounded Model-Checking A bounded guided tour Ofer Strichman Carnegie Mellon University.
Weizmann Institute Tuning SAT-checkers for Bounded Model-Checking A bounded guided tour Ofer Shtrichman Weizmann Institute & IBM (HRL)
SAT-based Bounded Model Checking
Proof-based Abstraction Presented by Roman Gershman Ken McMillan, Nina Amla.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
Presented by Ed Clarke Slides borrowed from P. Chauhan and C. Bartzis
1 Completeness and Complexity of Bounded Model Checking Ed Clarke Daniel Kroening Joel Ouaknine Carnegie Mellon University, Pittsburgh, USA Ofer Strichman.
1 Quantified Formulas Acknowledgement: QBF slides borrowed from S. Malik.
Formal Verification Group © Copyright IBM Corporation 2008 IBM Haifa Labs SAT-based unbounded model checking using interpolation Based on a paper “Interpolation.
Pruning techniques for the SAT-based Bounded Model-Checking problem Ofer Shtrichman Weizmann Institute of Science & IBM - HRL.
Weizmann Institute Tuning SAT-checkers for Bounded Model-Checking A bounded guided tour Ofer Shtrichman Weizmann Institute & IBM-HRL.
Computing Over­Approximations with Bounded Model Checking Daniel Kroening ETH Zürich.
1 Completeness and Complexity of Bounded Model Checking.
1 Abstraction Refinement for Bounded Model Checking Anubhav Gupta, CMU Ofer Strichman, Technion Highly Jet Lagged.
Invisible Invariants: Underapproximating to Overapproximate Ken McMillan Cadence Research Labs TexPoint fonts used in EMF: A A A A A.
CS 267: Automated Verification Lecture 13: Bounded Model Checking Instructor: Tevfik Bultan.
7/13/2003BMC A SAT-Based Approach to Abstraction Refinement in Model Checking Bing Li, Chao Wang and Fabio Somenzi University of Colorado at Boulder.
Binary Decision Diagrams (BDDs)
1 Completeness and Complexity of Bounded Model Checking.
SAT and SMT solvers Ayrat Khalimov (based on Georg Hofferek‘s slides) AKDV 2014.
SAT-based Model Checking Yakir Vizel Computer Science Department, Technion, Israel Based on slides from K.L. McMillan, A.R. Bradley and Yakir Vizel.
Introduction to Satisfiability Modulo Theories
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View BDDs.
Lazy Annotation for Program Testing and Verification Speaker: Chen-Hsuan Adonis Lin Advisor: Jie-Hong Roland Jiang November 26,
On the Relation between SAT and BDDs for Equivalence Checking Sherief Reda Rolf Drechsler Alex Orailoglu Computer Science & Engineering Dept. University.
Verification & Validation By: Amir Masoud Gharehbaghi
SAT-Based Model Checking Without Unrolling Aaron R. Bradley.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
CS357 Lecture 13: Symbolic model checking without BDDs Alex Aiken David Dill 1.
Bounded Model Checking A. Biere, A. Cimatti, E. Clarke, Y. Zhu, Symbolic Model Checking without BDDs, TACAS’99 Presented by Daniel Choi Provable Software.
SAT Solving As implemented in - DPLL solvers: GRASP, Chaff and
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
Bernd Fischer RW714: SAT/SMT-Based Bounded Model Checking of Software.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
Efficient Generation of Small Interpolants in CNF (for Model Checking)
Symbolic model checking with SAT/SMT
Introduction to Software Verification
Inference and search for the propositional satisfiability problem
Bounded Model Checking
(xy)(yz)(xz)(zy)
Introduction to Software Verification
K. L. McMillan Cadence Berkeley Labs
Heuristics for Efficient SAT Solving
Decision Procedures An Algorithmic Point of View
Computer Security: Art and Science, 2nd Edition
Scalability in Model Checking
Formal Methods in software development
Verifying Clausal Proofs, DRUPing and Interpolants SAT/SMT Seminar
Presentation transcript:

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: can we find a bad state in k steps? Verification: can we find a counterexample in k steps ? Biere, Cimatti, Clarke, Zhu, 1999

What is SAT? SATisfying assignment! Given a propositional formula in CNF, find if there exists an assignment to Boolean variables that makes the formula true:  1 = (b c)  2 = (  a  d)  3 = (  b d)  =  1  2  3 A = {a=0, b=1, c=0, d=1}  1 = (b c)  2 = (  a  d)  3 = (  b d)  =  1  2  3 A = {a=0, b=1, c=0, d=1} clauses literals

BMC idea Given: transition system M, temporal logic formula f, and user-supplied time bound k Construct propositional formula  (k) that is satisfiable iff f is valid along a path of length k Path of length k: Say f = EF p and k = 2, then What if f = AG p ?

BMC idea (cont’d) AG p means p must hold in every state along any path of length k We take So That means we look for counterexamples

Safety-checking as BMC p is preserved up to k-th transition iff  (k) is unsatisfiable:... s0s0 s1s1 s2s2 s k-1 sksk pp p pp p If satisfiable, satisfying assignment gives counterexample to the safety property.

Example: a two bit counter Safety property: AG  (2) is unsatisfiable.  (3) is satisfiable. Initial state: Transition:

Example: another counter Liveness property: AF  (2) is satisfiable Check: EG where Satisfying assignment gives counterexample to the liveness property

What BMC with SAT Can Do All LTL ACTL and ECTL In principle, all CTL and even mu-calculus –efficient universal quantifier elimination or fixpoint computation is an active area of research

How big should k be? For every model M and LTL property  there exists k s.t. The minimal such k is the Completeness Threshold (CT)

How big should k be? Diameter d = longest shortest path from an initial state to any other reachable state. Recurrence Diameter rd = longest loop-free path. rd ¸ d d = 2 rd = 3

How big should k be? Theorem: for Gp properties CT = d s0s0 pp Arbitrary path

How big should k be? Theorem: for Fp properties CT= rd s0s0 pp pp pp pp pp  Open Problem: The value of CT for general Linear Temporal Logic properties is unknown

Given  in CNF: (x,y,z),(-x,y),(-y,z),(-x,-y,-z) Decide() Deduce() Resolve_Conflict()  X X X XX  A basic SAT solver

While (true) { if (!Decide()) return (SAT); while (!Deduce()) if (!Resolve_Conflict()) return (UNSAT); } Choose the next variable and value. Return False if all variables are assigned Apply unit clause rule. Return False if reached a conflict Backtrack until no conflict. Return False if impossible Basic Algorithm

A =  empty clause? y UNSAT conflict? Obtain conflict clause and backtrack y n is A total? y SAT Branch: add some literal to A DPLL-style SAT solvers SATO,GRASP,CHAFF,BERKMIN n

The Implication Graph (  a  b)  (  b  c  d) a cc Decisions b Assignment: a  b   c  d d

Resolution a  b   c  a   c  d b   c  d When a conflict occurs, the implication graph is used to guide the resolution of clauses, so that the same conflict will not occur again.

Conflict clauses (  a  b)  (  b  c  d)  (  b   d) a cc Decisions b Assignment: a  b   c  d d Conflict! (  b  c ) resolve Conflict! (  a  c) resolve Conflict!

Conflict Clauses (cont.) Conflict clauses: –Are generated by resolution –Are implied by existing clauses –Are in conflict with the current assignment –Are safely added to the clause set Many heuristics are available for determining when to terminate the resolution process.

Generating refutations Refutation = a proof of the null clause –Record a DAG containing all resolution steps performed during conflict clause generation. –When null clause is generated, we can extract a proof of the null clause as a resolution DAG. Original clauses Derived clauses Null clause

Unbounded Model Checking A variety of methods to exploit SAT and BMC for unbounded model checking: –Completeness Threshold –k - induction –Abstraction (refutation proofs useful here) –Exact and over-approximate image computations (refutation proofs useful here) –Use of Craig interpolation

Conclusions: BDDs vs. SAT Many models that cannot be solved by BDD symbolic model checkers, can be solved with an optimized SAT Bounded Model Checker. The reverse is true as well. BMC with SAT is faster at finding shallow errors and giving short counterexamples. BDD-based procedures are better at proving absence of errors.

Acknowledgements “Exploiting SAT Solvers in Unbounded Model Checking” by K. McMillan, tutorial presented at CAV’03 “Tuning SAT-checkers for Bounded Model Checking” and “Heuristics for Efficient SAT solving” by O. Strichman Slides originally prepared for 2108 by Mihaela Gheorghiu.