next up previous top
Next: Role Type
Up: Connector
Previous: RTScheduler

Role

Description

A role is a visible semantic unit in the protocol of a connector through which the connector can mediate the interaction between components. More concretely, a role is a named entity in the protocol of a connector that can be associated with a player, a named entity in the interface of a component, in a connection during system construction. Roles are used to identify the players that must cooperate in a successful interaction; roles identify the kinds of interactions that a connector can establish (i.e., the kinds of components it can work with and the player types it can handle).

A role definition contains:

A role defines the responsibilities and the requirements for a player involved in an interaction among components. Role types are primitive typing units used to (1) identify players that can play a given role in a connection and (2) define their responsibilities and requirements in such a connection. Each role type in UniCon has a pre-defined set of player types that it may be associated with in a connection, and each defines the semantics of the responsibilities of the players in the connection.

Roles are further specified by properties in the property list of the role definition. Properties can be thought of as attributes of a definition which are used to further describe (i.e., specify) it. For roles, they are attributes that apply to the role as a whole. There are many places in UniCon where lists of properties are used to further specify a definition. In roles, properties are used to specify information such as the legal component/player type combinations of players that can be associated with a given role in a connection, and the minimum and maximum number of player/role associations involving a given role in a connection.

Syntax

The following is the syntax for a role definition:

  <role> :== 
    ROLE <identifier> IS <role_type>
    <optional_end_role_syntax>
<role_type> :== Caller | Definer | Load | Participant | Readee | Reader | Sink | Source | User | Writee | Writer
<optional_end_role_syntax> :== EMPTY | <property_list> END <identifier>
Roles can be defined with and without properties. In the latter case, for example, the role definition appears as follows:

  ROLE Unix_Pipe_Input_End IS Source 
Notice that if no properties are specified in a role definition (i.e., the property list is empty), the END statement is omitted.

In the former case, the role definition appears as follows:

  ROLE Unix_Pipe_Input_End IS Source
    MINCONNS (1)
    MAXCONNS (1)
    ACCEPT (Filter.StreamOut, General.StreamOut,
        SeqFile.ReadNext, General.ReadNext)
  END Unix_Pipe_Input_End
The END statement is required in this case. The <identifier> in the END statement must be identical to the <identifier> following the keyword ROLE, including the case of the letters.

Properties

There are only three properties in UniCon that are legal in the property list of a role definition: MinConns, MaxConns, and Accept. Every role type in UniCon has a pre-defined, default value for each of these properties; therefore, it is not required that these properties be specified in the property list in a role definition. The syntax of the value portion of each of these properties is the same across all role types:

The syntax for a MinConns property in a connector is an
<integer> surrounded by parentheses:

MINCONNS (1)
The syntax for a MaxConns property in a connector is an
<integer> surrounded by parentheses:

MAXCONNS (1)
The syntax for an Accept property in a connector is a comma-separated list of dot-separated pairs of <identifier>s, surrounded by parentheses:

ACCEPT (Filter.StreamOut, General.StreamOut,
SeqFile.ReadNext, General.ReadNext)

next up previous top
Next: Role Type
Up: Connector
Previous: RTScheduler

Comments? Mail the current maintainer of this page.

Author: Gregory Zelesnik

Last Modified: May 12, 1996