where: • P and T are a non empty infinite sets of places and transitions; • F and H are functions F: PxT - Nand H: TxP -N; • MO is an initial marking, MO : P -+ N U {w}, where N = {O, I, ... }.
The moment when a Q-model process finishes, characterises its behaviour much better then the activation time does, because the activation times can be predefined by the activation interval and a process starts regardless of the availability of input data. This is not the case with the termination moment, since a
20
A graphic representation of a Petri Net is a directed graph with two types of nodes: circles and bars. F and H are represented by multiple arcs. The initial marking is represented accordingly with tokens inside circles.
Other possibilities for comparing the modelling powers are: either based on analysis of state space and structure (Lipton et ai., 1974), or based on both, structural and behavioural characteristics (Peterson and Bredt, 1974).
A transition t is enabled at the marking M if and only if: VpEP ( M(p) - F(p,t) ~ 0 ) (2)
A class of models A defines a class of languages L(A). Definition 5 Two classes of models A and Bare defined to be equivalent if L(A)=L(B) The modelling power of class A is defined to be less or equal to the class B, if L(A)kL(B).
When one of enabled transitions (let it be t*) works the marking M of the Petri Net will change as the following formula requires: VpEP ( M'(p) = M(p) - F(p,t*) + H(t *,p)
(3)
Let q be a Q-model. A transformation \I' is constructed, so that Q= \1'( q), where Q is a Petri Net and L(Q)=L(q). If it is so, then according to definition 5, it is clear that the modelling power of Q-models is less or equal to the modelling power of Petri Nets.
A sequence of the worked transitions can be taken as a word in the alphabet T of transitions and the set of all words as a language. Different types of languages appear, if the alphabet of the language and the set of transitions are not exactly the same sets.
A transformation from a Q-model to a Petri Net, where the Q-model is assumed to be without selector processes and with equivalence intervals set at Emax=O, is defined and some proved results discussed. Selector processes and longer equivalence intervals are added to the transformation later on.
The language types used for comparison are: • the language pf - if the transformation from the set of transitions T to alphabet I 0 : T - I is one to one, and an empty word ( denoted by A ) does not belong to the alphabet, and all possible markings are the final markings;
The transformation (given on fig. 1) is the following :
• the language LA - 0: T - I is not one to one, and an empty word A belongs to the alphabet, and the final markings are fixed.
1) a Q-model process Pi is transformed to one place k and one transition Ei
2) a channel which passes data ( with type asynchronous (a), synchronous (s), or semisynchronous (ss» ci=( Pi l' Pi 2) is transformed into a triple of two arcs Eil-Oi and ~'>j-Ei2, and a place Oi ' for semisynchronous channel some more arcs are added: always an arc Ei I-Ok where Ok is the activation place of Pi2'
Definition 3 Petri Net N =
is a marked graph if and only if VpEP (I{ t I H(t,p) > O}I = 1 & I{ t I F(p,t) > O}I =1 ) (each place is connected with transition from both sides).
°
exactly one
3) initial marking of places of Petri Nets is following : Definition 4 Petri Net N =
is a free choice net, if and only if
• all places that correspond to a semisynchronous or asynchronous channel have w tokens;
VtET & VpE!t, where It ={ pi F(p,t) > O} , holds: • all places that correspond to a synchronous channel with function cf(m,n) have n tokens ; (each transition has exactly one input place or each input pl ace of that transition has exactly one output arc).
• If a Q-model process has an activation interval, then corresponding activation place of Petri Net has w tokens and the same for activation places of processes which have a synchronous link to that process.
4. COMPARING THE MODELLING POWER OF Q-MODELS AND PETRI NETS The following comparison of modelling power of the Q-model and the Petri Nets is based on the languages aenerated bv both formal isms.
'"
,
Now some results are formulated , proofs are given in (Tekko, 1988).
21
An element of the Q-model
According part of Petri net
=>
O;--->1t 1 1
=>
~t 1 1
cf(2.x)
Lemma 1. For Q-models qEQ * following holds : if Q=1jJ( q), then all transitions in Q are reachable if and only if the Petri Net Q is alive . This gives the basis for correspondence between Qmodels Q* and alive Petri Nets .
~
k2 t2 t 1 ~Pl ~~
Theorem 2. If qEQ * and each process of q is potentially active, then the Petri Net Q ( Q=1jJ(Q) ) is alive .
~Pl
::
Till now a transformation 1jJ into Free choice net - a subclass of Petri Nets, and pf -type of Petri Net language were used. For Q-models in addition to unlimited execution time of a process, also equivalence interval was zero and selector processes were missing. In Fig. 2 and Fig. 3 the Petri Net parts are given that correspond to equivalence interval and selector process notion . Now
An arc in to acti va tIOn place of each process. whi ch is connected with p I through synchronous channels
Fi g. I. Transformation 'tjJ from a Q-model into a Petri Net.
the LA-type of Petri Net languages is also used. Theorem 1. For each Q-model q a Petri Net Q='tjJ( q) can be found , so that corresponding languages L( q) and L(Q) are 1jJ-equivalent, i.e. 1jJ(L( q»=L(Q) .
In the corresponding transformation (given on Fig. 2 and Fig. 3) the theorems remain valid but an other Petri Net language LA is used . The only restriction about Q-models that remains unchanged is the unlimited execution time .
The following intermediate result about Q-models Q", where processes are activated either by start interval (set of activation moments is infinite) or by other process, also holds.
In Fig. 4 all unnumbered connections between modelling powers are completely verified . There is a reason to believe connection 1 on the basis of works in (Vain, 1987), where an attempt to compare Petri Nets and Q-model was made . Thi s comparison was based on structural and behavioural characteristics of Petri Nets and Q-model.
p
s
5_ CONCLUSIONS
a selector process
The hierarchy of modelling powers of Petri Nets and Q-models was constructed.
according fragment of the Petri Net Fi g. 2. Transformati on of a selector process Ps with two output ports connected to P2, P3, P4 via asynchronous channels k 1,... ,k4
Fig. 3. Modelling of equivalence interval (to works if an activation appears, t1 works if process was started, t2 works if activation was suppressed).
22
Ordinary Petri Nets
Q-model
Free choice nets
Lipton,R., L. Snyder and Y.A. Zalcstein Comparative Study of Models of Computation. In: Proc. of the 15th Symposium on Switching and Automata New York. IEEE.
Q-model with unlimited execution time and variable equ ivalence interval
(1974) Parallel Annual Theory.
Matus, L. (1994). The Impact of Safety and Reliability Requirements on the Specification of Control Systems. In: IFAC Workshop on Safety. Reliability and Applications of Emerging Intelligent Control Technologies, Hongkong. Matus, L. and M.G. Rodd (1994). Timing Analysis of Real-Time Software. Pergamon.
Q-model with unlimited execution time of processes and with equivalence interval 0
Peterson, J. and T. Bredt (1974) . A Comparison of Models of Parallel Computation. Information Processing 74, In: Proceedings of the 1974 IFIP Congress, Amsterdam: North-Holland.
Q-model with unlimited execution time of processes and with equivalence interval 0 and without selector process
Peterson, J.L. (1981). Petri Net Theory and the Modelling of Systems. Prentice-Hall, Englewood Cliffs. Quirk, WJ. and R. Gilbert (1977) . The Formal Specification of the Requirements of Complex Real-Time Systems.A.E.R.E. , Harwell.
Marked graphs Fig. 4. Connections between Q-models and Petri Nets based on modelling power (arcs show the direction of decreasing modelling power).
Tekko, J. (1988). The Comparative Analysis of Quirk Model and Petri Nets Based on Quirk Model Language. Proc.of Academy of Sc. of Estonia, Physics, Mathematics , Vol 37, N. 1, 18-25 (in Russian).
The important result is, that if the Q-model is simplified a little, allowing the maximum execution time of processes in Q-models to be infinite, than the modelling power of the simplified Q-model is not more, and probably less, than the modelling power of Petri Nets .
Vain, J. (1987). A Comparison of Petri Nets and Quirk Model Using Modelling Power. Proc.of Academy of Sc. of Estonia, Physics, Mathematics, Vo136, N. 2, 324-333 (in Russian).
From this the actual role of time parameters in Qmodels can be deduced: • as soon as time parameters are not considered to be important, the modelling power reduces a lot; • if the Q-model technique is used, then time parameters are not only very important, when the task contains time restrictions, but other properties of the task should be converted to some time properties of the specification.
REFERENCES Ghezzi , C , D. Mandrioli, S. Morasca, and M. Pezze (1991). A Unified High-Level Petri Net Formalism for Time-Critical Systems. IEEE TraIlS. Software Eng.,Vol. 17, N.2. Jensen. K. and G. Rosenberg (Eds.) (1991). Highlevel Petri Nets. Springer-Verlag. 23