Component Based Testing with ioco

Size: px
Start display at page:

Download "Component Based Testing with ioco"

Transcription

1 CTIT Technicl Report TR CTIT 03 34, University of Twente, 2003 Component Bsed Testing with ioco Mchiel vn der Bijl 1, Arend Rensink 1 nd Jn Tretmns 2 1 Softwre Engineering, Deprtment of Computer Science, University of Twente P.O. Box 217, 7500 AE Enschede, The Netherlnds {vdbijl,rensink}@cs.utwente.nl 2 Softwre Technology Reserch Group, University of Nijmegen P.O. Box 9010, 6500 GL Nijmegen, The Netherlnds tretmns@cs.kun.nl Abstrct. Component bsed testing concerns the integrtion of components which hve lredy been tested seprtely. We show tht, with certin restrictions, the ioco-test theory for conformnce testing is suitble for component bsed testing, in the sense tht the integrtion of fully conformnt components is gurnteed to be correct. As consequence, there is no need to re-test the integrted system for conformnce. This result is lso relevnt for testing in context, since it implies tht every filure of system embedded in test context cn be reduced to fult of the system itself. Contents 1 Introduction Forml preliminries Approch Testing scenrio Component-bsed testing Exmple Compositionlity for synchroniztion nd hiding Synchroniztion Hiding Demonic completion Conclusions A Appendix: proofs A.1 Proofs of section 4.1 (Congruence properties for synchroniztion) 19 A.2 Proofs of Section 4.2 (Congruence properties for hiding) A.3 Proofs of section References This reserch ws supported by Ordin Finnce nd by the dutch reserch progrmme PROGRESS under project: TES5417: Atomyste ATOm splitting in embedded systems TEsting.

2 1 Introduction Testing is n importnt ctivity in ssessing nd controlling the qulity of systems, in prticulr in distributed nd communicting systems. Idelly, tests re developed from specifiction of required behvior, nd subsequently executed, be it mnully or utomticlly. The outcome of the test is nlyzed leding to verdict bout the correctness of the implementtion under test (iut) with respect to its specifiction. Test tools my support this testing process. When forml specifiction of the system is vilble, this opens wys towrd utomtic, specifiction bsed test genertion. For this purpose severl theories of forml testing nd test genertion, with corresponding tools, hve been developed. One of these theories is the so-clled ioco-test theory, which works on the bsis of lbeled trnsition systems [11, 12]. The nme ioco, which stnds for input/output conformnce, refers to the implementtion reltion (i.e., notion of correctness) on which the theory nd the test genertion lgorithm hve been built. A number of tools implement this lgorithm, mong which there re tgv [5], TestGen [6] nd TorX [1]. Two open issues in testing theory in generl, nd the ioco-theory in prticulr, re component bsed testing lso referred to s compositionl testing nd testing in context. For instnce, for the testing theory bsed on Finite-Stte- Mchines (FSM) this issue hs been studied in [9]. Component bsed testing considers integrtion testing of components which hve lredy been tested seprtely. The question is wht cn be concluded from the individul tests of the seprte components, nd wht should be (re)tested on the integrtion or system level. The im is to determine whether the composition of (correct) component implementtions lwys conforms to the composition of their specifictions. In the forml domin, the question is whether the implementtion reltion is pre-congruence for composition of components. Another scenrio, with similr chrcteristics, is testing in context. This refers to the sitution tht tester cnnot directly ccess the interfce of the implementtion under test but there is third system in between, such s network or protocol unit. This intermedite system is clled the test context [7, 8, 10]. The tester cn only indirectly observe nd control the iut vi the test context. This mkes testing weker, in the sense tht there re fewer possibilities for observtion nd control of the iut. With testing in context, the question is wht cn be concluded with respect to conformnce of the iut from testing the composition of iut nd its context: whether fults in the iut cn be detected by testing the composition of iut nd test context, nd whether filure of this composition lwys indictes fult of the iut. This question is the converse of component bsed testing: when testing in context we wish to detect errors in the iut component by testing it in composition with the test context, wheres in component bsed testing we wish to infer correctness of the integrted system from conformnce of the individul components. In the forml domin, both boil down to the question whether the implementtion reltion is pre-congruence for the composition opertors. 2

3 This pper studies pre-congruence properties of ioco for two opertions on lbeled trnsition systems (prllel composition nd hiding) tht model integrtion of components either different prts of the iut or the iut nd the test context. If ioco is pre-congruence for these opertions, it follows tht correctness of the prts (the components) implies correctness of the whole (the system), or tht fult in the whole (iut nd test context) implies fult in the component (iut). We show tht ioco is pre-congruence in the bsence of implicit underspecifiction. One wy to stisfy this condition is to only llow specifictions which re input enbled. Another wy is to mke the underspecifiction explicit by completion. We show tht, in prticulr, demonic completion is suitble for this purpose. This leds to new implementtion reltion, bptized ioco U, which is slightly weker thn ioco. Overview. The next section reclls some bsic concepts nd definitions bout trnsition systems nd ioco. Section 3 sets the scene nd formlizes the problems of component bsed testing nd testing in context. Section 4 studies the pre-congruence properties of ioco for prllel composition nd hiding. Section 5 discusses underspecifiction, nd pproches to complete specifictions with implicit underspecifiction. Section 6 concludes with some finl remrks nd n ssessment of the results. The proofs of theorems nd propositions used in this pper cn be found in the ppendix. 2 Forml preliminries This section reclls the spects of the theory behind ioco tht re used for this pper; see [11] for more detiled exposition. Lbeled Trnsition Systems. A lbeled trnsition system (LTS) description is defined in terms of sttes nd lbeled trnsitions between sttes, where the lbels indicte wht hppens during the trnsition. Lbels re tken from globl set L. We use specil lbel τ / L to denote n internl ction. For rbitrry L L, we use L τ s shorthnd for L {τ}. We devite from the stndrd definition of lbeled trnsition systems in tht we ssume the lbel set of n LTS to be prtitioned in n input nd n output set. Definition 1. A lbeled trnsition system is 5-tuple Q, I, U, T, q 0 where Q is non-empty countble set of sttes; I L is the countble set of input lbels; U L is the countble set of output lbels, which is disjoint from I; T Q (I U {τ}) Q is set of triples, the trnsition reltion; q 0 Q is the initil stte. We use L s shorthnd for the entire lbel set (L = I U); furthermore, we use Q p, I p etc. to denote the components of n LTS p. We commonly write q λ for 3

4 (q, λ, ) T. Since the distinction between inputs nd outputs is importnt, we sometimes use question mrk before lbel to denote input nd n exclmtion mrk to denote output.we denote the clss of ll lbeled trnsition systems over I nd U by LTS(I, U). We represent lbeled trnsition system in the stndrd wy, by directed, edge-lbeled grph where nodes represent sttes nd edges represent trnsitions. A stte tht cnnot do n internl ction is clled stble. A stte tht cnnot do n output or internl ction is clled quiescent. We use the symbol δ ( L τ ) s pseudo-lbel to represent quiescence: tht is, p δ p stnds for the bsence of ny trnsition p λ p with λ U τ. For n rbitrry L L τ, we use L δ s shorthnd for L {δ}. An LTS is clled strongly responsive if it lwys eventully enters quiescent stte; in other words, if it does not hve ny infinite U τ -lbeled pths. For technicl resons we restrict LTS(I, U) to strongly responsive trnsition systems. A trce is finite sequence of observble ctions. The set of ll trces over L ( L) is denoted by L, rnged over by, with ɛ denoting the empty sequence. If 1, 2 L, then 1 2 is the conctention of 1 nd 2. We use the stndrd nottion with single nd double rrows for trces: q 1 n q denotes q 1 n, q = ɛ denotes q τ τ nd q ====== 1... n q denotes q = ɛ 1 = ɛ ɛ n = (where i L τδ ). We will not lwys distinguish between lbeled trnsition system nd its initil stte: if p = Q, I, U, T, q 0, then we will identify the process p with its initil stte q 0, nd we write, for exmple, p = q 1 insted of q 0 = q 1. Input-output trnsition systems. An input-output trnsition system (IOTS) is lbeled trnsition system tht is completely specified for input ctions: tht is, ll ctions in I re enbled in ny stte of the trnsition system. Definition 2. An input-output trnsition system p = Q, I, U, T, q 0 is lbeled trnsition system for which ll inputs re enbled in ll sttes: q Q, I : q = The clss of input-output trnsition systems with input ctions in I nd output ctions in U is denoted by IOTS(I, U) ( LTS(I, U)). Composition of lbeled trnsition systems. The integrtion of components cn be modeled lgebriclly by putting the components in prllel while synchronizing nd internlizing their common ctions. In process lgebr, the synchroniztion nd internliztion re typiclly regrded s two seprte opertions; the ltter is commonly clled hiding. Since we hve modeled the components s LTS s, these opertions trnslte to constructions over LTS. Concretely, for two given LTS s p nd q nd given set of ctions V we define The synchroniztion of p nd q, denoted p q. This is defined only if the input nd output ctions of p nd q re distinct (in wy mde precise 4

5 below). The sttes of the resulting trnsition system re lso denoted p, where p nd re sttes of p nd q, respectively. The hiding in p of the ctions in V, denoted hide V in p. This is defined only if V consists of output ctions of p (see below). The sttes of the resulting trnsition system re lso denoted hide V in p, where p is stte of p. Note tht hiding input ctions does not mke sense. Note tht these constructions re only prtil: there re constrints on the input nd output sets. Moreover, prllel composition my give rise to n LTS tht is not strongly responsive, even if the components re. For the time being, we do not try to nlyze this but implicitly restrict ourselves to cses where the prllel composition is strongly responsive (thus, this is nother source of prtility of the construction). Definition 3. For i = 1, 2 let p i = Q i, I i, U i, T i, p i be trnsition system. If I 1 I 2 = U 1 U 2 = then p 1 p 2 = def Q, I, U, T, p 1 p 2 where Q = {q 1 q 2 q 1 Q 1, q 2 Q 2 }; I = (I 1 \ U 2 ) (I 2 \ U 1 ); U = U 1 U 2. T is the miniml set stisfying the following inference rules (µ L τ ): q 1 µ q 2 µ q 1 µ q 1, µ L 2 q 1 q µ 2 q 1 q 2 q 2, µ L 1 q 1 q µ 2 q 1 q 2 q 1, q µ 2 q 2, µ τ q 1 q µ 2 q 1 q 2 If V U 1, then hide V in p 1 = def Q, I 1, U 1 \ V, T, hide V in p 1 where Q = {hide V in q 1 q 1 Q 1 }; T is the miniml set stisfying the following inference rules (µ L τ ): q 1 µ q 1 µ q 1, µ V hide V in q µ 1 hide V in q 1 q 1, τ µ V hide V in q 1 hide V in q 1 The following proposition sttes tht these constructions yield LTS s, nd IOTS s when pplied to IOTS s. Proposition 4. Let p, q LTS with I p I q = U p U q =, nd let V U p. 1. If p q is strongly responsive then p q LTS((I p \ U q ) (I q \ U p ), U p U q ); moreover, p q IOTS if p, q IOTS. 2. hide V in p LTS(I 1, U 1 \V ); moreover, hide V in p IOTS if p IOTS. Conformnce. The testing scenrio on which ioco is bsed ssumes tht two things re given: An LTS constituting specifiction of required behvior; An implementtion under test. We tret the iut s blck box. In order to reson bout it we ssume it cn be modeled s n IOTS (n iut is n object in the rel world). This ssumption is referred to s the test hypothesis [2, 7]. We wnt to stress tht we do not need to hve this model when testing the iut. We only ssume tht the implementtion could be modeled s n IOTS. 5

6 Given specifiction s nd n (ssumed) model of the iut i, the reltion i ioco s expresses tht i conforms to s. Whether this holds is decided on the bsis of the suspension trces of s: it must be the cse tht, fter ny such trce, every output ction (nd lso quiescence) tht i is cpble of should be llowed ccording to s. This is formlized by defining p fter (the set of sttes tht cn be reched in p fter the suspension trce ), out(p) (the set of output nd δ-ctions of p) nd Strces(p) (the suspension trces of p). Definition 5. Let p LTS(I, U), let P Q p be set of sttes in p, let i IOTS(I, U), s LTS(I, U) nd let L δ. 1. p fter = def { p p = p } 2. out(p) = def {x U p x } {δ p δ } 3. out(p ) = def { out(p) p P } 4. Strces(p)= def { L δ p = } The following defines the implementtion reltion ioco, modulo function F tht genertes set of testble trces from specifiction. In this definition 2 X denotes the powerset of X, for n rbitrry set X. Definition 6. Given function F : LTS(I, U) 2 L δ, we define iocof IOTS(I, U) LTS(I, U) s follows: i ioco F s F(s) : out(i fter ) out(s fter ) We will use the nottion ioco s the nottion for ioco Strces. For more detils bout ioco we refer to [11]. 3 Approch To clrify our pproch, we briefly recpitulte the testing frmework. We focus on the wy testing is trnslted to forml setting ccording to the ioco-theory. We present the results in this section in the context of compositionl testing. The consequences for testing in context will be discussed in the finl section. We ssume tht implementtions cn be modeled s input-output trnsition systems. Thus, we require implementtions to be input enbled, to reflect the fct tht input ctions cnnot relisticlly be refused. Specifictions re given s generl lbeled trnsition systems (with distinguished input nd output sets), which mens tht they re not necessrily input enbled. This reflects the ide tht specifiction my be prtil: the bsence of n input trnsition from certin stte of the specifiction mens tht the behvior fter this input is unconstrined nything goes. 3.1 Testing scenrio We study systems tht re obtined by integrting independently implemented (nd tested) components, or (in the cse of testing in context) n iut nd its test 6

7 context. The behvior of such system is described by the prllel composition of the individul trnsition systems. Output ctions of one component tht re in the input lbel set of nother component re synchronized, resulting in single, internl trnsition of the overll system. Actions of component tht re not in the lbel set of nother component re not synchronized, resulting in single observble trnsition of the overll system. I p U p p L pq L qp r r = hide L pq L qp in p q q U q I q Fig. 1. Prllel composition of components with hiding This gives rise to the scenrio depicted in figure 1, which shows the composition of components p nd q, with input nd output lphbets I p nd U p, nd I q nd U q, respectively, such tht I p I q = U p U q =. The sets I p, U p, L pq, L qp, I q, U q re derived from the input/output lphbets s follows: L pq = U p I q : outputs of p tht re synchronized with inputs of q; L qp = U q I p : outputs of q tht re synchronized with inputs of p; I p = I p \ U q : remining (i.e., unsynchronized) inputs of p; U p = U p \ I q : remining (i.e., unsynchronized) outputs of p; I q = I q \ U p : remining (i.e., unsynchronized) inputs of q; U q = U q \ I p : remining (i.e., unsynchronized) outputs of q. Formlly, this type of composition is modeled by prllel composition, s embodied in the opertor, followed by hiding, s embodied in hide V in, where V = L pq L qp is the set of synchronized ctions. An implicit ssumption in this composition scenrio is tht different components my not hve overlpping input or output sets; tht is, no ction cn be n input to two different components or n output from two different components. 3.2 Component-bsed testing We now prphrse the question of component-bsed testing, discussed in the introduction, s follows: Given tht the components p nd q hve been tested to be ioco-correct (ccording to their respective specifictions), my we conclude tht their integrtion is lso ioco-correct (ccording to the integrted specifiction)? If the component specifictions re LTS s, the component implementtions re modeled by IOTS s, nd their integrtion by prllel composition 7

8 followed by hiding, this boils down to the following questions in our forml frmework (where i k IOTS(I k, U k ) nd s k LTS(I k, U k ) for k = 1, 2, with I 1 I 2 = U 1 U 2 = ): Q1: Given i k ioco s k for k = 1, 2, is it the cse tht i 1 i 2 ioco s 1 s 2? Q2: Given i 1 ioco s 1, is it the cse tht (hide V in i 1 ) ioco (hide V in s 1 ) for rbitrry V U 1? If the nswer to both questions is yes, then we my conclude the following: Corollry 7. If i k IOTS(I k, U k ) nd s k LTS(I k, U k ) for k = 1, 2 with I 1 I 2 = U 1 U 2 = nd V = (I 1 U 2 ) (U 1 I 2 ), then i 1 ioco s 1 i 2 ioco s 2 (hide V in i 1 i 2 ) ioco (hide V in s 1 s 2 ). This is equivlent to sying tht ioco is suitble for component bsed testing. We study the bove congruence questions in the next section. We will show tht the nswer to Q1 nd Q2 in generl is no. Insted, we cn show tht the nswer to Q1 nd Q2 is yes if s 1 nd s 2 re completely specified. 3.3 Exmple 0.50, 1.00 mke coffee mke te coffee, te 0.50, 1.00 s mon error s drk s cof = hide {mke coffee, mke te, error} in s mon s drk i cof = hide {mke coffee, mke te, error} in i mon i drk Fig. 2. Architecture of coffee mchine in components. To illustrte component bsed testing, we use two components of coffee mchine: money component tht hndles the inserted coins nd drink component tht tkes cre of prepring nd pouring the drinks, see Figure 2. The money component ccepts coins of 1 nd of 0.50 s input from the environment. After insertion of 0.50 coin (respectively 1 coin), the money component orders the drink component to mke te (respectively coffee). The drink component interfces with the money component nd the environment. If the money component orders it to mke te (respectively coffee) it outputs te (respectively coffee) to the environment. If nything goes wrong in the drink mking process, the component gives n error signl. 8

9 The coffee mchine is the prllel composition of the money component nd the drink component, in which the mke coffee commnd, the mke te commnd nd the error signl re hidden. One cn think of the prllel composition s estblishing the connection between the money component nd the drink component, wheres hiding mens tht the communiction between the components is not observble nymore; only communiction with the environment cn be observed.!mke coffee?1.00 s mon?0.50!mke te!coffee?mke coffee?mke te?mke coffee!error s drk?mke?mke coffee te!error!error!te?mke te?mke coffee?mke te?mke coffee?mke te money component specifiction drink component specifiction Fig. 3. Specifiction of money nd drink components s LTS s. Models In Figure 3 we show the behviorl specifiction of the components s LTS s. Note tht the money component is underspecified for the error input lbel nd tht the drink component cnnot recover from n error stte, nd while in the error stte it cnnot produce te or coffee. Figure 4 shows implementtion models of the money component, i mon, nd the drink component, i drk. We hve used trnsitions lbeled with? s n bbrevition for ll the non-specified input ctions from the lphbet of the component. The money component hs input lbel set, I mon = {0.50, 1.00, error}, output lbel set U mon = {mke coffee, mke te, 0.50, 1.00 }; s mon LTS(I mon, U mon ), i mon IOTS(I mon, U mon ). For the drink component I drk = {mke coffee, mke te} nd U drk = {coffee, te, error} re the input nd output lbel sets; s drk LTS(I drk, U drk ), i drk IOTS(I drk, U drk ). In the implementtions of the components we choose to improve upon the specifiction, by dding functionlity. This is possible since, s we hve discussed, the specifiction my in plces be under-specified. The extr functionlity of i mon compred to its specifiction s mon is tht it cn hndle error signls: it rects by returning i drk is lso chnged with respect to its specifiction s drk : mking te never produces n error signl. Since implementtions re input 9

10 enbled, we hve chosen tht ll non specified inputs re ignored, i.e., the system remins in the sme stte. We hve i mon ioco s mon nd i drk ioco s drk. The question now is whether the integrted specifictions nd implementtions, s given by s cof nd i cof in Figure 2, re lso ioco correct. We discuss this in the next section, to illustrte the compositionlity properties discussed there. i mon i drk!mke coffee??1.00?0.50!1.00?error!mke te?!coffee?!error?mke?mke coffee te!te??mke coffee!error?mke te? money component implementtion drink component implementtion? Fig. 4. Implementtion of the money nd drink components s IOTS s. 4 Compositionlity for synchroniztion nd hiding In this section we ddress the questions Q1 nd Q2 formulted bove (Section 3.2), using the coffee mchine exmple to illustrte our results. 4.1 Synchroniztion The property tht we investigte for prllel composition is: if we hve two correct component implementtions ccording to ioco, then the implementtion remins correct fter synchronizing the components. It turns out tht in generl this property does not hold, s we show in the following exmple. Exmple 8. Regrd the LTS s in figure 5. On the left hnd side we show the specifictions nd on the right hnd side the corresponding implementtions. The models hve the following lbel sets: s 1 LTS({x}, ), i 1 IOTS({x}, ), s 2 LTS(, {x}), i 2 IOTS(, {x}). The suspension trces of s 1 re given by δ δ?xδ nd the suspension trces of s 2 re given by {ɛ,!x}!x!xδ. We hve i 1 ioco s 1 nd i 2 ioco s 2. 10

11 After we tke the prllel composition of the two specifictions we get s 1 s 2, see figure 5 (the corresponding implementtion is i 1 i 2 ). From this specifiction the suspension trces re: {ɛ}!xδ. We see tht out(i 1 i 2 fter!x) = {!x} out(s 1 s 2 fter!x) = {δ}; in other words: i 1 i 2 ioco / s 1 s 2. Anlysis shows tht i 1 ioco s 1, becuse ioco llows underspecifiction of input ctions. However, the semntics of the prllel composition opertor does not tke underspecifiction of input ctions into ccount. Although s 2 cn output second x, it cnnot do so in s 1 s 2, becuse s 1 cnnot input the second x. We sy tht s 1 is underspecified for the second x, becuse lthough n implementtion is llowed to ccept second x s input, the correct behvior fter the second x is not specified. In other words the specifiction is underspecified for the second x s input. It turns out tht if we forbid underspecifiction, i.e., if the specifiction explicitly prescribes for ny possible input wht the llowed responses re, then we do not hve this problem. In fct in tht cse we hve the desired compositionlity property. This property is expressed in the following theorem. For proof see the ppendix. Theorem 9. Let s 1, i 1 IOTS(I 1, U 1 ), s 2, i 2 IOTS(I 2, U 2 ), with I 1 I 2 = U 1 U 2 =. i 1 ioco s 1 i 2 ioco s 2 i 1 i 2 ioco s 1 s 2 Our running exmple (Section 3.3) shows the sme problem illustrted in exmple 8. Although the implementtions of the money component nd the drink component re ioco correct with respect to their specifictions, it turns out tht the prllel composition of i mon nd i drk is not: out(i mon i drk fter?1.00!mke coffee) = {!coffee,!error} out(s mon s drk fter?1.00!mke coffee) = {!coffee} Note tht the internl signls re still visible s output ctions. To turn them into internl ctions is the tsk of the hiding opertor, discussed below. 4.2 Hiding The property tht we investigte for hiding is the following: if we hve correct implementtion ccording to ioco, then the implementtion remins correct f- s 1 s 2 s 1 s 2 i 1 i 2 i 1 i 2?x!x!x?x!x!x!x?x!x!x Fig. 5. Counter exmple to compositionlity for prllel composition; see Exmple 8. 11

12 ter hiding (some of the) output ctions. It turns out tht, s for synchroniztion, in generl this property does not hold. Exmple 10. Consider the implementtion i nd specifiction s in Figure 6, both with input set {} nd output set {x, y}. {ɛ}?δ!xδ re the suspension trces of s. We see tht i ioco s. After hiding the output ction x, we get the specifiction hide x in s, nd implementtion hide x in i; now the specifiction hs suspension trces?δ δ. We hve out(hide x in i fter ) = {δ, y} out(hide x in s fter ) = {δ}; in other words, (hide x in i) ioco / (hide x in s). s i hide x in s hide x in i?!x???!y!x??? τ?? τ?!y?? Fig. 6. Counter-exmple to compositionlity for hiding; see Exmple 10. An nlysis of the bove exmple shows tht s ws underspecified, in the sense tht it fils to prescribe how n implementtion should behve fter the trce!x?. The proposed implementtion i uses the implementtion freedom by hving n unspecified y-output fter!x?. However, if x becomes unobservble due to hiding, then the trces!x? nd? collpse nd become indistinguishble: in hide x in s nd hide x in i they both msquerde s the trce?. Now hide x in s ppers to specify tht fter?, only quiescence (δ) is llowed; however, hide x in i still hs this unspecified y-output. In other words, hiding cretes confusion bout wht prt of the system is underspecified. It follows tht if we rule out underspecifiction, i.e., we limit ourselves to specifictions tht re IOTS s then this problem disppers. In fct, in tht cse we do hve the desired congruence property. This is stted in the following theorem. Theorem 11. If i, s IOTS(I, U) with V U, then: i ioco s (hide V in i) ioco (hide V in s) Using our running exmple, we show tht the problem illustrted by Exmple 10 is not unrelistic. The integrted coffee system implementtion i cof, consisting of the money nd drink component implementtions, fter hiding the 12

13 synchronized ctions (mke coffee, mke te, error), cn do the trce?1.00!1.00 (ejecting 1.00 fter hidden error). Hence!1.00 out(i cof fter?1.00) wheres!1.00 out(s cof fter?1.00) (where?1.00 Strces(s cof )) (see Figure 2 for s cof, i cof ). So we cn conclude tht lthough the component implementtions re ioco correct with respect to their specifictions, the integrted system is not. 5 Demonic completion We hve shown in the previous section tht ioco is pre-congruence for prllel composition nd hiding when restricted to IOTS IOTS. However, in the originl theory [11] ioco IOTS LTS; the specifictions re LTS s. The intuition behind this is tht ioco llows underspecifiction of input ctions. In this section we present function tht trnsforms LTS s into IOTS s in wy tht complies with this notion of underspecifiction. We will show tht this leds to new implementtion reltion tht is slightly weker thn ioco. Underspecifiction comes in two flvors: underspecifiction of input ctions nd underspecifiction of output ctions. Underspecifiction of output ctions is lwys explicit; in n LTS it is represented by non-deterministic choice between severl output ctions. The intuition behind this is tht we do not know or cre which of the output ctions is implemented, s long s t lest one is. Underspecifiction of input ctions is lwys implicit; it is represented by bsence of the respective input ction in the LTS. The intuition behind underspecifiction of input ctions is tht fter n unspecified input ction we do not know or cre wht the behvior of the specified system is. This mens tht in n underspecified stte i.e., stte reched fter n unspecified input ction every ction from the lbel set is correct, including quiescence. Following [3] we cll this kind of behvior chotic. In trnslting LTS s to IOTS s, we propose to model underspecifiction of input ctions explicitly. Firstly, we model chotic behvior through stte q χ λ (where χ stnds for chos) with the property: λ U : q χ = q χ nd λ δ λ I : q χ === q χ. Secondly, we dd for every stble stte q (of given LTS) tht is underspecified for n input trnsition (q,, q χ ). This turns the LTS into n IOTS. After [4] we cll this procedure demonic completion s opposed to ngelic completion, where unspecified inputs re discrded (modeled by dding self-loop trnsitions). Definition 12 (demonic completion). : LTS(I, U) IOTS(I, U) is defined by Q, I, U, T, q 0 Q, I, U, T, q 0, where Q = Q {q χ, q Ω, q }, where q χ, q Ω, q Q T = T {(q,, q χ ) q Q, I, q /, q / } {(q χ, τ, q Ω ), (q χ, τ, q )} {(q Ω, λ, q χ ) λ L} {(q, λ, q χ ) λ I} τ 13

14 specifiction (LTS) demoniclly completed specifiction (IOTS)!mke coffee s mon!mke te!mke coffee s mon!mke te?1.00?0.50?1.00?0.50 q 1 q 2 q 1 q 2?error?error?error chotic IOTS?0.50?0.50?1.00?1.00 q χ I U q χ I I U I τ τ τ τ q Ω q q Ω q Fig. 7. Demonic completion of n LTS specifiction. Exmple 13. To illustrte the demonic completion of implicit underspecifiction, we use the money component of section 3.3. The LTS specifiction of the money component is given in the top left corner of Figure 7. The IOTS tht models our chos property is given in the bottom left corner. For every stble stte of the specifiction, the function dds n rrow for every unspecified input, from tht stte to stte q χ. For exmple, every stte is underspecified for input ction error, so we dd trnsition from every stte to q χ for error. The sttes q 1 nd q 2 re underspecified for 0.50 nd 1.00, so we dd trnsitions for these inputs from q 1 nd q 2 to q χ. The resulting demoniclly completed specifiction is given on the right hnd side of Figure 7. The chotic IOTS cn do every trce tht n LTS cn do. However it is esy to see tht the chotic IOTS cnnot do every imginble trce. For exmple it cnnot do δ λ, where λ U. We need the following property to show tht the chotic IOTS cn do every (sub)trce tht n rbitrry LTS cn do. The regulr set (U δ I) δ contins ll the elements of L δ except those tht contin the trce δ followed by n output. By definition this is of course n impossible trce for n LTS. Proposition 14. Let s LTS(I, U). Strces(s) : (U δ I) δ An importnt property of demonic completion is tht it only dds trnsitions from stble sttes with underspecified inputs in the originl LTS to q χ. More- 14

15 over, it does not delete sttes or trnsitions. This is expressed in the following proposition. Proposition 15. Let s LTS(I, U). L δ, Q s : s = (s) = Furthermore, the chotic IOTS cts s kind of sink: once one of the dded sttes (q χ, q Ω or q ) hs been reched, they will never be left nymore. Together with proposition 14 it is esy to see tht q χ cn do ll the (sub)trces tht n rbitrry LTS cn do. Proposition 16. Let s LTS(I, U) nd q χ be the chotic stte in the demoniclly completed LTS (s). (U δ I) δ : q χ = Q s We use the nottion ioco to denote tht before pplying ioco, the LTS specifiction is trnsformed to n IOTS by ; i.e., i(ioco )s i ioco (s). Theorem 17. ioco ioco Note tht the opposite is not true, i.e., i (ioco ) s i ioco s. Figure 8 shows tht the counter-exmple for the pre-congruence of hiding is lso counterexmple for the reverse direction of this proposition. On the left hnd side we see the specifiction s, next to it is the demoniclly completed specifiction (s) nd on the right is the implementtion. Now we hve tht i(ioco )s nd i ioco / s. Thus, ioco is strictly weker reltion thn ioco. We wnt to stress two spects of this observtion: Our investigtion, which strted with component-bsed testing, hs led to new vrition in the notion of conformnce tht is different from the reltion implemented in, e.g., the TorX tool; This new vrition considers ll previously tested, ioco-conformnt systems correct, but my consider system correct tht ws rejected by ioco. Thus, the vrition is reltively hrmless. These properties re consequence of our choice of the demonic completion function. Other forms of completion, such s ngelic completion, result in vrints of ioco which re incomprble to the originl reltion (i.e., neither weker nor stronger). The difference between ioco nd ioco occurs when there is nondeterminism in the underspecifiction, i.e. when the specifiction cn nondeterministiclly go to two or more different sttes. In one stte the input is specified, wheres in nother stte the input is underspecified. For exmple, in Figure 8, s cn nondeterministiclly tke the τ-trnsition. Before the τ-trnsition, input? is specified, while fter the τ-trnsition input? is underspecified. In cse of nondeterminism in the underspecifiction, ioco tkes the specified side, while ioco tkes the underspecified side. 15

16 s (s) i? τ? τ? τ I? I I I U q χ I!y τ τ q Ω q I I Fig. 8. i(ioco )s i ioco s. Testing The testing scenrio is now such tht n integrted system cn be tested by compring the individul components to their demoniclly completed specifictions. If the components conform, then the composition of implementtions lso conforms to the composition of the demoniclly completed specifictions. Corollry 18. Let s 1, s 2 LTS(I, U) nd i 1, i 2 IOTS(I, U) i 1 ioco (s 1 ) i 2 ioco (s 2 ) i 1 i 2 ioco (s 1 ) (s 2 ) Test restriction A disdvntge of demonic completion is tht it destroys informtion bout underspecified behvior. On the bsis of the underspecified LTS, one cn conclude tht trces including n unspecified input need not be tested becuse every implementtion will lwys pss; fter completion, however, this is no longer visible, nd so utomtic test genertion will yield mny spurious tests. In order to void this, we chrcterize ioco directly over LTS s. In other words, we extend the reltion from IOTS IOTS to IOTS LTS, in such wy s to obtin the sme testing power but void these spurious tests. For this purpose, we restrict the number of trces fter which we test. Definition 19. Let s LTS(I, U). Utrces(s) = def { L δ s = (, 1 2 = : I s == 1 = )} Intuitively, the Utrces re the Strces without the underspecified trces. A trce is underspecified if there exists prefix 1 of, with I, for which s == 1 nd = /. The following proposition puts it differently: Utrces(s) re the Strces(s) for which the demoniclly completed specifiction, (s), never leds to chotic stte. Proposition 20. Let s = Q, I, U, T, q 0 be n rbitrry LTS. Utrces(s) = { Strces(s) ((s) fter ) Q} 16

17 We use ioco U s shorthnd for ioco Utrces. In the following proposition we stte tht ioco U is equivlent to ioco. Theorem 21. ioco U = ioco This equivlence is quite intuitive. ioco uses fresh sttes to hndle underspecified behvior, which re constructed so s to disply chotic behvior. If (s) reches such stte, then ll behvior is considered correct. ioco U, on the other hnd, circumvents underspecified behvior, becuse it uses Utrces, which re Strces from which ll underspecified trces hve been removed. 6 Conclusions The results of this pper imply tht ioco cn be used for component bsed testing: if components re tested seprtely nd then integrted, the resulting system will lso conform to the integrted specifiction. The integrtion of components is modeled by the successive ppliction of two lgebric opertions: prllel composition followed by hiding. However, s we hve shown, there re some constrints to this scenrio. Summrizing the results of this pper: We hve shown tht component-bsed ioco-testing works smoothly if the component specifictions re input-enbled (i.e., given s input-output trnsition systems); see theorems 9 nd 11. We hve shown tht if the component specifictions re not input enbled, both prllel composition nd hiding re non-compositionl (see exmple 8 nd 10): the integrted system my not conform to the integrted specifiction in spite of the fct tht the individul components re fully conformnt. A solution to this is to complete the component specifictions before using them for testing purposes; this involves dding input trnsitions where they re missing. Completion turns the specifictions into IOTS s, so tht the bove result becomes pplicble. Completion cn be done in mny different wys; we hve shown tht demonic completion is consistent with the existing ioco theory (see theorem 17). Testing fter completion is in principle (much) more expensive since, due to the nture of IOTS s, even the completion of finite specifiction lredy displys infinite testble behvior. As finl result of this pper, we hve shown how to use the originl component specifictions for testing, before completion (see theorem 21). Note tht the correctness of the integrted system is still only gurnteed with respect to the completed component specifictions; thus, completion is still n unvoidble step. The result of this pper is lso relevnt for testing in context, since it implies tht every filure of system embedded in test context cn be reduced to fult of the system itself. Interprettion. The insights gined from these results cn be recst in terms of underspecifiction. ioco recognizes two kinds of underspecifiction: omitting 17

18 input ctions from stte (which implies don t cre if n input does occur) nd including multiple output ctions from stte (which llows the implementtion to choose between them). It turns out tht the first of these two is not comptible with prllel composition nd hiding. To mke it comptible we hve hd to modify the theory t two points: The underlying set of trces for ioco hs been redefined, resulting in slightly weker notion of conformnce; previously conformnt implementtions re still conformnt, but it might be tht previously non-conformnt implementtions re llowed under the modified notion of conformnce. The integrtion (i.e., prllel composition nd hiding) of component specifictions hs been moved to the domin of IOTS s. Thus, we no longer consider these s constructions on generl lbeled trnsition systems; insted, component specifictions hve to be completed prior to their integrtion. Testing in context We hve discussed the pre-congruence properties minly in the context of component bsed testing, but the results cn esily by trnsposed to testing in context. Suppose n implementtion under test i is tested vi context c. The tester intercts with c, nd c intercts with i; the tester cnnot directly interct with i. Then we hve I i U c nd U i I c, nd L i is not observble for the tester, i.e., hidden. The tester observes the system s n implementtion in context: C[i] = hide I i U i in c i Now theorem 9 nd 11 directly led to the following corollry for testing in context. Corollry 22. Let s, i IOTS occur in test context C[ ] C[i] ioco / C[s] i ioco / s Hence, n error detected while testing the implementtion in its context is rel error of the implementtion, but not the other wy round: n error in the implementtion my not be detectble when tested in context. Future work. The current stte of ffirs is not yet completely stisfctory, becuse the notion of composition tht we require is not defined on generl lbeled trnsition systems but just on IOTS s. Testing ginst IOTS s is inferior, in tht these models do not llow the input underspecifiction discussed bove: for tht reson, testing ginst n IOTS cnnot tke dvntge of informtion bout don t cre inputs (essentilly, no testing is required fter don t cre input, since by definition every behvior is llowed). We intend to solve this issue by extending IOTS s with predicte tht mkes the notion of input underspecifiction explicit, by designting some sttes s chotic. Testing cn stop when the specifiction hs reched chotic stte. 18

19 A Appendix: proofs A.1 Proofs of section 4.1 (Congruence properties for synchroniztion) Proposition A.1. Let p IOTS(I p, U p ), q IOTS(I q, U q ), r Q p q with I p I q = U p U q =. 1. L p \ L q : p q r p : p p r = p q 2. L q \ L p : p q r : q r = p 3. p q τ r ( p : p τ p r = p q) ( : q τ r = p ) 4. (L p L q ) {δ} : p q r p, : p p q r = p Proof. 1. Assume L p \ L q only if: p q r ( definition ) p : p p r = p q if: p : p p r = p q ( definition ) p q r 2. Anlogous to 1 3. Anlogous to 1 4. The cse L p L q is nlogous to 1. Here the proof for = δ is given. only if: First we show r = p q, then the remining prt of the proof is given. p q δ r ( Definition δ ) p q δ r r = p q (1) p q δ r ( Definition δ ) µ U p U q {τ} : p q / µ ( Definition ) µ (U p \L q ) {τ} : p / µ µ (U q \L p ) {τ} : q / µ µ L p L q : p / µ q / µ ( p, q IOTS (note tht µ I p : p µ µ I q : q µ ) ) µ U p {τ} : p / µ µ U q {τ} : q / µ ( definition δ nd r = p q (see 1) ) p δ p q δ q r = p q 19

20 if: Let r = p q p δ p q δ q ( definition δ ) µ U p {τ} : p / µ µ U q {τ} : q / µ ( definition ) µ U p U q {τ} : p q / µ ( definition δ ) p q δ p q ( Given: r = p q ) p q δ r We now introduce some nottion for the projection of trce on lbel set. Definition A.2. Let L δ, L δ, S L δ : ɛ S = ɛ { S S ( ) S = ( S) S To improve redbility we use L δ p to denote L p {δ}. Proposition A.3. Let p IOTS(I p, U p ), q IOTS(I q, U q ), r Q p q, L δ, with L = I p I q U p U q nd I p I q = U p U q =. p q = r p, : p Lδ p ==== p q Lδ q ==== r = p Proof. Only if: Proof by induction on the structure of. Bsic step: = ɛ. p q = ɛ r ( Proposition A.1.3 nd definition of p, : p = ɛ p q = ɛ r = p ( Definition A.2 of projection ) p, : p ɛ Lδ p === p q ɛ Lδ q === r = p ɛ = ) Induction step: We mke the ssumption tht the proposition holds for in =, with L δ. We identify three cses: 1. Assume L δ p L δ q (= (L p L q ) {δ}). 20

21 p q === r ( Definition === ) r 1, r 2 : p q = ɛ r 1 r 2 == r ( Bsic step ) p 1, q 1, r 2 : p = ɛ p 1 q = ɛ q 1 p 1 q 1 r 2 == r ( Proposition A.1.4 ) p 1, p 2, q 1, q 2 : p = ɛ p 1 q = ɛ q 1 p 1 p 2 q 1 q 2 p 2 2 == r ( Definition = ) p 2, q 2 : p = p 2 q = q 2 p 2 2 == r ( Induction ) p, p 2,, q 2 : p = L δ p p 2 ==== p q = L δ q q 2 ==== r = p ( Definition A.2 of projection ) p, : p ( ) L δ p ======= p q ( ) L δ q ======= r = p ( = ) p, : p Lδ p ==== p q Lδ q ==== r = p 2. Assume L δ p \ L δ q (= L p \L q ). p q === r ( Definition = ) r 1, r 2 : p q = ɛ r 1 r 2 == r ( Bsic step ) p 1, q 1, r 2 : p = ɛ p 1 q = ɛ q 1 p 1 q 1 r 2 == r ( Proposition A.1.1 ) p 1, p 2, q 1 : p = ɛ p 1 q = ɛ q 1 p 1 p 2 p 2 1 == r ( Definition of = ) p 2, q 1 : p = p 2 q = ɛ q 1 p 2 1 == r ( Induction ) p 2, p, q 1, : p = L δ p p 2 ==== p q = ɛ L δ q q 1 ==== r = p ( Definition A.2 of projection ) p, : p ( ) L δ p ======= p q ( ) L δ q ======= r = p ( = ) p, : p Lδ p ==== p q Lδ q ==== r = p 3. Assume L δ q \ L δ p. This is symmetric with the previous cse. 21

22 if: By induction on the structure of. Bsic step: = ɛ. p, : p ɛ Lδ p === p q ɛ Lδ q === ( Definition A.2 of projection ) p, : p = ɛ p q = ɛ ( Proposition A.1.3 nd definition of p, : p q = ɛ p ( = ɛ ) p, : p q = p ( Given r = p ) p q = r ɛ = ) Induction step: We ssume the proposition holds for in =, L δ. We identify three cses: 1. Assume L δ p L δ q (= (L p L q ) {δ}): p, : p ( ) L δ p ======= p q ( ) L δ q ======= ( Definition A.2 of projection ) p 2, p, q 2, : p = L δ p p 2 ==== p q = L δ q q 2 ==== ( Definition of = ) p 1, p 2, p, q 1, q 2, : L δ p L δ q p = ɛ p 1 p 2 ==== p q = ɛ q 1 q 2 ==== ( Bsic step ) p 1, p 2, p, q 1, q 2, : L δ p L δ q p q = ɛ p 1 q 1 p 1 p 2 ==== p q 1 q 2 ==== ( Proposition A.1.4 ) p 1, p 2, p, q 1, q 2, : L δ p L δ q p q = ɛ p 1 q 1 p 2 q 2 p 2 ==== p q 2 ==== ( Definition of = ) L δ q p 2, p, q 2, : p q = L δ p p 2 q 2 p 2 ==== p q 2 ==== ( Induction ) p 2, p, q 2, : p q = p 2 q 2 p 2 2 == p ( Definition of = ) p, : p q === p ( = ) p, : p q = p ( Given r = p ) p q = r 22

23 2. Assume L δ p \ L δ q (= L p \L q ): p, : p ( ) L δ p ======= p q ( ) L δ q ======= ( Definition A.2 of projection ) p 2, p, : p = L δ p p 2 ==== p L δ q ==== ( Definition of = ) L δ p p 1, p 2, p, : p = ɛ p 1 p 2 ==== p L δ q ==== ( Bsic step ) L δ p p 1, p 2, p, : p q = ɛ p 1 q p 1 p 2 ==== p L δ q ==== ( Proposition A.1.1 ) L δ p p 1, p 2, p, : p q = ɛ p 1 q p 2 q p 2 ==== p L δ q ==== ( Definition of = ) p 2, p, : p q = L δ p p 2 q p 2 ==== p L δ q ==== ( Induction ) p 2, p, : p q = p 2 q p 2 q == p ( Definition of = ) p, : p q === p ( = ) p, : p q = p ( Given r = p ) p q = r 3. Assume L δ q \ L δ p. This is symmetric with the previous cse. Lemm A.4. Let i, s IOTS(I, U), then: Proof. i ioco s Strces(i) Strces(s) only if: Proof by induction on the structure of, let Strces(i). Bsic Step: = ɛ. ɛ Strces(s) trivilly holds. Induction step : We identify two cses: 1. = ρ with I: By induction ρ Strces(s), so s : s = ρ s, nd since s IOTS(I, U), s = lwys holds. Hence, ρ Strces(s). 2. = ρ x with x U {δ}: If i == ρ x then by definition 5 x out(i fter ρ), nd since i ioco s nd by induction ρ Strces(s) we cn conclude tht x out(sfterρ). Hence, s == ρ x, nd ρ x Strces(s). if: Let Strces(s) nd x out(i fter ), then i === x, which implies x Strces(i), hence x Strces(s) nd s === x, from which it follows tht x out(s fter ). 23

24 Theorem 9 Let s 1, i 1 IOTS(I 1, U 1 ), s 2, i 2 IOTS(I 2, U 2 ) with I 1 I 2 = U 1 U 2 =. i 1 ioco s 1 i 2 ioco s 2 i 1 i 2 ioco s 1 s 2 Proof. To be proved ccording to lemm A.4: Strces(i 1 ) Strces(s 1 ) Strces(i 2 ) Strces(s 2 ) Strces(i 1 i 2 ) Strces(s 1 s 2 ) Strces(i 1 i 2 ) ( Definition of Strces ) i 1 i 2 = ( Proposition A.3 ) L δ i L δ i 1 i 1 ==== 2 i2 ==== ( premise ) L δ s L δ s 1 s 1 ==== 2 s2 ==== ( Proposition A.3 ) s 1 s 2 = ( Definition of Strces ) Strces(s 1 s 2 ) A.2 Proofs of Section 4.2 (Congruence properties for hiding) Definition A.5. The hiding of L δ with A L, denoted s \A, is defined s follows: ɛ = ɛ \A = \A = with A def ( \A) = with / A δ ( \A) = δ Proposition A.6. Let p LTS(I, U) where U is prtitioned in sets U 1 nd U p p with I U 1 hide U 2 in p hide U 2 in p 2. p p with U 2 hide U 2 in p τ hide U 2 in p 3. p τ p hide U 2 in p τ hide U 2 in p 4. p δ p hide U 2 in p δ hide U 2 in p 5. hide U 2 in p q with I U 1 p : p p q = hide U 2 in p 6. hide U 2 in p τ q ( p : p τ p q = hide U 2 in p ) ( p, U 2 : p p q = hide U 2 in p ) 7. hide U 2 in p δ q p δ p q = hide U 2 in p 24

25 Proof. 1. p p I U 1 ( Definition of hide ) hide U 2 in p hide U 2 in p 2. p p U 2 ( Definition of hide ) hide U 2 in p τ hide U 2 in p 3. p τ p ( Definition of hide ) hide U 2 in p τ hide U 2 in p 4. p δ p ( Definition of quiescence ) ( µ U {τ} : p / µ ) ( Definition of hide ) ( µ U 1 {τ} : hide U 2 in p / µ ) ( Definition of quiescence ) hide U 2 in p δ hide U 2 in p 5. hide U 2 in p q ( Definition of hide ) p : p p q = hide U 2 in p 6. hide U 2 in p τ q ( Definition of hide ) ( p : p τ p q = hide U 2 in p ) ( p, U 2 : p p q = hide U 2 in p ) 7. hide U 2 in p δ q ( Definition of quiescence ) µ U 1 {τ} : hide U 2 in p / µ q = hide U 2 in p ( Definition of hide ) ( µ U 1 : p / µ ) ( µ U 2 : p / µ ) p / τ q = hide U 2 in p ( Logicl xioms ) µ U {τ} : p / µ q = hide U 2 in p ( Definition of quiescence ) p δ p q = hide U 2 in p Proposition A.7. Let p LTS(I, U) where U is prtitioned into U 1 nd U 2 ; let L δ be rbitrry. 1. p = p hide U 2 in p \U2 ==== hide U 2 in p 2. hide U 2 in p = q p, L δ : p == p q = hide U 2 in p = \U 2 25

26 Proof. 1. By induction on the structure of : = ɛ: Using ɛ\u 2 = ɛ, the proposition reduces to: p ɛ = p hide U 2 in p ɛ = hide U 2 in p (2) which, using the definition of ɛ =, is rewritten to: p τ n p hide U 2 in p ɛ = hide U 2 in p (3) which is proved by induction on n: n = 0: p τ n p ( n = 0 nd from definition of p = p ɛ ( definition of = ) hide U 2 in p = ɛ hide U 2 in p n = n + 1: p τ n p ( n = n + 1 nd definition of p 1 : p τ τ p 1 p n 1 p ( proposition A.6.3 ) ɛ = : p τ 0 p p = p ) ɛ = ) hide U 2 in p τ τ hide U 2 in p 1 p n 1 p ( induction on eqution (3) ) hide U 2 in p τ ɛ hide U 2 in p 1 hide U 2 in p 1 = hide U 2 in p ɛ ( definition of = ) hide U 2 in p = ɛ hide U 2 in p 26

27 = ρ, with I U 1, ρ L δ : p = p ( = ρ ) p == ρ p ρ ( definition of == ) p 1, p 2 : p = ɛ ρ p 1 p 1 p 2 p 2 = p ( eqution (2) ) p 1, p 2 : hide U 2 in p = ɛ ρ hide U 2 in p 1 p 1 p 2 p 2 = p ( proposition A.6.1 ) p 1, p 2 : hide U 2 in p = ɛ hide U 2 in p 1 ρ hide U 2 in p 1 hide U 2 in p 2 p 2 = p ( induction ) p 1, p 2 : hide U 2 in p = ɛ hide U 2 in p 1 hide U 2 in p 1 hide U 2 in p 2 ρ\u 2 hide U 2 in p 2 ==== hide U2 in p (ρ\u 2) ( definition of ====== ) hide U 2 in p ====== (ρ\u2) hide U 2 in p ( definition A.5 ) hide U 2 in p ( ρ)\u2 ====== hide U 2 in p ( = ρ ) hide U 2 in p \U2 ==== hide U 2 in p 27

28 = ρ, with U 2, ρ L δ : p = p ( = ρ ) p == ρ p ρ ( definition == ) p 1, p 2 : p = ɛ ρ p 1 p 1 p 2 p 2 = p ( eqution (2) ) p 1, p 2 : hide U 2 in p = ɛ ρ hide U 2 in p 1 p 1 p 2 p 2 = p ( proposition A.6.2 ) p 1, p 2 : hide U 2 in p = ɛ hide U 2 in p 1 τ ρ hide U 2 in p 1 hide U 2 in p 2 p 2 = p ( induction ) p 1, p 2 : hide U 2 in p = ɛ hide U 2 in p 1 τ hide U 2 in p 1 hide U 2 in p 2 ρ\u 2 hide U 2 in p 2 ==== hide U2 in p ( definition of ρ\u 2 ==== ) hide U 2 in p ρ\u2 ==== hide U 2 in p ( definition A.5 ) hide U 2 in p ( ρ)\u2 ====== hide U 2 in p ( = ρ ) hide U 2 in p \U2 ==== hide U 2 in p 28

29 = δ ρ, with ρ L δ : p = p ( = δ ρ ) p == δ ρ p δ ρ ( definition == nd definition of quiescence ) p 1 : p = ɛ δ ρ p 1 p 1 p 1 p 1 = p ( eqution (2) ) p 1 : hide U 2 in p = ɛ δ ρ hide U 2 in p 1 p 1 p 1 p 1 = p ( proposition A.6.4 ) p 1 : hide U 2 in p = ɛ hide U 2 in p 1 δ ρ hide U 2 in p 1 hide U 2 in p 1 p 1 = p ( induction ) p 1 : hide U 2 in p = ɛ hide U 2 in p 1 δ hide U 2 in p 1 hide U 2 in p 1 ρ\u 2 hide U 2 in p 1 ==== hide U2 in p δ (ρ\u 2) ( definition of ====== ) hide U 2 in p ====== δ (ρ\u2) hide U 2 in p ( definition A.5 ) hide U 2 in p (δ ρ)\u2 ====== hide U 2 in p ( = δ ρ ) hide U 2 in p \U2 ==== hide U 2 in p 2. By induction on the structure of (Note tht (I U 1 {δ}) ): = ɛ: The proposition reduces to: hide U 2 in p = ɛ q p, L δ : (4) p == p q = hide U 2 in p ɛ = \U 2 which, using the definition of ɛ =, is rewritten to: hide U 2 in p τ n q p, L δ : (5) p == p q = hide U 2 in p ɛ = \U 2 which is proved by induction on n: n = 0: hide U 2 in p τ n q ( n = 0 nd from definition of ɛ = : p τ 0 p p = p ) p = p, = ɛ : p == p q = hide U 2 in p ɛ = \U 2 29

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.6.: Push Down Automt Remrk: This mteril is no longer tught nd not directly exm relevnt Anton Setzer (Bsed

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

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

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38 Theory of Computtion Regulr Lnguges (NTU EE) Regulr Lnguges Fll 2017 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of Finite Automt A finite utomton hs finite set of control

More information

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

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

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh Lnguges nd Automt Finite Automt Informtics 2A: Lecture 3 John Longley School of Informtics University of Edinburgh jrl@inf.ed.c.uk 22 September 2017 1 / 30 Lnguges nd Automt 1 Lnguges nd Automt Wht is

More information

Theory of Computation Regular Languages

Theory of Computation Regular Languages Theory of Computtion Regulr Lnguges Bow-Yw Wng Acdemi Sinic Spring 2012 Bow-Yw Wng (Acdemi Sinic) Regulr Lnguges Spring 2012 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of

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

Refined interfaces for compositional verification

Refined interfaces for compositional verification Refined interfces for compositionl verifiction Frédéric Lng INRI Rhône-lpes http://www.inrilpes.fr/vsy Motivtion Enumertive verifiction of concurrent systems Prllel composition of synchronous processes

More information

Lecture 1. Functional series. Pointwise and uniform convergence.

Lecture 1. Functional series. Pointwise and uniform convergence. 1 Introduction. Lecture 1. Functionl series. Pointwise nd uniform convergence. In this course we study mongst other things Fourier series. The Fourier series for periodic function f(x) with period 2π is

More information

Summer School Verification Technology, Systems & Applications

Summer School Verification Technology, Systems & Applications VTSA 2011 Summer School Verifiction Technology, Systems & Applictions 4th edition since 2008: Liège (Belgium), Sep. 19 23, 2011 free prticiption, limited number of prticipnts ppliction dedline: July 22,

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

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

THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS.

THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS. THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS RADON ROSBOROUGH https://intuitiveexplntionscom/picrd-lindelof-theorem/ This document is proof of the existence-uniqueness theorem

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automt Theory nd Forml Lnguges TMV027/DIT321 LP4 2018 Lecture 10 An Bove April 23rd 2018 Recp: Regulr Lnguges We cn convert between FA nd RE; Hence both FA nd RE ccept/generte regulr lnguges; More

More information

Global Session Types for Dynamic Checking of Protocol Conformance of Multi-Agent Systems

Global Session Types for Dynamic Checking of Protocol Conformance of Multi-Agent Systems Globl Session Types for Dynmic Checking of Protocol Conformnce of Multi-Agent Systems (Extended Abstrct) Dvide Ancon, Mtteo Brbieri, nd Vivin Mscrdi DIBRIS, University of Genov, Itly emil: dvide@disi.unige.it,

More information

Global Types for Dynamic Checking of Protocol Conformance of Multi-Agent Systems

Global Types for Dynamic Checking of Protocol Conformance of Multi-Agent Systems Globl Types for Dynmic Checking of Protocol Conformnce of Multi-Agent Systems (Extended Abstrct) Dvide Ancon, Mtteo Brbieri, nd Vivin Mscrdi DIBRIS, University of Genov, Itly emil: dvide@disi.unige.it,

More information

Advanced Calculus: MATH 410 Notes on Integrals and Integrability Professor David Levermore 17 October 2004

Advanced Calculus: MATH 410 Notes on Integrals and Integrability Professor David Levermore 17 October 2004 Advnced Clculus: MATH 410 Notes on Integrls nd Integrbility Professor Dvid Levermore 17 October 2004 1. Definite Integrls In this section we revisit the definite integrl tht you were introduced to when

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

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

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

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

7.2 The Definite Integral

7.2 The Definite Integral 7.2 The Definite Integrl the definite integrl In the previous section, it ws found tht if function f is continuous nd nonnegtive, then the re under the grph of f on [, b] is given by F (b) F (), where

More information

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

Non-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1 Non-Deterministic Finite Automt Fll 2018 Costs Busch - RPI 1 Nondeterministic Finite Automton (NFA) Alphbet ={} q q2 1 q 0 q 3 Fll 2018 Costs Busch - RPI 2 Nondeterministic Finite Automton (NFA) Alphbet

More information

N 0 completions on partial matrices

N 0 completions on partial matrices N 0 completions on prtil mtrices C. Jordán C. Mendes Arújo Jun R. Torregros Instituto de Mtemátic Multidisciplinr / Centro de Mtemátic Universidd Politécnic de Vlenci / Universidde do Minho Cmino de Ver

More information

Infinite Geometric Series

Infinite Geometric Series Infinite Geometric Series Finite Geometric Series ( finite SUM) Let 0 < r < 1, nd let n be positive integer. Consider the finite sum It turns out there is simple lgebric expression tht is equivlent to

More information

3 Regular expressions

3 Regular expressions 3 Regulr expressions Given n lphet Σ lnguge is set of words L Σ. So fr we were le to descrie lnguges either y using set theory (i.e. enumertion or comprehension) or y n utomton. In this section we shll

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

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

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

UNIFORM CONVERGENCE. Contents 1. Uniform Convergence 1 2. Properties of uniform convergence 3

UNIFORM CONVERGENCE. Contents 1. Uniform Convergence 1 2. Properties of uniform convergence 3 UNIFORM CONVERGENCE Contents 1. Uniform Convergence 1 2. Properties of uniform convergence 3 Suppose f n : Ω R or f n : Ω C is sequence of rel or complex functions, nd f n f s n in some sense. Furthermore,

More information

Concepts of Concurrent Computation Spring 2015 Lecture 9: Petri Nets

Concepts of Concurrent Computation Spring 2015 Lecture 9: Petri Nets Concepts of Concurrent Computtion Spring 205 Lecture 9: Petri Nets Sebstin Nnz Chris Poskitt Chir of Softwre Engineering Petri nets Petri nets re mthemticl models for describing systems with concurrency

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

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

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

Chapter 4 Contravariance, Covariance, and Spacetime Diagrams

Chapter 4 Contravariance, Covariance, and Spacetime Diagrams Chpter 4 Contrvrince, Covrince, nd Spcetime Digrms 4. The Components of Vector in Skewed Coordintes We hve seen in Chpter 3; figure 3.9, tht in order to show inertil motion tht is consistent with the Lorentz

More information

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!)

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!) CMSC 330: Orgniztion of Progrmming Lnguges DFAs, nd NFAs, nd Regexps (Oh my!) CMSC330 Spring 2018 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All

More information

Riemann Sums and Riemann Integrals

Riemann Sums and Riemann Integrals Riemnn Sums nd Riemnn Integrls Jmes K. Peterson Deprtment of Biologicl Sciences nd Deprtment of Mthemticl Sciences Clemson University August 26, 2013 Outline 1 Riemnn Sums 2 Riemnn Integrls 3 Properties

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

CS375: Logic and Theory of Computing

CS375: Logic and Theory of Computing CS375: Logic nd Theory of Computing Fuhu (Frnk) Cheng Deprtment of Computer Science University of Kentucky 1 Tble of Contents: Week 1: Preliminries (set lgebr, reltions, functions) (red Chpters 1-4) Weeks

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

Chapter 2 Finite Automata

Chapter 2 Finite Automata Chpter 2 Finite Automt 28 2.1 Introduction Finite utomt: first model of the notion of effective procedure. (They lso hve mny other pplictions). The concept of finite utomton cn e derived y exmining wht

More information

Formal languages, automata, and theory of computation

Formal languages, automata, and theory of computation Mälrdlen University TEN1 DVA337 2015 School of Innovtion, Design nd Engineering Forml lnguges, utomt, nd theory of computtion Thursdy, Novemer 5, 14:10-18:30 Techer: Dniel Hedin, phone 021-107052 The exm

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

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

1 Online Learning and Regret Minimization

1 Online Learning and Regret Minimization 2.997 Decision-Mking in Lrge-Scle Systems My 10 MIT, Spring 2004 Hndout #29 Lecture Note 24 1 Online Lerning nd Regret Minimiztion In this lecture, we consider the problem of sequentil decision mking in

More information

Compositional Testing with IOCO

Compositional Testing with IOCO Compositional Testing with IOCO Machiel van der Bijl and Arend Rensink Software Engineering, Department of Computer Science, University of Twente P.O. Box 217, 7500 AE Enschede, The Netherlands email:

More information

Riemann Sums and Riemann Integrals

Riemann Sums and Riemann Integrals Riemnn Sums nd Riemnn Integrls Jmes K. Peterson Deprtment of Biologicl Sciences nd Deprtment of Mthemticl Sciences Clemson University August 26, 203 Outline Riemnn Sums Riemnn Integrls Properties Abstrct

More information

Riemann is the Mann! (But Lebesgue may besgue to differ.)

Riemann is the Mann! (But Lebesgue may besgue to differ.) Riemnn is the Mnn! (But Lebesgue my besgue to differ.) Leo Livshits My 2, 2008 1 For finite intervls in R We hve seen in clss tht every continuous function f : [, b] R hs the property tht for every ɛ >

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

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

State space systems analysis (continued) Stability. A. Definitions A system is said to be Asymptotically Stable (AS) when it satisfies Stte spce systems nlysis (continued) Stbility A. Definitions A system is sid to be Asymptoticlly Stble (AS) when it stisfies ut () = 0, t > 0 lim xt () 0. t A system is AS if nd only if the impulse response

More information

1.3 Regular Expressions

1.3 Regular Expressions 56 1.3 Regulr xpressions These hve n importnt role in describing ptterns in serching for strings in mny pplictions (e.g. wk, grep, Perl,...) All regulr expressions of lphbet re 1.Ønd re regulr expressions,

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

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

Improper Integrals, and Differential Equations

Improper Integrals, and Differential Equations Improper Integrls, nd Differentil Equtions October 22, 204 5.3 Improper Integrls Previously, we discussed how integrls correspond to res. More specificlly, we sid tht for function f(x), the region creted

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

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

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

Exam 2, Mathematics 4701, Section ETY6 6:05 pm 7:40 pm, March 31, 2016, IH-1105 Instructor: Attila Máté 1

Exam 2, Mathematics 4701, Section ETY6 6:05 pm 7:40 pm, March 31, 2016, IH-1105 Instructor: Attila Máté 1 Exm, Mthemtics 471, Section ETY6 6:5 pm 7:4 pm, Mrch 1, 16, IH-115 Instructor: Attil Máté 1 17 copies 1. ) Stte the usul sufficient condition for the fixed-point itertion to converge when solving the eqution

More information

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

Non Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51 Non Deterministic Automt Linz: Nondeterministic Finite Accepters, pge 51 1 Nondeterministic Finite Accepter (NFA) Alphbet ={} q 1 q2 q 0 q 3 2 Nondeterministic Finite Accepter (NFA) Alphbet ={} Two choices

More information

1.4 Nonregular Languages

1.4 Nonregular Languages 74 1.4 Nonregulr Lnguges The number of forml lnguges over ny lphbet (= decision/recognition problems) is uncountble On the other hnd, the number of regulr expressions (= strings) is countble Hence, ll

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

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

The First Fundamental Theorem of Calculus. If f(x) is continuous on [a, b] and F (x) is any antiderivative. f(x) dx = F (b) F (a).

The First Fundamental Theorem of Calculus. If f(x) is continuous on [a, b] and F (x) is any antiderivative. f(x) dx = F (b) F (a). The Fundmentl Theorems of Clculus Mth 4, Section 0, Spring 009 We now know enough bout definite integrls to give precise formultions of the Fundmentl Theorems of Clculus. We will lso look t some bsic emples

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

Notes on specifying systems in EST

Notes on specifying systems in EST Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 1 Notes on specifying systems in EST Robert Meolic, Ttjn Kpus Fculty of EE & CS University of Mribor Robert Meolic, Ttjn Kpus: Notes on specifying

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

New Expansion and Infinite Series

New Expansion and Infinite Series Interntionl Mthemticl Forum, Vol. 9, 204, no. 22, 06-073 HIKARI Ltd, www.m-hikri.com http://dx.doi.org/0.2988/imf.204.4502 New Expnsion nd Infinite Series Diyun Zhng College of Computer Nnjing University

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

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

Math 1B, lecture 4: Error bounds for numerical methods

Math 1B, lecture 4: Error bounds for numerical methods Mth B, lecture 4: Error bounds for numericl methods Nthn Pflueger 4 September 0 Introduction The five numericl methods descried in the previous lecture ll operte by the sme principle: they pproximte the

More information

Review of basic calculus

Review of basic calculus Review of bsic clculus This brief review reclls some of the most importnt concepts, definitions, nd theorems from bsic clculus. It is not intended to tech bsic clculus from scrtch. If ny of the items below

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

Review of Calculus, cont d

Review of Calculus, cont d Jim Lmbers MAT 460 Fll Semester 2009-10 Lecture 3 Notes These notes correspond to Section 1.1 in the text. Review of Clculus, cont d Riemnn Sums nd the Definite Integrl There re mny cses in which some

More information

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives Block #6: Properties of Integrls, Indefinite Integrls Gols: Definition of the Definite Integrl Integrl Clcultions using Antiderivtives Properties of Integrls The Indefinite Integrl 1 Riemnn Sums - 1 Riemnn

More information

Chapter 0. What is the Lebesgue integral about?

Chapter 0. What is the Lebesgue integral about? Chpter 0. Wht is the Lebesgue integrl bout? The pln is to hve tutoril sheet ech week, most often on Fridy, (to be done during the clss) where you will try to get used to the ides introduced in the previous

More information

CMDA 4604: Intermediate Topics in Mathematical Modeling Lecture 19: Interpolation and Quadrature

CMDA 4604: Intermediate Topics in Mathematical Modeling Lecture 19: Interpolation and Quadrature CMDA 4604: Intermedite Topics in Mthemticl Modeling Lecture 19: Interpoltion nd Qudrture In this lecture we mke brief diversion into the res of interpoltion nd qudrture. Given function f C[, b], we sy

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

1 Probability Density Functions

1 Probability Density Functions Lis Yn CS 9 Continuous Distributions Lecture Notes #9 July 6, 28 Bsed on chpter by Chris Piech So fr, ll rndom vribles we hve seen hve been discrete. In ll the cses we hve seen in CS 9, this ment tht our

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

arxiv: v1 [math.ra] 1 Nov 2014

arxiv: v1 [math.ra] 1 Nov 2014 CLASSIFICATION OF COMPLEX CYCLIC LEIBNIZ ALGEBRAS DANIEL SCOFIELD AND S MCKAY SULLIVAN rxiv:14110170v1 [mthra] 1 Nov 2014 Abstrct Since Leibniz lgebrs were introduced by Lody s generliztion of Lie lgebrs,

More information

Math Lecture 23

Math Lecture 23 Mth 8 - Lecture 3 Dyln Zwick Fll 3 In our lst lecture we delt with solutions to the system: x = Ax where A is n n n mtrix with n distinct eigenvlues. As promised, tody we will del with the question of

More information

Review of Riemann Integral

Review of Riemann Integral 1 Review of Riemnn Integrl In this chpter we review the definition of Riemnn integrl of bounded function f : [, b] R, nd point out its limittions so s to be convinced of the necessity of more generl integrl.

More information

Improper Integrals. Type I Improper Integrals How do we evaluate an integral such as

Improper Integrals. Type I Improper Integrals How do we evaluate an integral such as Improper Integrls Two different types of integrls cn qulify s improper. The first type of improper integrl (which we will refer to s Type I) involves evluting n integrl over n infinite region. In the grph

More information

Harvard University Computer Science 121 Midterm October 23, 2012

Harvard University Computer Science 121 Midterm October 23, 2012 Hrvrd University Computer Science 121 Midterm Octoer 23, 2012 This is closed-ook exmintion. You my use ny result from lecture, Sipser, prolem sets, or section, s long s you quote it clerly. The lphet is

More information

f(x) dx, If one of these two conditions is not met, we call the integral improper. Our usual definition for the value for the definite integral

f(x) dx, If one of these two conditions is not met, we call the integral improper. Our usual definition for the value for the definite integral Improper Integrls Every time tht we hve evluted definite integrl such s f(x) dx, we hve mde two implicit ssumptions bout the integrl:. The intervl [, b] is finite, nd. f(x) is continuous on [, b]. If one

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

Semantic reachability for simple process algebras. Richard Mayr. Abstract

Semantic reachability for simple process algebras. Richard Mayr. Abstract Semntic rechbility for simple process lgebrs Richrd Myr Abstrct This pper is n pproch to combine the rechbility problem with semntic notions like bisimultion equivlence. It dels with questions of the following

More information

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

How to simulate Turing machines by invertible one-dimensional cellular automata How to simulte Turing mchines by invertible one-dimensionl cellulr utomt Jen-Christophe Dubcq Déprtement de Mthémtiques et d Informtique, École Normle Supérieure de Lyon, 46, llée d Itlie, 69364 Lyon Cedex

More information

Compositional Testing with IOCO

Compositional Testing with IOCO Compositional Testing with IOCO Machiel van der Bijl 1, Arend Rensink 1 and Jan Tretmans 2 1 Software Engineering, Department of Computer Science, University of Twente P.O. Box 217, 7500 AE Enschede, The

More information

Nondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA

Nondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA Nondeterminism Nondeterministic Finite Automt Nondeterminism Subset Construction A nondeterministic finite utomton hs the bility to be in severl sttes t once. Trnsitions from stte on n input symbol cn

More information

Theoretical foundations of Gaussian quadrature

Theoretical foundations of Gaussian quadrature Theoreticl foundtions of Gussin qudrture 1 Inner product vector spce Definition 1. A vector spce (or liner spce) is set V = {u, v, w,...} in which the following two opertions re defined: (A) Addition of

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

Heat flux and total heat

Heat flux and total heat Het flux nd totl het John McCun Mrch 14, 2017 1 Introduction Yesterdy (if I remember correctly) Ms. Prsd sked me question bout the condition of insulted boundry for the 1D het eqution, nd (bsed on glnce

More information

Acceptance Sampling by Attributes

Acceptance Sampling by Attributes Introduction Acceptnce Smpling by Attributes Acceptnce smpling is concerned with inspection nd decision mking regrding products. Three spects of smpling re importnt: o Involves rndom smpling of n entire

More information

Name Ima Sample ASU ID

Name Ima Sample ASU ID Nme Im Smple ASU ID 2468024680 CSE 355 Test 1, Fll 2016 30 Septemer 2016, 8:35-9:25.m., LSA 191 Regrding of Midterms If you elieve tht your grde hs not een dded up correctly, return the entire pper to

More information

ARITHMETIC OPERATIONS. The real numbers have the following properties: a b c ab ac

ARITHMETIC OPERATIONS. The real numbers have the following properties: a b c ab ac REVIEW OF ALGEBRA Here we review the bsic rules nd procedures of lgebr tht you need to know in order to be successful in clculus. ARITHMETIC OPERATIONS The rel numbers hve the following properties: b b

More information

20 MATHEMATICS POLYNOMIALS

20 MATHEMATICS POLYNOMIALS 0 MATHEMATICS POLYNOMIALS.1 Introduction In Clss IX, you hve studied polynomils in one vrible nd their degrees. Recll tht if p(x) is polynomil in x, the highest power of x in p(x) is clled the degree of

More information

Quadratic Forms. Quadratic Forms

Quadratic Forms. Quadratic Forms Qudrtic Forms Recll the Simon & Blume excerpt from n erlier lecture which sid tht the min tsk of clculus is to pproximte nonliner functions with liner functions. It s ctully more ccurte to sy tht we pproximte

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