Model Checking Linearizability via Refinement 1 ICFEM 2008 Model Checking Linearizability via Refinement Yang LIU, Wei CHEN, Yanhong A. LIU, and Jun SUN.

Slides:



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

Copyright 2000 Cadence Design Systems. Permission is granted to reproduce without modification. Introduction An overview of formal methods for hardware.
Automatic Verification Book: Chapter 6. How can we check the model? The model is a graph. The specification should refer the the graph representation.
Tintu David Joy. Agenda Motivation Better Verification Through Symmetry-basic idea Structural Symmetry and Multiprocessor Systems Mur ϕ verification system.
Shape Analysis for Fine-Grained Concurrency using Thread Quantification Josh Berdine Microsoft Research Joint work with: Tal Lev-Ami, Roman Manevich, Mooly.
Hongjin Liang and Xinyu Feng
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:
An Introduction to the Model Verifier verds Wenhui Zhang September 15 th, 2010.
Distributed Markov Chains P S Thiagarajan School of Computing, National University of Singapore Joint work with Madhavan Mukund, Sumit K Jha and Ratul.
Heap Decomposition for Concurrent Shape Analysis R. Manevich T. Lev-Ami M. Sagiv Tel Aviv University G. Ramalingam MSR India J. Berdine MSR Cambridge Dagstuhl.
Model Checking : Making Automatic Formal Verification Scale Shaz Qadeer EECS Department University of California at Berkeley.
SpecDiff: Differencing LTSs Zhenchang Xing *, Jun Sun +, Yang Liu * and Jin Song Dong * * National University of Singapore + Singapore University of Technology.
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
Process Analysis Toolkit PAT is A SPIN-like self-contained environment for system specification, visualized simulation and automated verification. PAT.
Automated creation of verification models for C-programs Yury Yusupov Saint-Petersburg State Polytechnic University The Second Spring Young Researchers.
An Automata-based Approach to Testing Properties in Event Traces H. Hallal, S. Boroday, A. Ulrich, A. Petrenko Sophia Antipolis, France, May 2003.
A Mile-High View of Concurrent Algorithms Hagit Attiya Technion.
Model checking dynamic states in GROOVE Arend Rensink Formal Methods and Tools University of Twente.
Formalisms and Verification for Transactional Memories Vasu Singh EPFL Switzerland.
Verification of Hierarchical Cache Coherence Protocols for Future Processors Student: Xiaofang Chen Advisor: Ganesh Gopalakrishnan.
Deriving Linearizable Fine-Grained Concurrent Objects Martin Vechev Eran Yahav IBM T. J. Watson Research Center Martin Vechev Eran Yahav IBM T. J. Watson.
Transaction Ordering Verification using Trace Inclusion Refinement Mike Jones 11 January 2000.
Models of Computation for Embedded System Design Alvise Bonivento.
CprE 458/558: Real-Time Systems
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
Comparison Under Abstraction for Verifying Linearizability Daphna Amit Noam Rinetzky Mooly Sagiv Tom RepsEran Yahav Tel Aviv UniversityUniversity of Wisconsin.
Formal verification Marco A. Peña Universitat Politècnica de Catalunya.
Formal Techniques for Verification Using SystemC By Nasir Mahmood.
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
Yang LIU Senior Research Scientist National University of Singapore (joint work with Jun SUN and Jin Song DONG and PAT research team)
Regular Model Checking Ahmed Bouajjani,Benget Jonsson, Marcus Nillson and Tayssir Touili Moran Ben Tulila
Compositional Verification of Termination-Preserving Refinement of Concurrent Programs Hongjin Liang Univ. of Science and Technology of China (USTC) Joint.
Using Mathematica for modeling, simulation and property checking of hardware systems Ghiath AL SAMMANE VDS group : Verification & Modeling of Digital systems.
Thread Quantification for Concurrent Shape Analysis Josh BerdineMSR Cambridge Tal Lev-AmiTel Aviv University Roman ManevichTel Aviv University Mooly Sagiv.
Parallel Programming Philippas Tsigas Chalmers University of Technology Computer Science and Engineering Department © Philippas Tsigas.
Simple Wait-Free Snapshots for Real-Time Systems with Sporadic Tasks Håkan Sundell Philippas Tsigas.
Model-based Methods for Web Service Verification.
Runtime Refinement Checking of Concurrent Data Structures (the VYRD project) Serdar Tasiran Koç University, Istanbul, Turkey Shaz Qadeer Microsoft Research,
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
Introduction to Formal Methods Based on Jeannette M. Wing. A Specifier's Introduction to Formal Methods. IEEE Computer, 23(9):8-24, September,
B. Fernández, D. Darvas, E. Blanco Formal methods appliedto PLC code verification Automation seminar CERN – IFAC (CEA) 02/06/2014.
Shape Analysis Overview presented by Greta Yorsh.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 3 (26/01/2006) Instructor: Haifeng YU.
Yang Liu, Jun Sun and Jin Song Dong School of Computing National University of Singapore.
Specifying and Verifying Event-based Fairness Enhanced Systems 1 ICFEM 2008 Specifying and Verifying Event-based Fairness Enhanced Systems Jun SUN, Yang.
Characterizing Progress Properties of Concurrent Objects via Contextual Refinements Hongjin Liang Univ. of Science and Technology of China (USTC) Joint.
Håkan Sundell, Chalmers University of Technology 1 Simple and Fast Wait-Free Snapshots for Real-Time Systems Håkan Sundell Philippas.
A Consistency Framework for Iteration Operations in Concurrent Data Structures Yiannis Nikolakopoulos A. Gidenstam M. Papatriantafilou P. Tsigas Distributed.
Model construction and verification for dynamic programming languages Radu Iosif
Page 1 Advanced Technology Center HCSS 03 – April 2003 vFaat: von Neumann Formal Analysis and Annotation Tool David Greve Dr. Matthew Wilding Rockwell.
Symbolic Execution with Abstract Subsumption Checking Saswat Anand College of Computing, Georgia Institute of Technology Corina Păsăreanu QSS, NASA Ames.
Wait-Free Multi-Word Compare- And-Swap using Greedy Helping and Grabbing Håkan Sundell PDPTA 2009.
Verification & Validation By: Amir Masoud Gharehbaghi
Constraints Assisted Modeling and Validation Presented in CS294-5 (Spring 2007) Thomas Huining Feng Based on: [1]Constraints Assisted Modeling and Validation.
Compositionality Entails Sequentializability Pranav Garg, P. Madhusudan University of Illinois at Urbana-Champaign.
Parallel and Distributed Systems Laboratory Paradise: A Toolkit for Building Reliable Concurrent Systems Trace Verification for Parallel Systems Vijay.
Properties as Processes : FORTE slide Properties as Processes: their Specification and Verification Joel Kelso and George Milne School of Computer.
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
Alpine Verification Meeting 2008 Model Checking Transactional Memories Vasu Singh (Joint work with Rachid Guerraoui, Tom Henzinger, Barbara Jobstmann)
Software Systems Verification and Validation Laboratory Assignment 4 Model checking Assignment date: Lab 4 Delivery date: Lab 4, 5.
Automated Formal Verification of PLC (Programmable Logic Controller) Programs
Jun Sun, Yang Liu, Jin Song Dong and Xian Zhang School of Computing National University of Singapore.
1 1 Nastaran Shafiei VERIFICATION OF A NON-BLOCKING ARRAY-BASED QUEUE ALGORITHM.
Symbolic Model Checking of Software Nishant Sinha with Edmund Clarke, Flavio Lerda, Michael Theobald Carnegie Mellon University.
Introduction to Formal Methods
Formal methods: Lecture
Hongjin Liang, Xinyu Feng & Ming Fu
Logical architecture refinement
Presentation transcript:

Model Checking Linearizability via Refinement 1 ICFEM 2008 Model Checking Linearizability via Refinement Yang LIU, Wei CHEN, Yanhong A. LIU, and Jun SUN

PAT: Process Analysis Toolkit PAT is a self-contained environment for system specification, visualized simulation and automated verification. 2

Model Checking Linearizability via Refinement Summary about PAT Main Features –MC fairness enhanced systems (vs Spin) Process Counter Abstraction –Refinement checking (vs FDR) –MC Real-time systems (vs Uppaal) Applications –MC Self-stablizing population protocol model –Verification of linearizability (this talk) –Web service conformance checking June 2007 to Nov 2009 –C#, 1 million LOC –Visual Studio like GUI –500+ downloads, 100+ organization, 29 countries/regions –3 Modules: CSP, RTS and WS –50+ build-in examples 3

Model Checking Linearizability via Refinement On-going and future Works New modules –UML, security, sensor network and privacy?? Symbolic representation techniques, e.g. BDD Reduction and abstraction techniques Probabilistic model checking techniques

Model Checking Linearizability via Refinement 5 FM 2009 Outline Motivations and Overview Background –Shared Memory Model –Linearizability Definitions Linearizability as Refinement Relations Verification of Linearizability Experiments Related Work Conclusion and Future Work

Model Checking Linearizability via Refinement 6 FM 2009 Motivations Concurrent objects (shared queue, stacks) are hard to design correctly –Exclusive access (correctness) vs. Maximum interleaving (performance) –Esp. lock-free & wait-free ones Linearizability [HW90] is an accepted correctness criterion for shared objects. –A shared object is linearizable if each operation on the object can be understood as occurring instantaneously at some point, (a.k.a. linearization point) Automatic verification of linearizability is challenging –Rely on the knowledge of linearization points –Linearization points are hard to be statically determined

Model Checking Linearizability via Refinement Overview of Our Approach Define linearizability based on refinement relations –An event-based modeling language –Semantics based on LTS Verify linearizability using refinement checking algorithms –Create linearizable specifications –Refinement between abstract specification and concrete implementation models Tool: Process Analysis Toolkit (PAT) –A toolkit for automatically analyzing event-based concurrent systems including refinement checking –Substantial Experiments: Stack, Queue, K-valued Register Mailbox[DISC’08], SNZI[PODC’07]. FM

Model Checking Linearizability via Refinement 8 FM 2009 Outline Motivations and Overview Background –Shared Memory Model –Linearizability Definitions Linearizability as Refinement Relations Verification of Linearizability Experiments Related Work Conclusion and Future Work

Model Checking Linearizability via Refinement Shared Memory Model A shared memory model M, –O = (o 1,…,o k ) denotes the set of k shared objects, –P = (p 1,…,p n ) denotes the set of n processes accessing the objects. –O support a set of operations: pairs of invocations and matching responses. The behaviour of M –the set of all possible sequences (trace) of invocations and responses together with the initial states of the objects. FM p0: W inv (x,1) W res (x) R inv (y) R res (y,2) p1: W inv (y,2) W res (y) R inv (x) R res (x,1)

Model Checking Linearizability via Refinement Linearizability σ is linearizable if there exists a sequential permutation π of σ such that –1) for each object o i, π| oi is a legal sequential history (i.e. π respects the sequential specification of the objects), and –2) if op1 < σ op2, then op1 < π op2 (i.e., π respects the run-time ordering of operations). Examples FM p0: W inv (x,1) W res (x) R inv (y) R res (y,2) p1: W inv (y,2) W res (y) R inv (x) R res (x,1) p0: W inv (x,1) W res (x) R inv (y) R res (y,2) p1: W inv (y,2) W res (y) R inv (x) R res (x,1) p0: W inv (x,1) W res (x) R inv (y) R res (y,0) p1: W inv (y,2) W res (y) R inv (x) R res (x,1)

Model Checking Linearizability via Refinement Stack Example High-level Linearizability vs. Low-Level Linearizability

Model Checking Linearizability via Refinement 12 FM 2009 Outline Motivations and Overview Background –Shared Memory Model –Linearizability Definitions Linearizability as Refinement Relations Verification of Linearizability Experiments Related Work Conclusion and Future Work

Model Checking Linearizability via Refinement Create Specification Model Event-base formalism (e.g. CSP) Specify each operation op of a shared object o on a process p i using three atomic steps: –the invocation action inv(op) i, –the linearization action lin(op) i, and (Invisible event) –the response action res(op, resp) i. Is linearizable! FM

Model Checking Linearizability via Refinement Create Implementation Consider the implementment of object o. –The visible events of impl are also those inv(op) i 's and res(op, resp) i 's. Is linearizable? FM

Model Checking Linearizability via Refinement Linearizability as Refinement FM

Model Checking Linearizability via Refinement On-the-fly verification algorithm (DFS) Optimizations: –Partial Order Reduction ||| is the main source of state space explosion Explore only a subset of enabled transitions and yet preserve soundness. –Symmetry Reduction Ignore the orders of similar processes E.g. reader ||| writer1 ||| writer2 == reader ||| writer2 ||| writer1 –Process Counter Abstraction Refinement Checking Algorithm 16

Model Checking Linearizability via Refinement Experiments TASE

Model Checking Linearizability via Refinement Related Works Manual proving –Herlihy and Wing ACM Transaction 90 –Vafeiadis et. al. use rely-guarantee PPoPP’06 Using theorem provers –Doherty et. al. use simulation between I/O automata modeling the specification and implementation. FORTE'04 Static analysis –Wang and Stoller present a static analysis that verifies linearizability for an unbounded number of threads. PPoPP’05 Model checking –Amit et al. presented a shape difference abstraction that tracks the difference between two heaps. CAV’07 –Manevich et al. SAS’08 and Berdine et al. CAV’08 extended it to handle larger number and unbounded number of threads, respectively. –Vafeiadis further improved this solution to allow linearization points in different threads. VMCAI’09 –Vechev and Yahav use trace analysis. PLDI'08 FM

Model Checking Linearizability via Refinement 19 FM 2009 Conclusion Specify and verify linearizability using refinement relation Show that refinement checking algorithm behind PAT allows verifying concurrent algorithms –without the knowledge of linearization points –fully automatically –effective reduction technique Formally verify Mailbox and SNZI algorithms for the first time

Model Checking Linearizability via Refinement 20 FM 2009 On-going and future works Deal with infamous state explosion problem Combine different state space reduction techniques and parameterized refinement checking for infinite number of processes

Model Checking Linearizability via Refinement 21 ICFEM 2008 Thank You

Model Checking Linearizability via Refinement Modeling Language Shared Variables and Arrays Synchronization primitives in nonblocking algorithms –compare and swap (CAS) and –load linked (LL)/store-conditional (SC). FM

Model Checking Linearizability via Refinement Semantics System State : a pair (P,V) –P is the current process expression, and –V is the current valuation of the shared variables represented as a mapping from names to values. FM

Model Checking Linearizability via Refinement Refinement L im = (S im, init im,T im ) be a LTS for an implementation. L sp = (S sp, init sp,T sp ) be a LTS for a specification. L im refines L sp, iff traces(L im ) ⊆ traces(L sp ). FM

Model Checking Linearizability via Refinement Back up Support Synchronization Primitives –Compare and Swap –Load-linked/ Store-Conditional