Protocol Instantiations
Protocol instantiations can be used to instantiate agent, function,
and action parameters of abstract protocols. An example of a protocol
instantiation is
CRI[A,B](c) = CR[A,B](c=c,r[A,B](x)=x)
which means that the protocol CRI is defined in terms of
CR by declaring the r parameter to be the identity
function. The syntax rules for protocol instantiations are as follows:
|
ProtDecl | ::= | ... |
|
| | | ProtInst |
|
ProtInst | ::= | SimpleProtDecl '=' ProtTerm |
|
ProtTerm | ::= | ProtTermInst |
|
| | | ...
|
The protocol term for instantiations is defined as follows:
|
ProtTermInst | ::= | ProtocolNameIdentifier StaticParams FunctionAndActionInsts |
|
FunctionAndActionInsts | ::= | ( '(' (FunctionInst
| ActionInst ) * ')' )?
|
A function instantiation provides a definition for a function
parameter of the abstract protocol that is being instantiated. There
are two variants that can be used to instantiate the functions of an
abstract protocol:
In either of the forms all function parameters must be mentioned in
the argument list of the instantiation.
Action instantiations can be used to replace an action variable
attached to a local agent edge in the abstract protocol. The syntax
for an action instantiation is
|
ActionInst | ::= | < identifier >' =' '{' AgentAction '}' |
|
|
Because, function and action instantiations can occur in any order in
the instantion list, the use of an action instantiation implies that
use of the second variant for function instantiations, i.e. action
instantiations cannot be mixed with function instantiations using
only identifier and the argument position. An example of an action
instantiation would be:
a = {new x}
Last updated: July 17, 2006
Send comments and questions to ma@kestrel.edu, dusko@kestrel.edu. For more information, see also Dusko's homepage