Discrete Time Process Algebra with Relative Timing

Similar documents
Coalgebra, Lecture 15: Equations for Deterministic Automata

Convert the NFA into DFA

Designing finite automata II

p-adic Egyptian Fractions

Minimal DFA. minimal DFA for L starting from any other

Process Algebra: An Algebraic Theory of Concurrency

Lecture 08: Feb. 08, 2019

Parse trees, ambiguity, and Chomsky normal form

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

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

Formal Languages and Automata

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

Exercises with (Some) Solutions

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

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

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

1 Nondeterministic Finite Automata

CS 330 Formal Methods and Models Dana Richards, George Mason University, Spring 2016 Quiz Solutions

CM10196 Topic 4: Functions and Relations

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

Nondeterminism and Nodeterministic Automata

Bridging the gap: GCSE AS Level

Closure Properties of Regular Languages

Vectors , (0,0). 5. A vector is commonly denoted by putting an arrow above its symbol, as in the picture above. Here are some 3-dimensional vectors:

Lecture 3: Equivalence Relations

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

Things to Memorize: A Partial List. January 27, 2017

2.4 Linear Inequalities and Interval Notation

CS 275 Automata and Formal Language Theory

Section 6.1 INTRO to LAPLACE TRANSFORMS

CMSC 330: Organization of Programming Languages

Bases for Vector Spaces

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

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

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016

CS12N: The Coming Revolution in Computer Architecture Laboratory 2 Preparation

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

Introduction to Group Theory

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

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

Lecture 09: Myhill-Nerode Theorem

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

Bernoulli Numbers Jeff Morton

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

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.

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

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.

First Midterm Examination

set is not closed under matrix [ multiplication, ] and does not form a group.

Linear Inequalities. Work Sheet 1

1.9 C 2 inner variations

First Midterm Examination

The Regulated and Riemann Integrals

Bisimulation. R.J. van Glabbeek

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010

Analytically, vectors will be represented by lowercase bold-face Latin letters, e.g. a, r, q.

Finite Automata-cont d

Combinational Logic. Precedence. Quick Quiz 25/9/12. Schematics à Boolean Expression. 3 Representations of Logic Functions. Dr. Hayden So.

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont.

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

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

Linear Systems with Constant Coefficients

Homework 3 Solutions

Handout: Natural deduction for first order logic

EECS 141 Due 04/19/02, 5pm, in 558 Cory

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

Review of Gaussian Quadrature method

Exercises Chapter 1. Exercise 1.1. Let Σ be an alphabet. Prove wv = w + v for all strings w and v.

Tutorial Automata and formal Languages

MAA 4212 Improper Integrals

1 From NFA to regular expression

Section 4: Integration ECO4112F 2011

System Validation (IN4387) November 2, 2012, 14:00-17:00

Section 6.1 Definite Integral

September 13 Homework Solutions

Suppose we want to find the area under the parabola and above the x axis, between the lines x = 2 and x = -2.

1B40 Practical Skills

Random subgroups of a free group

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

CS 275 Automata and Formal Language Theory

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

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

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

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

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.

Designing Information Devices and Systems I Spring 2018 Homework 7

Chapter 14. Matrix Representations of Linear Transformations

Learning Goals. Relational Query Languages. Formal Relational Query Languages. Formal Query Languages: Relational Algebra and Relational Calculus

DFA minimisation using the Myhill-Nerode theorem

Talen en Automaten Test 1, Mon 7 th Dec, h45 17h30

The practical version

Duality # Second iteration for HW problem. Recall our LP example problem we have been working on, in equality form, is given below.

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

expression simply by forming an OR of the ANDs of all input variables for which the output is

Models of Computation: Automata and Processes. J.C.M. Baeten

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

CS 330 Formal Methods and Models

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

Process Algebra CSP A Technique to Model Concurrent Programs

State Minimization for DFAs

Transcription:

Discrete Time Process Alger with Reltive Timing J.C.M. Beten nd M.A. Reniers Deprtment of Mthemtics nd Computing Science, Eindhoven University of Technology, P.O. Box 513, NL-5600 MB Eindhoven, The Netherlnds jos@win.tue.nl, michelr@win.tue.nl Hndout My 16, 1995 1 Introduction Process lger in the form of ACP descries the min fetures of impertive concurrent progrmming without explicit mention of time. Implicitly, time is present in the interprettion of sequentil composition: in p q the process p must e executed efore q. A qunttive view on the reltion etween process execution nd progress of time is sent in ACP, however. Process lgers cn e developed tht provide stndrdised fetures to incorporte qunttive view on time. An option is to represent time y mens of non-negtive rels, nd to hve time stmps on ctions. Another option is to divide time in slices indexed y nturl numers, to hve n implicit or explicit time stmping mechnism tht provides ech ction with the time slice in which it occurs nd to hve time order within ech time slice only. We use the phrse discrete time process lger if n enumertion of time slices is used. The ojective of this note is to extend ACP to discrete time process lger. We consider discrete time process lgers with reltive timing, where timing refers to the execution of the previous ction. We present the so-clled two-phse version, where the pssge of time nd the execution of ctions is seprted. Another version of discrete time process lger uses solute timing, where ll timing refers to n solute clock. Finlly, we hve discrete process lger with prmetric timing, where solute nd reltive timing re integrted. There re mny prcticl uses conceivle for timed process lgers. In prticulr, we mention the ToolBus. This ToolBus contins progrm nottion clled T which is syntcticlly sugred discrete time process lger. Progrms in T re clled T-scripts. The runtime system is lso descried in terms of discrete time process lger. By using rndomised symolic execution the ToolBus implementtion encts tht the xioms of process lger cn e viewed s correctness preserving trnsformtions of T-scripts. A comprle prt of discrete time process lger tht is used to descrie T-scripts hs lso een used for the description of φ-sdl, flt SDL, suset of SDL tht leves out modulristion nd concentrtes on timing spects. We design our lgers (or rther their specifictions) in modulr, incrementl wy. 2 Bsic Discrete Time Process Alger with Reltive Timing nd Non-delyle Actions We present xioms for process lgers in which ctions re timed reltively. With we denote the process tht will execute in the time slice in which it is initilised. So, if is enled during slice 7, then will e performed in the course of time slice 7. With the opertor rel processes 1

cn e delyed one time slice. So if the process rel ( rel ( + )) is initilised in slice 5, this hs the effect tht in slice 7 choice etween nd must e mde. On the other hnd, if the process rel ( rel ()) + rel ( rel ()) is initilised in slice 5, this does not sy tht the choice etween the execution of in slice 7 or the execution of in slice 7 is mde in the course of slice 5. Also in this cse the choice is mde in slice 7. The underlying ssumption tht the pssge of time s such cnnot determine choice is clled time fctoriztion. The signture of BPA ID hs constnts (for A), denoting in the current time slice, nd δ, denoting dedlock t the end of the current time slice. The opertors re lterntive (+) nd sequentil composition ( ), nd the reltive discrete time unit dely rel. The process rel (x) will strt fter one clock tick, i.e. in the next time slice. Note tht the opertor rel is constructor: the term rel () cnnot e reduced. Furthermore, we hve the uxiliry opertor current time slice time out ν rel. The current time slice time out opertor disllows n initil time step, it gives the prt of process tht strts with n ction in the current time slice. This opertor will prove useful when we extend BPA ID with prllel composition in the next section. The superscript denotes tht time free toms re not prt of the signture. The ddition -ID denotes tht the immedite dedlock constnt of [BB95] is not considered. Within time slice, there is no explicit mention of the pssge of time, we cn see the pssge to the next time slice s clock tick. Thus, the cn e clled non-delyle ctions: the ction must occur efore the next clock tick. The xioms of BPA ID re the xioms of BPA (A1-A5) nd dditionlly the xioms DRT1- DRT2, DRTA6-7 nd DCS1-4 of Tle 1. The xiom DRT1 is the time fctoriztion xiom: it sys tht the pssge of time y itself cnnot determine choice. However, it is possile tht pssge of time disles the execution of n ction. This is illustrted y the exmple + rel (). If clock tick occurs the process evolves into. Therey, it hs ecome impossile to execute the ction : it is disled y the occurrence of the clock tick. The xiom DCS4 for the current time slice time out opertor clerly express tht ll lterntives which cnnot perform n ction in the current time slice re replced y δ. x + y = y + x A1 (x + y) + z = x + (y + z) A2 x + x = x A3 (x + y) z = x z + y z A4 (x y) z = x (y z) A5 rel (x) + rel (y) = rel (x + y) DRT1 rel (x) y = rel (x y) DRT2 x + δ = x DRTA6 δ x = δ DRTA7 ν rel () = DCS1 ν rel (x + y) = ν rel (x) + ν rel (y) DCS2 ν rel (x y) = ν rel (x) y DCS3 ν rel ( rel (x)) = δ DCS4 Tle 1: Axioms of BPA ID. We give n opertionl semntics for BPA ID. As set of sttes S we hve the set of closed process terms, nd we define the following reltions on sttes s usul: ction step S A S, nottion s s, which denotes tht the process s cn perform n ction nd therey evolves 2

p R q p R q u u u p p R q Figure 1: Trnsfer condition (1.) for isimultion into s, nd ction termintion S A, nottion s, which denotes tht the process s cn perform n ction nd then termintes successfully. Besides these two reltions we dditionlly hve reltion time step S S, nottion s s, denoting pssge to the next time slice. The opertionl rules re given in Tle 2. The time fctoriztion xiom DRT1 is enforced in the opertionl semntics y phrsing the rules in such wy tht ech process term hs t most one -step: in trnsition system, ech node hs t most one outgoing -edge. x x x + y x, y + x x x x + y, y + x x x x y x y x x y y x x ν rel (x) x x ν rel (x) rel (x) x x x, y x + y x, y + x x x x, y y x + y x + y x x x y x y Tle 2: Opertionl rules for BPA ID. One of the opertionl rules from Tle 2 contins premise of the form y. This mens tht there is no term y such tht y y. We cn still show, however, tht these rules determine unique trnsition reltion on closed terms. Bisimultion is defined s usul, so symmetric, inry reltion R on process terms is isimultion if nd only if the following trnsfer conditions hold: 1. if R(p, q) nd p u p for some u A nd process term p, then there is process term q such tht q u q nd R(p, q ) (see Figure 1); 2. if R(p, q) nd p for some A, then q (see Figure 2). Two terms p nd q re isimilr, p q, if there exists isimultion reltion R relting them. We cn mke the set of process terms modulo isimultion into model for BPA ID. We define the set of sic terms B over BPA ID inductively. We use the uxiliry set ND (no dely) which represents sic terms tht will strt in the current time slice. These two sets of sic terms re defined simultneously s follows: 1. ND B 2. if A δ, then ND 3. if A nd t B, then t ND 3

p R q p R q R Figure 2: Trnsfer condition (2.) for isimultion 4. if s, t ND, then s + t ND 5. if t B, then rel (t) B 6. if t ND nd s B, then t + rel (s) B. Some reflection leds to the insight tht the sic terms over BPA ID re exctly the terms of one of the following two forms: 1. i t i + j, with m + n > 0, i A, j A δ nd t i, s k sic terms; 2. i<m i<m j<n i t i + j + rel (t), with m, n 0, i, j A, nd t i, t sic terms. j<n Here, we use the convention tht sum over n empty set denotes δ. It cn e shown tht every closed process term over the signture of BPA ID is equivlent to sic term. This property is clled elimintion. Theorem 2.1 (Elimintion) Let t e closed BPA ID term. Then there exists sic term s over BPA ID such tht BPA ID t = s. The following theorem expresses tht BPA ID is sound nd complete xiomtistion of isimultion equivlence on the set of process grphs. Theorem 2.2 (Soundness nd Completeness) Let p nd q e closed BPA ID terms. Then we hve BPA ID p = q if nd only if p q. Thus, we hve found sound nd complete model for BPA ID. It is lso possile to define grph model for BPA ID directly, not y giving trnsition system specifiction, ut y defining n interprettion of the constnts nd opertors on process grphs. We define set of process grphs s in [BW90] with lels from A stisfying the extr condition tht every node hs t most one outgoing -leled edge. Moreover, termintion node cn hve lel (for successful termintion). A -leled edge my not led to successful termintion node. Let G e the set of such process grphs. To stte this precisely, n element of G is qudruple N, E, r, where N is the set of nodes, E (N ) A N is the set of leled edges, r (N ) is the root node, nd N is the set of successful termintion nodes. We define n interprettion s follows: 1. The constnt δ is mpped to the process grph with one node, the root, nd no lel (see Figure 3). 2. The constnt is mpped to the process grph with two nodes, the first the root, the lst successful termintion node, connected y n -leled edge (see Figure 3). 3. Given two process grphs g nd h. There re two cses to e considered: 4

() t most one of the grphs hs -leled loop t its root node: In this cse we hve to root unwind oth grphs (see [BW90]). The grph g + h is otined y identifying the roots of the root unwinded grphs ρ(g) nd ρ(h). If oth roots (fter root unwinding) hve n outgoing -leled edge, oth these edges re removed, nd new -leled edge is dded from the root to the root of the sum of the grphs the originl -leled edges were going to. () oth grphs hve -leled loop t the root node: In this cse we only hve to root unwind oth grphs with respect to non--leled edges. This slightly different notion of root unwinding is denoted y ρ. Then oth roots re identified nd the two - leled loops t the root node re identified. For n exmple of this construction see Exmple 2.4. 4. Given two grphs g nd h, in order to form g h, ppend t ech successful termintion node of g copy of h. 5. Given grph g, the grph rel (g) is otined y dding new root node, with -leled edge from the new root to the old root; 6. Given grph g, the grph ν rel (g) is otined y deleting ll -leled edges from the root. Figure 3: The process grphs for δ nd. While trnsforming closed process term into process grph one never introduces loop. Therefore, it is not necessry to root unwind process grphs in the construction of the lterntive composition. However, s soon s recursion is dded, one cn hve process grphs with loops. We formulted the construction of the lterntive composition such tht it remins unchnged when we dd recursion. Exmple 2.3 Figure 4 contins the process grph ssocited to the process term rel ( rel () + rel ()). Figure 4: Exmple of process grph. Exmple 2.4 We will illustrte the construction of the lterntive composition of two process grphs which oth hve -leled loop t the root node. Figure 5 contins the process grphs g nd h, their root unwinded versions ρ (g) nd ρ (h) nd their lterntive composition. Exercise 2.5 Prove tht the following terms re equivlent in BPA ID. 1. rel () + rel () + rel (δ) nd rel ( + ) 2. rel ( rel ()) + rel () rel ( + δ) nd rel () rel () 5

g ρ*(g) h ρ*(h) ρ*(g)+ρ*(h) Figure 5: Interprettion of + on process grphs. g h i j c c Figure 6: The process grphs g, h, i nd j. Drw the process grphs of these processes nd give the isimultion reltions. Exercise 2.6 Give process grphs for the following BPA ID terms: 1. rel ( ) + rel ( c) 2. rel () + rel (c) 3. + rel (δ) Exercise 2.7 Give sic terms for the following BPA ID terms: 1. rel () + rel () + rel (δ) 2. rel ( + ) 3. rel ( rel ()) + rel () rel ( + δ) 4. rel () rel () Exercise 2.8 Consider the process grphs g nd h from Figure 6. Give the process grph tht represents g + h y using the interprettion of + in the grph model. Do the sme for the grphs i nd j. 3 Extension with Prllellism We extend the process lger BPA ID from the previous section with the prllel composition opertor, nd with the uxiliry opertor. The process x y interleves the ehviours of x 6

nd y ut it is forced to synchronize on time steps, i.e. clock tick is executed y oth processes t the sme time, or if this is not possile, the process dedlocks. The resulting process lger will e clled PA ID. The xioms of PA ID re the xioms of BPA ID nd dditionlly the xioms DRTM1-6 from Tle 3. x y = x y + y x DRTM1 x = x DRTM2 x y = (x y) DRTM3 (x + y) z = x z + y z DRTM4 rel (x) ν rel (y) = δ DRTM5 rel (x) (ν rel (y) + rel (z)) = rel (x z) DRTM6 Tle 3: Additonl xioms of PA ID. Note tht the xioms DRTM1-4 re similr to the xioms used for defining the free merge in the setting of PA. The xioms DRTM5-6 express the propgtion of the time fctoriztion principle for the uxiliry opertor. A non-delyle ction in the right-hnd side of the cnnot occur when the left-hnd side process is forced to perform clock tick. In order to split the right-hnd side process into prt which must perform clock tick nd prt which cnnot perform clock tick we introduced the current time slice time out opertor. The process ν rel (y) in xiom DRTM6 represents the prt of the right-hnd side which cnnot perform clock tick, wheres the process rel (z) represents the prt which is forced to perform clock tick. Since we must cover the cse where the right-hnd side cnnot perform clock tick s well, we hve introduced xiom DRTM5. Exmple 3.1 We show how the free merge opertor cn e eliminted from the process ( + rel ()) ( + rel ()). ( + rel ()) ( + rel ()) DRTM1 = ( + rel ()) ( + rel ()) + ( + rel ()) ( + rel ()) DRTM4 = ( + rel ()) + rel () ( + rel ()) + ( + rel ()) + rel () ( + rel ()) DRTM2 = ( + rel ()) + rel () ( + rel ()) + ( + rel ()) + rel () ( + rel ()) DCS1 = ( + rel ()) + rel () (ν rel () + rel ()) + (ν rel () + rel ()) + rel () ( + rel ()) DRTM6 = ( + rel ()) + rel ( ) + ( + rel ()) + rel ( ) DRT1 = ( + rel ()) + rel ( + ) + ( + rel ()) DRTM2 = ( + rel ()) + rel ( + ) + ( + rel ()) For the opertionl semntics we hve the opertionl rules of BPA ID nd dditionlly the opertionl rules for the prllel composition without communiction nd its time step semntics from Tle 4. We hve results similr to those given in the previous section. Theorem 3.2 (Elimintion) Let t e closed PA ID term. Then there exists sic term s over BPA ID such tht PA ID t = s. Theorem 3.3 (Soundness nd Completeness) Let p nd q e closed PA ID terms. Then we hve PA ID p = q if nd only if p q. 7

x x x y x y, y x y x, x y x y x x y y, y x y, x y y x x, y y x y x y, x y x y Tle 4: Additionl opertionl rules for PA ID. Theorem 3.4 (Conservtivity) PA ID is conservtive extension of BPA ID, i.e. for ll closed BPA ID terms s nd t we hve BPA ID s = t if nd only if PA ID s = t. In the previous section we gve n interprettion of the opertors of BPA ID on process grphs. In this section we dded two opertors. We will next interpret these on process grphs. Thereto, we introduce the notion of initil nodes. A node of process grph is clled initil if nd only if it cn e reched from the root node vi -leled edges only. 1. Given two process grphs g nd h, we otin the process grph g h s follows. The nodes of g h re otined y tking the crtesin product of the nodes of g nd the nodes of h. The edges of g h re for A, s, s 1, s 2 nodes of g nd t, t 1, t 2 nodes of h given y: () if s 1 s2 in g, then (s 1, t) (s 2, t) in g h; () if t 1 t2 in h, then (s, t 1 ) (s, t 2 ) in g h; (c) if s 1 s2 in g nd t 1 t2 in h, then (s 1, t 1 ) (s 2, t 2 ) in g h; (d) if s 1 s2 in g nd t in h, then (s 1, t) (s 2, t) in g h; (e) if t 1 t2 in h nd s in g, then (s, t 1 ) (s, t 2 ) in g h; (f) There re no other edges in g h. The root node of g h is the pir of root nodes from g nd h. A node (s, t) in g h hs successful termintion lel if nd only if s hs successful termintion lel in g nd t hs successful termintion lel in h. 2. Given two process grphs g nd h, in order to otin g h from g h, we descrie the following procedure: () The root node of g h does not hve -leled loop. In this cse root unwind the grph with respect to ρ. Then remove ll edges (s, t) (s, t ) with (s, t) the root of ρ(g h). Repet this procedure for every sugrph with root node (s, t ) in ρ(g h) which is connected to the root of ρ(g h) y -leled edge. () The root node of g h hs -leled loop. In this cse root unwind the grph with respect to ρ nd remove ll edges (s, t) (s, t ) with (s, t) the root of ρ (g h). Exmple 3.5 The interprettion of the prllel composition opertor is illustrted for the process (+ rel ()) (+ rel ()). Figure 7 gives process grphs for + rel (), + rel (), (+ rel ()) (+ rel ()), nd ( + rel ()) ( + rel ()). Exercise 3.6 Give sic BPA ID terms for the BPA ID terms, rel (), rel () rel (), nd rel ( rel ( ) + rel (c)) ( rel (c) + δ). Give lso process grphs for these terms using the direct interprettion of the constnts nd function symols in the grph model. 8

Figure 7: The process grphs. Exercise 3.7 Prove the following for closed PA ID-terms x nd y: 1. PA ID rel (x) ( + y) = rel (x) y 2. PA ID rel (x) ( y + z) = rel (x) z Exercise 3.8 Prove the following for ritrry PA ID-terms x, y, z nd A. 1. PA ID rel (x) rel (y) = rel (x y) 2. PA ID x y = y x 3. PA ID rel (x) δ = δ 4. PA ID rel (x) rel (y) = rel (x y) 4 Extension with Communiction We dd the communiction merge sed on given prtil, commuttive nd ssocitive communiction function γ : A A A, nd the encpsultion opertor H (for H A). The resulting process lger is clled ACP ID. The xioms of this process lger re the xioms of BPA ID nd dditionlly the xioms from Tle 5. Note tht we hve replced the xiom M1 from PA ID y the xiom CM1. The xioms DRTCF1 nd DRTCF2 define how the communiction function, which is defined on the set of delyle ctions, is interpreted for non-delyle ctions. The xioms DRTCM2-6 for re similr to those of ACP. The xioms DRTCM7-9 express tht, in sitution tht only one of the two processes is enforced to execute clock tick the result is dedlock. In the cse tht oth processes re enforced to perform clock tick, these re synchronized. Exmple 4.1 We show how the merge opertor cn e eliminted from the process (+ rel ()) (+ rel ()) where the only possile communiction is given y = c. First, we compute ( + rel ()) ( + rel ()). ( + rel ()) ( + rel ()) DRT CM5 = ( + rel ()) + rel () ( + rel ()) DRT CM6 = + rel () + rel () + rel () rel () DRT CF1 = c + rel () + rel () + rel () rel () DCS1 = c + ν rel () rel () + rel () ν rel () + rel () rel () 9

= γ(, ) if γ defined DRTCF1 = δ otherwise DRTCF2 x y = x y + y x + x y DRTCM1 x = x DRTM2 x y = (x y) DRTM3 (x + y) z = x z + y z DRTM4 rel (x) ν rel (y) = δ DRTM5 rel (x) (ν rel (y) + rel (z)) = rel (x z) DRTM6 x = ( ) x DRTCM2 x = ( ) x DRTCM3 x y = ( ) (x y) DRTCM4 (x + y) z = x z + y z DRTCM5 x (y + z) = x y + x z DRTCM6 rel (x) ν rel (y) = δ DRTCM7 ν rel (x) rel (y) = δ DRTCM8 rel (x) rel (y) = rel (x y) DRTCM9 H () = if H DRTD1 H () = δ if H DRTD2 H (x + y) = H (x) + H (y) DRTD3 H (x y) = H (x) H (y) DRTD4 H ( rel (x)) = rel ( H (x)) DRTD5 Tle 5: Additionl xioms for ACP ID. 10

DRT CM8 = c + δ + rel () ν rel () + rel () rel () DRT CM7 = c + δ + δ + rel () rel () DRT CM9 = c + δ + δ + rel ( ) DRTA6 = c + rel ( ) DRT CF1 = c + rel (c) We use this computtion nd the computtion of Exmple 3.1 to compute (+ rel ()) (+ rel ()). ( + rel ()) ( + rel ()) DRT CM1 = ( + rel ()) ( + rel ()) + ( + rel ()) ( + rel ()) + ( + rel ()) ( + rel ()) = ( + rel ()) + rel ( + ) + ( + rel ()) + ( + rel ()) ( + rel ()) = ( + rel ()) + rel ( + ) + ( + rel ()) + c + rel (c) DRT1 = ( + rel ()) + rel ( + + c) + ( + rel ()) + c The opertionl semntics of ACP ID is given y the opertionl rules of PA ID nd dditionlly the opertionl rules for the prllel composition with communiction nd for encpsultion nd their time step semntics from Tle 6. x x, y y, γ(, ) = c x y c x y, x y c x y x, y, γ(, ) = c x y c, x y c x x, H H (x) H (x ) x x H (x) H (x ) x x, y, γ(, ) = c x y c x, y x c x, x y c x, y x c x x x, y y x y x y x, H H (x) Tle 6: Additionl opertionl rules for ACP ID. We hve results similr to those of the previous sections. Theorem 4.2 (Elimintion) Let t e closed ACP ID term. Then there exists sic term s over BPA ID such tht ACP ID t = s. Theorem 4.3 (Soundness nd Completeness) Let p nd q e closed ACP ID terms. Then we hve ACP ID p = q if nd only if p q. Theorem 4.4 (Conservtivity) ACP ll closed BPA ID terms s nd t we hve BPA ID is conservtive extension of BPA ID s = t if nd only if ACP ID, i.e. for ID s = t. Next, we will give direct interprettion of the new merge, communiction merge nd encpsultion. 11

1. Given two process grphs g nd h, the process grph for g h is otined s follows: Tke the process grph for g h from the previous section nd dd n edge (s 1, t 1 ) c (s 2, t 2 ) whenever s 1 s2 in g, t 1 t2 in h, nd γ(, ) = c. 2. Given two process grphs g nd h, in order to otin g h from g h, we descrie the following procedure: () The root node of g h does not hve -leled loop. In this cse root unwind the grph with respect to ρ. Then remove ll edges (s, t) (s, t ) with (s, t) the root of ρ(g h). Also remove ll edges (s, t) c (s, t ) with (s, t) the root of ρ(g h) whenever (s, t) (s, t ), (s, t) (s, t) nd γ(, ) = c in ρ(g h). Repet this procedure for every sugrph with root node (s, t ) in ρ(g h) which is connected to the root of ρ(g h) y -leled edge. () The root node of g h hs -leled loop. In this cse root unwind the grph with respect to ρ nd remove ll edges (s, t) (s, t ) with (s, t) the root of ρ (g h). Also remove ll edges (s, t) c (s, t ) with (s, t) the root of ρ(g h) whenever (s, t) (s, t ), (s, t) (s, t) nd γ(, ) = c in ρ (g h). 3. Given two process grphs g nd h, in order to otin g h from g h, we descrie the following procedure: () The root node of g h does not hve -leled loop. In this cse root unwind the grph with respect to ρ. Then remove ll edges (s, t) (s, t ) nd (s, t) (s, t) with (s, t) the root of ρ(g h). Repet this procedure for every sugrph with root node (u, v) in ρ(g h) which is connected to the root of ρ(g h) y -leled edge. () The root node of g h hs -leled loop. In this cse root unwind the root with respect to ρ nd remove ll edges (s, t) (s, t ) nd (s, t) (s, t) with (s, t) the root of ρ (g h). 4. Given the process grph g, the process grph for H (g) is otined from g y removing ll edges which re leled y n ction from the set H. Exercise 4.5 Give the process grphs for the processes ( + rel ()) ( + rel ()) nd ( + rel ()) ( + rel ()) using the interprettion in the grph model. The only defined communiction is = = c. Exercise 4.6 Consider the process grphs from Figure 6. Give process grphs for g h nd i j with c = c = d the only defined communiction. Tke H = {, c}. Give lso process grphs for H (g h) nd H (i j). Exercise 4.7 Prove for closed ACP ID terms x, y, nd z the following: 1. x y = y x 2. (x y) z = x (y z) 5 Extension with Delyle Actions In this section we will extend the process lger BPA ID from the previous section with the constnts from A δ. These re the delyle ctions. The resulting process lger will e clled BPA ID. The constnt represents the proces tht cn execute in n ritrry time slice, followed y immedite termintion. We define these constnts using the opertor ω, the unounded strt dely opertor: x ω cn strt the execution of x in the current time slice, or dely unchnged to the next time slice. The defining xiom for this opertor tkes the form of 12

recursive eqution. In order to prove identities for the unounded strt dely opertor, we need restricted form of the Recursive Specifiction Principle RSP. We cll this restricted version RSP(USD). The unounded strt dely opertor is defined esily in terms of the current time slice time out opertor. The delyle ctions re then chrcterised in terms of the non-delyle ctions s descried y xiom ATS (Any Time Slice). The xioms for ω nd delyle ctions re given in Tle 7. x ω = ν rel (x) + rel ( x ω ) USD = ω ATS Tle 7: Axioms for unounded strt dely nd delyle ctions. Exmple 5.1 As n exmple we show tht the following processes re derivly equivlent: + rel () nd + rel ( + + rel ()). + rel () ATS = ω + rel () USD = νrel () + rel ( ω ) + rel () DRT1 = ν rel () + rel ( ω + ) USD = νrel () + rel (ν rel () + rel ( ω ) + ) DCS1 = + rel ( + rel ( ω ) + ) ATS = + rel ( + rel () + ) An opertionl semntics for these constnts nd opertors is given y the opertionl rules in Tle 8. δ δ x x x ω x x x ω x ω x ω Tle 8: Opertionl rules for unounded strt dely nd delyle ctions. Next, we will introduce the recursive specifiction principle for unounded strt dely. This principle is necessry to prove identities for the unounded strt dely opertor. y = ν rel (x) + rel (y) y = x ω RSP(USD) Tle 9: RSP for Unounded Strt Dely. Exmple 5.2 To illustrte the use of RSP(USD) we prove tht the processes rel () ω nd δ re identicl. Tke x rel () nd y δ. Then we cn conclude x ω = y from y = ν rel (x) + rel (y). 13

We will prove this from the xioms. ν rel ( rel ()) + rel (δ) DCS4 = δ + rel (δ) DCS1 = ν rel (δ) + rel (δ) ATS = ν rel (δ) + rel ( δ ω ) USD = δ ω ATS = δ We define the set of sic terms B over BPA ID inductively. We use the uxiliry sets ND (no dely), which represents sic terms tht will strt in the current time slice, nd RD (root dely), i.e., terms tht cn perform ny numer of time steps efore strting. These sets of terms re defined simultneously s follows: 1. ND B 2. if A δ, then ND 3. if A nd t B, then t ND 4. if s, t ND, then s + t ND 5. if t B, then rel (t) B 6. RD B 7. if A δ, then RD 8. if A nd t B, then t RD 9. if s, t RD, then s + t RD 10. if t ND nd s B, then t + rel (s) B. Some reflection leds to the insight tht the sic terms over BPA ID re exctly the terms of one of the following two forms: 1. i t i + j + i<m j<n k<oc k s k + d l, with m + n > 0, o + p > 0, i, c k A, j, d l A δ l<p nd t i, s k sic terms; 2. i t i + j + rel (t), with m, n 0, i, j A, nd t i, t sic terms. i<m j<n Theorem 5.3 (Elimintion) Let t e closed BPA ID term. Then there exists sic term s over BPA ID such tht BPA ID t = s. Theorem 5.4 (Soundness nd Completeness) Let p nd q e closed BPA ID terms. Then we hve BPA ID p = q if nd only if p q. Theorem 5.5 (Conservtivity) BPA ID is conservtive extension of BPA δ nd BPA ID, i.e. for ll closed BPA δ terms s nd t we hve BPA δ s = t if nd only if BPA ID s = t nd for ll closed BPA ID terms u nd v we hve BPA ID u = v if nd only if BPA ID u = v. We give n interprettion of the constnts from A δ nd opertors in terms of process grphs. 1. The constnt δ is mpped to the process grph with one node, the root. There is - leled edge connecting this node to itself. The node hs no successful termintion lel (see Figure 8). 14

2. The constnt is mpped to the process grph with two nodes, the first the root, the lst successful termintion node, connected y -leled edge. Moreover, the root node is connected y -leled edge to itself (see Figure 8). 3. Given grph g, the grph g ω is otined from g y removing -leled edges from the root node nd dding -leled edge from the root node to itself. Figure 8: The process grphs for δ nd. Exercise 5.6 Give process grphs for the BPA ID terms: +, ω, rel (), nd + rel (). Exercise 5.7 Give sic terms for the BPA ID terms + rel ( ++ rel ()) nd ( +) ( + rel (c)). The only defined communiction is given y = c. Give lso process grphs for those terms. Exercise 5.8 Show tht the xiom A6, i.e. x + δ = x, does not hold in BPA ID. Exercise 5.9 Model the ctions performed y the cller descried elow s BPA ID term. A cller tkes the phone of the hook. If he hers certin tone within tht time unit he dils some numer (it doesn t mtter which one). If he doesn t her the tone he throws the phone on the hook. After diling the numer the cller wits t most 2 time units for the other side to pick up the phone. After some time the connection is roken y putting the phone on the hook. If 3 time units pssed nd the cll is not nswered he puts the phone on the hook. Use the following tomic ctions to model this process: ofhook onhook dil enled connection tke the phone of the hook put the phone on the hook dil the numer the response tone to picking up the hook the cll is nswered We ssume tht the cller is cple to dil the numer without mking errors. Exercise 5.10 Prove tht for n ritrry BPA ID term x we hve x ω = x ω + rel ( x ω ). Also prove tht rel (x) ω = δ in BPA ID. 6 Additionl Fetures Imge tht we wnt to specify, using one of the previously introduced process lgers, process which hs the following ehviour. In the current time slice the suprocess x is performed or in time slice 1934775 (or ny other lrge numer) the suprocess y is performed. It is not very difficult to write down this process. However, it might tke quite some spce. Also redility is not well served y the resulting expression. In this section we will introduce simple shorthnd for executing numer of clock ticks. As shorthnd for the term rel ( rel ( rel ( x) )) }{{}}{{} n times n times 15

we write rel n (x). Formlly, this nottion cn e defined s follows: { rel(x) n x if n = 0 = rel ( n 1 rel (x)) if n 1 A useful dditionl opertor is the time out opertor rel. It specifies tht the first ction must occur efore certin time. This opertor is defined y the xioms from Tle 10. ν rel (x) rel n = ν rel (x) DTO1 (ν rel (x) + rel (y)) rel 1 = ν rel (x) DTO2 (ν rel (x) + rel (y)) rel (n + 1) = ν rel (x) + rel (y rel n) DTO3 Tle 10: Axioms for the time out opertor (n 1). Together with rel m this opertor cn e used to express tht certin delyle ction must e executed t lest m clock ticks from now, ut no more thn n clock ticks from now s follows rel m() rel n. Exercise 6.1 Give opertionl rules for m rel nd rel. Also define these opertors directly on the grph model. Exercise 6.2 Prove tht for ritrry BPA ID terms nd m, n 0 nd o, p 1 the following propositions hold: 1. rel m(n rel (x)) = m+n(x) rel 2. rel m(x) + n rel (y) = min(m,n) rel ( m min(m,n) rel 3. (x rel o) rel p = x rel min(o, p) (x) + n min(m,n) (y)) Exercise 6.3 Show tht the following equtions cn e derived from the xioms of BPA ID nd the xioms of the time out opertor. rel rel 1 = rel (n + 1) = + rel ( rel n) Exercise 6.4 Define function T mx which ssocites to process the mximl numer of time slices tht it needs to terminte successfully. Define lso function T min which ssocites to process the miniml numer of time slices in which it cn terminte successfully. Exercise 6.5 Use the opertors n rel nd rel to give shorter description of the cller from Exercise 5.9. References [BB95] J.C.M. Beten nd J.A. Bergstr. Discrete Time Process Alger. Forml Aspects of Computing, 1995. [BW90] J.C.M. Beten nd W.P. Weijlnd. Process Alger. Cmridge Trcts in Theoreticl Computer Science 18. Cmridge University Press, Cmridge, 1990. ISBN 0-521-40043-0. 16