CONCLUSIONES Y DISCUSIÓN
C. Resumen de conclusiones y Discusión
How many actors take part in our modelling of COPY!, and what is each of them allowed to do? We call an agent any actor which might change the 'COPY! state. As 3tated before, we have four kinds of agents: the demanders, the outport actors, the inport actor, and the supplier If n is the number of ¡COPY] outports, there are altogether 2 * (n*-1) agents In every state of I COPY] at least one agent is enabled for a state change, unless there is a deadlock Indeed, any number of agents may be enabled for any number of state changes Each agent carries out at most one transition in a single go, but d iffe re n t agents are permitted to ' fire" simultaneously
The rule for I n o . - m a (* 4.7 and 5.3.1) must be slightly extended Our model for the ¡COPY, node actor Is in norm al priority if simultaneously
— none of the m essage labels (in p o rt o r o u tp o rt) is A,
— the I novalue»! is ¡finalbiil«' at each ¡COPY outport whose message label is K,
— the ¡COPY! inport state is C only if at least one ¡COPY] outport is currently interested in the daton value to com e
V -1 0 Section 5.3.4 f stated already the actions of the demanders and of the supplier, but it remains to sum up the actions of the I COPY! inport actor and of the ¡COPY]
outport actors. These code fragments are closely related to the core of the I COPY]
act, and they were used almost directly to produce the state tables.
5.6.2.1 Action by the IcQPVl Inport
The jcQPYl Inport actor (I) is capable of examining and changing any part of the [COPYI state (though it would not alter any outport message label). The inport actor does all those tasks which concern more than one outport, and it communicates with the outports mainly through the , . n o v e l u e » i and the queues. The actions of the inport
V » 19 b e g i n I : * the i n p o r t s t a t e , b e i n g a m e s s a g e l a b e l ; acond : = tr u e i f a l l th e " n o v a l u e s ” a r e non—z e r o ; ccond : = tr u e i f f o r at l e a s t one o u t p o r t : th e messag e l a b e l i s C and no d a t o n i s queued f o r t h a t o u t p o r t ; i f ( I *= and c ) ( acond or n o t ccond)
th en the i n p o r t s t a t e may be changed t o N ;
i f th e nova l u e s i n a l l o u t p o r t a c t o r s t a t e s a r e f i n a l i n d e x th en b e g i n
i f ( I O C ) and ( I < > K ) end acond
then the i n p o r t s t a t e may b e changed t o K ; end
e l s e b e g i n
i f I = H
then b e g i n
i f acond
then the i n p o r t s t a t e may be changed t o A but then a l s o
must each n o v a l u e s be d e cr e me n t e d by one
e l sc i f ccond and normal Ex
t hen the i n p o r t s t a t e may be changed t o C ; end ;
i f I = D
.
then beg i n ( one may do t h e f o l l o w i n g , a l l in one g o ; ) f o r each o u t p o r tdo i f i t s no v a l u c s i s g r e a t e r z e r o t hen r educe i t s n o v a l u e s by one,
e l s e append the d a t o n to i t s d a t o n queue ; but t hen a l s o
s e t t he i n p o r t s t a t e t o A ;
end end end ;
5.5.2.2 Action by a [CQPVl Outport
There Is one ICOPYl outport actor for each [COPY] outport. An outport actor (o) is capable of examining and changing any part of the fCQPV] state (though the only
message label It would alter Is its own one). Each outport cooperates, of course,
y « 2 o
closely with the inport. The actions of an outport are essentially:
b e g i n
OS : « the r e s p e c t i v e o u t p o r t a c t o r s t a t e ; ML :■ the m essage l a b e l i n OS ;
i f HL » C and normalEa
and a d ato n is queued at t h i s o u t p o r t t h e n the message l a b e l i n OS may be changed t o O ,
i t ML s K
th e n the n o v a lu e s in OS may be changed t o f i n a l in d e x ,
i f ML 3 A
t h e n b e g in (on e may d o th e f o l l o w i n g , a l l in one g o : } i f a daton i s queued at t h i s o u t p o r t
then pop the o l d e s t d a to n o f f t h a t queue e l s e increment by one th e n o v a l u e s in OS ; but th e n a l s o change th e message l a b e l in OS t o N , end ; end ;
6.5.3 Simplifications
The message passing state of the fcOPYl node actor has been presented above, and it was obtained by pruning the total state of 'cOTVi. Refore we generate the state transition table of a iCOPVi node actor, we apply the following simplifications to bound and reduce the number of states.