Discrete Time Process Algebra with Relative Timing

Size: px
Start display at page:

Download "Discrete Time Process Algebra with Relative Timing"

Transcription

1 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 Hndout My 16, 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

2 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

3 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

4 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

5 () 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 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

6 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

7 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

8 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

9 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

10 = γ(, ) 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

11 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

12 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

13 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

14 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

15 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 (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

16 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, [BW90] J.C.M. Beten nd W.P. Weijlnd. Process Alger. Cmridge Trcts in Theoreticl Computer Science 18. Cmridge University Press, Cmridge, ISBN

Coalgebra, Lecture 15: Equations for Deterministic Automata

Coalgebra, Lecture 15: Equations for Deterministic Automata Colger, Lecture 15: Equtions for Deterministic Automt Julin Slmnc (nd Jurrin Rot) Decemer 19, 2016 In this lecture, we will study the concept of equtions for deterministic utomt. The notes re self contined

More information

Convert the NFA into DFA

Convert the NFA into DFA Convert the NF into F For ech NF we cn find F ccepting the sme lnguge. The numer of sttes of the F could e exponentil in the numer of sttes of the NF, ut in prctice this worst cse occurs rrely. lgorithm:

More information

Designing finite automata II

Designing finite automata II Designing finite utomt II Prolem: Design DFA A such tht L(A) consists of ll strings of nd which re of length 3n, for n = 0, 1, 2, (1) Determine wht to rememer out the input string Assign stte to ech of

More information

p-adic Egyptian Fractions

p-adic Egyptian Fractions p-adic Egyptin Frctions Contents 1 Introduction 1 2 Trditionl Egyptin Frctions nd Greedy Algorithm 2 3 Set-up 3 4 p-greedy Algorithm 5 5 p-egyptin Trditionl 10 6 Conclusion 1 Introduction An Egyptin frction

More information

Minimal DFA. minimal DFA for L starting from any other

Minimal DFA. minimal DFA for L starting from any other Miniml DFA Among the mny DFAs ccepting the sme regulr lnguge L, there is exctly one (up to renming of sttes) which hs the smllest possile numer of sttes. Moreover, it is possile to otin tht miniml DFA

More information

Process Algebra: An Algebraic Theory of Concurrency

Process Algebra: An Algebraic Theory of Concurrency Process Alger: An Algeric Theory of Concurrency Wn Fokkink Vrije Universiteit Amsterdm, Deprtment of Theoreticl Computer Science, De Boeleln 1081, 1081 HV Amsterdm, The Netherlnds wnf@cs.vu.nl Astrct.

More information

Lecture 08: Feb. 08, 2019

Lecture 08: Feb. 08, 2019 4CS4-6:Theory of Computtion(Closure on Reg. Lngs., regex to NDFA, DFA to regex) Prof. K.R. Chowdhry Lecture 08: Fe. 08, 2019 : Professor of CS Disclimer: These notes hve not een sujected to the usul scrutiny

More information

Parse trees, ambiguity, and Chomsky normal form

Parse trees, ambiguity, and Chomsky normal form Prse trees, miguity, nd Chomsky norml form In this lecture we will discuss few importnt notions connected with contextfree grmmrs, including prse trees, miguity, nd specil form for context-free grmmrs

More information

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

Farey Fractions. Rickard Fernström. U.U.D.M. Project Report 2017:24. Department of Mathematics Uppsala University U.U.D.M. Project Report 07:4 Frey Frctions Rickrd Fernström Exmensrete i mtemtik, 5 hp Hledre: Andres Strömergsson Exmintor: Jörgen Östensson Juni 07 Deprtment of Mthemtics Uppsl University Frey Frctions

More information

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

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science CSCI 340: Computtionl Models Kleene s Theorem Chpter 7 Deprtment of Computer Science Unifiction In 1954, Kleene presented (nd proved) theorem which (in our version) sttes tht if lnguge cn e defined y ny

More information

Formal Languages and Automata

Formal Languages and Automata Moile Computing nd Softwre Engineering p. 1/5 Forml Lnguges nd Automt Chpter 2 Finite Automt Chun-Ming Liu cmliu@csie.ntut.edu.tw Deprtment of Computer Science nd Informtion Engineering Ntionl Tipei University

More information

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

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014 CMPSCI 250: Introduction to Computtion Lecture #31: Wht DFA s Cn nd Cn t Do Dvid Mix Brrington 9 April 2014 Wht DFA s Cn nd Cn t Do Deterministic Finite Automt Forml Definition of DFA s Exmples of DFA

More information

Exercises with (Some) Solutions

Exercises with (Some) Solutions Exercises with (Some) Solutions Techer: Luc Tesei Mster of Science in Computer Science - University of Cmerino Contents 1 Strong Bisimultion nd HML 2 2 Wek Bisimultion 31 3 Complete Lttices nd Fix Points

More information

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton 25. Finite Automt AUTOMATA AND LANGUAGES A system of computtion tht only hs finite numer of possile sttes cn e modeled using finite utomton A finite utomton is often illustrted s stte digrm d d d. d q

More information

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

Regular expressions, Finite Automata, transition graphs are all the same!! CSI 3104 /Winter 2011: Introduction to Forml Lnguges Chpter 7: Kleene s Theorem Chpter 7: Kleene s Theorem Regulr expressions, Finite Automt, trnsition grphs re ll the sme!! Dr. Neji Zgui CSI3104-W11 1

More information

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

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages Deprtment of Computer Science, Austrlin Ntionl University COMP2600 Forml Methods for Softwre Engineering Semester 2, 206 Assignment Automt, Lnguges, nd Computility Smple Solutions Finite Stte Automt nd

More information

1 Nondeterministic Finite Automata

1 Nondeterministic Finite Automata 1 Nondeterministic Finite Automt Suppose in life, whenever you hd choice, you could try oth possiilities nd live your life. At the end, you would go ck nd choose the one tht worked out the est. Then you

More information

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

CS 330 Formal Methods and Models Dana Richards, George Mason University, Spring 2016 Quiz Solutions CS 330 Forml Methods nd Models Dn Richrds, George Mson University, Spring 2016 Quiz Solutions Quiz 1, Propositionl Logic Dte: Ferury 9 1. (4pts) ((p q) (q r)) (p r), prove tutology using truth tles. p

More information

CM10196 Topic 4: Functions and Relations

CM10196 Topic 4: Functions and Relations CM096 Topic 4: Functions nd Reltions Guy McCusker W. Functions nd reltions Perhps the most widely used notion in ll of mthemtics is tht of function. Informlly, function is n opertion which tkes n input

More information

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

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University CS415 Compilers Lexicl Anlysis nd These slides re sed on slides copyrighted y Keith Cooper, Ken Kennedy & Lind Torczon t Rice University First Progrmming Project Instruction Scheduling Project hs een posted

More information

Nondeterminism and Nodeterministic Automata

Nondeterminism and Nodeterministic Automata Nondeterminism nd Nodeterministic Automt 61 Nondeterminism nd Nondeterministic Automt The computtionl mchine models tht we lerned in the clss re deterministic in the sense tht the next move is uniquely

More information

Bridging the gap: GCSE AS Level

Bridging the gap: GCSE AS Level Bridging the gp: GCSE AS Level CONTENTS Chpter Removing rckets pge Chpter Liner equtions Chpter Simultneous equtions 8 Chpter Fctors 0 Chpter Chnge the suject of the formul Chpter 6 Solving qudrtic equtions

More information

Closure Properties of Regular Languages

Closure Properties of Regular Languages Closure Properties of Regulr Lnguges Regulr lnguges re closed under mny set opertions. Let L 1 nd L 2 e regulr lnguges. (1) L 1 L 2 (the union) is regulr. (2) L 1 L 2 (the conctention) is regulr. (3) L

More information

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:

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: Vectors 1-23-2018 I ll look t vectors from n lgeric point of view nd geometric point of view. Algericlly, vector is n ordered list of (usully) rel numers. Here re some 2-dimensionl vectors: (2, 3), ( )

More information

Lecture 3: Equivalence Relations

Lecture 3: Equivalence Relations Mthcmp Crsh Course Instructor: Pdric Brtlett Lecture 3: Equivlence Reltions Week 1 Mthcmp 2014 In our lst three tlks of this clss, we shift the focus of our tlks from proof techniques to proof concepts

More information

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

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4 Intermedite Mth Circles Wednesdy, Novemer 14, 2018 Finite Automt II Nickols Rollick nrollick@uwterloo.c Regulr Lnguges Lst time, we were introduced to the ide of DFA (deterministic finite utomton), one

More information

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

Things to Memorize: A Partial List. January 27, 2017 Things to Memorize: A Prtil List Jnury 27, 2017 Chpter 2 Vectors - Bsic Fcts A vector hs mgnitude (lso clled size/length/norm) nd direction. It does not hve fixed position, so the sme vector cn e moved

More information

2.4 Linear Inequalities and Interval Notation

2.4 Linear Inequalities and Interval Notation .4 Liner Inequlities nd Intervl Nottion We wnt to solve equtions tht hve n inequlity symol insted of n equl sign. There re four inequlity symols tht we will look t: Less thn , Less thn or

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 utomt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Prolem (II) Chpter II.5.: Properties of Context Free Grmmrs (14) nton Setzer (Bsed on ook drft y J. V. Tucker nd K. Stephenson)

More information

Section 6.1 INTRO to LAPLACE TRANSFORMS

Section 6.1 INTRO to LAPLACE TRANSFORMS Section 6. INTRO to LAPLACE TRANSFORMS Key terms: Improper Integrl; diverge, converge A A f(t)dt lim f(t)dt Piecewise Continuous Function; jump discontinuity Function of Exponentil Order Lplce Trnsform

More information

CMSC 330: Organization of Programming Languages

CMSC 330: Organization of Programming Languages CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 CMSC 330 1 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All exmples so fr Nondeterministic

More information

Bases for Vector Spaces

Bases for Vector Spaces Bses for Vector Spces 2-26-25 A set is independent if, roughly speking, there is no redundncy in the set: You cn t uild ny vector in the set s liner comintion of the others A set spns if you cn uild everything

More information

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

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2 CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

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

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1 Chpter Five: Nondeterministic Finite Automt Forml Lnguge, chpter 5, slide 1 1 A DFA hs exctly one trnsition from every stte on every symol in the lphet. By relxing this requirement we get relted ut more

More information

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

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016 CS125 Lecture 12 Fll 2016 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple

More information

CS12N: The Coming Revolution in Computer Architecture Laboratory 2 Preparation

CS12N: The Coming Revolution in Computer Architecture Laboratory 2 Preparation CS2N: The Coming Revolution in Computer Architecture Lortory 2 Preprtion Ojectives:. Understnd the principle of sttic CMOS gte circuits 2. Build simple logic gtes from MOS trnsistors 3. Evlute these gtes

More information

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

Centrum voor Wiskunde en Informatica REPORTRAPPORT. Supervisory control for nondeterministic systems Centrum voor Wiskunde en Informtic REPORTRAPPORT Supervisory control for nondeterministic systems A. Overkmp Deprtment of Opertions Reserch, Sttistics, nd System Theory BS-R9411 1994 Supervisory Control

More information

Introduction to Group Theory

Introduction to Group Theory Introduction to Group Theory Let G be n rbitrry set of elements, typiclly denoted s, b, c,, tht is, let G = {, b, c, }. A binry opertion in G is rule tht ssocites with ech ordered pir (,b) of elements

More information

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

8. Complex Numbers. We can combine the real numbers with this new imaginary number to form the complex numbers. 8. Complex Numers The rel numer system is dequte for solving mny mthemticl prolems. But it is necessry to extend the rel numer system to solve numer of importnt prolems. Complex numers do not chnge the

More information

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

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck. Outline Automt Theory 101 Rlf Huuck Introduction Finite Automt Regulr Expressions ω-automt Session 1 2006 Rlf Huuck 1 Session 1 2006 Rlf Huuck 2 Acknowledgement Some slides re sed on Wolfgng Thoms excellent

More information

Lecture 09: Myhill-Nerode Theorem

Lecture 09: Myhill-Nerode Theorem CS 373: Theory of Computtion Mdhusudn Prthsrthy Lecture 09: Myhill-Nerode Theorem 16 Ferury 2010 In this lecture, we will see tht every lnguge hs unique miniml DFA We will see this fct from two perspectives

More information

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

Matrix Algebra. Matrix Addition, Scalar Multiplication and Transposition. Linear Algebra I 24 Mtrix lger Mtrix ddition, Sclr Multipliction nd rnsposition Mtrix lger Section.. Mtrix ddition, Sclr Multipliction nd rnsposition rectngulr rry of numers is clled mtrix ( the plurl is mtrices ) nd the

More information

Bernoulli Numbers Jeff Morton

Bernoulli Numbers Jeff Morton Bernoulli Numbers Jeff Morton. We re interested in the opertor e t k d k t k, which is to sy k tk. Applying this to some function f E to get e t f d k k tk d k f f + d k k tk dk f, we note tht since f

More information

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

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb. CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

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.

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. Regulr Expressions, Pumping Lemm, Right Liner Grmmrs Ling 106 Mrch 25, 2002 1 Regulr Expressions A regulr expression descries or genertes lnguge: it is kind of shorthnd for listing the memers of lnguge.

More information

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

STRUCTURE OF CONCURRENCY Ryszard Janicki. Department of Computing and Software McMaster University Hamilton, ON, L8S 4K1 Canada 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

More information

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.

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. 378 Reltions 16.7 Solutions for Chpter 16 Section 16.1 Exercises 1. Let A = {0,1,2,3,4,5}. Write out the reltion R tht expresses > on A. Then illustrte it with digrm. 2 1 R = { (5,4),(5,3),(5,2),(5,1),(5,0),(4,3),(4,2),(4,1),

More information

First Midterm Examination

First Midterm Examination Çnky University Deprtment of Computer Engineering 203-204 Fll Semester First Midterm Exmintion ) Design DFA for ll strings over the lphet Σ = {,, c} in which there is no, no nd no cc. 2) Wht lnguge does

More information

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

set is not closed under matrix [ multiplication, ] and does not form a group. Prolem 2.3: Which of the following collections of 2 2 mtrices with rel entries form groups under [ mtrix ] multipliction? i) Those of the form for which c d 2 Answer: The set of such mtrices is not closed

More information

Linear Inequalities. Work Sheet 1

Linear Inequalities. Work Sheet 1 Work Sheet 1 Liner Inequlities Rent--Hep, cr rentl compny,chrges $ 15 per week plus $ 0.0 per mile to rent one of their crs. Suppose you re limited y how much money you cn spend for the week : You cn spend

More information

1.9 C 2 inner variations

1.9 C 2 inner variations 46 CHAPTER 1. INDIRECT METHODS 1.9 C 2 inner vritions So fr, we hve restricted ttention to liner vritions. These re vritions of the form vx; ǫ = ux + ǫφx where φ is in some liner perturbtion clss P, for

More information

First Midterm Examination

First Midterm Examination 24-25 Fll Semester First Midterm Exmintion ) Give the stte digrm of DFA tht recognizes the lnguge A over lphet Σ = {, } where A = {w w contins or } 2) The following DFA recognizes the lnguge B over lphet

More information

The Regulated and Riemann Integrals

The Regulated and Riemann Integrals Chpter 1 The Regulted nd Riemnn Integrls 1.1 Introduction We will consider severl different pproches to defining the definite integrl f(x) dx of function f(x). These definitions will ll ssign the sme vlue

More information

Bisimulation. R.J. van Glabbeek

Bisimulation. R.J. van Glabbeek Bisimultion R.J. vn Glbbeek NICTA, Sydney, Austrli. School of Computer Science nd Engineering, The University of New South Wles, Sydney, Austrli. Computer Science Deprtment, Stnford University, CA 94305-9045,

More information

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

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010 CS 311 Homework 3 due 16:30, Thursdy, 14 th Octoer 2010 Homework must e sumitted on pper, in clss. Question 1. [15 pts.; 5 pts. ech] Drw stte digrms for NFAs recognizing the following lnguges:. L = {w

More information

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

Analytically, vectors will be represented by lowercase bold-face Latin letters, e.g. a, r, q. 1.1 Vector Alger 1.1.1 Sclrs A physicl quntity which is completely descried y single rel numer is clled sclr. Physiclly, it is something which hs mgnitude, nd is completely descried y this mgnitude. Exmples

More information

Finite Automata-cont d

Finite Automata-cont d Automt Theory nd Forml Lnguges Professor Leslie Lnder Lecture # 6 Finite Automt-cont d The Pumping Lemm WEB SITE: http://ingwe.inghmton.edu/ ~lnder/cs573.html Septemer 18, 2000 Exmple 1 Consider L = {ww

More information

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

Combinational Logic. Precedence. Quick Quiz 25/9/12. Schematics à Boolean Expression. 3 Representations of Logic Functions. Dr. Hayden So. 5/9/ Comintionl Logic ENGG05 st Semester, 0 Dr. Hyden So Representtions of Logic Functions Recll tht ny complex logic function cn e expressed in wys: Truth Tle, Boolen Expression, Schemtics Only Truth

More information

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

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont. NFA DFA Exmple 3 CMSC 330: Orgniztion of Progrmming Lnguges NFA {B,D,E {A,E {C,D {E Finite Automt, con't. R = { {A,E, {B,D,E, {C,D, {E 2 Equivlence of DFAs nd NFAs Any string from {A to either {D or {CD

More information

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

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.) CS 373, Spring 29. Solutions to Mock midterm (sed on first midterm in CS 273, Fll 28.) Prolem : Short nswer (8 points) The nswers to these prolems should e short nd not complicted. () If n NF M ccepts

More information

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

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018 CS 301 Lecture 04 Regulr Expressions Stephen Checkowy Jnury 29, 2018 1 / 35 Review from lst time NFA N = (Q, Σ, δ, q 0, F ) where δ Q Σ P (Q) mps stte nd n lphet symol (or ) to set of sttes We run n NFA

More information

Linear Systems with Constant Coefficients

Linear Systems with Constant Coefficients Liner Systems with Constnt Coefficients 4-3-05 Here is system of n differentil equtions in n unknowns: x x + + n x n, x x + + n x n, x n n x + + nn x n This is constnt coefficient liner homogeneous system

More information

Homework 3 Solutions

Homework 3 Solutions CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 3 Solutions 1. Give NFAs with the specified numer of sttes recognizing ech of the following lnguges. In ll cses, the lphet is Σ = {,1}.

More information

Handout: Natural deduction for first order logic

Handout: Natural deduction for first order logic MATH 457 Introduction to Mthemticl Logic Spring 2016 Dr Json Rute Hndout: Nturl deduction for first order logic We will extend our nturl deduction rules for sententil logic to first order logic These notes

More information

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

EECS 141 Due 04/19/02, 5pm, in 558 Cory UIVERSITY OF CALIFORIA College of Engineering Deprtment of Electricl Engineering nd Computer Sciences Lst modified on April 8, 2002 y Tufn Krlr (tufn@eecs.erkeley.edu) Jn M. Rey, Andrei Vldemirescu Homework

More information

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata CS103B ndout 18 Winter 2007 Ferury 28, 2007 Finite Automt Initil text y Mggie Johnson. Introduction Severl childrens gmes fit the following description: Pieces re set up on plying ord; dice re thrown or

More information

Review of Gaussian Quadrature method

Review of Gaussian Quadrature method Review of Gussin Qudrture method Nsser M. Asi Spring 006 compiled on Sundy Decemer 1, 017 t 09:1 PM 1 The prolem To find numericl vlue for the integrl of rel vlued function of rel vrile over specific rnge

More information

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

Exercises Chapter 1. Exercise 1.1. Let Σ be an alphabet. Prove wv = w + v for all strings w and v. 1 Exercises Chpter 1 Exercise 1.1. Let Σ e n lphet. Prove wv = w + v for ll strings w nd v. Prove # (wv) = # (w)+# (v) for every symol Σ nd every string w,v Σ. Exercise 1.2. Let w 1,w 2,...,w k e k strings,

More information

Tutorial Automata and formal Languages

Tutorial Automata and formal Languages Tutoril Automt nd forml Lnguges Notes for to the tutoril in the summer term 2017 Sestin Küpper, Christine Mik 8. August 2017 1 Introduction: Nottions nd sic Definitions At the eginning of the tutoril we

More information

MAA 4212 Improper Integrals

MAA 4212 Improper Integrals Notes by Dvid Groisser, Copyright c 1995; revised 2002, 2009, 2014 MAA 4212 Improper Integrls The Riemnn integrl, while perfectly well-defined, is too restrictive for mny purposes; there re functions which

More information

1 From NFA to regular expression

1 From NFA to regular expression Note 1: How to convert DFA/NFA to regulr expression Version: 1.0 S/EE 374, Fll 2017 Septemer 11, 2017 In this note, we show tht ny DFA cn e converted into regulr expression. Our construction would work

More information

Section 4: Integration ECO4112F 2011

Section 4: Integration ECO4112F 2011 Reding: Ching Chpter Section : Integrtion ECOF Note: These notes do not fully cover the mteril in Ching, ut re ment to supplement your reding in Ching. Thus fr the optimistion you hve covered hs een sttic

More information

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

System Validation (IN4387) November 2, 2012, 14:00-17:00 System Vlidtion (IN4387) Novemer 2, 2012, 14:00-17:00 Importnt Notes. The exmintion omprises 5 question in 4 pges. Give omplete explntion nd do not onfine yourself to giving the finl nswer. Good luk! Exerise

More information

Section 6.1 Definite Integral

Section 6.1 Definite Integral Section 6.1 Definite Integrl Suppose we wnt to find the re of region tht is not so nicely shped. For exmple, consider the function shown elow. The re elow the curve nd ove the x xis cnnot e determined

More information

September 13 Homework Solutions

September 13 Homework Solutions College of Engineering nd Computer Science Mechnicl Engineering Deprtment Mechnicl Engineering 5A Seminr in Engineering Anlysis Fll Ticket: 5966 Instructor: Lrry Cretto Septemer Homework Solutions. Are

More information

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

Suppose we want to find the area under the parabola and above the x axis, between the lines x = 2 and x = -2. Mth 43 Section 6. Section 6.: Definite Integrl Suppose we wnt to find the re of region tht is not so nicely shped. For exmple, consider the function shown elow. The re elow the curve nd ove the x xis cnnot

More information

1B40 Practical Skills

1B40 Practical Skills B40 Prcticl Skills Comining uncertinties from severl quntities error propgtion We usully encounter situtions where the result of n experiment is given in terms of two (or more) quntities. We then need

More information

Random subgroups of a free group

Random subgroups of a free group Rndom sugroups of free group Frédérique Bssino LIPN - Lortoire d Informtique de Pris Nord, Université Pris 13 - CNRS Joint work with Armndo Mrtino, Cyril Nicud, Enric Ventur et Pscl Weil LIX My, 2015 Introduction

More information

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

Strong Bisimulation. Overview. References. Actions Labeled transition system Transition semantics Simulation Bisimulation Strong Bisimultion Overview Actions Lbeled trnsition system Trnsition semntics Simultion Bisimultion References Robin Milner, Communiction nd Concurrency Robin Milner, Communicting nd Mobil Systems 32

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 Automt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Problem (II) Chpter II.5.: Properties of Context Free Grmmrs (14) Anton Setzer (Bsed on book drft by J. V. Tucker nd K. Stephenson)

More information

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

More on automata. Michael George. March 24 April 7, 2014 More on utomt Michel George Mrch 24 April 7, 2014 1 Automt constructions Now tht we hve forml model of mchine, it is useful to mke some generl constructions. 1.1 DFA Union / Product construction Suppose

More information

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

Homework 4. 0 ε 0. (00) ε 0 ε 0 (00) (11) CS 341: Foundations of Computer Science II Prof. Marvin Nakayama CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 4 1. UsetheproceduredescriedinLemm1.55toconverttheregulrexpression(((00) (11)) 01) into n NFA. Answer: 0 0 1 1 00 0 0 11 1 1 01 0 1 (00)

More information

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

BİL 354 Veritabanı Sistemleri. Relational Algebra (İlişkisel Cebir) BİL 354 Veritnı Sistemleri Reltionl lger (İlişkisel Ceir) Reltionl Queries Query lnguges: llow mnipultion nd retrievl of dt from dtse. Reltionl model supports simple, powerful QLs: Strong forml foundtion

More information

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

Improper Integrals. The First Fundamental Theorem of Calculus, as we ve discussed in class, goes as follows: Improper Integrls The First Fundmentl Theorem of Clculus, s we ve discussed in clss, goes s follows: If f is continuous on the intervl [, ] nd F is function for which F t = ft, then ftdt = F F. An integrl

More information

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.

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. York University CSE 2 Unit 3. DFA Clsses Converting etween DFA, NFA, Regulr Expressions, nd Extended Regulr Expressions Instructor: Jeff Edmonds Don t chet y looking t these nswers premturely.. For ech

More information

Designing Information Devices and Systems I Spring 2018 Homework 7

Designing Information Devices and Systems I Spring 2018 Homework 7 EECS 16A Designing Informtion Devices nd Systems I Spring 2018 omework 7 This homework is due Mrch 12, 2018, t 23:59. Self-grdes re due Mrch 15, 2018, t 23:59. Sumission Formt Your homework sumission should

More information

Chapter 14. Matrix Representations of Linear Transformations

Chapter 14. Matrix Representations of Linear Transformations Chpter 4 Mtrix Representtions of Liner Trnsformtions When considering the Het Stte Evolution, we found tht we could describe this process using multipliction by mtrix. This ws nice becuse computers cn

More information

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

Learning Goals. Relational Query Languages. Formal Relational Query Languages. Formal Query Languages: Relational Algebra and Relational Calculus Forml Query Lnguges: Reltionl Alger nd Reltionl Clculus Chpter 4 Lerning Gols Given dtse ( set of tles ) you will e le to express dtse query in Reltionl Alger (RA), involving the sic opertors (selection,

More information

DFA minimisation using the Myhill-Nerode theorem

DFA minimisation using the Myhill-Nerode theorem DFA minimistion using the Myhill-Nerode theorem Johnn Högerg Lrs Lrsson Astrct The Myhill-Nerode theorem is n importnt chrcteristion of regulr lnguges, nd it lso hs mny prcticl implictions. In this chpter,

More information

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

Talen en Automaten Test 1, Mon 7 th Dec, h45 17h30 Tlen en Automten Test 1, Mon 7 th Dec, 2015 15h45 17h30 This test consists of four exercises over 5 pges. Explin your pproch, nd write your nswer to ech exercise on seprte pge. You cn score mximum of 100

More information

The practical version

The practical version Roerto s Notes on Integrl Clculus Chpter 4: Definite integrls nd the FTC Section 7 The Fundmentl Theorem of Clculus: The prcticl version Wht you need to know lredy: The theoreticl version of the FTC. Wht

More information

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

Duality # Second iteration for HW problem. Recall our LP example problem we have been working on, in equality form, is given below. Dulity #. Second itertion for HW problem Recll our LP emple problem we hve been working on, in equlity form, is given below.,,,, 8 m F which, when written in slightly different form, is 8 F Recll tht we

More information

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

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun: CMPU 240 Lnguge Theory nd Computtion Spring 2019 NFAs nd Regulr Expressions Lst clss: Introduced nondeterministic finite utomt with -trnsitions Tody: Prove n NFA- is no more powerful thn n NFA Introduce

More information

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

expression simply by forming an OR of the ANDs of all input variables for which the output is 2.4 Logic Minimiztion nd Krnugh Mps As we found ove, given truth tle, it is lwys possile to write down correct logic expression simply y forming n OR of the ANDs of ll input vriles for which the output

More information

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

Models of Computation: Automata and Processes. J.C.M. Baeten Models of Computtion: Automt nd Processes J.C.M. Beten Jnury 4, 2010 ii Prefce Computer science is the study of discrete ehviour of intercting informtion processing gents. Here, ehviour is the centrl notion.

More information

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

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS CS 310 (sec 20) - Winter 2003 - Finl Exm (solutions) SOLUTIONS 1. (Logic) Use truth tles to prove the following logicl equivlences: () p q (p p) (q q) () p q (p q) (p q) () p q p q p p q q (q q) (p p)

More information

CS 330 Formal Methods and Models

CS 330 Formal Methods and Models CS 330 Forml Methods nd Models Dn Richrds, section 003, George Mson University, Fll 2017 Quiz Solutions Quiz 1, Propositionl Logic Dte: Septemer 7 1. Prove (p q) (p q), () (5pts) using truth tles. p q

More information

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

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh Finite Automt Informtics 2A: Lecture 3 Mry Cryn School of Informtics University of Edinburgh mcryn@inf.ed.c.uk 21 September 2018 1 / 30 Lnguges nd Automt Wht is lnguge? Finite utomt: recp Some forml definitions

More information

Process Algebra CSP A Technique to Model Concurrent Programs

Process Algebra CSP A Technique to Model Concurrent Programs 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

More information

State Minimization for DFAs

State Minimization for DFAs Stte Minimiztion for DFAs Red K & S 2.7 Do Homework 10. Consider: Stte Minimiztion 4 5 Is this miniml mchine? Step (1): Get rid of unrechle sttes. Stte Minimiztion 6, Stte is unrechle. Step (2): Get rid

More information