tive aspects of such systems has come into focus. ..... tained by renaming the actions in B according to H. ...... of the form P := B where B is a behaviour possibly.
A Stochastic Causality-Based Process Algebra Ed Brinksma1, Joost-Pieter Katoen1, Rom Langerak1 and Diego Latella2 Department of Computing Science, University of aTwente P.O. Box 217, 7500 AE Enschede, The Netherl CNUCE Istituto del CNR, Via Santa Maria 36, 56100ndsPisa, Italy 1
2
Thi s paperdi scussesstochasti c areextensi onsofasito happen mple processal gdelebrai n acausal itybased setti n g. Atomi c acti o ns supposed after a a y that i s determiof nevent ed byastructures stochastiics vari able witrestri h acertai nthedistridibstriutiboutin. oAsi mpleostochasti cexpotype di s cussed, c ti n g n functi ns to be nenti onalsemanti cysofthi s modelic varis giavntenandcompared toturesexiasilsti. nAcorrespondi gdiscussed (interlewhere aved)ngoperati approaches. Secondl , a stochasti ofnature, event vistrucdi s tri b uti o ns are of a much more general z. ofal phase-type. Thi s i n cl u des exponenti a l , Erl a ng, Coxi a n and mi x tures of exponenti distributions.
1. INTRODUCTION
Though origindesign, ally formal methods concentrated on the speci cation, and anal y si s of functi o nal aspects ofvediaspects stributedofsystems, recentlhasy thecomestudyintooffocus. quantitatieral such systems Sevextensions of formalmethods where the occurrence of actitimonse ofcanoccurrence be assignedcana be( xed) probabi lareity and/or thefrom constrai n ed known l i t erature (Nicolli n & Si f aki s , 1992; van Gl a bbeek et Anal., i1990). mportantsuchreason for enhanci ng tiformal methods witateth thenotions as probabi l i t i e s and m e i s tos offacilianalysis of performance characteri s ti c systems designs. In this way the eci e ncy of desi g n alternatigvnses cancan bebeassessed such thatofin unsati early desi gn stages desi rejected because s factory performance characteristics, thus avoi d i n g costl y redesign atcorporating later stages.quantitati In addivetiaspects on, a formal speci cati on forincan be very useful establ a well-understood and eecti ve way chains of develandopiqueuing nisghingperformance model s , such as Markov networks, fromputsystem speciextensi catioonns.of forA l o t of eort has been on the mal methods where the tiway. me ofInactiearlonsy stages is speciof theed inde-a compl e tely deterministic siandgnthereisoftennoexactti mingia nsystems formatiophenomena navailable i n , for instance, mul t i medi like jitter andbutresponse timesofarea stochasti not determi nisticallyIn determined much more c nature. these casesare deterministi cappropri timed aextensi ons of process al elgebras not always te. Therefore, in the d of stochastic process al g ebras the ti m e of occurrence variables, of actionsinisparti determi nredexponenti by stochasti c stri(orbuted random) c ul a a l y di ones. Several approaches to enhance process algebras
with exponentiallyetaldistributed delays have beenotzdevel -, oped(Bernardo . ,1994;Buchholz,1994;G etal . 1993a; Hillston, 1994a). Current systems stochasticas anprocess algebrassemantical all use label ed. transition underlying model This results inactions. a semantics basedtheonstructure the interlofeaving ofindependent Though transi tion systems closely resembles thatexplofosion standard Markov chain representations, the state problem is as serious drawback. Trul y concurrent semantical model arethe less aected by this problem as rather parallelism leads tor sum of the components states, than to thei productmodels (as inretain interleaving). In addition,about true theconcurrency explicit information parallelism between system components. As performance modelsand/or typically are owbased on abstractions ofthetheusecon-of trol data structure of systems, trueconcurrencysemanticsisthoughttobeadirectway of narrowing themodels gap withenable functional models. Fiofnlalocally, true concurrent the possibility anal ythat sis. This means that itinis which relativelyone easy to study only part of a system is interested, isolating it from the rest. (Label eventofstructures (Winskel, 1989) consti tuteare awell-suited majored)branch true concurrency models and as abasic semantical modelof foreventprocess algebrasare like CCS. The ingredients structures events modeling occurrences of actions, and abetween causalityevents. relation indicating the causal dependencies Towith t themulti-way speci c requirements of parallelusedcom-in position synchronization|as process algebras like LOTOS bundl and CSP|an adapta-, tionoflabeledeventstructures, e event structures arestructures appropriate (Langerak, 1992). Using bundle eventcs a compositional true concurrent semanti for LOTOS can be de ned that is`compatible' withthe
The Computer Journal, Vol. , No. , 1995
2 Ed Brinksma, Joost-Pieter Katoen, Rom Langerak and Diego Latella standard interleaving semantics. tation. They are used in many probabilistic model s that have matrix-geometric solutions, have a ri c h theIn (Brinksma et alan., 1995; Brionnksma ets type al., 1994) we ory (Neuts, 1981; Neuts, 1989), and include frequently extensively treated extensi of thi of event useddistributionssuchashyper-andhypo-exponenti al, structures with determi n i s ti c ti m es i n whi c h ti m e is asErlang, and Cox distributions. sociatedtocausalrel atitoons(termedbundl edelsinaysourevent This paper is organized as follows. Section 2. brie y structure model) and events. Bundl e specify introducesbundleeventstructuresandSection3.shows the lerelative delay between causalspecily dependent events howthismodelcanbeusedtoprovideacausality-based whi event delays enabl e the cati o n of timing semantics to a simple process algebra. A treatment ofn constraints on events that have no i n comi n g bundle. a deterministic time extension of this model is gi v en i Incommon this timed model components maycipants synchroni ze ontoa Section 4. The timed model is a simpli ed version of action as soon as al l parti are ready models elaboratedSection in (Brinksma etonal.,the1995;studyBrinofksmaexengage, that is, when al l i n di v i d ual ti m i n g constraints et al . , 1994). 5. reports are met. The workofpresented iinstithic stimpaper isourbasedtimedon ponential distributions in our model and relates this thetrue generalization determi n es i n toexisting interleaved proposals. Sectionfuncti 6.invesconcurrent model towards distribution functions. work tigates the use of more general distribution onnss We start by investi g ati n g a general i z ati o n i n which in bundle event structures. Finally, Section 7. contai wea sirestrict to exponenti al disaretribassoci utions.atedThiwis tresults in conclusions and pointers for future work. Appendix A m ple model where rates h events introduces PH-distributions andrelevant providesin thesomecontext impor-of onlas soon y. Theas principle that a synchroni z ati o n takes place tant theoretic results that are all partithatcipants areayready for acti it means inbea this paper. stochastic setting the del of such o n will ditiosnstributed as the product of themaxiinmdiumvidofualthedistribu2. BUNDLE EVENT STRUCTURES (or, equivalentl y , as the corresponding individual stochasti c vari a bl e s). As the class Bundle event structures consistthe ofoccurrence events labelofeditswiac-th ofuct,exponential distri b uti o ns i s not cl o sed under prodactions (an event modeling weabandon our synchroni zationng prithencirateple ofanda take tion), together with relations of causality andascon i catl achronization pragmatic approach by computi synbetween events. System runs can be modeled parti simplymasilasome arbistitnrary functiocnprocess of the orders of events satisfying certain constraints posed by ialngdiebras. vidualTherates|si r to exi g stochasti theCon ict causalityisanda symmetric con ict relations between thebetween events. resul t i n g model i s used to provi d e a true binary relation concurrent semanti cesaviof nagstochasti ccsprocess aldedgebra.whichA events and the intended meaning is that when two corresponding interl semanti i s provi events aresystem in con ict, they canity isnever both happen in shows that our simpl e stochasti c model cl o sel y resema single run. Causal represented by a reblalgesebras, existingthusinterleaved proposal s ofonstochasti c processof lation between a set of events X, that are pairwise in provi d i n g evi d ence the adequacy con ict, andin ana system event run, e. Theexactly interpretation iisn that if our approach. e happens one event X has Onlythataallow few stochasti c process algclebras arediknown (to happened beforea (and caused e). between This enabltheesevents us to us)functions for a more general a ss of s tribution uniquely de ne causal ordering (Ajmone Marsan et ealss|properti ., 1994; Geostzofetexpo-al., aincausal a systemrelation run. between When there is they neitherareaindependent. con ict nor 1993b). The elegant|memoryl events nential distributionsintoenabl e atiosmooth incorporation of Once enabled, independent events can occur in any orsuch distributions transi n systems, whi l e the inder or in parallel. terl euseavingof more of independent actions seemsess)todiscomplicate De ni tion(E;2.#1 ; 7!;lA) with bundleE,event structure E #is a theconsiderably general (non-memoryl tri b utions quadruple a set of events , (Gorepltz etacement al., 1993b). Whenniscarefully in-in E E, the (irre exive and symmetric) con ict relation, vestigating the of determi ti c times 7!theaction-l 2E aEbel, theing function, causality where relation,L isanda setl : ofE acti! oLn, our model by general di s tri b uti o ns i t turns out that it iclsopossible to product support (correspondi a class of dinsgtritobutitheonsmaximum which is labels, such that E satis es 8 X E;e 2 E : sed under ofcalstochastic variabland es under thecontai assumpti onidofentity statistiX 7! e ) (8 ei;ej 2 X : ei 6= ej ) ei # ej ) . independence), whi c h n s an ele ment for product. These properti e s wi l be justi ed in As an interesti ng classntsofwedispropose tributiothen func-use events The constraint speci es that for bundle Xevent7! struce all tithiofophase-type nss paper. that satis es these constrai in X are in mutual con ict. Bundle (PHas matri -) distrix general butions.izatiPH-di softriexponential butions can Eventsaredenotedasdots;nearthedottheacti tures are graphically represented in the followionnlg way. bedistributions consideredand o ns abel are well-suited for numerical compu- isgiven. Con ictsareindicatedbydottedlinesbetween The Computer Journal, Vol. , No. , 1995
3 functionthewithprocess H( )=algebra and H(a) 6= forf ga a2relabeling L. We consider B ::= 0 j a ; B j B + B j B j G B j B[H] j B n G: ndingTheprecedencesoftheoperatorsare,inincreasingbi order: j , +, ;, [] and n . G Actions are considered tothebe atomic andthatto occur instantaneously. 0 represents behaviour can perform no actionsin aatandall.after a ; Bthedenotes a behaviour which may engage occurrence of a behaves like B. B1 +BB1 2anddenotes the (standard) choice between behaviours B 2 , while B1 j G B2 is their parallelactions composition where synchronization is which requiredis ob-for in G . B [ H ] denotes a behaviour tained by renaming theexcept actionsthatin allB actions accordingin Gto areH. Bturned n G behaves like B into invisible actions (i.e.can ). now be de ned as A causality-based semantics Let E [ Bi ] = Ei = (Ei; #i; 7!i;li), i=1; 2 with Eefollows. 1 \ E2 = ?. For action-pre x a ; B1 , a new event which causally precedes all a (labeled initial eventsa)ofis Eintroduced 1 (cf. Figure 2). E [ B1 + B2 ] is equal
A Stochastic Causality-Based Process Algebra
representations of events.fromAeach bundlevent e (X;ein) Xis itondiecated byconnecting drawing allanarrows arrow and by smal l l i n es. We often denote anIneventthe labeled a byadoptea. the following notations. For sequel we ementsthe sequences is,=x1=:::xf x1n;:::;x ,let ndenotethesetofel ipre x n , that g , and l e t denote i x1 :::xofi?1, forup 0to 1)beindependent Actionstowith rate u, therateidentity of ~, do not That constochastic variables where U has di s tri b uti o n F i U i , and tribute the resulting of a synchronization. W =onMax f U1;:::;U g. Then (u) a j a () a results passive in actionandoftenoccuri a with rate .nSuch buti function of W nequal sn the probability distri- is,actionsarereferredtoas perY formance modeling to model service-like activiti e s. FW (x)= i=1 FUi (x) , We conclude this section by discussing immediate ac-tions. In performance modeling actions that are i r rel and its probability densi ty function 1 evant from a performance evaluation point of thus view notare 0 n n often considered to take place immediately Y X imposingThisanyledadditional delayofonimmediate the system's FW0 (x)= i=1 @FU0 i (x) j=1;j6=i FUj (x)A . tion. to the notion transiexecutions The Computer Journal, Vol. , No. , 1995
A Stochastic Causality-Based Process Algebra (;a;) B () a ; B ?????!
7
(;a;) (;a;) B 0 B B1 ?????! 2 ?????! B20 1 (;a;) B 0 (;a;) B 0 B1 + B2 ?????! B1 + B2 ?????! 1 2 (;a;) B 0 (;a;) B1 ((?????! B 2 ?????! B20 1 ( a 2 6 G ) ;);a;) B10 j G B2 ((;);a;) B j B 0 (a 62 G) B1 j G B2 ???????! B1 j G B2 ???????! 1 G 2 ( ;a;) B 0 (;a;) B 0 ^ B ?????! B1 ?????! 2 2 (a 2 G) 1 (( ; ) ; a ; ~ ) 0 0 B1 j G B2 ?????????! B1 j G B2 (;a;) B 0 (;a;) B 0 B ?????! B ?????! ( a 2 6 G ) (;a;) B 0 n G (;;) B 0 n G (a 2 G) B n G ?????! B n G ?????! (;a;) B 0 B (?????! ;H(a);) B0[H ] B[H] ???????! TABLE 1. Event transition system for SL. bras we de neto thean non-interleaving operational semantics for SLThethatapcorresponds semantics. proach we follow incasethisforpaper is a straightforward generalization of the untimed LOTOS (Langerak, 1992) and quitetiming similarcaseto(Brinksma the approach taken forThethe deterministic et al . , 1995). basic idea is1981)) to de nein which a transition system (inof thetheoccursense ofrence(Plotkin, we keep track of actionseventin antransition expressionsystem of SL. . This results in a (stochastic) In orderoftoande ne an event istransition systemeach oc-arcurrence action-pre x subscripted with an bitrary but letter. uniqueThese event occurrence occurrence identi ers identi er, play denotedthe by a Greek FIGURE 5. Some example simple stochastic event structure role of aevent names. E.g.parallel an expression like anew ; b +event b besemantics. comes ; b + b . For composition 0 an names are created. If e is an event name of B and e 0 eventnamein 0 0are (e;B),thenpossiblenewnamesforeventsi 0) for unsynchronized eventsn iinmmedi stochastic Petri nets, and si m i l a rl y to the noti o n of B j B and ( ;e G ,gacti. (Bernardo onswithrate 1., )i1994;n stochasandThe(e;etransition ) for synchronized events. ti1994)). c processateactions(i.e. algebras (e. et al G o tz, relation ? ! is de nedrulesas thede nedsmalilnIn our model such acti o ns can easi l y be inest relation closed under all inference (e;a;) B 0 means that behaviour B can corporated by extendi n g the de ni t i o n of ~ such that Table 1. B ?????! + ~1 = 1 for all 2 IR [ f1g. perform e, labeled a with rate and evolve into B0Using . event the transition relation ?! intheusualway. the notion of 5.4. Operational Semantics (stochastic)eventtracecanbede ned Variousthatstochastic extensi onsinterlof process algebrascs.areIn Astic, thethetransition system induced by be?!represented is determinbyisknown are based on an e avi n g semanti transition system for B can order to compare our approach tocompati thesebexiilitsy'tinofg ourap- characterized its set of stochastic event traces Tway,[ B ]and. Thissubsequentl set can bey proaches and to investi g ate the ` in a denotational proposal with the standard semantics of process alge- proven to coincide with the set of timed event traces of λ2 ❋ λ4
λ1
a
µ1
µ2
b
a
b
d
c
µ3
λ3
(a)
(b)
λ1 ❋ µ1
( λ2 ❋ λ4) ❋ µ2 b
a
c
d
λ3
µ3
(c)
The Computer Journal, Vol. , No. , 1995
8 Ed Brinksma, Joost-Pieter Katoen, Rom Langerak and Diego Latella thethe consistency correspondingbetween event thestructure Xo[nalB ]semantics . This proves choice expressiondistributivity above are modeled by distinct events. operati and So, itseemsthat of ~ over +isnot anecdenotational semantics in terms of event structures. essary requirement in our model unless distinct events Theorem 5.7 8 B 2 SL : STr(X [ B ] ) = T [ B ] . are identi ed by some congruence relation. Proof: Inasimilarwayasforthedetermi nistic timing 6. GENERALIZED STOCHASTIC EVENT case (Brinksma et al., 1995). STRUCTURES From the event transi t i o n systemde ned by ? ! wecan The main advantage of thesimple model extension of the previofousbundlsec-e easi l y obtain the standard i n ference rul e s for process tion is that it is a rather algebras likeidenti ers. CSP andInLOTOS by theomitransi tting ttheion rates event structures which correspondssuchasMTIPP(G quite closely to oex-tz and event addi t i o n, rules istingstochasticprocessalgebras strongly resemble thealgebras, operatiand onal forsemanti csofofthese existingal- et al., 1993a), PEPA (Hillston, 1993), D-MPA (Buchstochastic process some holz, 1994), and B-MPA~(Bernardo et al., 1994) (de-ng gebras we obtain identi c al rul e s when substi t uting the pendingonthechoicefor ). Unfortunately,forkeepi appropriate operator forty-based ~. Thimodel s provi. des adequacy for the model within the domain of exponential distribuourInstochastic causal i tions we weretheunable to thelet thesynchronized stochastic action variablbee thatthe MTIPP (G o tz et al . , 1993a; Herrmanns & Retteldetermines delay of the rate of rates a synchroni zcomponents, ed action is thus sim- maximum of the individual stochastic variables, whilst plbach, y ~ the 1994) product of the of the this seems quite reasonable and would betiming a straimodel ghtfor-. = . For B-MPA (Bernardo et al . , 1994) the ward generalization of our deterministic resulting ratecondition is the maxi matumleastof theoneinofdivtheidualparticirates In addition, exponential distributions are a bit reunder the that strictiveinperformance modelingand there isaeconsi ds-pating behaviours must be passi v e wi t h respect to the erableneedformorerealistic(i.e.,non-memoryl ss)di interaction, thus, rst~proposal =max(for;PEPA )giventhat =1993) u or tributions. Especiallyintheanalysisofhigh-speedcom= u . In the (Hi l s ton, munication systems or multi-media applications where thethe expected delay (i . e . , the reci p rocal of the rate) of the correlation between successive packet arrival s is no interaction is assumed to be the sum of the exlonger negligible and packets tend to have a constant pected duration of(the)=acti( +on).in Ineachtheof naltheproposal partici- lengththeusualPoissonarrivalsandexponentialpacket pants, i.e. ~ = lengths aresection no longer valid assumptions. foris computed PEPA (Hillston, 1994a) the rate of an i n teraction In this we replace the deterministic timcestias-mby taki n g i n to account the total capacsociatedtobundles andeventsinourdeterministi itaitynoflabel a behaviour toleparti cipate irate). n actioSinsncewiapparent th a cer- ing model (cf. Section 4.) by stochastic variables hav(the so-cal d apparent ingarbitrary distributions, andofinvestigate whatothens arererates are based on the enti r e behavi o ur of a particiquired (algebraic) properties such distributi rather than solepolly ioncy cannot the (localbe)model rate ofed anusingevent~. given that the treatment of synchronization is similar thiInpantsD-MPA synchronization to the deterministic case. (Buchhol z , 1994) a somewhat di erent approach is taken|each acti oan; lBabel(r 2a IiRs +assi)denotes gned a abe xed transition rate , and ( r ) a 6.1. The Model haviour that may engage i n a where the ti m e before a Distribution functions aredistribution added to function bundle event strucis performed isexponential y distributed withrate ra. tures When ( r in two ways. A associ atedof 1 ) a and (r2 ) a synchronize the time before inwith event e determines the time between the start teraction a happens i s di s tri b uted wi t h rate r 1 r2 a . the occurrence ofXe,7!whilea distrinbesutitheon Usi g ~ asaproduct ontherisame (ratherscheme than oncanrates) assum- thesystemand iwingthnthat is given be obtained function associated to bundle e determi relative timeinbetween the occurrence of e and its causal the rulesbefore, of Tabldesie r1.ed algebraic properties of ~ are predecessor X . Asnoted associativity, commutati vitycalandly speaki the exing,stence of an withThedistribution interpretation ofthatbundle f eahappened g 7! eb decorated F is if e has at aedcer-is ithat dentityhIR+element. (Al g ebrai thi s means a tain time t then the time at which e is enabl ; ~i is a commutati v e, or Abel i a n, monoid.) a b Besides require these two~ toproperti esbuti(Gvoetz,over1994;the Hillston, determined by ta+FU. where U is a stochastic variable with distribution 1994b) be di s tri addition of rates in order toalsoiconsin thecontextofparal der () a +() a andlelcomposi(+) a lowing If moreinterpretation than one bundle pointsForto instance, an event suppose the foltobeequivalent, is chosen. titoonnote(which leads tomodel the dirates stributiareviassoci ty). Itatedis intoteresting frespectively. ea g7! ec andNow,f ebifg7e!a (eebc)with distribution FthenandtheG, that in our events happens at t ( t ) a b rather than to actions, and the two a actions in the time of enabling of ec is determined by the stochastic The Computer Journal, Vol. , No. , 1995
9
A Stochastic Causality-Based Process Algebra
vari ta+U;tb+V ), where U (V ) has distributioAsnaFblae( nal Gmax( ). example, consi derngdif eastrig b7!utieobndecorated wiasithdi s tribution F and e havi G. Using b m i l a rreasoningasabove,wei n ferthatthestochastic e max(thatU;teaa+happens V ) determiat tinesmetheta.time of enabling ofvariLetebablgiven tions. DF denote an arbitrary classof distribution function 6.hE1; F ; AGistochastic bundlee event event structure structure ?(De ni iE;s#a; 7!triple wi t h E a bundl ;l), and F :functi E !oDFn ofandclaGss :DF7! !to DFevents , associatibundlng eas,distribution and respectively. We denote a bundle (X;e) with G((X;e)) = F by Xevents7!F ewhere . Eventeachtraces areei isconsi dered aswitsequences of event associ a ted h a stochastienabl c variingabletimeUiofthateventunieqiuel. The y determi nes cthevarimiablneimalUi stochasti iwis tdetermined by the di s tri b uti o n functi o n associ a ted h e (i.e. F ( e )), the di s tri b uti o ns l i n ked to al l buni toi e and the stochastic variables U of dlthees causal pointing i of e in the trace (as thesejdepredecessors termine the time of occurrencei of ej). De nitioofn events 6.2 (Ae1;Urandom event trace of ? is a sequence 1 ) ::: (en ;Un ) with ei 2 E , and Ui (0 o 1) stochastic variablghtforwardtoobtai esablfore. nVibundl es poin naclmtiumof nogsedto formul a forcannot Ui sincealwaysstatibesticguaranteed. al independence ofstochastic its constivarituents The ann functi n-dimonensional hyable Uand= has(U1;:::;U ns)trispans perspace joint di b uti o Z x 1 Z xn 0 FU (x)= ?1 ::: ?1 FU (y1;:::;yn)dyn :::dy1: Exampl eFigure 6.3 6.ConsiThederevent the stochasti c oevent structures in di s tri b uti n of eventfor esiamplis icdenoted F and i s omi t ted i n the gure a ity.;Ub)(eFora;Ua(a)) wiletgalh Uatraces are and(ea;UUba)(=eb;UUFb). and ( e = U b F a b Note that the stochasti c vari a bl e s are equal for both traces. ea;UaU)(Feb ;Ub;UGb+) Uisa).a trace wily,thforUa (c)= U(eFaa;Uanda)(ForebU;Ub (b)b)(=ec(max( Fi n al ;Uc) is a trace with Ua = UFa , Ub =
a
a
a
G b
b G
H c
b
FIGURE 6. Some stochastic bundle event structures. UFb and Uc =Maxf UFc ;UG+Ua;UH +Ub g. (a)
(b)
(c)
6.2. A Generalized Stochastic Process Algebra
In thisas asection we usemodel the formodela generalized of the previous sec-c tion semantical stochasti processwhatalgebra. The aimalgebraic of thisproperties exercise isoftodistri investibu-gate the desired tion Let F beis now a distribution class DF. The functions syntax of are. behaviours de ned asinfollows: B ::= 0 j (F ) a ; B j B + B j B j G B j B[H] j B n G: Thissyntaxisidenticaltothestochasticprocessalgebra ofdistribution Section 5. functions. except that rates are replaced by arbitrary In wea similar waya mapping as for theS[exponential distributiona case de ne B ] which associates bundle event letstructure to= ?expression Bi.; 7!Ini the;lstochastic following de nition S [ B ] = h ( E ; # i i i , forstochastic i = 1; 2, variables with E1 corresponding \ E2 = ?. Weto theasi); Fthat i; Giithe sume bundle andindependent. event distributions in ?1 events and ?2 ofare? sta-are tistically The positive those have =a distribution function di. Leterentpin(?)=pos(?) fromeventsu, i.e.thatpos(?) f e 2 E j F ( e ) = 6 u g [ init(?). De nition 6.4 S[ ] is de ned recursively as follows: S [ 0 ] = hE [ (0)]]; ?; ?i S[ (F ) a ; B17!] == hE7![ (([ (Fff) ea ;gg B1)]]; F ; Gi where 1 a pin(?1)) FG == G(E1[f u g) [ f (ea;F ) g 1 pin(?1) g S[ B1 + B2F] == hEFf (([ f[(eaFBg1;e+);BF21)](]e;))F ;j Gie 2where G = G11 [ G22 SS[[BB1 n[HG]]]] == hEhE[[ ((BB1[nHG])])]]];;FF1;;GG1ii S[ FB((1 jeG1;eB2))] == FhE[(e()BF11 (jeG )Bwith )]2 ]1; F ;1Gi where F 1 2 1 1 2 2 i() = u G(X; (e1;e2)) = H1H2 with
The Computer Journal, Vol. , No. , 1995
10
Ed Brinksma, Joost-Pieter Katoen, Rom Langerak and Diego Latella syntax with the construct B ::= Pa behaviour where P denotes a H1 = if 9 X1 : X1 G7!11 e1 ^ process instantiation. We assume i s al w ays X = f (ei;ej) 2 E j ei 2 X1 g considered in the context of a set of process de nitions then G1 else u of the formoccurrences P := B where B is a behaviour possibly containing of P . H2 = if 9 X2 : X2 G7!22 e2 ^ [ P ] forstandard P := xed B ispoint de nedtheory. in theA followi way X = f (ei;ej) 2 E j ej 2 X2 g bySusing complenteg parthen G2 else u
. From thisfunctions de nitioniswerequiinferredthatto bethecloclsedassunder DF of distritipbliution mulcation and to have an i d enti t y el e ment u for multipltioicnsation. (Recall that themaxi product ofdiof stheitribrutistochastic on funccorresponds to the m um vari ables under the assumption of statistical independence.) Here,eventin eSa[ ((label F ) ae;dBa1)] toa bundl etiiaslinevents troducedof ?from a new al l i n i and. 1 itinonfunctiondierentfrom addition, to all events iun. ?Thedi 1 that have a distribus tri b uti o nofthese events isnow relative to e , soeach bundl e f e g7 ! e is a on F (e), and theadistribuassociated with a di s tri b uti tiFo. n InF (ethe) isuntimed made u.andTheexponenti distri1butiaol ncaseF (ea(cf.) becomes De nitifromons e3.1a toandthe5.6)initialit suces to onl y i n troduce bundles events of ? 1 . Introducing bundles from e toalleventsi n pi n (? )i s ,however,semantically a and is used here 1only to make distributions equi v alent to ea(b). ToS[exempl s, Figure 7withdepiFiofcgevents tsure(a)2).Srelative [ B1 ] , and (F ) a ;ifBy1thi] (Compare d
d G
G
u b K
c J
I
H
FIGURE 7.
(a)
u
a
e
e
F
u
H K
b u
c J
I
u (b)
Example of timed action pre x.
Finally, we explaiThen theevents semantiof Scs[ ofB1thej G paral lel composi t ion operator. B 2 ] are coninassociated the samewiwayth aasbundl in De ni tion 5.to6.theTheproddistriuctstructed bution e i s equal of thewe distributi on functing oonns theassocii-thatedcomponents with the bundles get by projecti of the events yii(si=1etheld;s2)aproduct bundle inof Sthe[ Bidiin]s.thetriThebutibundl diosnstrie,ofbiutif ithitosnscomponents ofprojection an event that are not equal to .
6.3. Recursion
this section siInderation with werecursiextend on. Tothethatbehaviendourswe under extendcon-the
tial order (c.p.o.)withE theis de ned oneventstochastic bundl e, event structures empty structure (i . e . Stion[ 0 ]P) as:= theB aleast element ?.de ned Then that for each de ni function F is substi t utes B ain stochastic event allstructure for ineachB occurrence of onP B , interpreting operators as operators stochastic eventmeansstructures. FB] iscanshown to be conti nuous, which that S [ P be de ned as the upper bound (l.u.b.) ofthisthe paper chain we(under Ede ne ) ?, Fleast ( ? ), F ( F ( ? )) ;::: . For just B B B theappropriate ordering itE isandthecorrespondi ng l.u.tob. Given these ingredients rather straightforward de ne a continuouscasefunction FB in 1992, a similarChapter way as8).for the non-stochastic (Langerak, n 6.5?1 ELet?2 ?ii = h(Ei; #i; 7!i;li); Fi; Gii for iDe ni =1; 2.tioThen 1.2. E#11 E#22 ^ 8 e;e0 2 E1 : e #2 e0 ) e #1 e0 3. (I) 8FX1;e 2 E1 : F X(II)1 7!8 1Xe ;e)2 9EX2: X: X27!F7!2e e)^ (XX1 =\ XE2 )\7!FE1e 4.5. Fl22EE11=2=l1F1 1 2 2 2 1 1 6. G2 7!1= G1. where 1 denotes restriction. The constraints E 1 E2 and # # are self-explanatory. In addition we re-n 2 quireforcon ictsthatnonewcon ictsshouldappeari ?(II)2 between eventsintroduction that are already in ?in1. ?Simi l a rl y , 3. forbids the of bundles for events 2 in? 1 forwhichthere existsnobundle in?1 . Theseconditions guarantee that a `larger' stochastic event struc-nt ture(under E )doesallowmoreeventtraces. Constrai (I)bundle allowsisforcontained bundles and to grow in such a waydistrithatbutitheon old3.remains the associated the ?same. It; ?is; ?now; ?)straightforward toAveriuse-fy that E with = h ( ? ; ? ; ?i is a c.p.o. ful property is Theorem 6.6 (?1 E ?2 ^ E1 = E2) ) ?1 =?2. Proof: ofStraightforwardbysystematicallychecki equality the components of ?1 and ?2. ngthe F The l.u.b. of a chain ? 1 E ?2 E :::, denoted i ?i , islabeling de nedfunction, as follows.andForeventthedistributions set of events,wecon isimcplts,y take union of ofalltheevents, eventthedistributions eventcon icts, structureslabelings in the chaiandn.
The Computer Journal, Vol. , No. , 1995
11 frequently usedErlang, distributions suchdistributions. as hyper- andAn hypoexponential, and Cox introduction to PH-distributions and a review of the maithen results that are of interest to our work (such as computation of theA.product of two PH-distributions) is givenAnother in Appendix interesting class isofintroduced distributionin (Sahner functions& that is closed under product Trivedi,of `exponential 1987). Here,polynomial the productform' of distribution functions F (x) = Xi aixki ebix for x > 0: for kitoa natural andconcurrent ai;bi real orexecution complexofnumbers, is used model the groups of tasks. Coxian,distributions exponential,also Erlang, and mixtures ofsexponential fall into this class of di tributions. n the context of ourTheapplicabilityofsuchdistributionsi work is for further study.
A Stochastic Causality-Based Process Algebra
maybundles. grow thiSuppose s approach does notbundle apply toXAsj the7!bundles set of some ? has j . According toj ethe, Xde ni tion of E there is a jofebundles seri e s X ! 7 j j +1 7!j+1 e;::: satisfying Xbundl > j. l Then thesinlaseri .u.b. econtains k+1 e\(ESk X= Xk) for7! ek. Asal bundl e sretain j + n n thethe same distribution the bundl e di s tri b uti o n i s simply union of the bundl e di s tri b uti o ns of the structures in the chain. Thus, De ni Fi ?i =tiho(nSi6.E7i; SiLet#i; ?7!1;ESi?li2);ES:::i Fibe; SiaGchaiii wint,hthen 7! = f (XX;ek+1)\j9Ejk :=8Xk k> ^j :XXk=7!SkkeXk^g Fi ?i indeed is a l.u.b. of the chain It?1now follows that E ?2 E :::. Exampl 6.8 process As an de ni exampltion,e ofconsithedersemanti(uc)s aof; ((aeFrecursive P := ) b ; P +( G ) c ; ( H ) d ; P ). ? i s the empty 7. CONCLUDING REMARKS bundl e event structure. F ( ? ) i s depi c ted i n FigB ure 8(a). Bydepicted repeatedin Fisubsti ution we obtain the event ticIn thisextensions paper weof have madealgebra an investigation of stochasstructure gure t8(b). a process in a causality-based setting. Weto presented a distributions simple event and structure model restricted exponential a more general one involving PH-distributions. Thesimplesemanticdardmodel is shownsemantics to be compatible withprocess the stanoperational of (ordinary) alex-gebras like LOTOS and CSP and to closely resembl e isting stochastic extensions of ainterleaved models likofe MTIPP, B-MPA, D-MPA and preliminary version PEPA. Themodelinvolving PH-distributions evolvedof thefromaaustraightforward generalization of earlier work thors inBrinksma a deterministic timedThisresultsinassoci setting (Brinksma etatialn.g, 1995; et al . ,1994). distributions to events andwhichconditionsitwoul bundles. It would be indter-be estingtoinvestigateunder possible to simplify this model and avoid, forby instance, distributions to be linked with events (e.g. avoiding FIGURE 8. Example semantics for process de nition. timing constraints on initial events). To our knowledge onlyclass a fewof process algebras exionsst supporting a much wider distribution functi than exponential ones. (Ajmone Marsaninetwhich al., 1994) de ne a stochastic extension of LOTOS ran-fy 6.4. Appropriate Distributions dom variables with arbitrary density functions speci that the desi redis ofproperti es toof theus areclassthatof enabled thetimelapsebetweenactions. Onceanactionbecomes diiWet sshould triconclude butionbefunctions that i n terest an experiment is carried out,of thetheaction. outcomeTheof closed under product and have an i d enwhich represents the actual delay tity oelnement for product. Ansfy ithese nteresticonstrai ng classntsofaredisthetri- timing main limitation of must this proposal is that alllevel', stochasti c buti functions that sati constraints be speci ed at `top thus phase-type (PH-)as matri distrixbutigeneral ons. izPH-di striof bexponential utions can toreducingcompositionalityandavoidingtheissueofhow bedistriconsidered ati o ns combine(Glocal density functions in case of synchro-on b utions and are wel l sui t ed for numeri c al compunization. o tz et al . , 1993b) discuss a generalizati tati on.haveThey are used inc many probabi lisatiric chlmodels oftions.MTIPP whichtoassociatethe supports arbitrary distribution func-on that matrix-geometri sol u ti o ns, have y deInorder appropriate distributi veloped theory (Neuts, 1981; Neuts, 1989), and include function to actions in the interleaved semantic model, a
a
F
G
b
F
c
G
b
c
H
H
d
a
d
F
(a)
b
G
a
a
F
G
c
H
G
F
d
c
H
b
d
a
a
F
G
a
F
G F
G
(b)
The Computer Journal, Vol. , No. , 1995
12 Ed Brinksma, Joost-Pieter Katoen, Rom Langerak and Diego Latella they introduce the tonotikeepon track of `startof resireferences' . Suchof Brinksma, E.,Latella, Katoen,D. 1995. J.-P., Langerak, R.,TrueBolConcurognesi, references are used d ual l i f etimes T., & A Rel a ted stochastic variables. In our model a similar notion is rency andinclInterl eaving View on .aTech. TimedRep.Process not needed. Al g ebra u ding Urgent Actions UniThough this paper provi d es the rst basi c ingrediversity of Twente (in preparation). ents to studymodel the (semi -)ofautomated devel catiopment ofa Buchholz, P. 1994. Markovian Process Algebra: Comperformance s out system speci o ns in positionandEquivalence. Pages 11{30of: (Herzog true concurrent setti n g, there are a number of issues & Rettelbach, 1994). todressbe thesettled. Toof how mentitoonobtaia few,n a weperformance did not yetmodelad- Davio, M. 1981. Kronecker Products and Shue Algeissue bra. IEEE Transactions on Computers, C-30 (2), from event structure representati onn thewhilsemantics. e exploit116{125. iSome ng theanexamples explicit paral l e l i s m present i of how thidetermi s couldnibesticdonetimesstartiandngprobafrom van Glabbeek, R., Smolka, S., Steen, B., & Tofts,Mod-C. anbilievent structure wi t h 1990. Reactive, Generative, and Strati ed stic choices can beItfound inbe(Briinvesti nksmagatedet alhow., 1994; elsProc.of 5thProbabilistic Processes.on Logic Pagesin130{141 of: Katoen et al . , 1994). has to this IEEE Symposium Computer carriesnetsoveristoalstheo consi stochasti ctocase.be useful. A comparScience. iapproach srelonationship with Petri d ered The Gotz,tionN. von1994.Funktional Stochastische Prozessalundgebren{Integraof bundlby e(Boudol event structures wianith, 1991) Petri nets e m Entwurf Leistungsbewhas been studied & Castel l and ertung Verteil t er Systeme . Ph.D. thesis, Univeriexponential) t would be interesti to extend stochastincg Petri nets. this study to (non- Gotz,sitN.,at Erlangen-N u rnberg. Herzog,andU.,Distributed & Rettelbach, M. Desi 1993a.gn: MulTheAcknowl edgment The authors like todiscussions thank Victor tiprocessor System Nicola and Boudewijn Haverkort for helpful and Integration of Functional Speci cation and gPerforsuggestions.onThereviewersarekindlyacknowledgedfortheir comments a draft of this paper. manceAnalysisUsingStochasticProcessAl ebras. The work presented in this paper has been partially In: Donatiello, L., & Nelson, R. (eds), Perforfunded by C.N.R. - Progetto Bilaterale: Estensioni probamance Evalu.ation of vol. Computer and Communicabilisticheetemporalidell' a lgebradiprocessiLOTOSbasate tion Systems LNCS, 729. Springer-Verl ag. sudi sistemi strutturedistribuiti, di eventi,andperbyla C.speci ca e analisi quantitative G o tz, N., Herzog, U., & Rettelbach, M. 1993b. N.R. di- Progetto Coordinato: TIPPPerformance { Introduction and Application toH.ProtoStrumenti per la speci ca e veri ca proprieta' critiche di col Analysis. In: K o nig, (ed), sistemi concorrenti e distribuiti. Formal e Beschreibungstechniken f u r Verteil t e teme. FOKUS series. Munich: Saur publishers.SysHerrmanns,H.,&Rettelbach,M.1994. Syntax,SemanReferences tics, Equivalences, and Axioms for MTIPP. Pages 71{88 of: (Herzog & Rettelbach, 1994). Aceto,Well-Caused. L., & Murphy, D.97{111 1993. of:OnBest, the IlE.(ed), l-TimedConbut Herzog, U., & Rettelbach, M. (eds). 1994. ProceedPages cur' 93. LNCS, vol. 715. Springer-Verlag. ings Performance of the 2nd Modell Workshop on ProcessUniAlversi gebrastat and i ng . Erlangen: AjmoneR., &Marsan, M. , Bi a nco, A. , Ci m i n i e ra, L., Sisto, Erlangen-N urnberg. A. Anal 1994.ysiAs ofLOTOS Extension Hillston, J. 1993. PEPA:Rep.Performance Enhanced Profortems.theValenzano, Performance Di s tri b uted SysIEEE/ACM Transactions on Networking , cess Al g ebra . Tech. CSR-24-93, Universi t y of Edinburgh. 2(2) , 151{164. Hillston, J. 1994a. AingCompositional Approach to tPerBernardo, M.,andDonati eylzio,ngL.Concurrent , & GorrieSystems ri, R. 1994. formance Modell . Ph.D. thesis, Universi y of Modeling Anal with Edinburgh. MPA. Pages 175{189 of: (Herzog & Rettelbach, 1994). Hillston, J.51{70 1994b.of: (Herzog The Nature of Synchroni sation. PagesJ.-P., & Rettelbach, 1994). Boudol,tributed G., &Computations: Castellani, I. Event 1991. Structures Flow Modelands ofNets Dis-. Katoen, Langerak, R., &isticLatella, D.Al1994. Mod-An INRIA Research Rep. 1482, Sophi a Anti p ol i s. el i ng Systems by Probabil Process g ebra: Event Structures Approach . Pages 253{268 of: Brinksma, E., Katoen, J. P. , Langerak, R. , & Latella, Tenney, R., Amer, P., & Uyar, M. (eds), Formal D.rency1994.Semanti Performance Anal309{337 ysis andof:TrueRus,ConcurDescription Techniques, VI. IFIP Transactions, c s. Pages T., & vol. C-22. North-Holland. Rattray, C.System (eds),Devel Theories and. AMASTSeries Experiences forin Kobayashi, H. 1978. Modeling and Analysis: An Real Time o pment Computing, . 2. Worl enti) c. (ext. abstract Introduction System Performance Evaluation in: (Herzog &volRettel bach,d Sci1994). Methodology. toAddison-Wesley. The Computer Journal, Vol. , No. , 1995
' &6 6
$ %
PPP-Pq m+1 transient states 1; ;m 1 6 6
FIGURE 9. 1
13 fromstate i,or,equivalently, theresidencetimeinstate igeneral, is exponentially distributed withdepend rate ?on1=theT(i;itime). Inat the transition rates may which a system is considered. In this paper we con ne ourselvestoMarkovchainswhosebehaviourisinvari ant toonetime-shifts. That is, at any time the rate to go from to another is the same. SuchMarkov processes ares. oftenThestate referred to as time-homogeneous chai n probability (x) ofbythe time until absorption in state distribution m +1 is nowFgiven F (x) =1 ? eTx1 , for x >a 0,representation and F (x) = of0, Ffor. The x < corresponding 0. The pair (;probaT) is called bility density function equals F 0(x) = eTxT 0 , forof Fx(x>) 0,areand niteF 0(andx) =given 0, forbyx < 0. The moments i i =(?1)ii!(T?i1) for i =1; 2;::: . The rstmomentofastochasticvariablecorrespondsto itsmomentandthesquareofthe rstmomentcorresponds expectation, and the dierence between the second to Note its variance. of the expressions forforF (ex-x), 0(x) andtheiresemblance Fponential to the corresponding expressions In fact, fordistribution. m=1 we obtaiPH-n thedistributions resultsdistributions. forcanregular exponential thus be considered as matrix general isations of the exponential distributions, which makes them suitable for numeric computations. De ni functioni Fit onisthedistributionoftimetoabsorptioninacontinuous[0; 1ti)oisn A1 called Aofcontinuous phase-type distribution (PH-distribution) time Markov chain as de ned above. Exampl e A2Erlang,Example PH-distributions are theandexponential, hyperand hypo-exponential, Coxian distributions. Important to note is that whi thesele well-known (PH-type) distributions are acyclic the de nition of PH-type distributions alsoanallows for cyclic Markov chains. Figure 10 illustrates (a) exponential distribution with with rate rates , (b) ai, 3-stage hyperexponential distribution (c) a 2-stage hypo-exponential distribution with rates i, andof (b)(d) aand 3-phase Coxian distribution. Representations (d) ;are0; 0),(band) = (p1;p2;p3) with p1+p2+p3 = 1, (d) =(1
A Stochastic Causality-Based Process Algebra
2
m
m
+1
Schematic view of a PH-distribution.
Langerak, R.. 1992. Transformations andof Semantics for LOTOS Ph.D. thesi s , Uni v ersi t y Twente. Neuts,Stochastic M.F. 1981. Matrix-geometric Solutions. Thein Model s {An Al g orithmic Approach JohnsM.F.Hopkins UniStructured versity Press. Neuts,M/G/1 1989. Stochastic Matrices of Type and Their Appl i cations . Marcel Inc. NicolDekker, lsiisn,ofX.,Timed & Sifakis, J.AlAngebras. OverviPages ew and526{548 Synthe-of: Process deticeBakker, J.W. (ed), Spri Realn-ger-Verl Time: Theory in Prac. LNCS, vol. 600. a g. Plotkierational n, G.D. Semantics 1981. A. Structured Approach to OpTech. Rep. DAIMI FM-19, University. Sahner,Aarhus R.A., & Trivedi , siK.s SUsi. n1987. Performance and Reliability Anal y g Di r ected Acyclic Graphs. IEEE Transactions on Software Engineering, SE-13 (10)AnIntroducti , 1105{1114.on toEventStructures. Winskel,G.1989. deBakker,J. WTime, ., deRoever,W.P.Pages364{397of: ,Time&Rozenberg, G.(eds), Linear Branching and Partial Order in Logics and Model Concurrency. LNCS, vol. 354. Springer-Verlag.s for
A PH-DISTRIBUTIONS
Intui ively,absorption a PH-distriinbutia nion tie-state s characteri sneduous-time by the tiMarkov me tuntil conti process with a single absorbi nggure9)wi state. Consider aconti n uoustimeMarkovchai n (cf.Fi thtransitiaentl probability states f 1;:::;m g and absorbi n g state m +1, inivector ( ; m +1 ) with 1+ m+1 = 1, and (in nitesimal) generator matrix Q = T0 T00 , where that Tof(Qi;i)equalT< 0iszero,anda square Ti.e.(i;jT1+)matri >T 00(x=0.i of6= order j). Them such row sums (i;j)(i state 6= j)canchanges beinfromtransi terpreted astherate atwhich thesieTntcurrent e nt state i tostatetran-i state j . Stated otherwi s e, starti n g from For square matrix T of order m, eTx is de ned by eTx = i1t=Ttakes an exponenti a l y di s tri b uted ti m e wi t h mean 0 (i)is the rate atwhich the I m + Tx + T x2 + T x3 kx+k:::, where Im kdenotes the identity ( i;j )to reach state j . T matrix of orderxk m and T k is matrix T with each element systemcanmovefromtransi e ntstate i totheabsorbing state, state m+1. ?T(i;i) is the total rate of departure multiplied by k . 2
2!
3
3!
!
!
The Computer Journal, Vol. , No. , 1995
14
i i - gi iiZZ-~> gi i - i - ig i? - ?i -- iig?
Ed Brinksma, Joost-Pieter Katoen, Rom Langerak and Diego Latella
p p p
(a)
1 2 3
1
1
2 3
(b)
p
p
1
1
2
(c)
2 2
1 1
(1?p ) (1?p )
2
2
(d)
3
FIGURE 10. Some example PH-distributions. 0 ?1 0 0 1 0 ?1 1p1 0 1 @ 00 ?02 ?03 A ; @ 00 ?02 ?2p32 A for T(b) and T(d), respectively. andwithV PH-distri arestatisbtiuticalolnsy inGdependent stochasticvariabltheIf Uesdistribution and H respecti vely,tothenthe F of W = max( U;V ) i s equal product of G ofandtwoHPH-di and isstriagai nonsa PH-di sctriulabtedution.as The product b uti i s cal follows (Neuts, 1981, Chapter 2). Theorem A3; T)LetandPH-di striofborders utions mG;Handhaven, respecrepre( ; S ) sentations ( Then F (x) =( ;GL()xof)Horder (x) ismna PH-di witibyvtely.h representation + m +strinbution given
= (0 ; n+1;m+1 ) and 0 0 1 L = @ T In +00 Im S Im T 0 S T S 0 In A : de neddenotes the tensor (or Kronecker) product and is below. toNoteas thethattensor T Isum S is Ssometimes n + Iofm T and alTso referred , denoted S . T S represents the generator matrix Markov process which is the cartesian product ofofthea
Markov processes represented byin T(Daviando,S1981). . TensorThealgebra is extensivel y di s cussed consiproduct. sting only of the absorbing state iPH-distribution s the identity under De ni ion A4 A andTheBtensor (or Kronecker) product ofrespectively, two tmatrices of orders r 1 c1 and r2 c2 , r1r2 c1c2 andis de ned as C = A B with C of order C((i1?1)r2 + i2; (j1?1)c2 + j2)= A(i1;j1)B(i2;j2) , where 0