Next: 1.6 Mapping
Up: 1. Introduction
Previous: 1.4 Related Work
Contents
Index
1.5 Model of Computation
To describe the structure of a process network, we introduce the notions of
process type set and data type. A process type set defines the set of process
types. Each process type has a set of input ports and a set of output ports.
With each port we associate a data type. A process network consists of a set of
processes and a set of channels. A channel connects a process output port to a
process input port of the same data type. Each port is connected to precisely
one channel.
To describe the communication between the processes we provide three functions
called read, write, and select that can be called from within
a process. The informal meaning of these functions is as follows. The read
function consumes data from an input port and stores it in a local variable of
the process. The write function copies the value of a local variable to an
output port. The select function selects an input or output port that
eventually will produce or consume data, respectively. To formalize the
semantics of these functions we associate with each port at any time the number
of tokens that it has transferred up to now and the number of tokens that it
has committed to transfer up to now but that not have been transferred yet. To
this end we introduce the following definitions.
Following the approach of Martin [8], the communication mechanism
is based on the following assumptions. For all channels it must hold at any
time that a write action is not blocked, the number of consumed tokens does not
exceed the number of produced tokens, and the functionality is
first-in-first-out.
Axiom 1.5.1
Let  be a channel from output port  to input port  .
Then the following invariants hold
|
Under these assumptions we define the semantics of the read, write, and select
functions using preconditions and postconditions as follows. Note that these
functions stall when their postcondition cannot be satisfied. Furthermore, note
that the write function is non-destructive which means that the variables of
the producing process keep their values.
Definition 1.5.2
Let  be an input port of type  ,  an array of type  , and  a
positive integer indicating a number of tokens. Then action
read is defined by
- precondition
, and
- postcondition
.
|
Definition 1.5.3
Let  be an output port of type  ,  an array of type  , and  a
positive integer indicating a number of tokens. Then action
write is defined by
- precondition
, and
- postcondition
.
|
Definition 1.5.4
Let  be a positive integer,  up to  ports,  up to 
positive integers indicating requests for numbers of tokens, and  a positive
integer no larger than  indicating the index of the selected port. Then
action select
 is defined by
- precondition
, and
- postcondition
.
|
Following temporal logic theory, the symbol
means eventually.
Hence, the select function selects a port such that the current number of
transferred tokens through this port plus the requested number of tokens is
eventually smaller than or equal to the number of transferred tokens through
the connected port. If we consider an input port
, then this port is a
candidate for selection if the corresponding output port
will
eventually produce enough tokens to complete a read action of
tokens. If
we consider an output port
, then this port is a candidate for selection
if the corresponding input port
will eventually consume the tokens
produced by a write action of
tokens. Note that the select function has
no effect on the number of transferred tokens, i.e., it does not produce or
consume data.
To describe the functionality of the processes we use a sequential programming
language. We introduce an additional function called execute to abstract
from the implementation of the functionality in the sequential programming
language. To this end, the functionality between two communication actions has
to be annotated with one or more execute actions. These execute actions
annotate the computation requirements of the processes; they do not provide
additional functionality.
Next: 1.6 Mapping
Up: 1. Introduction
Previous: 1.4 Related Work
Contents
Index
© Copyright Koninklijke Philips Electronics NV 2006