230 likes | 363 Views
Stochastic Activity Networks ( SAN ). Verification of Reactive Systems Mohammad E smail Esmaili Prof. Movaghar. Sharif University of Technology ,Computer Engineer D epartment , Winter 2013. Introduction.
E N D
Stochastic Activity Networks ( SAN ) Verification of Reactive Systems Mohammad Esmail Esmaili Prof. Movaghar Sharif University of Technology ,Computer Engineer Department , Winter 2013
Introduction • Stochastic activity networks have been used since the mid-1980s for performance, dependability, and performability evaluation. • Stochastic Activity Networks (SANs) are a stochastic generalization of Petri nets which have been defined for the modeling and analysis of distributed real-time systems.
Activity networks • Activity networks are the non-probabilistic model on which SANs are built, just as in a similar fashion, (un-timed) Petri nets provide the foundation for stochastic Petri nets . • Activity networks are nondeterministic models which have been developed for representing concurrent systems. • The transitions in Petri nets are replaced by the primitives called "activities."
Definitions • Activities: which are of two kinds: timed activities and instantaneous activities. Each activity has a non-zero integral number of cases (possible actions). • Timed activities represent the activities of the modeled system whose durations impact the system's ability to perform . • Instantaneous activities, represent system activities that, relative to the performance variable in question, are completed in a negligible amount of time.
Definitions • places : as in Petri nets. • input gates : each of which has a finite set of inputs and one output. Associated with each input gate are an n-ary computable predicate and an n-ary computable partial function over the set of natural numbers . • output gates, each of which has a finite set of outputs and one input. Associated with each output gate is an n-ary computable function on the set of natural numbers, called the output function.
Definitions • P denote the set of all places of the network • If S is a set of places (S P), a marking of S is a mapping • the set of possible markings of S is the set of functions : = . • an input gate is defined to be a triple, (G, e, f ), where G P is the set of input places associated with the gate, e : is the enabling predicate of the gate, and f : the input function of the gate .
Definitions • an output gate is a pair, (G, f ), where G P is the set of output places associated with the gate and f : is an output function of the gate.
Definitions • An activity network (AN) is an eight-tuple : AN = (P,A, I, O,) • P is some finite set of places. • A is a finite set of activities. • I is a finite set of input gates. • O is a finite set of output gates. • species the number of cases for each activity. • T imed; Instantaneous} specifies the type of each activity.
Definitions • The net structure is specified via the functions and . • maps input gates to activities • maps output gates to cases of activities. • Several implications of this definition are immediately apparent. First, each input or output gate is connected to a single activity. In addition, each input of an input gate or output of an output gate is connected to a unique place.
Graphical Representation • To aid in the modeling process, a graphical representation for activity networks is typically employed. In fact, for all but the smallest networks, speciation via the tuple formulation presented in the definition is extremely cumbersome. • Not only is the graphical representation more compact, but it also provides greater insight into the behavior of the network.
Graphical Representation • Here places are represented by circles (A, B, and C), as in Petri nets. • Timed activities (T1 and T 2) are represented as hollow ovals. Instantaneous activities (I1) are represented by solid bars. • Cases associated with an activity are represented by small circles on one side of the activity (as on T 1). • An activity with only one case is represented with no circles on the output side (as on T 2). • Gates are represented by triangles.
Activity Network Behavior • An input gate has two components: • • enabling function (state) → Boolean; also called the enabling predicate • • input function(state) → state; rule for changing the state of the model • An activity is enabled if for every connected input gate, the enabling predicate is true, and for each input arc, the number of tokens in the connected place ≥ number of arcs. • We use the notation MARK(P) to denote the number of tokens in place P.
Cases • Cases represent a probabilistic choice of an action to take when an activity completes.
Output Gates • When an activity completes, an output gate allows for a more general change in the state of the system. This output gate function is usually expressed using seudo-C code.
Completion Rules • When an activity completes, the following events take place (in the order listed), possibly changing the marking of the network: • If the activity has cases, a case is (probabilistically) chosen. • The functions of all the connected input gates are executed (in an unspecified order). • Tokens are removed from places connected by input arcs. • The functions of all the output gates connected to the chosen case are executed (in an unspecified order). • Tokens are added to places connected by output arcs connected to the chosen case.
Definition of a Stochastic Activity Network • Given an activity network that is stabilizing in some specified initial marking, a stochastic activity network is formed by adjoining functions C, F, and G, where C species the probability distribution of case selections, F represents the probability distribution functions of activity delay times, and G describes the sets of “reactivation markings" for each possible marking.
Definition of a Stochastic Activity Network • A stochastic activity network (SAN) is a five-tuple : SAN = (AN,,C,F,G) Where : • AN = (P,A, I, O,) is an activity network. • is the initial marking and is a stable marking in which AN is stabilizing. • C is the case distribution assignment. • F is the activity time distribution function assignment • G is the reactivation function assignment.
SAN Terms • activation - time at which an activity begins. • completion - time at which activity completes. • abort - time, after activation but before completion, when activity is no longer enabled . • active - the time after an activity has been activated but before it completes or aborts.
References • [1] Stochastic Activity Networks: Formal Definitions and Concepts , William H. Sanders and John F. Meyer , Lecture Notes in Computer Science, Volume 2090, 2001, pp315-343 . • [2] Stochastic Activity Networks: A New Definition and Some Properties , A. Movaghar , ScientiaIranica, Vol. 8, No. 4, pp. 303-311, October 2001. • [3] users.crhc.illinois.edu/nicol/ece541/slides .