Graphics Programs Reference
In-Depth Information
p 3
p 1
p 3
p 1
p 1
p 3
t AB
t AB
t A
p 5
t B
T AB
p 4
p 2
p 4
p 2
p 2
p 4
(b)
(c)
(a)
Figure 10.4: Rendez-vous and communication, simple case
as the delay is caused by the reciprocal wait and not by the action per se).
The translation of the ALT statement (Fig. 10.3( b)), is modelled instead
as a nondeterministic choice among possible communications; the G i are
communication statements (input guards) or simple conditions and are thus
represented as immediate transitions.
The automatic implementation of these rules is quite straightforward as it
corresponds to simple modifications of any algorithm that translates a pro-
gram into a flowchart. Applying these translation rules mechanically, many
useless immediate transitions and places are generated: they can be partially
removed, since all sequences of immediate transitions of the 1-in 1-out type
can be collapsed into a single one (of course this is not true if a transition
represents communication, as it will be manipulated during the fourth step
of the procedure). Removing these useless transitions corresponds to the
application of well-known reduction techniques [ 64, 15] .
Step 3 consists of replacing all transitions that represent named processes
with their net representations. The substitution can be easily performed
by superimposing the input (output) place of the process equivalent subnet
with the input (output) place of the transition that represents the named
process.
Step 4 consists of implementing the rendez-vous. In a CSP-like language,
a rendez-vous is caused by any pair of input and output (communication)
statements. Indeed a process that executes an input (output) command
is blocked if its partner is not ready to execute the complementary state-
ment: when both processes are ready the communication takes place and
the blocked process resumes execution. Observe Fig. 10.4( a): if the mean-
ing of t A (t B ) in the translation of process A (B) is that of requiring a
 
Search WWH ::




Custom Search