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.
Definition 1.5.1
Let be a port. Then at any time
|
|
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
|
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
|
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
|
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.