![]() ![]() |
||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
A
property expression represents the value that is associated with a property through a property
association. The type of the value resulting from the evaluation of the property expression must
match the property type declared for the property name.
Syntax
property_expression
::=
boolean_term
| real_term
| integer_term
| string_term
| enumeration_term
| real_range_term
| integer_range_term
| property_term
| component_classifier_term
| reference_term
boolean_term
::=
boolean_value
| boolean_property_constant_term
| not boolean_term
| boolean_term and boolean_term
| boolean_term or boolean_term
| ( boolean_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
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
::=
value
( [ property_set_identifier :: ] property_name_identifier )
property_constant_term
::=
value
( [ property_set_identifier :: ]
property_constant_identifier )
component_classifier_term
::=
component_category
[ unique_component_type_identifier
[ . component_implementation_identifier ] ]
reference_term
::=
reference
subcomponent_identifier
{ .subcomponent_identifier }*
|
{ subcomponent_identifier. }+connection_identifier
|
{ subcomponent_identifier . }+server_subprogram_identifier
NOTES:
Boolean operators have the following decreasing precedence order: (), not, and, or.
Naming
Rules
The
component type identifier or component implementation name of a subcomponent classifier
reference must appear in the anonymous namespace or in the namespace of the specified
package.
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.
Legality
Rules
If
the base type of a property number type or range type is integer, then the numeric literals must
be integers.
The
type of a property named in a property term must match the type of the property name in the
property association.
The
type of a property constant named in a property constant term must match the type of the
property name in the property association.
Property
name references in property expressions cannot be circular. If a property has a property
expression that refers to a property name, then that property’s expression evaluation cannot
directly or indirectly depend on the value of the original property.
Semantics
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.
Boolean
terms are of property type aadlboolean. The reserved words true and false
evaluate to
the Boolean values true and false. The operator not logically negates the value of a Boolean
term. Expressions containing the operators or and andare of type Boolean. They evaluate
to the
logical disjunction and conjunction of the values of their subexpressions. Boolean operators have
the following decreasing precedence order: (), not, and, or. Because Boolean
expressions can
contain property terms that reference the values of other properties, and a referenced property
value could be undefined, the Boolean operators are defined to operate over the three values true,
false, and undefined.
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
aadlintegerproperty 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.
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.
Range
terms are of rangeproperty 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. Properties with range
terms as values typically represent range and increment constraints on data streams
communicated through ports.
String
terms are of aadlstring property type. A string literal evaluates to the string of
characters
denoted by that literal.
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
Deadlineproperty has
the property term value(Period) as its default property expression. If
this default value is not overwritten by another property association, the value of Deadlineof 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 thePeriod 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.
Property
constant termsevaluate 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.
Component
classifier terms are of the property type component classifier. They evaluate to a
component category and an optional component classifier reference.
Reference
terms are of reference property type and evaluate to a reference. This reference may
be a reference to a component in the component containment hierarchy or to a connection or
server subprogram contained in a component.
The
entire reference evaluates to the component, connection, or server subprogram feature
identified by the last identifier in that name. In other words, the sequence of identifiers specifies
a
path down the containment hierarchy starting with the component in the context of which the
property association is declared.
NOTES:
Expressions of the property type referenceor classifier are provided
to support the description of
binding constraints and of binding-specific property expressions.
Processing
Requirements and Permissions
A
method of processing specifications may define additional rules to determine if an expression
value is legal for a property name, 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 name.
If
an associated expression or default value is not specified for a property name, 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 may accept a specification in which that property has no associated value.
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.
Examples
threadProducer
endProducer;
threadimplementation
Producer.Basic
properties
Compute_Execution_Time => 0ms..10ms in binding (
powerpc.speed_350Mhz );
Compute_Execution_Time => 0ms..8ms in binding (
powerpc.speed_450MHz );
endProducer.Basic ;
processCollect_Samples
endCollect_Samples;
systemSoftware
endSoftware;
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;
} ;
endSoftware.Basic;
systemHardware
endHardware;
system
implementation Hardware.Basic
subcomponents
Host_A: processor;
Host_B: processor;
endHardware.Basic
;
systemTotal_System
endTotal_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 => referenceHW.Host_A
applies to SW.Sampler_A;
Allowed_Processor_Binding => referenceHW.Host_B
applies to SW.Sampler_A;
endTotal_System.SW_HW;
|
||||||||||||||||||||||||||||||||||||||||||||