STRUCTURE OF CONCURRENCY Ryszard Janicki. Department of Computing and Software McMaster University Hamilton, ON, L8S 4K1 Canada

Similar documents
The area under the graph of f and above the x-axis between a and b is denoted by. f(x) dx. π O

378 Relations Solutions for Chapter 16. Section 16.1 Exercises. 3. Let A = {0,1,2,3,4,5}. Write out the relation R that expresses on A.

Minimal DFA. minimal DFA for L starting from any other

Coalgebra, Lecture 15: Equations for Deterministic Automata

Lecture 9: LTL and Büchi Automata

Farey Fractions. Rickard Fernström. U.U.D.M. Project Report 2017:24. Department of Mathematics Uppsala University

Convert the NFA into DFA

Software Engineering using Formal Methods

The practical version

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

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

Regular Language. Nonregular Languages The Pumping Lemma. The pumping lemma. Regular Language. The pumping lemma. Infinitely long words 3/17/15

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

Bases for Vector Spaces

NFAs continued, Closure Properties of Regular Languages

8. Complex Numbers. We can combine the real numbers with this new imaginary number to form the complex numbers.

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

CS 330 Formal Methods and Models

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9.

Chapter 1: Fundamentals

Nondeterminism and Nodeterministic Automata

MATH 573 FINAL EXAM. May 30, 2007

Designing finite automata II

Tutorial Automata and formal Languages

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

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

Lecture 3: Equivalence Relations

Boolean algebra.

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

Homework 3 Solutions

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science

Fundamentals of Computer Science

Linear Inequalities. Work Sheet 1

The Evaluation Theorem

CM10196 Topic 4: Functions and Relations

DFA minimisation using the Myhill-Nerode theorem

Infinite Geometric Series

CS 275 Automata and Formal Language Theory

Regular expressions, Finite Automata, transition graphs are all the same!!

AUTOMATED REASONING. Agostino Dovier. Udine, November Università di Udine CLPLAB

NFAs continued, Closure Properties of Regular Languages

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

Formal Languages and Automata

1 Sets Functions and Relations Mathematical Induction Equivalence of Sets and Countability The Real Numbers...

QUADRATIC RESIDUES MATH 372. FALL INSTRUCTOR: PROFESSOR AITKEN

Parse trees, ambiguity, and Chomsky normal form

Finite-State Automata: Recap

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

Reinforcement Learning

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

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

Improper Integrals. The First Fundamental Theorem of Calculus, as we ve discussed in class, goes as follows:

p-adic Egyptian Fractions

Thoery of Automata CS402

Review of Calculus, cont d

Duke Math Meet

Formal Methods in Software Engineering

dx dt dy = G(t, x, y), dt where the functions are defined on I Ω, and are locally Lipschitz w.r.t. variable (x, y) Ω.

Table of contents: Lecture N Summary... 3 What does automata mean?... 3 Introduction to languages... 3 Alphabets... 3 Strings...

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

1.4 Nonregular Languages

Theoretical foundations of Gaussian quadrature

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

BİL 354 Veritabanı Sistemleri. Relational Algebra (İlişkisel Cebir)

Calculus Module C21. Areas by Integration. Copyright This publication The Northern Alberta Institute of Technology All Rights Reserved.

In this skill we review equations that involve percents. review the meaning of proportion.

Homework 4. 0 ε 0. (00) ε 0 ε 0 (00) (11) CS 341: Foundations of Computer Science II Prof. Marvin Nakayama

Unit #9 : Definite Integral Properties; Fundamental Theorem of Calculus

Symbolic enumeration methods for unlabelled structures

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

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

Introduction to Group Theory

Sturm-Liouville Theory

Handout: Natural deduction for first order logic

Chapter 2 Finite Automata

1.3 Regular Expressions

Jim Lambers MAT 169 Fall Semester Lecture 4 Notes

Finite Automata-cont d

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

arxiv:math/ v2 [math.ho] 16 Dec 2003

CHAPTER 1 PROGRAM OF MATRICES

Example Sheet 6. Infinite and Improper Integrals

Lecture 08: Feb. 08, 2019

Lecture 3 ( ) (translated and slightly adapted from lecture notes by Martin Klazar)

MA123, Chapter 10: Formulas for integrals: integrals, antiderivatives, and the Fundamental Theorem of Calculus (pp.

(e) if x = y + z and a divides any two of the integers x, y, or z, then a divides the remaining integer

Quantum Nonlocality Pt. 2: No-Signaling and Local Hidden Variables May 1, / 16

Random subgroups of a free group

1 From NFA to regular expression

AQA Further Pure 1. Complex Numbers. Section 1: Introduction to Complex Numbers. The number system

List all of the possible rational roots of each equation. Then find all solutions (both real and imaginary) of the equation. 1.

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38

Review of Gaussian Quadrature method

ɛ-closure, Kleene s Theorem,

Matrix Algebra. Matrix Addition, Scalar Multiplication and Transposition. Linear Algebra I 24

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3

Linearly Similar Polynomials

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

Lecture 09: Myhill-Nerode Theorem

DEFINITION The inner product of two functions f 1 and f 2 on an interval [a, b] is the number. ( f 1, f 2 ) b DEFINITION 11.1.

Transcription:

STRUCTURE OF CONCURRENCY Ryszrd Jnicki Deprtment of Computing nd Softwre McMster University Hmilton, ON, L8S 4K1 Cnd jnicki@mcmster.c 1

Introduction Wht is concurrency? How it cn e modelled? Wht re the sic tools for modelling concurrency? Clssicl, or the most populr (top down) pproches to modelling concurrecy: 1. Find forml model for system (utomt, process lger, Petri nets, etc.). 2. Define semntics for the chosen model (sequences, prtil orders, steps, temporl logic, etc.). Cn we discuss concurrency without introducing the system level? 2

Voculry An OBSERVATION: system/progrm run sequence : c d step sequence : c d n INTERVAL order : c eginning of end of time An CONCURRENT BEHAVIOUR/CONCURRENT HISTORY: set of EQUIVALENT oservtions. 3

SIMULTANEITY: if two event occurrences nd re llowed, they cn e executed either IN SEQUENCE or SIMULTANEOUSLY A forml definition of simultneity is not ovious nd depends on the mening of events. We ssume tht it is somehow correctly defined or simply disllowed (impossile to oserve). time SIMULTANEOUS SIMULTANEOUS???? 4

CONCURRENCY PARADIGMS: A superposition or sttement out the structure of concurrent ehviour/history involving tretment of SIMULTANEITY. We hve 8 prdigms π 1,..., π 8, however from those eight only π 1, π 3, nd π 8 re importnt. π 8 : the most restrictive one: ( Δ. x o y) [( Δ. x o y) ( Δ. y o x)] where: Δ - concurrent ehviour/concurrent history (i.e. set of equivlent oservtions), x o y - in the oservtion o, x nd y re simultneous, x o y - in the oservtion o, x preceeds y. 5

π 3 : covers most cses tht re not covered y π 8 : [( Δ. x o y) ( Δ. y o x)] = ( Δ. x o y) where: Δ - concurrent ehviour/concurrent history (i.e. set of equivlent oservtions), x o y - in the oservtion o, x nd y re simultneous, x o y - in the oservtion o, x preceeds y. π 1 : no restrictions t ll. π 8 = π 3 = π 1 6

Remrk 1 : If simultneity is disllowed or unoservle, the concept of concurrency prdigms disppers, only sequentil oservtions do exist. Remrk 2 : If time is continuous nd events re instntenous, simultneity does not exist s one of the fundmentl principles of modern physics sttes: no two instntenous events cn e oserved exctly t the sme time. Such oservtion would require infinite energy. Remrk 3 : Ech non instntenous event, cn e modelled y two instntenous events B nd E, with B o E for ech oservtion, where B is the eginning of nd E is the end of. Do we need theory for ono instntenous events? YES. Complex numers cn e modelled y pirs of rels, frctions y pirs of integers, etc., ut this is not very prcticl wy of using them. 7

SETS OF PARTIAL ORDERS AND THEIR INVARIANTS Let Δ e set of prtil orders with common domin, nd let invrints(δ) e the sets of ll INVARIANTS generted y Δ, where n invrint of Δ is property (i.e. reltion) shred y ll memers of Δ. All invrints cn e derived from the three sic ones: <, nd <>, interpreted s CAUSALITY, WEAK CAUSALITY nd COMMUTATIVITY. Let inv,eninvrint, nd let extensions(inv) e the set of ll prtil orders tht re extensions of inv, i.e. they stisfy ll the properties of the reltion inv. 8

BASIC INVARIANTS CAUSALITY RELATION: < For ech oservtion, lwys PRECEEDS. WEAK CAUSALITY RELATION: For ech oservtion, is lwys NOT LATER THAN. COMMUTATIVITY RELATION: <> For ech oservtion, either lwys PRECEEDS, OR PRECEEDS, ut they re NEVER executed simultneously. NOTE THAT: < <> CAUSALITY is lwys PARTIAL ORDER, the xioms for WEAK CAUSALITY nd COMMUTATIVITY re much more complex. All invrints cn e derived from <, nd <>. 9

CONCURRENT HISTORIES Let Δ e set of prtil orders with common domin. The set of prtil orders Δ cl, invrint closure of Δ, is defined s: Δ cl = \ inv invrints(δ) extensions(inv). It cn e proved tht Δ cl = extenstions(<> Δ ) extensions( Δ ) or, if the prdigms π 3 holds: Δ cl = extenstions(< Δ ) extensions( Δ ) A set of prtil orders with common domin Δ is clled CONCURRENT HISTORY if Δ = Δ cl nd the elements of Δ re interpreted s oservtions. 10

A Simple Exmple Consider two events: nd. Let {,} denote simultneous execution of nd. Assume tht oth nd must e executed, ech of them exctly once. How mny (nonequivlent) trnsition systems cn we construct for this prolem? Three (or two or only one, dependently on interprettion) sequentil models: 11

Five (ut only four relly different) non-sequentil models: {,} {,} {,} {,} 12

CASE 1 Equivlent oservtions: o 1 =c o 2 =c o 3 ={,c} c o {,c} 1 = o 2 = c o 3 = c c c CAUSALITY: < is equl to c < is the intersection o 1 o 2 o 3, {o 1,o 2,o 3 } is the set of ll step sequence extensions of <, {o 1,o 2,o 3 } is lso the set of ll intervl order extensions of <, CONCLUSION: < is equivlent to/fully represented y the set {o 1,o 2,o 3 } π 8 is SATISFIED in this cse (lso π 3 nd π 1 ). 13

CASE 2 c {,c} Equivlent oservtions: o 1 =c o 1 = o 3 = c CAUSALITY: < is equl to c WEAK CAUSALITY: is equl to c o 3 ={,c} c 14

For ech reltion R, define R s R (R). Note tht if R is totl order then R = R. For the Cse 2 we hve: o 1 = ô 1 = c ut o 3 = c ô 3 = c < is the interesection o 1 o 3, is the interesection ô 1 ô 3, {o 1,o 3 } is the set of extensions of the pir (<, ) in the sense tht {o 1,o 3 } extends < nd {ô 1,ô 3 } extends. CONCLUSION: (<, ) is equivlent to/fully represented y the set {o 1,o 3 }. π 3 is stisfied here, ut π 8 is NOT. 15

CASE 3 {,c} o 3 = Equivlent oservtions: o 3 ={,c} c CAUSALITY: < is equl to c WEAK CAUSALITY: is equl to c CONCLUSION: (<, ) is equivlent to/fully represented y the set {o 3 }. π 3 is stisfied here, ut π 8 is NOT. 16

CASE 4 c c Equivlent oservtions: o 1 =c o 2 =c o 1 = c o 2 = c CAUSALITY: < is equl to c WEAK CAUSALITY: is equl to < COMMUTATIVITY: <> is equl to c 17

o 1 = ô 1 = c nd o 2 = ô 2 = c is the interesection ô 1 ô 2, <> is the interesection (o 1 o 1 1 ) (o 2 o 1 2 ) {o 1,o 2 } is the set of extensions of the pir (<>, ) in the sense tht {ô 1,ô 2 } extends nd {o 1 o 1 1,o 2 o 1 2 } extends <>. CONCLUSION: (<>, ) is equivlent to/fully represented y the set {o 1,o 2 }. Only π 1 is stisfied, π 3 nd π 8 re NOT! 18

AXIOMS FOR CAUSALITY (<), WEAK CAUSALITY ( ) nd COMMUTATIVITY (<>) If the prdigm π 3 holds then <>=< < 1. Oservtions re SEQUENCES (TOTAL ORDERS), i.e. Simultneity is not llowed: < is PARTIAL ORDER is equl to < nd <> is equl to < < 1 Oservtions re STEP-SEQUENCES (STRATIFIED ORDERS), i.e. Simultneity is n equivlence reltion: S1. S2. < = S3. c = c = c S4. < c < c = < c S5. < <> (needed only if π 3 does not hold). 19

Oservtions re INTERVAL ORDERS I1. I2. < = I3. < < c = < c I4. < c < c = c I5. < c < d = < d I6. < c d = d = d I7. < <> (needed only if π 3 does not hold). Oservtions re PARTIAL ORDERS P1. P2. < = P3. < < c = < c P4. < c < c = c P5. < <> (needed only if π 3 does not hold). 20

COCLUSION A cuncurrent history, i.e. set of prtil orders Δ such tht Δ = Δ cl,is lwys entirely defined y its invrints, {<>, }, i.e. commuttivity nd wek cuslity. Dependently on the restrictions on the kind of prtil orders in Δ, the reltions <, nd <>, stisfy xioms S1-S5, I1-I7, orp1-p5. If Δ conforms to the prdigm π 3, then Δ is entirely defined y its invrints, {<, }, i.e. cuslity nd wek cuslity. 21

THANK YOU! 22