A Framework for Performance Evaluation and Verification in Stochastic Process Algebras
Total Page:16
File Type:pdf, Size:1020Kb
A Framework for Performance Evaluation and Functional Verification in Stochastic Process Algebras Hossein Hojjat MohammadReza Marjan Sirjani ∗ IPM and University of Tehran, Mousavi IPM and University of Tehran, Tehran, Iran TU/Eindhoven, Eindhoven, Tehran, Iran The Netherlands, and Reykjav´ık University, Reykjav´ık, Iceland ABSTRACT To make our goals concrete, we would like to translate Despite its relatively short history, a wealth of formalisms a number of SPAs which have similar semantic frameworks exist for algebraic specification of stochastic systems. The (e.g., PEPA [14], MTIPP [13], EMPA [4] and IMC [11]) goal of this paper is to give such formalisms a unifying frame- to a common form in the mCRL2 process algebra (which work for performance evaluation and functional verification. is a classic process algebra [2] enhanced with abstract data To this end, we propose an approach enabling a provably types). Our next milestone is to generate state space using sound transformation from some existing stochastic process the mCRL2 tool-set. Finally, we wish to be able to perform algebras, e.g., PEPA and MTIPP, to a generic form in the various functional- as well as performance-related analyses mCRL2 language. This way, we resolve the semantic dif- on the generated state space using available tools, as well as ferences among different stochastic process algebras them- tools that we develop for this purpose. selves, on one hand, and between stochastic process algebras For the ease of presentation, we shall focus on one of these and classic ones, such as mCRL2, on the other hand. From process algebras, namely PEPA (due to its popularity), in the generic form, one can generate a state space and perform the remainder of this paper and only touch upon the aspects various functional and performance-related analyses, as we in which our approach has to be adapted to fit the other pro- illustrate in this paper. cess algebras listed above. Our prototype implementation currently supports specifications in PEPA and MTIPP and we are currently extending it to support EMPA and IMC. 1 1. INTRODUCTION Related Work. A proposal for unifying performance Compositionality is a very much sought feature in the and functional analysis is put forward in [9] which is closest analysis of systems which is inherent to process algebras to ours. There, the authors use the process algebra LOTOS [2, 15, 16]. Stochastic process algebras (SPAs) [4, 6, 11, 14] together with stochastic gates (basic actions); the LOTOS bring about this useful feature to the field of performance specification is then translated, using CADP toolset, into evaluation. Several SPAs appeared as a result of different de- IMC and various existing as well as newly developed anal- sign decisions in merging stochastic aspects of processes with ysis techniques are introduced on the generated IMC spec- their behavioral aspects: some decided to follow the tradi- ification. Our work can benefit from the latter techniques tion in many timed process algebras and keep the semantics after generating the LTS semantics of stochastic decision of stochastic rates orthogonal to the behavioral semantics processes. As for the former translation (from LOTOS to while others decided to merge the two into a single semantic IMC), our work can be considered complementary to that of model, i.e., a single transition (multi-)relation. Communi- [9]. In [12], in order to combine functional and performance cation and synchronization are central to the semantics of analysis, a new operator, called elapse, is added to the LO- process algebras and defining the semantics of synchroniza- TOS process algebra. We decided to use the syntax of exist- tion for SPAs is yet another point of dispute among them. ing stochastic process algebras rather than adding syntactic Furthermore, different SPAs interpret nondeterminism dif- sugar to mCRL2 for modeling stochastic processes. ferently. Our approach relies essentially on using the equational theory of SPAs in order to resolve their semantic differences ∗The work of M.R. Mousavi has been partially supported by with mCRL2. Sound and complete equational theories are the projects “Unifying Framework for Operational Seman- already developed for MTIPP [13], EMPA [4] and IMC [11]. tics” (nr. 070030041). We are not aware of an existing complete axiomatization for PEPA; in [14], however, a number of sound axioms of PEPA are introduced. All existing axiomatizations of SPAs make use of an axiom scheme called Expansion Theorem which Permission to make digital or hard copies of all or part of this work for stands for an infinite number of axioms (one for each number personal or classroom use is granted without fee provided that copies are of summands as arguments of parallel composition). How- not made or distributed for profit or commercial advantage and that copies ever, we exploit the well-known technique of using auxiliary bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific operators [3] to give PEPA a finite (sound and complete) permission and/or a fee. 1The implementation is available from SAC’08 March 16-20, 2008, Fortaleza, Ceara,´ Brazil ∼ Copyright 2008 ACM 978-1-59593-753-7/08/0003 ...$5.00. http://www.win.tue.nl/ mousavi/spa/. 1 axiomatization. In [4, Section 3], the authors define an in- SOS-style deduction rules. terleaving semantics for EMPA. The method used in [4] for (α,r) defining the interleaving semantics of EMPA resembles our x → y (pre) (c0) 0 0 approach to resolving the semantics of synchronization and (α,r) (α,r) choice in our implementation. (α, r).x → x x0 + x1 → y0 (α,r) (α,r) The rest of this paper is organized as follows. Sections x → y x → y (c1) 1 1 (par0) 0 0 α∈ / L 2 and 3 give, respectively, an overview of our source and (α,r) (α,r) x0 + x1 → y1 x0 £¡ x1 → y0 £¡ x1 target domains, i.e., stochastic process algebras (with a fo- L L (α,r) cus on PEPA) and mCRL2. Section 4 presents our general x1 → y1 (par1) α∈ / L approach and gives a detailed account of its application to (α,r) x0 £¡ x1 → x0 £¡ y1 PEPA by means of a few examples. Section 5 applies our L L (α,r0) (α,r1) method to a case-study and provides a practical view to the x0 → y0 x1 → y1 (par2) α ∈ L application of our approach. Section 6 concludes the paper (α,R) x £¡ x → y £¡ y 0 L 1 0 L 1 and presents directions for ongoing and future research. r0 r1 where R = min(rα(x0), rα(x1)) rα(x0) rα(x1) (α,r) (α,r) x → y x → y (hid0) α∈ / L (hid1) α ∈ L (α,r) (τ,r) x/L → y x/L → y (α,r) t → y 2. STOCHASTIC PROCESS ALGEBRAS (rec) A := t (α,r) A → y Most deduction rules are standard, i.e., the same as their PA 2.1 PEPA counterparts. The most notable exception is deduction rule (par2) which defines synchronization. In this rule, the rate r0 r1 of the synchronizing action is min(rα(x0), rα(x1)), rα(x0) rα(x1) 2.1.1 Syntax and Semantics where rα(xi), for each i ∈ {0, 1} is the sum of the rates of all enabled α-transitions at the parallel component xi formally The syntax of PEPA processes is given below. defined below [14]. rα(0) = 0 p ::= 0 | (α, r).p | p + p | p £¡ p | p/L | A rα((α, r).x) = r L rα((β, r).x) = 0 rα(x + y) = rα(x) + rα(y) rα(x £¡ y) = rα(x) + rα(y) if α∈ / L In the above syntax, 0 stands for the deadlocking process. L 2 rα(x £¡ y) = min(rα(x), rα(y)) if α ∈ L (α, r).p stands for an action of type α ∈ A whose dura- L tion is determined by an exponentially distributed random rα(x/L) = rα(x) if α∈ / L >0 r (x/L) = 0 if α ∈ L variable with rate r ∈ R followed by process p. There α are weighted passive actions in PEPA which have rates in {n> | n ∈ IN \{0}} (1> is denoted by >). It is assumed 2.1.2 Axiomatization >0 that r < n> for each r ∈ R and n ∈ IN \{0}. Passive ac- Equational theories are powerful tools in process algebraic tions are important in practical applications: they represent formalisms which allow for sound transformations of pro- actions whose rates are unknown or determined by their syn- cesses (w.r.t. a particular notion of equality) without re- chronizing partner. Although we fully treat weighted pas- sorting to their semantics and generating their state space. sive actions in our tool implementation, we do not clutter Given a notion of behavior equality, a set of equations is the presentation in this section by treating them formally. called an axiomatization of a model, or is sound and com- They can be incorporated smoothly without any substantial plete, when one can prove all sound (and only sound) equali- change in the theory. Nondeterministic choice is represented ties from them. We present an axiomatization of the recursion- by + and stands for its general process-algebraic intuition. free subset of PEPA w.r.t. Markovian bisimulation [14, 11] Parallel composition with mandatory (CSP-style) synchro- in this section. To our knowledge, this is the first finite ax- nization among actions in L ⊆ A is denoted by p £¡ p. Ex- L iomatization of PEPA (most of the ingredients were already pression p/L hides actions in L ⊆ A, i.e., renames them present in [14], though).3 Similar axiomatizations exist for to the unobservable action τ ∈ A.