next up previous top
Next: Accept
Up: Connector
Previous: Connector Implementation

Property

A property is a name-value pair that specifies an attribute, an assertion, or a constraint pertaining to a UniCon definition or language element (e.g., a component, connector, role, or player). It is used to further specify the definition or language element. Properties are specified in <property_list>s, and these lists are a part of the syntax of the following UniCon language elements:

  <interface>
<component_implementation>
<instantiation>
<protocol>
<establish>
<role>
<player>
<variant>
<abstraction_bind>
<simple_bind>
All properties in all <property_list>s in UniCon are separated by whitespace (i.e., spaces, tabs, and carriage returns). A <property_list> can be empty (in many cases), or it may contain one or more properties.

The syntax of a property is as follows:

  <property> :== <name> <value>
<name> :== <identifier>
<value> :== EMPTY | (<value_part>)
The <name> in a property has significance in UniCon (i.e., it conveys meaningful information about a definition). There are 35 pre-defined property names in the UniCon language, and the property list associated with each language element listed above accepts only a certain subset of the pre-defined properties. Additionally, a given pre-defined property may be accepted in the property lists of more than one distinct UniCon language element. All property lists accept user-defined properties.

The <value> in a property associates specific information with the given property name in the given context. Here, the term context refers to the given language element of the given type (e.g., player, of type GlobalDataDef). The <value> may be NULL, or it may contain a <value_part> enclosed in parentheses. The <value_part> has a syntax that is specific to the property, in a given context. There are eleven common syntaxes for the values of UniCon properties - the syntaxes for all 35 pre-defined UniCon properties in all contexts fall into these eleven categories.

Examples of properties with and without <value_part>s are shown below:

LIBRARY
SIGNATURE ("int")
Each pre-defined UniCon property has a required rule associated with it. The property is either always required to be specified in the property list for which it is designated, or it is optional. If it is required to be present in a property list and the system designer does not specify it, the UniCon compiler will generate an error message and prevent system construction. If a property is optional in its designated list, the UniCon compiler will provide a default value.

Each pre-defined UniCon property has a merge rule associated with it. The merge rule tells the UniCon compiler how to resolve duplicate property specifications in a single property lists. For example, what does the compiler do when it encounters two Accept property specifications in the same property list? Does it throw out the first set of values, or the second? Or does it use the union of both lists? It depends on the value of the merge rule; the rule can take on one of the following three values: ERROR, REPLACE, or MERGE.

A merge rule value of ERROR instructs the UniCon compiler to ignore each subsequent specification of the given property in the same list, and treat it as an error (Warning). A merge rule value of REPLACE instructs the UniCon compiler to accept the last specification of a given property in the same list, and treat each prior specification as an error (Warning). A merge rule value of MERGE instructs the UniCon compiler to take the union of the elements in the value portions of all specifications of a given property in the same list.

NOTE: When instantiating a component in UniCon, the value part of a given property in a component <instantiation> property list overrides the value part of the same property in the <interface> property list in the component definition if the merge rule is REPLACE. The one in the <interface> overrides the one in the <instantiation> if the merge rule is ERROR. The values in both lists are merged together into one specification if the merge rule is MERGE. The same semantics apply for connector definitions and instantiations as well.


next up previous top
Next: Accept
Up: Connector
Previous: Connector Implementation

Comments? Mail the current maintainer of this page.

Author: Gregory Zelesnik

Last Modified: May 12, 1996