Going with the Flow Parameterized Verification using Message Flows Murali Talupur & Mark Tuttle SCL, Intel Corporation.

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.
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Quantified Invariant Generation using an Interpolating Saturation Prover Ken McMillan Cadence Research Labs TexPoint fonts used in EMF: A A A A A.
Tintu David Joy. Agenda Motivation Better Verification Through Symmetry-basic idea Structural Symmetry and Multiprocessor Systems Mur ϕ verification system.
Translation-Based Compositional Reasoning for Software Systems Fei Xie and James C. Browne Robert P. Kurshan Cadence Design Systems.
1 Model checking. 2 And now... the system How do we model a reactive system with an automaton ? It is convenient to model systems with Transition systems.
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.
Timed Automata.
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.
Compositional reasoning for Parameterized Verification Murali Talupur Joint work with Sava Krstic, John O’leary, Mark Tuttle.
Interpolants from Z3 proofs Ken McMillan Microsoft Research TexPoint fonts used in EMF: A A A A A.
A survey of techniques for precise program slicing Komondoor V. Raghavan Indian Institute of Science, Bangalore.
ECE 720T5 Fall 2012 Cyber-Physical Systems Rodolfo Pellizzoni.
David Brumley, Pongsin Poosankam, Dawn Song and Jiang Zheng Presented by Nimrod Partush.
Feature requests for Case Manager By Spar Nord Bank A/S IBM Insight 2014 Spar Nord Bank A/S1.
Ashish Kundu CS590F Purdue 02/12/07 Language-Based Information Flow Security Andrei Sabelfield, Andrew C. Myers Presentation: Ashish Kundu
Using Statically Computed Invariants Inside the Predicate Abstraction and Refinement Loop Himanshu Jain Franjo Ivančić Aarti Gupta Ilya Shlyakhter Chao.
Yongjian Li The State Key Laboratory of Computer Science Chinese Academy of Sciences William N. N. HungSynopsys Inc. Xiaoyu SongPortland State University.
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.
CS 290C: Formal Models for Web Software Lecture 10: Language Based Modeling and Analysis of Navigation Errors Instructor: Tevfik Bultan.
CPSC 668Set 16: Distributed Shared Memory1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
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.
1 Static vs dynamic SAGAs Ivan Lanese Computer Science Department University of Bologna/INRIA Italy.
Tirgul 6 B-Trees – Another kind of balanced trees Problem set 1 - some solutions.
Computing Over­Approximations with Bounded Model Checking Daniel Kroening ETH Zürich.
School of Computer ScienceG53FSP Formal Specification1 Dr. Rong Qu Introduction to Formal Specification
Counterexample Guided Invariant Discovery for Parameterized Cache Coherence Verification Sudhindra Pandav Konrad Slind Ganesh Gopalakrishnan.
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.
Formal verification Marco A. Peña Universitat Politècnica de Catalunya.
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.
ECE 720T5 Winter 2014 Cyber-Physical Systems Rodolfo Pellizzoni.
A Simple Method for Extracting Models from Protocol Code David Lie, Andy Chou, Dawson Engler and David Dill Computer Systems Laboratory Stanford University.
The Architecture of Secure Systems Jim Alves-Foss Laboratory for Applied Logic Department of Computer Science University of Idaho By, Nagaashwini Katta.
1 Automatic Non-interference Lemmas for Parameterized Model Checking Jesse Bingham, Intel DEG FMCAD 2008.
The supercompiler SCP 4 verification. Alexei P. Lisitsa The University of Liverpool. Andrei P. Nemytykh Program System Institute, Russian Academy of Sciences.
Proof-Carrying Code & Proof-Carrying Authentication Stuart Pickard CSCI 297 June 2, 2005.
On Reducing the Global State Graph for Verification of Distributed Computations Vijay K. Garg, Arindam Chakraborty Parallel and Distributed Systems Laboratory.
A Locally Nameless Theory of Objects 1.Introduction:  -calculus and De Bruijn notation 2.locally nameless technique 3.formalization in Isabelle and proofs.
Checking Reachability using Matching Logic Grigore Rosu and Andrei Stefanescu University of Illinois, USA.
High Integrity Ada in a UML and C world Peter Amey, Neil White Presented by Liping Cai.
Formal verification of skiplist algorithms Student: Trinh Cong Quy Supervisor: Bengt Jonsson Reviewer: Parosh Abdulla.
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.
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
Motivation  Parallel programming is difficult  Culprit: Non-determinism Interleaving of parallel threads But required to harness parallelism  Sequential.
Automated Synthesis of Protocols from Flows Murali Talupur FormalSim Sept Joint with: Sandip Ray, John Erickson Intel.
CSCI1600: Embedded and Real Time Software Lecture 11: Modeling IV: Concurrency Steven Reiss, Fall 2015.
Reasoning about the Behavior of Semantic Web Services with Concurrent Transaction Logic Presented By Dumitru Roman, Michael Kifer University of Innsbruk,
Shinya Umeno Nancy Lynch’s Group CSAIL, MIT TDS seminar September 18 th, 2009 Machine-Assisted Parameter Synthesis of the Biphase Mark Protocol Using Event.
Chapter 8 Asynchronous System Model by Mikhail Nesterenko “Distributed Algorithms” by Nancy A. Lynch.
Properties as Processes : FORTE slide Properties as Processes: their Specification and Verification Joel Kelso and George Milne School of Computer.
/ PSWLAB Thread Modular Model Checking by Cormac Flanagan and Shaz Qadeer (published in Spin’03) Hong,Shin Thread Modular Model.
September 1999Compaq Computer CorporationSlide 1 of 16 Verification of cache-coherence protocols with TLA+ Homayoon Akhiani, Damien Doligez, Paul Harter,
CS5270 Lecture 41 Timed Automata I CS 5270 Lecture 4.
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
Koushik Sen Abhay Vardhan Gul Agha Grigore Rosu
CSCI1600: Embedded and Real Time Software
Presentation transcript:

Going with the Flow Parameterized Verification using Message Flows Murali Talupur & Mark Tuttle SCL, Intel Corporation

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 or high degree of parallelism

Our Approach Consists of two key elements CMP Method: A general framework for reasoning about systems with replication We simplified and generalized the method Flow based Invariants: A new method for discovering invariants of concurrent systems Implicit partial orders on system events yield valuable invariants

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 [CTC] and further formalized by Krstic CMP: Pros and Cons –Scales to large protocols This was one of the first techniques to handle Flash protocol Within Intel handled a cache protocol several orders of magnitude bigger than even Flash –User has to supply “lemmas”/invariants Supplying lemmas is easier than supplying full blown 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

ruleset src : [1..N] do rule “Local_Get" UniMsg[src].Cmd = Get & !Dir.Pending ==> begin Dir.Dirty := false; UniMsg[src].Cmd := Put; endrule; endruleset; ruleset src : [1,2] do rule “Local_Get" UniMsg[src].Cmd = Get & !Dir.Pending ==> begin Dir.Dirty := false; UniMsg[src].Cmd := Put; endrule; endruleset; rule "ABSLocal_Get" true & !Dir.Pending ==> begin Dir.Dirty := false; NOP endrule; Rules are in guarded command form: r:  ! a

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 refine “Other”

Refinement User provides relevant lemmas Proceeds in two steps: (i)Strengthening of P(N) with the lemmas (ii)Abstracting the strengthened system

Strengthening invariant "Lemma" forall src : NODE do forall dst : NODE do dst != src -> (UniMsg[src].Cmd = Get -> !( Proc[dst].State = Excl)) ruleset src : NODE do rule “Local_Get" UniMsg[src].Cmd = Get & !Dir.Pending ==> begin Dir.Dirty := false; UniMsg[src].Cmd := Put; endrule; endruleset; ruleset src : NODE do rule "Local_Get" UniMsg[src].Cmd = Get & !Dir.Pending & forall dst: NODE do src != dst -> !(Proc[dst].State = Excl) end ==> begin Dir.Dirty := false; UniMsg[src].Cmd := Put; endrule; endruleset;

Refinement ruleset src : NODE do rule "Local_Get" UniMsg[src].Cmd = Get & !Dir.Pending & forall dst: [1..N] do src != dst -> !(Proc[dst].State = Excl) end ==> begin Dir.Dirty := false; UniMsg[src].Cmd := Put; endrule; endruleset; rule "ABSLocal_Get" true & !Dir.Pending & forall dst: [1,2]. -> !(Proc[dst].State = Excl) end ==> begin Dir.Dirty := false; NOP endrule; Abstracting strengthened system leads to a refined abstract model

CMP Method P(N) P s (N) PAPA Strengthen with 8 i,j.  (i,j) Abstraction ²  DTR is conservative Apparent Circular Reasoning P(N) ² 8 i,j.  (i,j) Conjunction of property to be proved and lemmas Paper has the proof details!

Flow based Invariants Rich partial orders on system events are implicit in the concurrent protocols –We call these Message Flows or simply Flows And these can yield powerful invariants

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

Constraints from Flows Dir ij SendReqS SendGntS RecvReqS RecvGntS ReqShare(i) SendReqS(i),RecvReqS(i),SendGntS(i),RecvGntS(i) Precedence between rules: For instance, for process i, action RecvReqS(i) must happen before SendGntS(i)

Tracking Flows A set Aux(i) of auxiliary variables to track 1) all the flows that a process i is involved in 2) for each such flow the last rule that was fired Each aux 2 Aux(i) is initially ( no_flow, no_rule ) If process i fires rules r n in a flow f: r 1,….r n-1, r n,…..r m update aux = (f,r n-1 ) to (f,r n ) If r n is the last rule reset the aux variable

Constraints from Flows Dir ij SendReqS SendGntS RecvReqS RecvGntS Precondition for process i firing r n in flow f: C(r n,f): 9 aux 2 Aux(i). aux = (f, r n-1 )

ijDir SendReqS RecvReqS SendInv SendGntS SendInvAck RecvGntS RecvInvAck SendInval(j) SendInv(j),SendInvAck(j), RecvInvAck(j) ReqShare(i) SendReqS(i),RecvReqS(i),SendInval(j),SendGntS(i),RecvGntS(i) Precedence between subflows and rules SendInval(j) must have finished before SendGntS(i) can happen (for process i) Constraints from Flows

Lemmas from Flows Let r:  ! a appear in flows f 1,..,f n Find precedence constraints C 1 (r,f 1 ),..,C n (r,f n ) Let pre(r) = C 1 (r,f 1 ) Ç.. Ç C n (r,f n ) Lemma:  ) pre(r)

Deriving Lemmas from Flows We can easily convert message flows into invariants –Our experiments indicate the resulting invariants are very powerful Advantages: –Message flows are readily available in design documents –Easy to understand Flows are local and linear No low level details of the protocol –Valuable validation collateral A German Flow ReqShare: SendReqS,RecvReqS,SendInval,SendGntS,RecvGntS invariant "Lemma_1" forall i : NODE do Chan3[i].Cmd = InvAck & CurCmd != Empty & ExGntd = true -> Chan3[i].Data = AuxData & forall j : NODE do j != i -> Cache[j].State != E & Chan2[j].Cmd != GntE & Chan3[j].Cmd != InvAck

Modified CMP Flow Design Doc Add aux and Flow lemmas Flows P(N) P a (N) Abstract Strengthen Model Check Invent Lemma PAPA Done or Real Cex spurious cex P # (N)

Experimental Results We applied our method to two standard examples –German and Flash –Verified both control and data property –Compared against CTC German –3 flows and 2 lemmas added manually –Lemmas slightly simpler than ones in CTC Flash –6 flows and 2 lemmas in contrast to > 5 lemmas in CTC one trivial and one from CTC paper –Lemma complexity reduced by 75% –One auxiliary variable in contrast to 4 in CTC paper Different from flow auxiliary variables This helps our running times as well: couple of minutes compared to couple of hours in the CTC work

Conclusion/ Future Work A powerful new method for parameterized verification based on (i)the CMP method and (ii)invariants from Flows CMP Method: (i) We have simplified and generalized the CMP method (ii) Allows more abstractions than simple data type reduction Thus, more widely applicable Flows: A new way to derive invariants for concurrent systems Look for implicit partial orders on system events!

Conclusion/Future Work More can be done with flows: Online monitoring to see all traces conform to flows Extend flows to other distributed systems Flows for shared memory systems using other types of system events… Learn flows automatically…

ijDir ReqS RecvReqS SendInv GntS SendInvAck RecvGntS RecvInvAck Precedence between subflows and rules All instances of SendInval(j) must have finished before SendGntS(i) can happen (for process i) Precondition for proc i firing rl n occuring after sfl(k,l) in flow fl C 2 (rl n,fl): 8 i. 8 aux 2 Aux(i). aux  (sfl,_) Constraints from Flows

CMP method The hardest part is coming up with lemmas –User has to supply “lemmas” Supplying lemmas is easier than supplying inductive invariants –We just have to constrain the Other process –Lemmas don’t have to be inductive This is what makes the method tick

Our Approach Consists of two key elements CMP Method: A general framework for reasoning about systems with replication Flow based Invariants: A new method for discovering invariants for concurrent systems These are applicable to concurrent systems in general

Refinement with 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