Axioms for behavioural congruence of single-pass instruction sequences
aa r X i v : . [ c s . P L ] N ov Axioms for Behavioural Congruenceof Single-Pass Instruction Sequences
J.A. Bergstra and C.A. Middelburg
Informatics Institute, Faculty of Science, University of AmsterdamScience Park 904, 1098 XH Amsterdam, the Netherlands
[email protected],[email protected]
Abstract.
In program algebra, an algebraic theory of single-pass in-struction sequences, three congruences on instruction sequences are paidattention to: instruction sequence congruence, structural congruence, andbehavioural congruence. Sound and complete axiom systems for the firsttwo congruences were already given in early papers on program algebra.The current paper is the first one that is concerned with an axiom sys-tem for the third congruence. The presented axiom system is especiallynotable for its axioms that have to do with forward jump instructions.
Keywords: program algebra, instruction sequence congruence, structuralcongruence, behavioural congruence, axiom system.
Program algebra, an algebraic theory of single-pass instruction sequences, wasfirst presented in [3] as the basis of an approach to programming languagesemantics. Various issues, including issues relating to programming languageexpressiveness, computability, computational complexity, algorithm efficiency,algorithmic equivalence of programs, program verification, program perform-ance, program compactness, and program parallelization, have been studied inthe setting of program algebra since then. An overview of all the work done todate and some open questions originating from it can be found at [13]. Threecongruences on instruction sequences were introduced in [3]: instruction sequencecongruence, structural congruence and behavioural congruence. Sound and com-plete axiom systems for instruction sequence congruence and structural congru-ence were already provided in [3], but an axiom system for behavioural congru-ence has never been provided. This paper is concerned with an axiom system forbehavioural congruence.Program algebra is parameterized by a set of uninterpreted basic instruc-tions. In applications of program algebra, this set is instantiated by a set ofinterpreted basic instructions. In the case of most issues that have been studiedin the setting of program algebra, the interpreted basic instructions are instruc-tions to set and get the content of Boolean registers. In the case of a few issues,the interpreted basic instructions are other instructions, e.g. instructions to ma-nipulate the content of counters or instructions to manipulate the content ofTuring machine tapes (see e.g. [4]).n the uninstantiated case, behavioural congruence is the coarsest congruencerespecting the behaviour produced by instruction sequences under executionthat is possible with uninterpreted basic instructions. In the instantiated cases,behavioural congruence is the coarsest congruence respecting the behaviour pro-duced by instruction sequences under execution that is possible taking the in-tended interpretation of the basic instructions into account. In this paper, anemphasis is laid on the uninstantiated case. Yet attention is paid to the instan-tiation in which all possible instructions for Boolean registers are taken as basicinstructions.The single-pass instruction sequences considered in program algebra are non-empty, finite or eventually periodic infinite instruction sequences. In this pa-per, the soundness question, i.e. the question whether derivable equality im-plies behavioural congruence, is fully answered in the affirmative. However, thecompleteness question, i.e. the question whether behavioural congruence impliesderivable equality, is answered in the affirmative only for the restriction to fi-nite instruction sequences because of problems in mastering the intricacy of acompleteness proof for the unrestricted case.In [3], basic thread algebra, an algebraic theory of mathematical objects thatmodel in a direct way the behaviours produced by instruction sequences underexecution, was introduced to describe which behaviours are produced by theinstruction sequences considered in program algebra. It is rather awkward todescribe and analyze the behaviours of this kind using algebraic theories of pro-cesses such as ACP [1,2], CCS [11,14] and CSP [10,12]. However, the objectsconsidered in basic thread algebra can be viewed as representations of processesas considered in ACP (see e.g. [6]). Basic thread algebra is parameterized bya set of uninterpreted basic actions and, when it is used for describing the be-haviours produced by instruction sequences under execution, basic instructionsare taken as basic actions. Like in [3], basic thread algebra will be used in thispaper for describing the behaviours produced by the instruction sequences con-sidered in program algebra and to define the notion of behavioural congruenceof instruction sequences.This paper is organized as follows. First, we introduce a version of programalgebra with axioms for instruction sequence congruence, structural congruence,and behavioural congruence (Section 2). Next, we present the preliminaries onbasic thread algebra that are needed in the rest of the paper (Section 3). Af-ter that, we describe which behaviours are produced by instruction sequencesunder execution and define a notion of behavioural congruence for instructionsequences (Section 4). Then, we go into the soundness and completeness of thepresented axiom system with respect to the defined notion of behavioural con-gruence (Section 5). Following this, we look at the instantiation of programalgebra in which all possible instructions for Boolean registers are taken as basicinstructions (Section 6). Finally, we make some concluding remarks (Section 7). In [3], basic thread algebra is introduced under the name basic polarized processalgebra. B of Boolean valuesis a set with two elements whose intended interpretations are the truth values false and true . As is common practice, we represent the elements of B by thebits 0 and 1.This paper draws somewhat from the preliminaries of earlier papers thatbuilt on program algebra and basic thread algebra. The most recent one of thepapers in question is [9]. In this section, we present PGA bc . PGA bc is a version of PGA (ProGram Alge-bra) with, in addition to the usual axioms for instruction sequence congruenceand structural congruence, axioms for behavioural congruence.The instruction sequences considered in PGA bc are single-pass instructionsequences of a particular kind. It is assumed that a fixed but arbitrary set A of basic instructions has been given. A is the basis for the set of instructions thatmay occur in the instruction sequences considered in PGA bc . The intuition isthat the execution of a basic instruction may modify a state and must producea Boolean value as reply at its completion. The actual reply may be state-dependent.The set of instructions of which the instruction sequences considered inPGA bc are composed is the set that consists of the following elements: – for each a ∈ A , a plain basic instruction a ; – for each a ∈ A , a positive test instruction + a ; – for each a ∈ A , a negative test instruction − a ; – for each l ∈ N , a forward jump instruction l ; – a termination instruction !.We write I for this set. The elements from this set are called primitive instruc-tions .Primitive instructions are the elements of the instruction sequences consid-ered in PGA bc . On execution of such an instruction sequence, these primitiveinstructions have the following effects: – the effect of a positive test instruction + a is that basic instruction a isexecuted and execution proceeds with the next primitive instruction if 1is produced and otherwise the next primitive instruction is skipped andexecution proceeds with the primitive instruction following the skipped one— if there is no primitive instruction to proceed with, inaction occurs; – the effect of a negative test instruction − a is the same as the effect of + a ,but with the role of the value produced reversed; The instruction sequences concerned are single-pass in the sense that they are in-struction sequences of which each instruction is executed at most once and can bedropped after it has been executed or jumped over. the effect of a plain basic instruction a is the same as the effect of + a ,but execution always proceeds as if 1 is produced; – the effect of a forward jump instruction l is that execution proceeds withthe l th next primitive instruction — if l equals 0 or there is no primitiveinstruction to proceed with, inaction occurs; – the effect of the termination instruction ! is that execution terminates.Inaction occurs if no more basic instructions are executed, but execution doesnot terminate.PGA bc has one sort: the sort IS of instruction sequences . We make this sortexplicit to anticipate the need for many-sortedness later on. To build terms ofsort IS , PGA bc has the following constants and operators: – for each u ∈ I , the instruction constant u : → IS ; – the binary concatenation operator ; : IS × IS → IS ; – the unary repetition operator ω : IS → IS .Terms of sort IS are built as usual in the one-sorted case. We assume that thereare infinitely many variables of sort IS , including X, Y, Z . We use infix notationfor concatenation and postfix notation for repetition.A PGA bc term in which the repetition operator does not occur is called a repetition-free PGA bc term.One way of thinking about closed PGA bc terms is that they represent non-empty, finite or eventually periodic infinite sequences of primitive instructions. The instruction sequence represented by a closed term of the form t ; t ′ is theinstruction sequence represented by t concatenated with the instruction sequencerepresented by t ′ . The instruction sequence represented by a closed term of theform t ω is the instruction sequence represented by t concatenated infinitely manytimes with itself. A closed PGA bc term represents a finite instruction sequenceif and only if it is a closed repetition-free PGA bc term.In this paper, closed PGA bc terms are considered equal if the instructionsequences that they represent can always take each other’s place in an instructionsequence in the sense that the behaviour produced under execution remains thesame irrespective of the interpretation of the instructions from A . In other words,equality of closed terms stands in PGA bc for a kind of behavioural congruenceof the represented instruction sequences. The kind of behavioural congruence inquestion will be made precise in Section 4.The axioms of PGA bc are given in Table 1. In this table, n stands for anarbitrary natural number from N , u , u , . . . , u k and v , . . . , v k ′ +1 stand forarbitrary primitive instructions from I , k , k ′ , and l stand for arbitrary naturalnumbers from N , and a stands for an arbitrary basic instruction from A . Foreach n ∈ N , the term t n , where t is a PGA bc term, is defined by induction on n as follows: t = t , and t n +1 = t ; t n . An eventually periodic infinite sequence is an infinite sequence with only finitelymany distinct suffixes. We write N for the set { n ∈ N | n ≥ } of positive natural numbers. able 1. Axioms of PGA bc ( X ; Y ) ; Z = X ; ( Y ; Z ) PGA1( X n ) ω = X ω PGA2 X ω ; Y = X ω PGA3( X ; Y ) ω = X ; ( Y ; X ) ω PGA4 k +1 ; u ; . . . ; u k ; u ; . . . ; u k ; k +1 ; u ; . . . ; u k ; l = l + k +1 ; u ; . . . ; u k ; l PGA6( l + k +1 ; u ; . . . ; u k ) ω = ( l ; u ; . . . ; u k ) ω PGA7 l + k + k ′ +2 ; u ; . . . ; u k ; ( v ; . . . ; v k ′ +1 ) ω = l + k +1 ; u ; . . . ; u k ; ( v ; . . . ; v k ′ +1 ) ω PGA8+ a ; a ; − a ; a ; a ; a ; − a ; a ; a ; l +2 ; l +1 = a ; l +2 ; l +1 PGA13 − a ; l +2 ; l +1 = a ; l +2 ; l +1 PGA14+ a ; ! ; ! = a ; ! ; ! PGA15 − a ; ! ; ! = a ; ! ; ! PGA16+ a ; u ω = a ; u ω PGA17 − a ; u ω = a ; u ω PGA18 k +3 ; k +3 ; k +3 ; u ; . . . ; u k ; + a = + a ; k +3 ; k +3 ; u ; . . . ; u k ; + a PGA19 k +3 ; k +3 ; k +3 ; u ; . . . ; u k ; − a = − a ; k +3 ; k +3 ; u ; . . . ; u k ; − a PGA20 k +2 ; k +2 ; u ; . . . ; u k ; a = a ; k +2 ; u ; . . . ; u k ; a PGA21 k + k ′ +4 ; u ; . . . ; u k ; + a ; k ′ +3 ; k ′ +3 ; v ; . . . ; v k ′ ; + a = k +1 ; u ; . . . ; u k ; + a ; k ′ +3 ; k ′ +3 ; v ; . . . ; v k ′ ; + a PGA22 k + k ′ +4 ; u ; . . . ; u k ; − a ; k ′ +3 ; k ′ +3 ; v ; . . . ; v k ′ ; − a = k +1 ; u ; . . . ; u k ; − a ; k ′ +3 ; k ′ +3 ; v ; . . . ; v k ′ ; − a PGA23 k + k ′ +3 ; u ; . . . ; u k ; a ; k ′ +2 ; v ; . . . ; v k ′ ; a = k +1 ; u ; . . . ; u k ; a ; k ′ +2 ; v ; . . . ; v k ′ ; a PGA24 k +1 ; u ; . . . ; u k ; ! = ! ; u ; . . . ; u k ; ! PGA25 k +1 ; ( u ; . . . ; u k ; u ) ω = ( u ; u ; . . . ; u k ) ω PGA26( k +2 ; k +1 ; u ; . . . ; u k ; + a ) ω = ( a ; k +1 ; u ; . . . ; u k ; a ) ω PGA27( k +2 ; k +1 ; u ; . . . ; u k ; − a ) ω = ( a ; k +1 ; u ; . . . ; u k ; a ) ω PGA28( k +2 ; k +1 ; u ; . . . ; u k ; a ) ω = ( a ; k +1 ; u ; . . . ; u k ; a ) ω PGA29( u ; . . . ; u k +1 ) ω = a ω if , for all i ∈ { , . . . , k +1 } , u i ∈ { a, + a, − a } or , for some l ∈ { , . . . , k } ,u i ≡ l and u ( i + l )mod( k +1) ∈ { a, + a, − a } PGA30 t = t ′ is derivable from PGA1–PGA4, then t and t ′ represent the sameinstruction sequence. In this case, we say that the represented instruction se-quences are instruction sequence congruent . We write PGA isc for the algebraictheory whose sorts, constants and operators are those of PGA bc , but whoseaxioms are PGA1–PGA4.The unfolding equation X ω = X ; X ω is derivable from the axioms of PGA isc by first taking the instance of PGA2 in which n = 2, then applying PGA4, andfinally applying the instance of PGA2 in which n = 2 again.A closed PGA bc term is in first canonical form if it is of the form t or t ; t ′ ω ,where t and t ′ are closed repetition-free PGA bc terms. The following propositionrelates PGA isc and first canonical forms. Proposition 1.
For all closed
PGA bc terms t , there exists a closed PGA bc term t ′ that is in first canonical form such that t = t ′ is derivable from the axioms of PGA isc .Proof.
The proof is analogous to the proof of Lemma 2.2 from [5]. ⊓⊔ If t = t ′ is derivable from PGA1–PGA8, then t and t ′ represent the same in-struction sequence after changing all chained jumps into single jumps and makingall jumps ending in the repeating part as short as possible if they are eventuallyperiodic infinite sequences. In this case, we say that the represented instructionsequences are structurally congruent . We write PGA sc for the algebraic theorywhose sorts, constants and operators are those of PGA bc , but whose axioms arePGA1–PGA8.A closed PGA bc term t has chained jumps if there exists a closed PGA bc term t ′ such that t = t ′ is derivable from the axioms of PGA isc and t ′ contains asubterm of the form n +1 ; u ; . . . ; u n ; l . A closed PGA bc term t that is in firstcanonical form has a repeating part if it is of the form u ; . . . ; u m ; ( v ; . . . ; v k ) ω .A closed PGA bc term t of the form u ; . . . ; u m ; ( v ; . . . ; v k ) ω has shortest possiblejumps ending in the repeating part if: (i) for each i ∈ [1 , m ] for which u i is ofthe form l , l ≤ k + m − i ; (ii) for each j ∈ [1 , k ] for which v j is of the form l , l ≤ k −
1. A closed PGA bc term is in second canonical form if it is in firstcanonical form, does not have chained jumps, and has shortest possible jumpsending in the repeating part if it has a repeating part. The following propositionrelates PGA sc and second canonical forms. Proposition 2.
For all closed
PGA bc terms t , there exists a closed PGA bc term t ′ that is in second canonical form such that t = t ′ is derivable from the axiomsof PGA sc .Proof. The proof is analogous to the proof of Lemma 2.3 from [5]. ⊓⊔ If t = t ′ is derivable from PGA1–PGA30, then t and t ′ represent instructionsequences that can always take each other’s place in an instruction sequencewithout affecting the behaviour produced under execution in an essential way.In this case, we say that the represented instruction sequences are behaviourallycongruent . In Section 4, we will use basic thread algebra to make precise which6ehaviours are produced by the represented instruction sequences under execu-tion.Axioms PGA1–PGA8 originate from [3]. Axioms PGA9–PGA30 are new andsome of them did not come into the picture until we recently attempted to obtaina complete axiom system for behavioural congruence.Henceforth, the instruction sequences of the kind considered in PGA isc ,PGA sc , and PGA bc are called PGA instruction sequences. In this section, we present an extension of BTA (Basic Thread Algebra) thatreflects the idea that infinite threads are identical if their approximations up toany finite depth are identical.BTA is concerned with mathematical objects that model in a direct waythe behaviours produced by PGA instruction sequences under execution. Theobjects in question are called threads. A thread models a behaviour that consistsof performing basic actions in a sequential fashion. Upon performing a basicaction, a reply from an execution environment determines how the behaviourproceeds subsequently. The basic instructions from A are taken as basic actions.BTA has one sort: the sort T of threads . We make this sort explicit to antic-ipate the need for many-sortedness later on. To build terms of sort T , BTA hasthe following constants and operators: – the inaction constant D : → T ; – the termination constant S : → T ; – for each a ∈ A , the binary postconditional composition operator E a D : T × T → T .Terms of sort T are built as usual in the one-sorted case. We assume that thereare infinitely many variables of sort T , including x, y, z . We use infix notation forpostconditional composition. We introduce basic action prefixing as an abbrevi-ation: a ◦ t , where t is a BTA term, abbreviates t E a D t . We treat an expressionof the form a ◦ t and the BTA term that it abbreviates as syntactically the same.Different closed BTA terms are considered to represent different threads. Thethread represented by a closed term of the form t E a D t ′ models the behaviourthat will first perform a , and then proceed as the behaviour modeled by thethread represented by t if the reply from the execution environment is 1 andproceed as the behaviour modeled by the thread represented by t ′ if the replyfrom the execution environment is 0. The thread represented by S models thebehaviour that will do no more than terminate and the thread represented by D models the behaviour that will become inactive.Closed BTA terms are considered equal if they represent the same thread.Equality of closed terms stands in BTA for syntactic identity. Therefore, BTAhas no axioms.Each closed BTA term represents a finite thread, i.e. a thread with a finiteupper bound to the number of basic actions that it can perform. Infinite threads,7 able 2. Axioms of BTA ∞ π ( x ) = D PR1 π n +1 ( D ) = D PR2 π n +1 ( S ) = S PR3 π n +1 ( x E a D y ) = π n ( x ) E a D π n ( y ) PR4 V n ≥ π n ( x ) = π n ( y ) ⇒ x = y AIP i.e. threads without a finite upper bound to the number of basic actions thatit can perform, can be defined by means of a set of recursion equations (seee.g. [4]). A regular thread is a finite or infinite thread that can only be in a finitenumber of states. The behaviours produced by PGA instruction sequences underexecution are exactly the behaviours modeled by regular threads.Two infinite threads are considered identical if their approximations up toany finite depth are identical. The approximation up to depth n of a threadmodels the behaviour that differs from the behaviour modeled by the thread inthat it will become inactive after it has performed n actions unless it would ter-minate at this point. AIP (Approximation Induction Principle) is a conditionalequation that formalizes the above-mentioned view on infinite threads. In AIP,the approximation up to depth n is phrased in terms of the unary projection operator π n : T → T .The axioms for the projection operators and AIP are given in Table 2. Inthis table, a stands for an arbitrary basic action from A and n stands for anarbitrary natural number from N . We write BTA ∞ for BTA extended with theprojection operators, the axioms for the projection operators, and AIP. In this section, we make precise in the setting of BTA ∞ which behaviours areproduced by PGA instruction sequences under execution and introduce the no-tion of behavioural congruence on PGA instruction sequences.To make precise which behaviours are produced by PGA instruction se-quences under execution, we introduce an operator | | meant for extracting fromeach PGA instruction sequence the thread that models the behaviour producedby it under execution. For each closed PGA bc term t , | t | represents the threadthat models the behaviour produced by the instruction sequence represented by t under execution.Formally, we combine PGA bc with BTA ∞ and extend the combination withthe thread extraction operator | | : IS → T and the axioms given in Table 3.In this table, a stands for an arbitrary basic instruction from A , u stands foran arbitrary primitive instruction from I , and l stands for an arbitrary naturalnumber from N . 8 able 3. Axioms for the thread extraction operator | a | = a ◦ D TE1 | a ; X | = a ◦ | X | TE2 | + a | = a ◦ D TE3 | + a ; X | = | X | E a D | X | TE4 |− a | = a ◦ D TE5 |− a ; X | = | X | E a D | X | TE6 | l | = D TE7 | X | = D TE8 | X | = | X | TE9 | l + 2 ; u | = D TE10 | l + 2 ; u ; X | = | l + 1 ; X | TE11 | ! | = S TE12 | ! ; X | = S TE13
If a closed PGA bc term t represents an instruction sequence that starts withan infinite chain of forward jumps, then TE9 and TE11 can be applied to | t | infinitely often without ever showing that a basic action is performed. In thiscase, we have to do with inaction and, being consistent with that, t = t ′ isderivable from the axioms of PGA sc for some closed PGA bc term t ′ . By contrast, t = t ′ is not derivable from the axioms of PGA isc . If closed PGA bc terms t and t ′ represent instruction sequences in which no infinite chains of forwardjumps occur, then t = t ′ is derivable from the axioms of PGA sc only if | t | = | t ′ | is derivable from the axioms of PGA isc and TE1–TE13.If a closed PGA bc term t represents an infinite instruction sequence, then wecan extract the approximations of the thread modeling the behaviour producedby that instruction sequence under execution up to every finite depth: for each n ∈ N , there exists a closed BTA term t ′′ such that π n ( | t | ) = t ′′ is derivable fromthe axioms of PGA sc , TE1–TE13, the axioms of BTA, and PR1–PR4. If closedPGA bc terms t and t ′ represent infinite instruction sequences that produce thesame behaviour under execution, then this can be proved using the followinginstance of AIP: V n ≥ π n ( | t | ) = π n ( | t ′ | ) ⇒ | t | = | t ′ | .PGA instruction sequences are behaviourally equivalent if they produce thesame behaviour under execution. Behavioural equivalence is not a congruence.Instruction sequences are behaviourally congruent if they produce the same be-haviour irrespective of the way they are entered and the way they are left.Let t and t ′ be closed PGA bc terms. Then: – t and t ′ are behaviourally equivalent , written t ≡ be t ′ , if | t | = | t ′ | is derivablefrom the axioms of PGA sc , TE1–TE13, and the axioms of BTA ∞ . – t and t ′ are behaviourally congruent , written t ∼ = bc t ′ , if, for each l, n ∈ N , l ; t ; ! n ≡ be l ; t ′ ; ! n . Behavioural congruence is the largest congruence contained in behavioural equiv-alence. Moreover, structural congruence implies behavioural congruence.
Proposition 3.
For all closed
PGA bc terms t and t ′ , t = t ′ is derivable fromthe axioms of PGA sc only if t ∼ = bc t ′ . We use the convention that t ; t ′ stands for t . roof. The proof is analogous to the proof of Proposition 2.2 from [5]. In thatproof use is made of the uniqueness of solutions of sets of recursion equationswhere each right-hand side is a BTA term of the form D , S or s E a D s ′ withBTA terms s and s ′ that contain only variables occurring as one of the right-handsides. This uniqueness follows from AIP (see also Corollary 2.1 from [5]). ⊓⊔ Conversely, behavioural congruence does not implies structural congruence. Forexample, + a ; ! ; ! ∼ = bc − a ; ! ; !, but + a ; ! ; ! = − a ; ! ; ! is not derivable from theaxioms of PGA sc . bc and Behavioural Congruence The axioms of PGA bc are intended to be used for establishing behavioural con-gruence in a direct way by nothing more than equational reasoning. Two ques-tions arise: the soundness question, i.e. the question whether derivable equalityimplies behavioural congruence, and the completeness question, i.e. the questionwhether behavioural congruence implies derivable equality. The two theoremspresented in this section concern these questions. The first theorem fully an-swers the soundness question in the affirmative. The second theorem answersthe completeness question in the affirmative only for the restriction obtained byexcluding the repetition operator because of problems in mastering the intricacyof a completeness proof for the unrestricted case.We start with a few additional definitions and results which will be used inthe proof of the theorems.A closed PGA bc term t has simplifiable control flow if there exists a closedPGA bc term t ′ such that t = t ′ is derivable from the axioms of PGA isc and t ′ contains a subterm of the same form as the left-hand side of one of the ax-ioms PGA9–PGA30. The intuition is that a closed PGA bc term has simplifiablecontrol flow if the instruction sequence that it represents has unnecessary tests,unnecessary jumps or needlessly long jumps. A closed PGA bc term is in thirdcanonical form if it is in second canonical form and does not have simplifiablecontrol flow.The following proposition relates PGA bc and third canonical forms. Proposition 4.
For all closed
PGA bc terms t , there exists a closed PGA bc term t ′ that is in third canonical form such that t = t ′ is derivable from the axioms of PGA bc .Proof. By Proposition 2, there exists a closed PGA bc term t ′′ that is in secondcanonical form such that t = t ′′ is derivable from the axioms of PGA sc . If t ′′ hassimplifiable control flow, it can be transformed into a closed PGA bc term thatdoes not have simplifiable control flow by applications of PGA9–PGA30 possiblyalternated with applications of PGA1 and/or PGA4. ⊓⊔ Proposition 4 is important to the proof of Theorem 2 below. Actually, there aresome axioms among PGA9–PGA30 that did not turn up until the elaborationof the proof of Theorem 2.The set of basic
PGA bc terms is inductively defined as follows:10 if u ∈ I , then u is a basic PGA bc term; – if u ∈ I and t is a basic PGA bc term, then u ; t is a basic PGA bc term; and – if t is a basic PGA bc term, then t ω is a basic PGA bc term.Obviously, for all closed PGA bc terms t , there exists a basic PGA bc term t ′ suchthat t = t ′ is derivable from PGA1. Lemma 1.
For all basic repetition-free
PGA bc terms t that are in third canon-ical form, t is of one of the following forms:(a) u , where u ∈ I ;(b) u ; t ′ , where u ∈ I and t ′ is a basic repetition-free PGA bc term that is inthird canonical form.Proof. This lemma with all occurrences of “third canonical form” replaced by“first canonical form” follows immediately from the definitions of basic PGA bc term and first canonical form. Moreover, in the case that t is of the form (b),it follows immediately from the definitions concerned that the properties “doesnot have chained jumps”,“has shortest possible jumps ending in the repeatingpart”, and “does not have simplifiable control flow” carry over from t to t ′ . Thismeans that t ′ is also in third canonical form. ⊓⊔ In the rest of this section, we refer to the possible forms of basic PGA bc termsthat are in third canonical form as in Lemma 1. Lemma 2.
For all basic repetition-free
PGA bc terms t and t ′ that are in thirdcanonical form, t ∼ = bc t ′ only if(1) t is of the form (a) iff t ′ is of the form (a);(2) t is of the form (b) iff t ′ is of the form (b).Proof. Suppose that t and t ′ are in third canonical form and t ∼ = bc t ′ .Property (1) is trivial because, in the case that t is of the form (a), t ∼ = bc t ′ iff t ≡ t ′ . Property (2) follows immediately from Lemma 1 and the consequence ofproperty (1) that, in the case that t is of the form (b), t ′ is not of the form (a). ⊓⊔ We now move on to the two theorems announced at the beginning of thissection.
Theorem 1.
For all closed
PGA bc terms t and t ′ , t = t ′ is derivable from theaxioms of PGA bc only if t ∼ = bc t ′ .Proof. Because ∼ = bc is a congruence, it is sufficient to prove for each axiom ofPGA bc that, for all its closed substitution instances t = t ′ , t ∼ = bc t ′ . For PGA1–PGA8, this follows immediately from Proposition 3. For PGA9–PGA30, it fol-lows very straightforwardly from the definition of ∼ = bc , TE1–TE13, and in thecase of PGA17 and PGA18, the unfolding equation X ω = X ; X ω . ⊓⊔ We write ≡ for syntactic identity. heorem 2. For all closed repetition-free
PGA bc terms t and t ′ , t = t ′ is deriv-able from the axioms of PGA bc if t ∼ = bc t ′ .Proof. See Appendix A. ⊓⊔ We will conclude Appendix A by going into the main problem that we haveexperienced in mastering the intricacy of a proof of the unrestricted version ofTheorem 2, which reads as follows: for all closed
PGA bc terms t and t ′ , t = t ′ is derivable from the axiomsof PGA bc if t ∼ = bc t ′ . In this section, we present the instantiation of PGA bc in which all possible in-structions for Boolean registers are taken as basic instructions. This instantiationis called PGA bcbr (PGA bc with instructions for Boolean registers). In order to jus-tify the additional axioms of PGA bcbr , we also present the instantiation of BTAin which all possible instructions for Boolean registers are taken as basic actionsand adapt the definitions of behavioural equivalence and behavioural congruenceto closed PGA bcbr terms using this instantiation of BTA.In PGA bcbr , it is assumed that a fixed but arbitrary set F of foci has beengiven. Foci serve as names of Boolean register services.The set of basic instructions used in PGA bcbr consists of the following: – for each f ∈ F and p, q : B → B , a basic Boolean register instruction f.p/q .We write A br for this set.The intuition is that the execution of a basic Boolean register instructionmay modify the register content of a Boolean register service and must producea Boolean value as reply at its completion. The actual reply may be dependent onthe register content of the Boolean register service. More precisely, the executionof a basic Boolean register instruction has the following effects: – if the register content of the Boolean register service named f is b when theexecution of f.p/q starts, then its register content is q ( b ) when the executionof f.p/q terminates; – if the register content of the Boolean register service named f is b whenthe execution of f.p/q starts, then the reply produced on termination of theexecution of f.p/q is p ( b ).The execution of f.p/q has no effect on the register content of Boolean registerservices other than the one named f . B → B , the set of all unary Boolean functions, consists of the following fourfunctions: – the function 0, satisfying 0(0) = 0 and 0(1) = 0; – the function 1, satisfying 1(0) = 1 and 1(1) = 1;12 able 4. Additional axioms for PGA bcbr + f. /p = − f. /p PGAbr1+ f. /p = − f. /p PGAbr2+ f. i /p = − f. c /p PGAbr3+ f. c /p = − f. i /p PGAbr4+ f. /p = f.q/p PGAbr5 – the function i , satisfying i (0) = 0 and i (1) = 1; – the function c, satisfying c(0) = 1 and c(1) = 0.In [7], we actually used the methods 0 /
0, 1 /
1, and i / i , but denoted them by set :0, set :1 and get , respectively. In [8], we actually used, in addition to thesemethods, the method c / c, but denoted it by com .We write I br for the set I of primitive instructions in the case where A br istaken as the set A .The constants and operators of PGA bcbr are the constants and operators ofPGA bc in the case where I br is taken as the set I .Closed PGA bcbr terms are considered equal if the instruction sequences thatthey represent can always take each other’s place in an instruction sequencein the sense that the behaviour produced under execution remains the sameunder the intended interpretation of the instructions from A br . In other words,equality of closed terms stands in PGA bcbr for a kind of behavioural congruenceof the represented instruction sequences. The kind of behavioural congruence inquestion will be made precise at the end of this section.The axioms of PGA bcbr are the axioms of PGA bc and in addition the axiomsgiven in Table 4. In this table, f stands for an arbitrary focus from F , and p and q stand for arbitrary unary Boolean functions from B → B .If t = t ′ is derivable from the axioms of PGA bcbr , then t and t ′ representinstruction sequences that can always take each other’s place in an instructionsequence without affecting the behaviour produced under execution in an essen-tial way, taking the intended interpretation of the instructions from A br intoaccount. Below, we introduce the instantiation of BTA in which all possibleinstructions for Boolean registers are taken as basic actions to make this precise.Henceforth, the instruction sequences of the kind considered in PGA bcbr arecalled PGA br instruction sequences.The instantiation of BTA referred to above is called BTA br (BTA with in-structions for Boolean registers). In BTA br , the effects of performing a basicaction on both the register content of Boolean register services and the wayin which the modeled behaviour proceeds subsequently to performing the basicaction concerned correspond to the intended interpretation of the basic actionwhen it is considered to be a basic instruction.The constants and operators of BTA br are the constants and operators ofBTA in the case where A br is taken as the set A .13 able 5. Axioms of BTA br x E f. /q D y = y E f. /q D x BTAbr1 x E f. i /q D y = y E f. c /q D x BTAbr2 x E f. /q D y = x E f.p/q D x BTAbr3
The idea behind equality of BTA br terms is that two closed BTA br terms areequal if they represent threads that can be made the same by a number of changesthat never influences at any step of the modeled behaviour the effects of the basicaction performed on the register content of Boolean register services and theway in which the modeled behaviour proceeds. Equality of closed terms standsin BTA br for a kind of congruence of the represented threads which originatesfrom the notion of effectual equivalence of basic instructions introduced in [9].The axioms of BTA br are given in Table 5. In this table, f stands for anarbitrary focus from F , and p and q stand for arbitrary unary Boolean functionsfrom B → B .Like BTA, we can extend BTA br with the projection operators, the axiomsfor the projection operators and AIP. We write BTA ∞ br for the resulting theory.To make precise which behaviours are produced by PGA br instruction se-quences under execution, we combine PGA bcbr with BTA ∞ br and extend the com-bination with the thread extraction operator and the axioms for the threadextraction operator.PGA br instruction sequences are behaviourally equivalent if the behavioursthat they produce under execution are the same under the intended interpreta-tion of the instructions from A br .Let t and t be closed PGA bcbr terms. Then: – t and t ′ are behaviourally equivalent , written t ≡ be t ′ , if | t | = | t ′ | is derivablefrom the axioms of PGA sc , TE1–TE13, and the axioms of BTA ∞ br . – t and t ′ are behaviourally congruent , written t ∼ = bc t ′ , if, for each l, n ∈ N , l ; t ; ! n ≡ be l ; t ′ ; ! n .It is obvious that, with this adapted definition of behavioural congruence,Theorem 1 goes through for closed PGA bcbr terms and Theorem 2 goes throughfor closed repetition-free PGA bcbr terms. In program algebra, three congruences on instruction sequences are paid atten-tion to: instruction sequence congruence, structural congruence, and behaviouralcongruence. However, an axiom system for behavioural congruence had neverbeen given. In this paper, we have given an axiom system for behavioural con-gruence and proved its soundness for closed terms and completeness for closedrepetition-free terms. This means that behavioural congruence of finite instruc-tion sequences can now be established in a direct way by nothing more than14quational reasoning. In earlier work, it had to be established in an indirectway, namely via thread extraction, by reasoning that was not purely equational.It is an open question whether the axiom system is also complete for closedterms in the case where the closed terms considered are not restricted to therepetition-free ones.
A Appendix
In this appendix, we outline the proof of Theorem 2. We do not give full detailsof the proof because the full proof is really tedious. We have aimed at providingsufficient information in the outline of the proof to make a reconstruction of thefull proof a routine matter.
Proof of Theorem 2:
For all closed PGA bc terms s , there exists a basic PGA bc term s ′ such that s = s ′ is derivable from PGA1. Moreover, for all closed PGA bc terms s and s ′ , s = s ′ is trivially derivable from the axioms of PGA bc if s ≡ s ′ .By these facts, Proposition 4, and Theorem 1, it is sufficient to prove:for all basic repetition-free PGA bc terms t and t ′ that are in third canon-ical form, t ≡ t ′ if t ∼ = bc t ′ .We prove this by induction on the depth of t and case distinction on the formof t according to Lemma 1.The case t ≡ u , for u ∈ I , is trivial because t ∼ = bc t ′ only if t ≡ t ′ .The case t ≡ u ; s , for u ∈ I and basic repetition-free PGA bc term s that isin third canonical form, is more involved. It follows immediately from Lemma 2that in this case t ∼ = bc t ′ only if t ′ ≡ u ′ ; s ′ for some u ′ ∈ I and basic repetition-free PGA bc term s ′ that is in third canonical form. Let u ′ ∈ I and s ′ be a basicrepetition-free PGA bc term that is in third canonical form such that t ′ ≡ u ′ ; s ′ .Then it follows immediately from the definition of ∼ = bc that t ∼ = bc t ′ only if s ∼ = bc s ′ . Hence, by the induction hypothesis, we have that t ∼ = bc t ′ only if s ≡ s ′ .We proceed with a case analysis on ( u, u ′ ). There exist 25 combinations of kindsof primitive instructions. In 9 of these combinations, it matters whether the basicinstructions involved are the same and, in 1 of these combinations, it matterswhether the natural numbers involved are the same. Hence, in total, there are35 cases to consider. However, 5 cases are trivial because in those cases u ≡ u ′ and 13 cases are covered by a symmetric case. Of the remaining 17 cases, 9cases contradict t ∼ = bc t ′ . Left over are the following 8 cases: ( u, u ′ ) = (+ a, a ),( u, u ′ ) = ( − a, a ), ( u, u ′ ) = (+ a, − a ), ( u, u ′ ) = ( l, + a ), ( u, u ′ ) = ( l, − a ),( u, u ′ ) = ( l, a ), ( u, u ′ ) = ( l, l ′ ) with l = l ′ , ( u, u ′ ) = ( l, !). The proofnow continues with a case analysis on ( s, s ′ ) for each of these eight cases, usingimplicitly the above-mentioned fact that s ≡ s ′ each time that the conclusionis drawn that there is a contradiction with t ∼ = bc t ′ . We will also implicitly useseveral times the easy to check fact that, for all basic repetition-free PGA bc terms r that are in third canonical form, | r | 6 = | l +2 ; r | and | r | 6 = | u ; . . . ; u k +1 ; r | if u ≡ a or u ≡ + a or u ≡ − a . 15n the analysis for the case ( u, u ′ ) = (+ a, a ), we make a case distinction onthe form of s according to Lemma 1: – in the case that s ≡ v , we make a further case distinction on the form of v : • if v ≡ b or v ≡ + b or v ≡ − b , then we have | + a ; v | 6 = | a ; v | and hence acontradiction with t ∼ = bc t ′ ; • if v ≡ | + a ; v ; ! | 6 = | a ; v ; ! | and hence a contradictionwith t ∼ = bc t ′ ; • if v ≡ t is not in third canonical form; • if v ≡ l +2, then we have | + a ; v ; ! | 6 = | a ; v ; ! | and hence a contradictionwith t ∼ = bc t ′ ; • if v ≡ !, then we have | + a ; v | 6 = | a ; v | and hence a contradiction with t ∼ = bc t ′ ; – in the case that s ≡ v ; r , for some basic repetition-free PGA bc term r thatis in third canonical form, we make a further case distinction on the form of v as well: • if v ≡ b or v ≡ + b or v ≡ − b , then we have | + a ; v ; r | 6 = | a ; v ; r | , because r is repetition-free, and hence a contradiction with t ∼ = bc t ′ ; • if v ≡ t ∼ = bc t ′ that r ≡ r ≡ r ′ forsome r ′ and hence t is not in third canonical form; • if v ≡ t is not in third canonical form; • if v ≡ l +2, then we make a further case distinction on the form of r according to Lemma 1: ∗ in the case that r ≡ w , we make a further case distinction on theform of w : · if w ≡ b or w ≡ + b or w ≡ − b , then we have | + a ; l +2 ; w | 6 = | a ; l +2 ; w | and hence a contradiction with t ∼ = bc t ′ ; · if w ≡ | + a ; l +2 ; w ; ! l +1 | 6 = | a ; l +2 ; w ; ! l +1 | and hence a contradiction with t ∼ = bc t ′ ; · if w ≡ l ′ +1 and l ′ > l , then we have | + a ; l +2 ; w ; ! l +1 | 6 = | a ; l +2 ; w ; ! l +1 | and hence a contradiction with t ∼ = bc t ′ ; · if w ≡ l ′ +1 and l ′ < l , then we have | + a ; l +2 ; w ; ! l ′ +1 | 6 = | a ; l +2 ; w ; ! l ′ +1 | and hence a contradiction with t ∼ = bc t ′ ; · if w ≡ l ′ +1 and l ′ = l , then t is not in third canonical form; · if w ≡ !, then we have | + a ; l +2 ; w | 6 = | a ; l +2 ; w | and hencea contradiction with t ∼ = bc t ′ ; ∗ in the case that r ≡ w ; r ′ , for some basic repetition-free PGA bc term r ′ that is in third canonical form, we make a further case distinctionon the form of w as well: · if w ≡ b or w ≡ + b or w ≡ − b , then we have | + a ; l +2 ; w ; r ′ | 6 = | a ; l +2 ; w ; r ′ | , because r ′ is repetition-free, and hence a con-tradiction with t ∼ = bc t ′ ; · if w ≡ t ∼ = bc t ′ that r ′ ≡ w ; . . . ; w l ; r ′ ≡ w ; . . . ; w l ; r ′′ for some r ′′ and hence t is not in thirdcanonical form; 16 if w ≡ l ′ +1 and l ′ = l , then we have | + a ; l +2 ; w ; r ′ | 6 = | a ; l +2 ; w ; r ′ | , because r ′ is repetition-free, and hence a con-tradiction with t ∼ = bc t ′ ; · if w ≡ l ′ +1 and l ′ = l , then t is not in third canonical form; · if w ≡ !, then it follows from t ∼ = bc t ′ that r ′ ≡ w ; . . . ; w l ; ! or r ′ ≡ w ; . . . ; w l ; ! ; r ′′ for some r ′′ and hence t is not in thirdcanonical form; • if v ≡ !, then it follows from t ∼ = bc t ′ that r ≡ ! or r ≡ ! ; r ′ for some r ′ and hence t is not in third canonical form.We conclude from this analysis that, in the case that t ≡ + a ; s and t ′ ≡ a ; s for some basic repetition-free PGA bc term s that is in third canonical form, wehave a contradiction with t ∼ = bc t ′ .The analyses for the cases ( u, u ′ ) = ( − a, a ) and ( u, u ′ ) = (+ a, − a ) are similarto the analysis for the case ( u, u ′ ) = (+ a, a ).In the analysis for the case ( u, u ′ ) = ( l, a ), we make a case distinction on l : – if l = 0, then we have | l ; s | 6 = | a ; s | and hence a contradiction with t ∼ = bc t ′ ; – if l = 1, then we have | l ; s | 6 = | a ; s | , because s is repetition-free, and hencea contradiction with t ∼ = bc t ′ ; – if l = l ′ +2, then we make a further case distinction on the form of s accordingto Lemma 1: • in the case that s ≡ v , we have | l ; s | 6 = | a ; s | and hence a contradictionwith t ∼ = bc t ′ ; • in the case that s ≡ v ; r , for some basic repetition-free PGA bc term r thatis in third canonical form, it follows from t ∼ = bc t ′ that r ≡ v ; . . . ; v l ′ ; a ; r ′ for some basic repetition-free PGA bc term r ′ that is in third canonicalform and we make a further case distinction on the form of v : ∗ if v ≡ b or v ≡ + b or v ≡ − b , then we have | l ′ +2; v ; v ; . . . ; v l ′ ; a ; r ′ | 6 = | a ; v ; v ; . . . ; v l ′ ; a ; r ′ | , because r ′ is repetition-free, and hence acontradiction with t ∼ = bc t ′ ; ∗ if v ≡ t ∼ = bc t ′ that r ′ ≡ r ′ ≡ r ′′ for some r ′′ and hence t is not in third canonical form; ∗ if v ≡ l ′′ +1 and l ′′ = l ′ +1, then we have | l ′ +2; v ; v ; . . . ; v l ′ ; a ; r ′ | 6 = | a ; v ; v ; . . . ; v l ′ ; a ; r ′ | , because r ′ is repetition-free, and hence acontradiction with t ∼ = bc t ′ ; ∗ if v ≡ l ′′ +1 and l ′′ = l ′ + 1, then t is not in third canonical form; ∗ if v ≡ !, then it follows from t ∼ = bc t ′ that r ′ ≡ ! or r ′ ≡ ! ; r ′′ for some r ′′ and hence t is not in third canonical form.We conclude from this analysis that, in the case that t ≡ l ; s and t ′ ≡ a ; s for some basic repetition-free PGA bc term s that is in third canonical form, wehave a contradiction with t ∼ = bc t ′ .The analyses for the cases ( u, u ′ ) = ( l, + a ) and ( u, u ′ ) = ( l, − a ) aresimilar to the analysis for the case ( u, u ′ ) = ( l, a ).In the analyses for the cases ( u, u ′ ) = ( l, l ′ ), with l = l ′ , and ( u, u ′ ) =( l, !), we use the function len, which assigns to each closed repetition-free17GA bc term the length of the instruction sequence that it represents. This func-tion is recursively defined as follows: len( u ) = 1 and len( t ; t ′ ) = len( t ) + len( t ′ ).In the analysis for the case ( u, u ′ ) = ( l, l ′ ) with l = l ′ , we only considerthe case l < l ′ (because the cases l < l ′ and l > l ′ are symmetric) and make acase distinction on l : – if l = 0, then we have | s | 6 = | l ′ ; s | and hence a contradiction with t ∼ = bc t ′ ; – if 0 < l ≤ len( s ), then it follows from t ∼ = bc t ′ that s ≡ u ; . . . ; u l − ; a ; v ; . . . ; v l ′ − ( l +1) ; a ; r for some basic repetition-free PGA bc term r that is inthird canonical form and we make a further case distinction on the form of v : • if v ≡ b or v ≡ + b or v ≡ − b , then we have | l ; u ; . . . ; u l − ; a ; v ; . . . ; v l ′ − ( l +1) ; a ; r | 6 = | l ′ ; u ; . . . ; u l − ; a ; v ; . . . ; v l ′ − ( l +1) ; a ; r | ,because r is repetition-free, and hence a contradiction with t ∼ = bc t ′ ; • if v ≡ t ∼ = bc t ′ that r ≡ r ≡ r ′ forsome r ′ and hence t is not in third canonical form; • if v ≡ l ′′ +1 and l ′′ = l ′ − l , then we have | l ; u ; . . . ; u l − ; a ; v ; . . . ; v l ′ − ( l +1) ; a ; r | 6 = | l ′ ; u ; . . . ; u l − ; a ; v ; . . . ; v l ′ − ( l +1) ; a ; r | ,because r is repetition-free, and hence a contradiction with t ∼ = bc t ′ ; • if v ≡ l ′′ +1 and l ′′ = l ′ − l , then t is not in third canonical form; • if v ≡ !, then it follows from t ∼ = bc t ′ that r ≡ ! or r ≡ ! ; r ′ for some r ′ and hence t is not in third canonical form; – if l > len( s ), then we have | s ; ! l − len( s ) | 6 = | l ′ ; s ; ! l − len( s ) | and hence acontradiction with t ∼ = bc t ′ .We conclude from this analysis that, in the case that t ≡ l ; s and t ′ ≡ l ′ ; s ,with l = l ′ , for some basic repetition-free PGA bc term s that is in third canonicalform, we have a contradiction with t ∼ = bc t ′ .In the analysis for the case ( u, u ′ ) = ( l, !), we make a case distinction on l : – if l = 0, then we have | l ; s | 6 = | ! ; s | and hence a contradiction with t ∼ = bc t ′ ; – if 0 < l ≤ len( s ), then it follows from t ∼ = bc t ′ that s ≡ u ; . . . ; u l − ; ! or s ≡ u ; . . . ; u l − ; ! ; r for some r and hence t is not in third canonical form; – if l > len( s ), then we have | l ; s | 6 = | ! ; s | and hence a contradiction with t ∼ = bc t ′ .We conclude from this analysis that, in the case that t ≡ l ; s and t ′ ≡ ! ; s for some basic repetition-free PGA bc term s that is in third canonical form, wehave a contradiction with t ∼ = bc t ′ .From the conclusions of the analyses, it follows immediately that for all basicrepetition-free PGA bc terms t and t ′ that are in third canonical form, t ≡ t ′ if t ∼ = bc t ′ . ⊓⊔ We conclude this appendix by going into the main problem that we have ex-perienced in mastering the intricacy of a proof of the generalization of Theorem 2from all closed repetition-free PGA bc terms to all closed PGA bc terms.In the proof of Theorem 2, case distinctions are made on a large scale. Itfrequently occurs that the number of cases to be distinguished is kept small by18aking use of Lemma 1. To devise and prove a generalization of this lemmathat is not restricted to repetition-free terms is not a big problem. In the proofof Theorem 2, something of the following form occurs at many places: “we have | s | 6 = | s ′ | because r is repetition-free, and hence a contradiction with t ∼ = bc t ′ ”. Atseveral similar places in the proof of the generalization of this theorem, r is notrepetition-free and | s | 6 = | s ′ | requires an elaborate proof. In some of these proofs,no use can be made of the generalization of Lemma 1 and one gets completelylost in the many deeply nested case distinctions. This is the main problem thatwe have experienced. References
1. Baeten, J.C.M., Weijland, W.P.: Process Algebra, Cambridge Tracts in TheoreticalComputer Science, vol. 18. Cambridge University Press, Cambridge (1990)2. Bergstra, J.A., Klop, J.W.: Process algebra for synchronous communication. In-formation and Control 60(1–3), 109–137 (1984)3. Bergstra, J.A., Loots, M.E.: Program algebra for sequential code. Journal of Logicand Algebraic Programming 51(2), 125–156 (2002)4. Bergstra, J.A., Middelburg, C.A.: Instruction sequence processing operators. ActaInformatica 49(3), 139–172 (2012)5. Bergstra, J.A., Middelburg, C.A.: Instruction Sequences for Computer Science,Atlantis Studies in Computing, vol. 2. Atlantis Press, Amsterdam (2012)6. Bergstra, J.A., Middelburg, C.A.: On the behaviours produced by instruction se-quences under execution. Fundamenta Informaticae 120(2), 111–144 (2012)7. Bergstra, J.A., Middelburg, C.A.: Instruction sequence based non-uniform com-plexity classes. Scientific Annals of Computer Science 24(1), 47–89 (2014)8. Bergstra, J.A., Middelburg, C.A.: Instruction sequence size complexity of parity.Fundamenta Informaticae 149(3), 297–309 (2016)9. Bergstra, J.A., Middelburg, C.A.: On instruction sets for Boolean registers in pro-gram algebra. Scientific Annals of Computer Science 26(1), 1–26 (2016)10. Brookes, S.D., Hoare, C.A.R., Roscoe, A.W.: A theory of communicating sequentialprocesses. Journal of the ACM 31(3), 560–599 (1984)11. Hennessy, M., Milner, R.: Algebraic laws for non-determinism and concurrency.Journal of the ACM 32(1), 137–161 (1985)12. Hoare, C.A.R.: Communicating Sequential Processes. Prentice-Hall, EnglewoodCliffs (1985)13. Middelburg, C.A.: Instruction sequences as a theme in computer science. https://instructionsequence.wordpress.com/ (2015)14. Milner, R.: Communication and Concurrency. Prentice-Hall, Englewood Cliffs(1989)(2015)14. Milner, R.: Communication and Concurrency. Prentice-Hall, Englewood Cliffs(1989)