Process Algebra CSP A Technique to Model Concurrent Programs

Similar documents
Bisimulation. R.J. van Glabbeek

Strong Bisimulation. Overview. References. Actions Labeled transition system Transition semantics Simulation Bisimulation

Hennessy-Milner Logic 1.

Summer School Verification Technology, Systems & Applications

Notes on specifying systems in EST

Semantic reachability for simple process algebras. Richard Mayr. Abstract

SAT-Solving in CSP Trace Refinement

Semantic Reachability. Richard Mayr. Institut fur Informatik. Technische Universitat Munchen. Arcisstr. 21, D Munchen, Germany E. N. T. C. S.

Concepts of Concurrent Computation Spring 2015 Lecture 9: Petri Nets

Temporal logic CTL : syntax. Communication and Concurrency Lecture 6. Φ ::= tt ff Φ 1 Φ 2 Φ 1 Φ 2 [K]Φ K Φ AG Φ EF Φ AF Φ EG Φ A formula can be

Review of Control Flow Semantics

Extending CSP with tests for availability

Science of Computer Programming

1 Introduction. Abstract

An Introduction to Bisimulation and Coinduction

Probabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford

CS 267: Automated Verification. Lecture 8: Automata Theoretic Model Checking. Instructor: Tevfik Bultan

Refined interfaces for compositional verification

Introduction to spefication and verification Lecture Notes, autumn 2011

Designing and Understanding the Behaviour of Systems

Process Algebras for Petri Nets

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck.

A tutorial on sequential functions

Process Algebra with Recursive Operations

19 Optimal behavior: Game theory

Kleene Theorems for Free Choice Nets Labelled with Distributed Alphabets

CS 275 Automata and Formal Language Theory

State Minimization for DFAs

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:

Exercises with (Some) Solutions

Chapter 2 Finite Automata

ɛ-closure, Kleene s Theorem,

Expressiveness modulo Bisimilarity of Regular Expressions with Parallel Composition (Extended Abstract)

Conjunction on processes: Full abstraction via ready-tree semantics

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Lecture 9: LTL and Büchi Automata

Discrete Time Process Algebra with Relative Timing

Informe Técnico / Technical Report

Introduction to ω-autamata

Equality and Inequality in the Dataflow Algebra. A. J. Cowling

Non-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1

Categorical approaches to bisimilarity

More on automata. Michael George. March 24 April 7, 2014

KNOWLEDGE-BASED AGENTS INFERENCE

Towards Algebraic Semantics of Circus Time

Complexity and Decidability of Some Equivalence-Checking Problems

We will see what is meant by standard form very shortly

Process Algebra: An Algebraic Theory of Concurrency

Towards a Mathematical Operational Semantics

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-*

CS 188: Artificial Intelligence Spring 2007

Minimal DFA. minimal DFA for L starting from any other

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1

CSE : Exam 3-ANSWERS, Spring 2011 Time: 50 minutes

Real-time Concepts for a Formal Specification Language for Software / Hardware Systems

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

Bisimulation, Games & Hennessy Milner logic

Administrivia CSE 190: Reinforcement Learning: An Introduction

Event Structures for Arbitrary Disruption

Uninformed Search Lecture 4

How to simulate Turing machines by invertible one-dimensional cellular automata

dierent process-lgebric theories in order to cpture dierent spects of system behvior; however, ech such formlism generlly includes the following chrct

Let's start with an example:

Acceptance Sampling by Attributes

Reinforcement Learning

Draft. Draft. Introduction to Coalgebra. Towards Mathematics of States and Observations. Bart Jacobs. Draft Copy.

Designing finite automata II

Coalgebra, Lecture 15: Equations for Deterministic Automata

CS 188: Artificial Intelligence Fall 2010

MA 124 January 18, Derivatives are. Integrals are.

Characterising Testing Preorders for Finite Probabilistic Processes

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh

ad = cb (1) cf = ed (2) adf = cbf (3) cf b = edb (4)

CS:4330 Theory of Computation Spring Regular Languages. Equivalences between Finite automata and REs. Haniel Barbosa

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh

Lecture 6 Regular Grammars

Module 6 Value Iteration. CS 886 Sequential Decision Making and Reinforcement Learning University of Waterloo

Equivalences on Observable Processes

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018

Lesson 25: Adding and Subtracting Rational Expressions

Electron Correlation Methods

Non Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51

New data structures to reduce data size and search time

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

Extended nonlocal games from quantum-classical games

Analyzing Real-Time Systems 1

Homework 3 Solutions

MOdal logics and behavioural equivalences are very

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute

CS375: Logic and Theory of Computing

CS 188: Artificial Intelligence

Decidability, Behavioural Equivalences and Infinite Transition Graphs. Hans Hüttel

Numerical Linear Algebra Assignment 008

Automata and Languages

Centrum voor Wiskunde en Informatica REPORTRAPPORT. Supervisory control for nondeterministic systems

The Predom module. Predom calculates and plots isothermal 1-, 2- and 3-metal predominance area diagrams. Predom accesses only compound databases.

Java II Finite Automata I

Decision Networks. CS 188: Artificial Intelligence Fall Example: Decision Networks. Decision Networks. Decisions as Outcome Trees

Foundations for Timed Systems

State space systems analysis (continued) Stability. A. Definitions A system is said to be Asymptotically Stable (AS) when it satisfies

Transcription:

Process Algebr CSP A Technique to Model Concurrent Progrms Jnury 15, 2002 Hui Shi

1 Contents CSP-Processes Opertionl Semntics Trnsition systems nd stte mchines Bisimultion Firing rules for CSP Model-Checker FDR Denottionl Semntics Specifiction nd Refinement

2 Semntic pproches to CSP Opertionl semntics inteprets CSP processes s trnsition digrms, with visible nd invisivle ctions for moving between vrious progrm sttes. Denottionl semntics mps CSP into some bstrct models: trces, filures nd filures/divergences. Algebric semntics is defined by set of lgebric lws, from which process equivlence between CSP processes cn be derived.

Opertionl Semntics

Opertionl Semntics 4 Trnsition systems nd stte mchines Lbelled Trnsition System (LTD) set of nodes s process sttes strting node n 0 for ech Σ,, reltion between nodes, where Σ, = Σ {, } Σ is the lphbet of ll communictions of process

Opertionl Semntics 5 A b B D C E Exmple 1 (A lbelled trnsition system)

Opertionl Semntics 6 Strong bisimultion Definition 1 (Strong Bisimultion) IF S is n LTS, the reltion R on the set of nodes S of S is sid to be strong bisimultion if, nd only if, both the following hold: n 1, n 2, m 1 S. x Σ,. n 1 Rn 2 n 1 x m1 m 2 S.n 2 x m2 m 1 Rm 2 n 1, n 2, m 2 S. x Σ,. n 1 Rn 2 n 2 x m2 m 1 S.n 1 x m1 m 1 Rm 2 Two nodes in S re sid to be bisimilr if there is ny bisimultion which reltes them.

Opertionl Semntics 7 A X B C Y E D G Z F Exmple 2 (Bisimultion equivlence)

Opertionl Semntics 8 Firing rules for CSP Foundmentl opertors Skip Ω Ω denotes ny terminted process e P where, subs(,e,p) ( comms(e)) comms(e) is the set of communiction described by e subs(, e, P) is the result of substituting the prt of for ech identifier in P bound by e P Q P P Q Q

Opertionl Semntics 9 µ p.p P[µ p.p/p] P P Q P P Q Q P Q Q P Q P P P Q P ( ) Q Q P Q Q ( ) Exmple 3 ( P b Q nd P b Q)

Opertionl Semntics 10 Prllel opertors P P P Q P Q X X Q Q P Q P X X Q P P P Q P Q ( Σ\X ) Q Q P Q P Q ( Σ\X ) X X X X P P Q P Q P X X Q Q ( X ) P X P Q P Ω Q X P X Q Q P Ω Q X Ω Ω Ω X Exercise: Derive the trnsitions of the process SVAR(0) {red,write} (USER(1) USER(2))

Opertionl Semntics 11 Hiding nd renming P P\B x P x P \B (x B { }) P P P\B Ω P P\B P P \B ( B) P P P[ R ] P [ R ] P P[ R ] Ω P P P b ( R b) P[ R ] P [ R ] Sequentil composition P x P P; Q x P ; Q (x ) P.P P P; Q Q Time-out P P P Q P Q P P P Q P ( ) P Q Q

Opertionl Semntics 12 P b b b b Q P Q Exmple 4 (P Q nd (P Stop) Q ) P = P Q = b Q

Opertionl Semntics 13 Exercise: Derive the trnsitions of the following process: COPY >> COPY = (COPY [ right/mid ] COPY [ left/mid ]) \ {mid} {mid} where COPY = µ p.left?x right.x p

Opertionl Semntics 14 The Model-Checker FDR The bsic concept of FDR FDR (Filures-Divergence-Refinemen) is model-checking tool for lbelled trnsition systems with foundtions in CSP bsed minly on explict model-checking techniques. Explict model-checking techniques: the check proceeds by recursive induction which fully expnds the rechble stte-spce of the two systems nd visits ech pir of supposedly corresponding stte in turn.

Opertionl Semntics 15 The bsic opertion of FDR Clculte the opertionl semntics using firing rules. Normlise the specifiction process into LTS in which ll sttes re semnticlly distinct bsed minly on the strong bisimultion. Checke process properties in terms of refinemen reltions.

Opertionl Semntics 16 Exmple 5 (Model-checking) A concurrent system is dedlocked if no component cn mke ny progress, generlly becuse ech is witing for communiction with others. A concurrent system cn livelock, when network communictes infinitely internlly without ny component communicting externlly. Some exmples Five dining philosophers (dedlock check) Producer-consumer system with hiding (livelock check) Buffer (refinement check)