(1) A property expression represents the value that is associated with a property through a property association. The type of the property expression must match the property type declared for the property.
Syntax
property_expression ::=
boolean_term
| real_term
| integer_term
| string_term
| enumeration_term
| unit_term
| real_range_term
| integer_range_term
| property_term
| component_classifier_term
| reference_term
| record_term
| computed_term
boolean_term ::=
boolean_value
| boolean_property_constant_term
boolean_value ::= true | false
real_term ::=
signed_aadlreal_or_constant
integer_term ::=
signed_aadlinteger_or_constant
string_term ::= string_literal | string_property_constant_term
enumeration_term ::=
enumeration_identifier | enumeration_property_constant_term
unit_term ::=
unit_identifier | unit_property_constant_term
integer_range_term ::=
integer_term .. integer_term [ delta integer_term ]
| integer_range_property_constant_term
real_range_term ::=
real_term .. real_term [ delta real_term ]
| real_range_property_constant_term
property_term ::=
[ property_set_identifier :: ] property_name_identifier
property_constant_term ::=
[ property_set_identifier :: ] property_constant_identifier
component_classifier_term ::=
classifier (
( unique_component_type_reference |
unique_component_implementation_reference ) )
reference_term ::=
reference ( contained_model_element_path )
record_term ::=
[ record_field_identifier => property_value ;
{ record_field_identifier => property_value; }* ]
computed_term ::=
compute ( function_identifier )
Naming Rules
(N1) The component type identifier or component implementation name of a subcomponent classifier reference must appear namespace of the specified package.
(N2) The enumeration identifier of a property expression must have been declared in the enumeration list of the property type that is associated with the property.
(N3) For reference terms the naming rules (N5) .. (N11) in Section 11.3 are applicable in order to resolve contained model element paths.
(N4) If a classifier property is associated with a core AADL model element, then the classifier meta model identifier of a classifier term can only refer to a core AADL meta model class.
(N5) If a classifier property is associated with an AADL annex model element, then the classifier meta model identifier of a classifier term can refer to a core AADL meta model class or an annex meta model class of the same annex.
(N6) If a reference property is associated with a core AADL model element, then the contained model element path of a reference term can only refer to a core AADL model element. The first identifier in the path must be defined in the namespace of the directly enclosing component that contains the property association.
(N7) If a reference property is associated with an AADL annex model element, then the contained model element path of a reference term can refer to a core AADL model element or an annex model element of the same annex.
(N8) The field identifier of a record expression must exist in the local namespace of the record type.
(N9) The function identifier of a compute expression must exist as function in the source text.
Legality Rules
(L1) If the base type of a property number type or range type is integer, then the numeric literals must be integers.
(L2) The type of a property named in a property term must be identical to the type of the property name in the property association.
(L3) The type of a property constant named in a property constant term must match the type of the property name in the property association.
(L4) Property references in property_term or property_constant_term of property expressions must be applicable to the model element to which the property association applies.
(L5) Property references in property_term or property_constant_term of property expressions cannot be circular. If a property has a property expression that refers to a property or property constant, then that expression evaluation cannot directly or indirectly depend on the value of the original property or property constant.
(L6) If the contained model element path of a reference term includes a subcomponent array identifier that does not identify a single element in the array, then the expression results in a list of references.
Semantics
(2) Every property expression can be evaluated to produce a value, a range of values, or a reference. It can be statically determined whether this value satisfies the property type designator of the property name in the property association. The value of the property association may evaluate undefined, if no property association or default value has been declared.
(3) Boolean terms are of property type aadlboolean. The reserved words true and false evaluate to the Boolean values true and false.
(4) Number terms evaluate to a numeric value denoted by the numeric literal, or evaluate to a pair consisting of a numeric value and the specified units identifier. A number term satisfies an aadlinteger property type if the numeric value is a numeric literal without decimal point or exponent. Otherwise, it satisfies the aadlreal property type. If specified, the units identifier must be one of the unit identifiers in the unit designator of the property type. Furthermore, the value must fall within the optionally specified range of the property type – taking into account unit conversion as necessary.
(5) Enumeration terms evaluate to enumeration identifiers. The enumeration property type of the property name is satisfied if the enumeration identifier is declared in the enumeration list of the property type.
(6) Range terms are of range property type and are represented by number terms for lower and upper range bounds plus and an optional delta value. Range terms evaluate to two or three numeric values that and each must satisfy the number type declared as part of the range property type. The delta value represents the maximum difference between two values, e.g., between two values of a data stream coming through a data port.
(7) String terms are of aadlstring property type. A string literal evaluates to the string of characters denoted by that literal.
(8) Property terms evaluate to the value of the referenced property. This allows one property value to be expressed in terms of another. The value of the referenced property is determined in the context of the element for which the property value is being determined. For example, the Deadline property has the property term Period as its default property expression. If this default value is not overwritten by another property association, the value of Deadline of a thread subcomponent is determined by evaluating the property term in the context of the thread subcomponent, i.e., the Deadline value is determined by the Period value for the thread subcomponent rather than the context of the default value declaration. The value of the referenced property may be undefined, in which case the property term evaluates to undefined.
(9) Property constant terms evaluate to the value of the referenced property constant. This allows one property value to be expressed symbolically in terms of a constant identifier rather than the actual value.
(10) Component classifier terms are of the property type classifier. They evaluate to a classifier reference.
(11) Reference terms are of reference property type and evaluate to a reference. This reference may be a reference to a model element in the model containment hierarchy, e.g., to a contained component, to a connection, mode, feature, or an annex model element.
(12) Record terms evaluate to a record value, which consists of a separate value for each named field in the record expression. Any record field defined in a record type, for which there is no value in the record expression, the field value is determined by the default value; otherwise it is considered not present.
(13) Computed terms allow a user-defined function to be called to calculate a property value. This function is called every time the value of the property is accessed. This function may access other properties of the same and other model elements to calculate its value and it is assumed to complete its computation in finite time. A typical use of this function is to calculate the value of a property based on the value of a property of its subcomponents. It takes the property association and the model element it is associated with as parameters. The function is expected to be without side effects and to return a value that is consistent with the type of the property. The function being called is assumed to exist in a library that is supplied to methods of processing.
NOTES:
Expressions of the property type reference or classifier are provided to support the ability to refer to classifiers and model elements in the model. For example, they are used to specify bindings of application components to execution platform components.
Processing Requirements and Permissions
(14) A method of processing specifications may define additional rules to determine if an expression value is legal for a property, beyond the restrictions imposed by the declared property type. The declared property type represents a minimum set of restrictions that must be enforced for every use of a property.
(15) If an associated expression or default value is not specified for a property, a method of processing specifications is permitted to reject that specification as erroneous. A method of processing specifications is permitted to construct a default expression, providing that default is made known to the developers. This decision may be made on a per property basis. If a property value is not required for a specific development activity, then the method of processing associated with this activity must accept a specification in which that property has no associated value.
(16) A method of processing specifications may impose additional restrictions on the use of property expressions whose value depends on the current mode of operation, or on bindings. For example, mode-dependent values may be allowed for some properties but disallowed for others. Mode-dependent property expressions may be disallowed entirely.
(17) A method of processing specifications may access and change field values of a record property value programmatically.
(18) A method of processing specifications may impose restrictions on the use of computed values in order to allow the computed value function to compute the value once and store the result as a cached value. For example, it may assume that the values of properties used in the computation have been declared through property associations. In that case the computed property value is not changed programmatically by a method of processing and can be determined at model instantiation time.
Examples
-- This is an AADL fragment inside a package
thread Producer
end Producer;
thread implementation Producer.Basic
properties
Compute_Execution_Time => 0ms..10ms in binding ( powerpc.speed_350Mhz );
Compute_Execution_Time => 0ms..8ms in binding ( powerpc.speed_450MHz );
end Producer.Basic ;
process Collect_Samples
end Collect_Samples;
system Software
end Software;
system implementation Software.Basic
subcomponents
Sampler_A : process Collect_Samples;
Sampler_B : process Collect_Samples
{
-- A property with a list of values
Source_Text => ( “collect_samples.ads”, “collect_samples.adb” ) ;
Period => 50 ms;
} ;
end Software.Basic;
device car
properties
mine::Car_Length => 3.25 meter;
mine::Position => ( x => 3; y => 4;);
mine::Car_Name => ( US => “Rabbit”; Germany => “Golf”; );
end car;
system Hardware
end Hardware;
system implementation Hardware.Basic
subcomponents
Host_A: processor;
Host_B: processor;
end Hardware.Basic ;
system Total_System
end Total_System;
system implementation Total_System.SW_HW
subcomponents
SW : system Software.Basic;
HW : system Hardware.Basic;
properties
-- examples of contained property associations
-- in a subcomponent of SW we are setting the binding to a
-- component contained in HW
Allowed_Processor_Binding => ( reference ( HW.Host_A ) )
applies to SW.Sampler_A;
Allowed_Processor_Binding => ( reference ( HW.Host_B ) )
applies to SW.Sampler_B;
end Total_System.SW_HW;