11.3    Property Associations

(1)   A property association assigns a property value or list of property values with a property.  This may involve evaluation of a property expressions.  Property associations can be declared within component types, component implementations, subcomponents, features, connections, flows, modes, and subprogram calls, as well as their respective refinement declarations. Contained property associations permit property values to be associated with any component in the system instance hierarchy (see Section 13.1).

Syntax

basic_property_association ::= 
  unique_property_identifier 
( => | +=> )
      [ constant ] property_value ;
 
property_association ::= 
  unique_property_identifier 
( => | +=> )
      [ constant ] assignment 
      [ in_binding ] ;
 
contained_property_association ::= 
  unique_property_identifier 
    => [ constant ] assignment
     applies to contained_model_element_path 
            { , contained_model_element_path }* 
     [ in_binding ] ;
 
unique_property_identifier ::=
  [ property_set_identifier :: ] property_name_identifier 
 
contained_model_element_path ::= 
      ( contained_model_element { . contained_model_element }*
        [ annex_path ] )
      | annex_path
 
contained_model_element ::= 
    named_element_identifier |
    named_element_array_selection_identifier
 
annex_path ::=
    annex annex_identifier {** annex_specific_path **}
 
annex_specific_path ::= <defined by annex> 
-- It is recommended this path follows the dot-separation syntax of the component path.
 
assignment ::=  property_value | modal_property_value
 
modal_property_value ::= 
    { property_value in_modes , }* property_value [ in_modes ] 
 
property_value ::= single_property_value | property_list_value
 
single_property_value ::= property_expression
 
property_list_value ::=
        (  [ ( property_list_value | property_expression ) 
         { , ( property_list_value | property_expression ) }* ] )
 
in_binding ::= 
      in binding( platform_classifier_reference 
                { , platform_classifier_reference }* )
platform_classifier_reference ::= 
        processor_unique_component_classifier_reference
        | virtual_processor_unique_component_classifier_reference
        | bus_unique_component_classifier_reference
        | virtual_bus_unique_component_classifier_reference
        | memory_unique_component_classifier_reference

Naming Rules

(N1)     A property is named by an optional property set identifier followed by a property identifier, separated by a double colon (“::”).

(N2)     The property set identifier, if present, must appear in the global namespace and must be the defining identifier in a property set declaration. 

(N3)     The property identifier must exist in the namespace of the property set, or if the optional property set identifier is absent, in the namespace of any predeclared property set.

(N4)     A property name may appear in the property association clause only if the respective AADL model element is listed in the applies to list of the property definition declaration. 

(N5)     The contained model element path identifies named model elements in the containment hierarchy, for which the property value holds.  The model element with the contained property association is the root of a path.

(N6)     For contained property associations declared with classifiers, e.g., a component type or component implementation, the first identifier in the path must appear in the local namespace of the classifier to which the property association belongs. 

(N7)     For contained property associations declared with model elements with a classifier reference, e.g., subcomponents, the first identifier must appear as a identifier within the local namespace of the classifier that is referenced by the model element. 

(N8)     Subsequent identifiers in a contained model element path must appear in the namespace of the model element identified by the preceding identifier.

(N9)     The annex identifier named in a contained model element path must be that of an approved or project-specific annex.

(N10)   Identifiers in an annex-specific path must appear in the namespace of the identified annex in the context of the namespace of the model element identified by the preceding identifier.

(N11)   If the identifier of a contained model element path is a subcomponent array identifier, it can specify a subcomponent array as a whole, an array subset, or an individual array element.

(N12)   If a property association has an in binding statement, then the unique platform classifier reference must be referenceable according to the with and renames declarations.

(N13)   If a property association has mode-specific values, i.e., an in modes statement for values, then the mode must refer to a mode of the component the property is associated with, or in the case of a property association of model elements that are not components, the modes of the containing component.

(N14)   A property association list must have at most one property association for the same property.  In case of binding-specific property associations, there must be at most one association for each binding.

Legality Rules

(L1)      The property definition named by a property association must list the class of the model element, with which the property is associated, or any of its super classes in its applies to clause. 

(L2)      A contained property association with mode-specific values can only be applied to a single model element, i.e., can only contain a single containment path.

(L3)      If a property expression list consists of a list of two or more property expressions, all of those property expressions must be of the same property type. 

(L4)      If the property declaration for the associated property definition does not contain the reserved words list of, the property value must be a single property valueIf the property declaration for the associated property definition contains the reserved words list of, the property list value must have the correct number of parentheses to match the list or nested list declaration.

(L5)      The property association operator +=> must only be used if the property declaration for the associated property definition contains the reserved words list of

(L6)      A property association with an operator +=> must not have an in modes or in binding statement.

(L7)      The property association operator +=> must not be used in contained property associations.

(L8)      In a property association, the type of the evaluated property expression must match the property type of the named property.

(L9)      A property value declared by a property association with the reserved word constant cannot be changed when the rules in the semantics  section for determining a property value are followed. 

(L10)   The unique component type identifiers in the in binding statement must refer to component types of the categories processor, virtual processor, bus, virtual bus, or memory.

(L11)   If a property value with an in modes statement is associated with a  connection, flow implementation, or call sequence with an in modes statement, then the set of modes for which the property value applies must be contained in the set of modes for which the connection, flow implementation, or call sequence is active.

Consistency Rules

(C1)If a property association has mode-specific values, i.e., values declared with the in modes statement, then the modal value assignment must include a value for each mode.  If the modal value assignment includes a value without the in modes statement, this value becomes the default for all modes without an explicit mode-specific value.

Semantics

(2)   Property associations determine the property value of the model element instances in the system instance hierarchy (see Section 13.1). The property association of a classifier, subcomponent, feature, flow, connection, mode, or subprogram call and other declarative model elements determines the property value of all instances derived from the respective declaration. 

(3)   A property association may be declared for a package.  In this case, the property value applies to the package.   

(4)   The value of a property is determined through evaluation of the property expression.

(5)   Property associations are declared in the properties subclause of component types and component implementations.  They are also declared as part of any other named declarative model element, such as features, subcomponents, connections, modes, mode transitions, etc. The property association of a component type acts as default value for all implementations, subcomponents, and instances, overwriting the default specified in the property definition.  Similarly, the property association of a component implementation overwrites the value of a component type, and the subcomponent property association overwrites the value of the component implementation.  The details of determining a property value are specified below.

(6)   If a property association is declared with modal property values, then the same rules hold for overwriting previous property associations.   Property values are modal if they are declared with an in modes.  In this case the property value applies if one of the specified modes is active.  If a property association contains both mode-specific associations and value without an in modes statement, then the latter specifies the value for all modes for which there is not an explicit value with an in modes statements.  A property value without an in modes statement also applies when the component is inactive.  If a modal property association does not specify a property value for one of the modes and there is no property value without in modes, then the property value is considered to be undefined.

(7)   If a property association has an in binding statement, the property value is binding-specific. The property value applies if the binding is to one of the specified execution platform types of the categories processor, virtual processor, bus, virtual bus, or memory.  If a property association list contains both binding-specific associations and an association without an in binding statement, then the latter applies to bindings to the reference processor.

(8)   Contained property associations can associate property values to any named model element down the system hierarchy relative to the location of the declaration.

(9)   The applies to clause of a contained property association may specify multiple contained model element paths.  In that case the property value is associated with each of the model elements.  If the property association specifying contained model elements includes an in modes statement, then the named modes must exist in the last component of the contained element path.  If the path refers to a model element that is not a component, e.g., a feature, then the modes must exist in the containing component of that model element.

(10)  A contained model element path may include the name of an array of components, or an index range of the array subset.  In that case the property value is associated with each of the model elements in the array or its subset, or model elements identified by the remaining path for each of the array elements.

(11)  Contained property associations can be used to record system instance specific property values for all model elements in a system instance. This permits AADL analysis tools to record system instance specific information about an actual system in a single location in an extension of the top-level system implementation. For example, a resource allocation tool can record the actual bindings of threads to processors and source text to memory through a set of contained property associations, and can keep multiple such binding configurations in different extensions of the same system implementation.

(12)  The property value is determined according to the following rules:

·         If a property value is not present after applying all of the rules below, it is determined by the default value of its property definition declaration.  If not present in the property definition declaration, the property value is undefined.

·         For classifier types, i.e., component types and feature group types and subclasses of ComponentType in Annex meta models, the property value of a property is determined by its property association in the properties subclause. If not present, the property value is determined by the first ancestor classifier type in the extends hierarchy with its property association. Otherwise, it is considered not present.

·         For classifier implementations, i.e., a component implementations and subclasses of ClassifierImplementation in Annex meta models, the property value of a property is determined by its property association in the properties subclause. If not present, the property value is determined by the first ancestor classifier implementation in the extends hierarchy with its property association. If not present, it is determined by the property value of the classifier implementation’s classifier type according to the classifier type rules. 

·         For modes, connections, flow sequences, or other model elements without a classifier reference, the property value of a property is determined by its property association in the element declaration. If not present and the model element is refined, then the property value is determined by a property association in the model element declaration being refined; this is done recursively along the refinement sequence. If not present and the property definition has been declared as inherit, it is determined by the property value of the closest containing component in the containment hierarchy of the system instance. This inherited property value must not be mode-specific.  Otherwise, it is considered not present.

·         For subcomponents, features and other model elements with classifier references, the property value of a property is determined by its property association in the model element declaration. If not present and the model element is refined, then the property value is determined by a property association in the model element declaration being refined; this is done recursively along the refinement sequence. If not present in the model element, it is determined by the model element’s classifier reference according to the respective classifier rules described above.  If not present for a feature that is a member of a feature group and the property definition has been declared as inherit, it is determined by the property value of the containing feature group type; or if not present and the feature group type is an extension of another freature group type, it is determined by the feature group type being extended. If not present and the property definition has been declared as inherit, it is determined by the property value of the closest containing component in the containment hierarchy of the system instance.  This inherited property value must not be mode-specific.  Otherwise, it is considered not present.

·         For subprogram calls in call sequences and other model elements with classifier or feature references, the property value of a property is determined by its property association in the model element.  If not present and the reference is a classifier reference, the property value is determined by the classifier according to its rules described above.  If not present and the reference is a feature reference in a type, the property value is determined by the feature according to the feature rules described above.  If not present and the property definition has been declared as inherit, it is determined by the property value of the closest containing component in the containment hierarchy of the system instance.  This inherited property value must not be mode-specific.  Otherwise, it is considered not present.

·         For component, feature, connection, flow, mode, or other model element instances in the system instance hierarchy, the property value of a property is determined by the contained property association highest in the system instance hierarchy that references the component, feature, connection, flow, mode, or other model element.  If not present, then the property value is determined by the respective subcomponent, mode, connection, feature, or other model element declaration that results in the instance according to the rules above.  If not present and the property definition has been declared as inherit, then it is determined by the property value of the closest containing component in the containment hierarchy of the system instance. This inherited property value must not be mode-specific.  Otherwise, it is undefined.

figure16

Figure 21 Property Value Determination

(13)  Figure 21 illustrates the order in which the value of a property is determined. Instance4 is an element in the system instance hierarchy.  The value of one of its properties is determined by first looking for a property associated with the instance itself – shown as step 1.  This is specified by a contained property association. The contained property association for this instance declared in a component implementation highest in the instance hierarchy determines that value.  If no instance value exists, the implementation (ImplA) of the instance is examined (step 2).  If it does not exist, ancestor implementations are examined (step 3).  If the property value still has not been determined, the component type is examined (step 4).  If not found there, its ancestor component types are examined (step 5).  If not found and the property is inherited, for subcomponents and features, the enclosing implementation is examined.  Otherwise, the containing component in the component instance hierarchy is examined (step 6).  Finally, the default value is considered.

(14)  Two property association operators are supported.  The property association operator => results in a new value for the property.  The property association operator +=> results in the addition of a value to a property value list.  In the case of nested lists, the value is added to the outermost list.

(15)  A property value list is evaluated by evaluating each of the property expressions, and appending the values in order.  If the property expression evaluates to a list, all the list elements are appended.  If the property expression evaluates to undefined, it is treated as an empty list. 

(16)  A property value declared by a property association with the reserved word constant cannot be changed.  For example, if a property association is defined as constant for a component type, then there cannot be a property association for the same property in any component implementation of the type, nor any subcomponent, nor contained property association that applies to a component of the component type.

(17)  If the property type is a record, a property association represents the assignment of a new record value. If a subset of record fields is assigned a value, the remaining fields have an undefined value and not inherited.

(18)  Component instance property associations with specified contained subcomponent identifier sequences allow separate property values to be associated with each component instance in the containment hierarchy. In particular, it permits separate property values such as actual processor binding property values or result values from an analysis method to be associated with each component in the system instance containment hierarchy.