SAT Based Abstraction/Refinement in Model-Checking

Slides:



Advertisements
Similar presentations
The behavior of SAT solvers in model checking applications K. L. McMillan Cadence Berkeley Labs.
Advertisements

Exploiting SAT solvers in unbounded model checking
Abstraction in Model Checking Nishant Sinha. Model Checking Given a: –Finite transition system M –A temporal property p The model checking problem: –Does.
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)
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:
Tuning SAT-checkers for Bounded Model-Checking A bounded guided tour Ofer Strichman Carnegie Mellon University.
Computing Over­Approximations with Bounded Model Checking Daniel Kroening ETH Zürich.
1 Abstraction Refinement for Bounded Model Checking Anubhav Gupta, CMU Ofer Strichman, Technion Highly Jet Lagged.
SAT-Based Model Checking Without Unrolling Aaron R. Bradley.
CHARME’03 Predicate abstraction with Minimum Predicates Sagar Chaki*, Ed Clarke*, Alex Groce*, Ofer Strichman** * Carnegie Mellon University ** Technion.
Presentation Title 2/4/2018 Software Verification using Predicate Abstraction and Iterative Refinement: Part Bug Catching: Automated Program Verification.
Restoration and Regulation Discussion
Properties of Living things
With Remote Capabilities by Justin Dansby
Restoration and Regulation Discussion
AND TELECOMMUNICATIONS BUSINESS
Restoration and Regulation Discussion
Copyright © Dale Carnegie & Associates, Inc.
Properties of Living things
Elastomers Frequently, presenters must deliver material of a technical nature to an audience unfamiliar with the topic or vocabulary. The material may.
US Treasury & Its Borrowing
Hashing and Hash Tables
The Use of Artificial Life and Culture in Gaming As a Tool for Education Jared Witzer Frequently, presenters must deliver material of a technical nature.
Binhai Zhu Computer Science Department, Montana State University
An ANN Approach to EEG Scoring
Heaps,heapsort and priority queue
Property Directed Reachability with Word-Level Abstraction
Binhai Zhu Computer Science Department, Montana State University
Department of Computer Science & Engineering
Teaching & Learning Staff and Work Plan
Brief Review of Proof Techniques
AOE/ESM 4084 Engineering Design Optimization
Technology Update Kris Young Director of Technology
Technology Update Kris Young Director of Technology
Erlang in Banking & Financial Switching
Presenting a Technical Report
Numerical Methods Charudatt Kadolkar 12/9/2018
Binhai Zhu Computer Science Department, Montana State University
Summer Success Academy Program Analysis Spring 2016
Board of Education Budget Workshop March 23, 2017
Final Budget Amendment and Proposed Budget
Engineering Services & Software introduces SuperFractionate/Ponchon
Correlation Immune Functions and Learning
Properties of Living things
Troy School District AP and Dual Enrollment Report
2015/16 Evaluation Summary October 4, 2016 Jordan Harris
2016 State Assessment Results
Business Services Update Board of Education Workshop December 1, 2015
Recommendations for Schools of Choice School Year
Scalability in Model Checking
TROY SCHOOL DISTRICT ENROLLMENT PROJECTIONS February 7, 2017
2015/16 Evaluation Summary October 18, 2016 Jordan Harris
Properties of Living things
PSoup: A System for streaming queries over streaming data
Predicate Abstraction
Business Services Update Board of Education Workshop December 6, 2016
Presentation to the Portfolio Committee
Randomized Algorithm & Public Key Cryptography
Final Budget Amendment and Proposed Budget
Restoration and Regulation Discussion
Binhai Zhu Computer Science Department, Montana State University
Restoration and Regulation Discussion
Restoration and Regulation Discussion
Business Services Update Board of Education Workshop March 7, 2017
Binhai Zhu Computer Science Department, Montana State University
Binhai Zhu Computer Science Department, Montana State University
Binhai Zhu Computer Science Department, Montana State University
Recommendations for Schools of Choice School Year
Presentation transcript:

SAT Based Abstraction/Refinement in Model-Checking Based on work by E. Clarke, A. Gupta, J. Kukula, O. Strichman (CAV’02) Frequently, presenters must deliver material of a technical nature to an audience unfamiliar with the topic or vocabulary. The material may be complex or heavy with detail. To present technical material effectively, use the following guidelines from Dale Carnegie Training®.   Consider the amount of time available and prepare to organize your material. Narrow your topic. Divide your presentation into clear segments. Follow a logical progression. Maintain your focus throughout. Close the presentation with a summary, repetition of the key steps, or a logical conclusion. Keep your audience in mind at all times. For example, be sure data is clear and information is relevant. Keep the level of detail and vocabulary appropriate for the audience. Use visuals to support key points or steps. Keep alert to the needs of your listeners, and you will have a more receptive audience.

Model Checking Given a: The model checking problem: Finite transition system M(S, I, R, L) A temporal property p The model checking problem: Does M satisfy p?

Model Checking Temporal properties: “Always x=y” (G(x=y)) “Every Send is followed immediately by Ack” (G(Send  X Ack)) “Reset can always be reached” (GF Reset) “From some point on, always switch_on” (FG switch_on) “Safety” properties “Liveness” properties

Model Checking (safety) Add reachable states until reaching a fixed-point = bad state

Model Checking (safety) Too many states to handle ! = bad state

Abstraction h S S’ Abstraction Function h : S ! S’

Abstraction Function Partition variables into visible(V) and invisible(I) variables. The abstract model consists of V variables. I variables are made inputs. The abstraction function maps each state to its projection over V.

Abstraction Function x1 x2 x3 x4 0 0 0 0 x1 x2 0 0 0 1 0 0 1 0 h 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 x1 x2 h 0 0 Group concrete states with identical visible part to a single abstract state.

Existential Abstraction

Model Checking Abstract Model Preservation Theorem Converse does not hold The counterexample may be spurious

Checking the Counterexample Counterexample : (c1, …,cm) Each ci is an assignment to V. Simulate the counterexample on the concrete model.

Checking the Counterexample Concrete traces corresponding to the counterexample: (Initial State) (Unrolled Transition Relation) (Restriction of V to Counterexample)

Abstraction-Refinement Loop Model Check M, p, h M’, p Pass No Bug Fail h’ Refine Check Counterexample Spurious Real Bug

Refinement methods… Localization (R. Kurshan, 80’s) Frontier P Visible Inputs Invisible Visible

Intel’s refinement heuristic Refinement methods… Intel’s refinement heuristic (Glusman et al., 2002) Generate all counterexamples. Prioritize variables according to their consistency in the counterexamples. X1 x2 x3 x4

Refinement methods… Abstraction/refinement with conflict analysis (Chauhan, Clarke, Kukula, Sapra, Veith, Wang, FMCAD 2002) Simulate counterexample on concrete model with SAT If the instance is unsatisfiable, analyze conflict Make visible one of the variables in the clauses that lead to the conflict

Why spurious counterexample? Deadend states I Bad States I Failure State f

Refinement Problem: Deadend and Bad States are in the same abstract state. Solution: Refine abstraction function. The sets of Deadend and Bad states should be separated into different abstract states.

Refinement h’ h’ h’ h’ h’ h’ h’ Refinement : h’

Refinement Deadend States

Refinement Deadend States Bad States

Refinement as Separation d1 0 1 0 0 1 0 1 1 I b1 0 0 1 0 0 1 0 V b2 0 1 1 1 0 1 0 Refinement : Find subset U of I that separates between all pairs of deadend and bad states. Make them visible. Keep U small !

Refinement as Separation d1 0 1 0 1 0 1 0 1 I b1 0 0 1 0 0 1 0 V b2 0 1 1 1 0 1 0 Refinement : Find subset U of I that separates between all pairs of deadend and bad states. Make them visible. Keep U small !

Refinement as Separation The state separation problem Input: Sets D, B Output: Minimal U  I s.t.:  d D,  b B, u U. d(u)  b(u) The refinement h’ is obtained by adding U to V.

Two separation methods ILP-based separation Minimal separating set. Computationally expensive. Decision Tree Learning based separation. Not optimal. Polynomial.

Separation with Decision Tree learning (Example) Classification: D B v1 v4 v2 1 {d1,b2} {d2,b1} DB Separating Set : {v1,v2,v4} B D 1 b1 d2 d1 b2

Separation with 0-1 ILP (Example)

Separation with 0-1 ILP One constraint per pair of states. vi = 1 iff vi is in the separating set.

Refinement as Learning For systems of realistic size Not possible to generate D and B. Expensive to separate D and B. Solution: Sample D and B Infer separating variables from the samples. The method is still complete: counterexample will eventually be eliminated.

Efficient Sampling d b D B Let (D,B) be the smallest separating set of D and B. Q: Can we find it without deriving D and B ? A: Search for smallest d,b such that (d,b) = (D,B)

Efficient Sampling Direct search towards samples that contain more information. How? Find samples not separated by the current separating set (Sep).

Efficient Sampling Recall: Samples that agree on the sep variables: D characterizes the deadend states B characterizes the bad states D B is unsatisfiable Samples that agree on the sep variables: Rename all vi B to vi’

Efficient Sampling Sep = {} Run SAT solver unsat STOP d,b = {} on W(Sep) Sep = {} d,b = {} STOP unsat sat Add samples to d and b Compute Sep:= (d,b) Sep is the minimal separating set of D and B

The Tool Sep MC LpSolve NuSMV Cadence SMV Dec Tree SAT Chaff

Results Property 1

Results Property 2 Efficient Sampling together with Decision Tree Learning performs best. Machine Learning techniques are useful in computing good refinements.