(1) Subprogram parameter declarations represent data values that can be passed into and out of subprograms. Parameters are typed with a data classifier reference representing the data type.
Syntax
parameter_spec ::=
defining_parameter_identifier :
( in | out | in out ) parameter
[ data_unique_component_classifier_reference |
data_component_prototype_identifier ]
parameter_refinement ::=
defining_parameter_identifier : refined to
( in | out | in out ) parameter
[ data_unique_component_classifier_reference |
data_component_prototype_identifier ]
Naming Rules
(N1) The defining identifier of a parameter must be unique within the namespace of the subprogram type containing the parameter declaration.
(N2) The defining parameter identifier of a parameter refinement declaration must also appear in a feature declaration of a component type being extended and must refer to a parameter or an abstract feature.
(N3) The data classifier reference must refer to a data component type or a data component implementation.
(N4) The prototype identifier, if present, must exist in the namespace of the subprogram classifier that contains the parameter declaration.
Legality Rules
(L1) Parameters can be declared for subprogram component types.
(L2) A parameter declaration that does not specify a data classifier reference is incomplete. Such a reference can be added in a parameter refinement declaration.
(L3) A parameter declaration may be refined by adding a property association. Inclusion of the data classifier reference is optional.
(L4) The parameter direction of a parameter refinement must be the same as the direction of the feature being refined. If the feature being refined is an abstract feature without direction, then all parameter directions are acceptable.
Standard Properties
-- Properties specifying the source text representation of the parameter
Source_Name: aadlstring
Source_Text: inherit list of aadlstring
Semantics
(2) A subprogram parameter specifies the data that are passed into and out of a subprogram. The data type specified for the parameter and the data type of the actual data passed to a subprogram must be compatible according to the Classifier_Matching_Rule.
(3) An in out parameter declaration represents a parameter whose value is passed in and returned by value. Parameters passed by reference are modeled using requires data access.