The <establish> statement can simplify the task of instantiating a connector and associating players with its roles. In one statement, both tasks are accomplished. Whereas the syntax of the <connection> statement allows the associations between players and roles to appear in any order in a composite implementation, it is often helpful, however, to group together all the <connection> statements for one connector instantiation in one place. The syntax of the <establish> statement requires the designer to perform this grouping.
When grouping player/role associations in this manner, the connector instance name is purely local to the group. The <establish> statement eliminates this name by implicitly instantiating the connector. The connector is not given a name by which it can be referred to. Therefore, the roles of such a connector cannot be referred to outside the scope of the <establish> statement, forcing the designer to specify all player/role associations involving roles in the connector inside the given <establish> statement.
NOTE: The syntax of an <establish> is not symmetrical with respect to components; it cannot be used to instantiate components and associate roles with its players.
The property list of an <establish> statement has identical semantics to the property list of a connector <instantiation>. This means that properties that are legal and illegal in a property list of a connector <instantiation> of a given type are legal and illegal, respectively, in an <establish> of the same type of connector.
<establish> :==
ESTABLISH <identifier> WITH
<establish_association_list>
<property_list>
END <identifier>
The <identifier> following the word ESTABLISH must name a connector definition, not an instantiation. This is because the <establish> statement performs the connector instantiation.
<establish_association> :==
<identifier>.<identifier> AS <identifier>
The <establish_association_list> is a whitespace-separated list of <establish_association>s, and the list must contain at least one association. The <establish_association> looks remarkably similar to the association part of a <connection> statement, However, there are differences. Since there is no connector instantiation name, only one identifier is needed to identify the role in the association. Therefore, the dot-separated pair of <identifier>s before the word AS must name a player, and the single <identifier> following the AS must name a role in the connector named by the <identifier> following the word ESTABLISH. There is no pre-defined language limit to the number of <establish_association>s that can be present in the list.
ESTABLISH C-proc-call WITH my_main_program.malloc AS Caller libc.malloc AS Definer END C-proc-callThe above example assumes that the "libc" component contains a RoutineDef player named "malloc," and that the "my_main_program" component contains a RoutineCall player named "malloc." It also assumes that there exists a UniCon definition for a ProcedureCall connector named "C-proc-call."
ESTABLISH Real_Time_Scheduler WITH RTClient.load AS load RTServer.load AS load ALGORITHM (rate_monotonic) PROCESSOR ("TESTBED.XX.CMU.EDU") TRACE (RTClient.load.trigger, RTClient.load.segment1, RTServer.load.segment, RTServer.load.segment2) END Real_Time_Scheduler
Author:
Last Modified: May 12, 1996