A Generic Process Calculus Approach to Relaxed-Memory Consistency

Similar documents
Multiprocessor Cache Coherence

Chapter 12: Multiprocessor Architectures. Lesson 09: Cache Coherence Problem and Cache synchronization solutions Part 1

Secure Reactive Systems


Secure Computation Without Authentication

Questions? Assignment. Techniques for Gathering Requirements. Gathering and Analysing Requirements

Moreover, under the risk neutral measure, it must be the case that (5) r t = µ t.

arxiv:math/ v2 [math.co] 5 Jul 2006

A Framework for the Semantics of Behavioral Contracts

Mathematical Induction

T Reactive Systems: Introduction and Finite State Automata

Semantics and Verification of Software

Software Modeling and Verification

Lecture 2: Universality

Formal Methods at Intel An Overview

Linear Algebra Notes for Marsden and Tromba Vector Calculus

On strong fairness in UNITY

Introducing Formal Methods. Software Engineering and Formal Methods

Introduction to type systems


Walrasian Demand. u(x) where B(p, w) = {x R n + : p x w}.

NP-Completeness and Cook s Theorem

Testing LTL Formula Translation into Büchi Automata

Internet Sustainability and Network Marketing Safety

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

Data Integration. Maurizio Lenzerini. Universitá di Roma La Sapienza

VHDL DESIGN OF EDUCATIONAL, MODERN AND OPEN- ARCHITECTURE CPU

Limits and Continuity

3 Extending the Refinement Calculus

Unit 26 Estimation with Confidence Intervals

Elasticity Theory Basics

Using Patterns and Composite Propositions to Automate the Generation of Complex LTL

Finding the Evidence in Tamper-Evident Logs

Public Key Cryptography in Practice. c Eli Biham - May 3, Public Key Cryptography in Practice (13)

Truth as Modality. Amsterdam Workshop on Truth 13 March 2013 truth be told again. Theodora Achourioti. ILLC University of Amsterdam

TECH. Requirements. Why are requirements important? The Requirements Process REQUIREMENTS ELICITATION AND ANALYSIS. Requirements vs.

Automatic Composition of Web Services

Journal of Engineering Science and Technology Review 2 (1) (2009) Lecture Note

PROPERTECHNIQUEOFSOFTWARE INSPECTIONUSING GUARDED COMMANDLANGUAGE

Chapter 17. Orthogonal Matrices and Symmetries of Space

Question Answering and the Nature of Intercomplete Databases

Relations: their uses in programming and computational specifications

Chapter 13: Query Processing. Basic Steps in Query Processing

7 Gaussian Elimination and LU Factorization

Semantic Description of Distributed Business Processes

Jaakko Hintikka Boston University. and. Ilpo Halonen University of Helsinki INTERPOLATION AS EXPLANATION

Rigorous Software Development CSCI-GA

Chapter 9. Systems of Linear Equations

CSG 399 Lecture. The Inductive Approach to Protocol Analysis p.1

Quantum Network Coding

Software Verification: Infinite-State Model Checking and Static Program

Testing mobile computing applications: toward a scenario language and tools

Authenticity by Typing for Security Protocols

Vorlesung Rechnerarchitektur 2 Seite 178 DASH

Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy

Section 4.4 Inner Product Spaces

Managing Variability in Software Architectures 1 Felix Bachmann*

5 Logic-Based Approaches to Workflow Modeling and Verification

COMPUTER SCIENCE TRIPOS

0 <β 1 let u(x) u(y) kuk u := sup u(x) and [u] β := sup

Similarity and Diagonalization. Similar Matrices

XoWiki Content Flow From a Wiki to a Simple Workflow System

MOMENTUM - A MEMORY-HARD PROOF-OF-WORK VIA FINDING BIRTHDAY COLLISIONS. DANIEL LARIMER dlarimer@invictus-innovations.com Invictus Innovations, Inc

Architecture Description for Mobile Distributed Systems

Abstract Factory Pattern. Human Computer Interaction Research University of Nevada, Reno

On Recognizable Timed Languages FOSSACS 2004

Observational Program Calculi and the Correctness of Translations

Semantic Groundedness

Performance Monitoring and Analysis System for MUSCLE-based Applications

CONTENTS 1. Peter Kahn. Spring 2007

A Modular Representation of a Business Process Planner

A Survey of Belief Revision on Reputation Management. Yao Yanjun a73482

Applying General Access Structure to Metering Schemes

Data Validation with OWL Integrity Constraints

University of Ostrava. Reasoning in Description Logic with Semantic Tableau Binary Trees

Cisco Application Networking for Citrix Presentation Server

LS.6 Solution Matrices

CHAPTER 7 GENERAL PROOF SYSTEMS

1 Operational Semantics for While

University of Lille I PC first year list of exercises n 7. Review

3. Prime and maximal ideals Definitions and Examples.

Specification and Analysis of Contracts Lecture 1 Introduction

No: Bilkent University. Monotonic Extension. Farhad Husseinov. Discussion Papers. Department of Economics

Modular Communication Infrastructure Design with Quality of Service

Partial Fractions. p(x) q(x)

Data Exchange: Semantics and Query Answering

Transformation Techniques for Constraint Logic Programs with Applications to Protocol Verification

Formal Security Model for Virtual Machine Hypervisors in Cloud Computing Systems

A Propositional Dynamic Logic for CCS Programs

This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination.

Definition of SOA. Capgemini University Technology Services School Capgemini - All rights reserved November 2006 SOA for Software Architects/ 2

Schooling, Political Participation, and the Economy. (Online Supplementary Appendix: Not for Publication)

Trust but Verify: Authorization for Web Services. The University of Vermont

GETTING STARTED WITH ANDROID DEVELOPMENT FOR EMBEDDED SYSTEMS

A Graph Abstract Machine Describing Event Structure Composition

Programming NAND devices

Theory of Multi Core Hypervisor Verification

Step Response of RC Circuits

1 Digital Signatures. 1.1 The RSA Function: The eth Power Map on Z n. Crypto: Primitives and Protocols Lecture 6.

5 Homogeneous systems

Transcription:

A Generic Process Calculus Approach to Relaxed-Memory Consistency Palle Raabjerg Tjark Weber Nadine Rohde Lars-Henrik Eriksson Joachim Parrow UPMARC Workshop on Memory Models (MM 15) 23 24 February 2015, Uppsala, Sweden T. Weber et al. A Generic Process Calculus Approach... 1 / 21

Introduction Motivation Two common ways to specify memory models formally: 1 Operational (events and guards) 2 Axiomatic (relational logic) T. Weber et al. A Generic Process Calculus Approach... 2 / 21

Introduction Goal These different styles make it difficult to apply verification techniques across different models. We want to specify relaxed consistency models and reason about the behavior of programs in a unified framework that supports formal verification for a range of specification styles. T. Weber et al. A Generic Process Calculus Approach... 3 / 21

Introduction Approach Psi calculi = process calculi + logics (e.g., pi-calculus) (e.g., first-order logic) T. Weber et al. A Generic Process Calculus Approach... 4 / 21

Psi Calculi Psi Calculi T. Weber et al. A Generic Process Calculus Approach... 5 / 21

Psi Calculi Process Calculi A process calculus is a language to formally model concurrent systems. Example (pi-calculus) a b, c.0 a(x, y).x(u).yu.0 Values: only names of communication channels Very expressive, but very basic (cf. lambda calculus) Process calculi have precise formal semantics. T. Weber et al. A Generic Process Calculus Approach... 6 / 21

Psi Calculi Process Calculi A process calculus is a language to formally model concurrent systems. Example (pi-calculus) a b, c.0 a(x, y).x(u).yu.0 τ b(u).cu.0 Values: only names of communication channels Very expressive, but very basic (cf. lambda calculus) Process calculi have precise formal semantics. T. Weber et al. A Generic Process Calculus Approach... 6 / 21

Psi Calculi Process Calculi (cont.) Pick an existing calculus, adapt it for your application. Examples: pi-calculus + cryptography pi-calculus + broadcast communication pi-calculus + XML data pi-calculus + constraints T. Weber et al. A Generic Process Calculus Approach... 7 / 21

Psi Calculi T. Weber et al. A Generic Process Calculus Approach... 8 / 21

Psi Calculi Process Calculi (cntd.) Repeating the procedure leads to a multitude of slightly different calculi: Nice for modeling, but how reliable is the analysis? T. Weber et al. A Generic Process Calculus Approach... 9 / 21

Psi Calculi A Generic Framework for Applied Process Calculi The Psi calculi framework is a factory for applied calculi: just add data and logics. T. Weber et al. A Generic Process Calculus Approach... 10 / 21

Psi Calculi A Generic Framework for Applied Process Calculi (cont.) Instantiating the Psi calculi framework yields pi-calculus extensions with many nice features (complex channels, arbitrary data structures, broadcast, higher-order,... ), compositional and straight-forward theory (semantics, process equivalence, types), machine-checked in Nominal Isabelle, tools for simulation and equivalence checking. T. Weber et al. A Generic Process Calculus Approach... 11 / 21

Psi Calculi Cooking a Psi Calculus Three sets: terms Σ, conditions C, assertions A Substitution on these sets Four operators:. : Σ Σ C (channel equivalence) : A A A (composition) 1 : A (unit assertion) A C (entailment) T. Weber et al. A Generic Process Calculus Approach... 12 / 21

Psi Calculi Psi Calculi Semantics From these ingredients, we obtain a process calculus: a data type of processes equipped with a structured operational semantics. Ψ P α P In the environment Ψ, process P can take action α to become P. T. Weber et al. A Generic Process Calculus Approach... 13 / 21

A Psi-Calculi Instance for MESI A Psi-Calculi Instance for MESI T. Weber et al. A Generic Process Calculus Approach... 14 / 21

A Psi-Calculi Instance for MESI The MESI Protocol MESI is a widely used coherence protocol that supports write-back cache. T. Weber et al. A Generic Process Calculus Approach... 15 / 21

A Psi-Calculi Instance for MESI MESI Terms Constants: c ::= M E S I (cache line states) read write (CPU requests) bus (the shared bus) READ RWITM INV DATA (bus communication) memory (memory or LLC) 0 1 (data values) Terms: S, T ::= c (any constant is a term) x (any name is a term) (T 1,..., T n ) (tuples of terms are terms) T. Weber et al. A Generic Process Calculus Approach... 16 / 21

A Psi-Calculi Instance for MESI MESI Conditions ϕ, ψ ::= T s (state of controller T Σ is s) T b (data held by controller T Σ is b) M (some controller is in modified state) ES (some controller is in exclusive or shared state) I (all controllers are in invalid state) S = T (equality of terms) ϕ (negation) ϕ ψ (conjunction) T. Weber et al. A Generic Process Calculus Approach... 17 / 21

A Psi-Calculi Instance for MESI MESI Assertions Let S := {M, E, S, I} be the set of cache line states, and B := {0, 1} be the set of data values. Assertions A: Ψ = (Ψ S, Ψ B ) is a pair of functions, where Ψ S : Σ S and Ψ B : Σ B. T. Weber et al. A Generic Process Calculus Approach... 18 / 21

A Psi-Calculi Instance for MESI The MESI Psi-Calculus Theorem MESI terms, conditions and assertions, together with suitable definitions for entailment and composition, satisfy the requirements on a Psi calculi instance. Thus by instantiating the Psi calculi framework with the above parameters, we obtain a process calculus. T. Weber et al. A Generic Process Calculus Approach... 19 / 21

A Psi-Calculi Instance for MESI Modeling and Verifying the MESI Protocol We have modeled the MESI protocol as a process in this calculus (extended with broadcast communication and priorities). 1 High-level abstract model, where cache controllers directly transition between states 2 Low-level model, where bus communication is accounted for We have verified (via a simulation proof) that both models provide sequential consistency. T. Weber et al. A Generic Process Calculus Approach... 20 / 21

Conclusions Conclusions and Future Work Achieved so far: Simple consistency models and coherence protocols implemented in Psi calculi Models at different levels of abstraction Tools for bisimulation checking in Psi calculi Expected: Realistic memory models (e.g., x86-tso, Power, C++) implemented in Psi calculi Hennessy-Milner style dynamic logics for Psi calculi Tools for model checking in Psi calculi T. Weber et al. A Generic Process Calculus Approach... 21 / 21