Compositional reasoning for Parameterized Verification Murali Talupur Joint work with Sava Krstic, John O’leary, Mark Tuttle.

Slides:



Advertisements
Similar presentations
Functional Decompositions for Hardware Verification With a few speculations on formal methods for embedded systems Ken McMillan.
Advertisements

Quantified Invariant Generation using an Interpolating Saturation Prover Ken McMillan Cadence Research Labs TexPoint fonts used in EMF: A A A A A.
Copyright 2000 Cadence Design Systems. Permission is granted to reproduce without modification. Introduction An overview of formal methods for hardware.
1 Verification of Infinite State Systems by Compositional Model Checking Ken McMillan Cadence Berkeley Labs.
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Translation-Based Compositional Reasoning for Software Systems Fei Xie and James C. Browne Robert P. Kurshan Cadence Design Systems.
Promising Directions in Hardware Design Verification Shaz Qadeer Serdar Tasiran Compaq Systems Research Center.
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Hierarchical Cache Coherence Protocol Verification One Level at a Time through Assume Guarantee Xiaofang Chen, Yu Yang, Michael Delisi, Ganesh Gopalakrishnan.
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
Timed Automata.
© Anvesh Komuravelli Quantified Invariants in Rich Domains using Model Checking and Abstract Interpretation Anvesh Komuravelli, CMU Joint work with Ken.
Transaction Based Modeling and Verification of Hardware Protocols Xiaofang Chen, Steven M. German and Ganesh Gopalakrishnan Supported in part by SRC Contract.
Transaction Based Modeling and Verification of Hardware Protocols Xiaofang Chen, Steven M. German and Ganesh Gopalakrishnan Supported in part by Intel.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 13.
A survey of techniques for precise program slicing Komondoor V. Raghavan Indian Institute of Science, Bangalore.
Slide 0 FMCAD 2004 How To Specify and Verify Cache Coherence Protocols: An Elementary Tutorial Ching-Tsun Chou Microprocessor Technology Lab Corporate.
1 A Compositional Approach to Verifying Hierarchical Cache Coherence Protocols Xiaofang Chen 1 Yu Yang 1 Ganesh Gopalakrishnan 1 Ching-Tsun Chou 2 1 University.
Thread-modular Abstraction Refinement Tom Henzinger Ranjit Jhala Rupak Majumdar [UC Berkeley] Shaz Qadeer [Microsoft Research]
Verification of Hierarchical Cache Coherence Protocols for Future Processors Student: Xiaofang Chen Advisor: Ganesh Gopalakrishnan.
Transaction Ordering Verification using Trace Inclusion Refinement Mike Jones 11 January 2000.
Microarchitecture Verification by Compositional Model Checking Ken McMillan Ranjit Jhala Cadence Berkeley Labs / UC Berkeley.
Software Reliability Methods Sorin Lerner. Software reliability methods: issues What are the issues?
Finite State Verification for Software Systems Lori A. Clarke University of Massachusetts Laboratory for Advanced Software Engineering Research
Transaction Ordering Verification using Trace Inclusion Refinement Mike Jones 11 January 2000.
Computing Over­Approximations with Bounded Model Checking Daniel Kroening ETH Zürich.
Word Level Predicate Abstraction and Refinement for Verifying RTL Verilog Himanshu Jain Daniel Kroening Natasha Sharygina Edmund Clarke Carnegie Mellon.
Counterexample Guided Invariant Discovery for Parameterized Cache Coherence Verification Sudhindra Pandav Konrad Slind Ganesh Gopalakrishnan.
End-to-End Design of Embedded Real-Time Systems Kang G. Shin Real-Time Computing Laboratory EECS Department The University of Michigan Ann Arbor, MI
Invisible Invariants: Underapproximating to Overapproximate Ken McMillan Cadence Research Labs TexPoint fonts used in EMF: A A A A A.
1 Reducing Verification Complexity of a Multicore Coherence Protocol Using Assume/Guarantee Xiaofang Chen 1, Yu Yang 1, Ganesh Gopalakrishnan 1, Ching-Tsun.
Transaction Based Modeling and Verification of Hardware Protocols Xiaofang Chen, Steven M. German and Ganesh Gopalakrishnan Supported in part by SRC Contract.
Slide 0 FMCAD 2004 A Simple Method for Parameterized Verification of Cache Coherence Protocols Ching-Tsun Chou Phanindra K. Mannava Seungjoon Park Microprocessor.
Principle of Functional Verification Chapter 1~3 Presenter : Fu-Ching Yang.
Thread-modular Abstraction Refinement Thomas A. Henzinger, et al. CAV 2003 Seonggun Kim KAIST CS750b.
Constraint-based Invariant Inference. Invariants Dictionary Meaning: A function, quantity, or property which remains unchanged Property (in our context):
A Simple Method for Extracting Models from Protocol Code David Lie, Andy Chou, Dawson Engler and David Dill Computer Systems Laboratory Stanford University.
© Andrew IrelandDependable Systems Group Proof Automation for the SPARK Approach to High Integrity Ada Andrew Ireland Computing & Electrical Engineering.
1 Automatic Non-interference Lemmas for Parameterized Model Checking Jesse Bingham, Intel DEG FMCAD 2008.
Secure Systems Research Group - FAU Classifying security patterns E.B.Fernandez, H. Washizaki, N. Yoshioka, A. Kubo.
B. Fernández, D. Darvas, E. Blanco Formal methods appliedto PLC code verification Automation seminar CERN – IFAC (CEA) 02/06/2014.
Checking Reachability using Matching Logic Grigore Rosu and Andrei Stefanescu University of Illinois, USA.
Program analysis with dynamic change of precision. 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 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
1 Predicate Abstraction and Refinement for Verifying Hardware Designs Himanshu Jain Joint work with Daniel Kroening, Natasha Sharygina, Edmund M. Clarke.
© Andrew IrelandDependable Systems Group Proof Automation for the SPARK Approach to High Integrity Ada Andrew Ireland Computing & Electrical Engineering.
Cut-Based Inductive Invariant Computation Michael Case 1,2 Alan Mishchenko 1 Robert Brayton 1 Robert Brayton 1 1 UC Berkeley 2 IBM Systems and Technology.
Going with the Flow Parameterized Verification using Message Flows Murali Talupur & Mark Tuttle SCL, Intel Corporation.
Lecture 5 1 CSP tools for verification of Sec Prot Overview of the lecture The Casper interface Refinement checking and FDR Model checking Theorem proving.
11 Counter-Example Based Predicate Discovery in Predicate Abstraction Satyaki Das and David L. Dill Computer Systems Lab Stanford University
Predicate Abstraction. Abstract state space exploration Method: (1) start in the abstract initial state (2) use to compute reachable states (invariants)
Automated Synthesis of Protocols from Flows Murali Talupur FormalSim Sept Joint with: Sandip Ray, John Erickson Intel.
All-Path Reachability Logic Andrei Stefanescu 1, Stefan Ciobaca 2, Radu Mereuta 1,2, Brandon Moore 1, Traian Serbanuta 3, Grigore Rosu 1 1 University of.
Automated Formal Verification of PLC (Programmable Logic Controller) Programs
CS357 Lecture 13: Symbolic model checking without BDDs Alex Aiken David Dill 1.
September 1999Compaq Computer CorporationSlide 1 of 16 Verification of cache-coherence protocols with TLA+ Homayoon Akhiani, Damien Doligez, Paul Harter,
Compositional Verification for System-on-Chip Designs SRC Student Symposium Paper 16.5 Nishant Sinha Edmund Clarke Carnegie Mellon University.
Verifying Component Substitutability Nishant Sinha Sagar Chaki Edmund Clarke Natasha Sharygina Carnegie Mellon University.
1 Interactive Computer Theorem Proving CS294-9 September 7, 2006 Adam Chlipala UC Berkeley Lecture 3: Data structures and Induction.
Xiaofang Chen1 Yu Yang1 Ganesh Gopalakrishnan1 Ching-Tsun Chou2
Opeoluwa Matthews, Jesse Bingham, Daniel Sorin
Michael D. Jones, Ganesh Gopalakrishnan
Automating Induction for Solving Horn Clauses
Lifting Propositional Interpolants to the Word-Level
Outline Midterm results summary Distributed file systems – continued
Majority voting Mehrdad Mahdavi
CSCI1600: Embedded and Real Time Software
SAMANVITHA RAMAYANAM 18TH FEBRUARY 2010 CPE 691
Presentation transcript:

Compositional reasoning for Parameterized Verification Murali Talupur Joint work with Sava Krstic, John O’leary, Mark Tuttle

Protocol Verification Distributed protocols are crucial components of modern computer systems –Cache coherence protocols for example Designed parametrically –Full validation requires parametric reasoning Protocol verification involves two main issues –Tightly coded So standard predicate abstraction and COI reduction will not work –Unbounded parallelism

Existing Methods Index predicates WS1S Counter Abstraction Regular Model Checking Invisible Invariants Aggregated Trans CMP Increasing Manual Effort Theorem Proving Automatic methods don’t scale Manual methods require human guidance but scale

CMP method Compositional reasoning based method –Proposed by McMillan, elaborated by Chou et al and further simplified by Krstic CMP scales to large protocols –This was one of the first techniques to handle Flash protocol User has to supply “lemmas” –Supplying lemmas is easier than supplying inductive invariants Easier than pure theorem proving

CMP Method P(N) True or Real Cex Abstract Strengthen Model Check Invent Lemma PAPA spurious cex P # (N)

Data Type Reduction Other 21 N 21 N-13 Reduces unbounded range [1..N] to [1,2, o] –Throws away the state spaces of [3..N] –Any condition involving them is conservatively over-approximated P(N) PAPA

Example rule "ABS_NI_Local_Get_Put" true & !Sta.Dir.Pending ==> var NxtSta : STATE; begin NxtSta := Sta; NxtSta.Dir.Dirty := false; NOP endrule; ruleset src : [1,2] do rule "NI_Local_Get_Put" Sta.UniMsg[src].Cmd = UNI_Get & !Sta.Dir.Pending ==> Var NxtSta: State begin NxtSta := Sta; NxtSta.Dir.Dirty := false; NxtSta.UniMsg[src].Cmd := UNI_Put; endrule; endruleset; Rules are given in guarded command form: rl:  ! a ruleset src : NODE do rule "NI_Local_Get_Put" Sta.UniMsg[src].Cmd = UNI_Get & !Sta.Dir.Pending ==> Var NxtSta: State begin NxtSta := Sta; NxtSta.Dir.Dirty := false; NxtSta.UniMsg[src].Cmd := UNI_Put; endrule; endruleset;

Data Type Reduction Data type reduction is syntactic –Very fast – Abstract model has small state space Behavior of “Other” is not constrained at all –Need to add lemmas constraining the behaviors of “Other”

Refinement with Lemmas User provides relevant lemmas Parameterized system is strengthened with the lemmas –Data type reduction is applied as usual –The resulting abstract model is more refined than previously Behavior of Other restricted by the states of processes 1 and 2

Murphi Example invariant "Lemma" forall src : NODE do forall dst : NODE do dst != src -> (Sta.Proc[dst].CacheState = Cache_E -> Sta.UniMsg[src].Cmd != UNI_Get) end end; ruleset src : NODE do rule "NI_Local_Get_Put" Sta.UniMsg[src].Cmd = UNI_Get & !Sta.Dir.Pending & forall dst: NODE do src != dst -> !(Sta.Proc[dst].CacheState = Cache_E) end ==> var NxtSta : STATE; begin NxtSta := Sta; NxtSta.Dir.Dirty := false; NxtSta.UniMsg[src].Cmd := UNI_Put; endrule; endruleset; rule "ABS_NI_Local_Get_Put" true & !Sta.Dir.Pending & forall dst: [1,2]. !(Sta.Proc[dst].CacheState = Cache_E) end ==> var NxtSta : STATE; begin NxtSta := Sta; NxtSta.Dir.Dirty := false; NOP endrule;

CMP Method P(N) P s (N) PAPA Strengthening Abstraction ²  DTR is conservative Circular Reasoning P(N) ² 8 i,j.  (i,j)

Circular Reasoning Principle System P consists of guarded rules  ! a Let R i stand for all states reachable within i steps in P ( 8 s 2 R i s ²  ) ( 8 s 2 R i s ²  P s :  Æ  ! a P s ²  ) P ² 

Application McOP is the cache coherence protocol of an experimental system with more than 50 cores Vastly more complex than Flash –German has 7 msg types, Flash has 16, McOP has 55 The proof took one month –25 lemmas Final count does not include the several wrong/weak lemmas that were used –5 auxiliary variables

Improvements to CMP Automate as much as possible Reduce the burden on human user –Derive lemmas automatically –Instead of data type reduction use richer abstraction

Automating CMP Method P(N) True or Real Cex Abstract Strengthen Model Check Invent Lemma PAPA spurious cex P # (N)

Deriving Lemmas from Flows We can use message flows to derive powerful lemmas automatically

Dir ij ReqS GntS RecvReqS RecvGntS ijDir ReqS RecvReqS SendInv GntS SendInvAck RecvGntS RecvInvAck Process i intiates a Request Shared transaction: Case 1 Process i intiates a Request Shared transaction: Case 2 Flows: Examples

Deriving Lemmas from Flows We can use message flows to derive powerful lemmas automatically Advantages: –Message flows are readily available in design documents –Easy to understand Flows are local involving two agents unlike system wide invariants –Valuable validation collateral

Constraints from Flows Dir ij ReqS GntS RecvReqS RecvGntS ReqShare(i) SendReqS(i),RecvReqS(i),SendGntS(i),RecvGntS(i) Precedence between rules: For process i, action RecvReqS(i) must happen before SendGntS(i) Using lemmas from flows cut down the number of manual lemmas by 75%! Our FMCAD’08 paper has more details

Flows Cont. German Flows ReqShare(i): SendReqS(i),RecvReqS(i),SendInval(i),SendGntS(i),RecvGntS(i) ReqExcl(i): SendReqE(i),RecvReqE(i),SendInval(i),SendGntE(i),RecvGntE(i) SendInval(i): SendInv(i),SendInvAck(i),RecvInvAck(i) invariant "Lemma_1" forall i : NODE do Chan3[i].Cmd = InvAck & CurCmd != Empty & ExGntd = true -> Chan3[i].Data = AuxData & -- 5 forall j : NODE do j != i -> Cache[j].State != E & -- 1 Chan2[j].Cmd != GntE & -- 1 Chan3[j].Cmd != InvAck -- 2 end end; In contrast:

Using Richer Abstractions Other 21 N 21 N-13 P(N) PAPA O1O1 O2O2 OnOn Use lightweight environment abstraction to track processes [3..N] instead of completely throwing away their states

Conclusion CMP works very well in practice –The idea of complementing model checkers with user supplied lemmas works quite well –Perhaps the only method that really works CMP is not just for cache coherence verification –Applicable to other distrbuted algorithms/concurrent software as well