13.2.8CastExpression
An expression used to filter values by type.
Generalizations
Synthesized Properties
The operand expression of the cast expression.
-
typeName : QualifiedName [0..1]
The named type of the cast expression (if any)
Derived Properties
None
Constraints
[1] castExpressionAssignmentsBefore
The assignments before the operand of a cast expression are the same as those before the cast expression.
[2] castExpressionLowerDerivation
A cast expression has a multiplicity lower bound of 0.
[3] castExpressionTypeDerivation
The type of a cast expression is the referent of the given type name (if there is one).
[4] castExpressionTypeResolution
If the cast expression has a type name, then it must resolve to a classifier.
[5] castExpressionUpperDerivation
A cast expression has a multiplicity upper bound that is the same as the upper bound of its operand expression.
Helper Operations
[1] updateAssignments ( ) : AssignedSource [*]
The assignments after a cast expression are the same as those after its operand expression.
13.2.9ClassExtentExpression
An expression used to obtain the objects in the extent of a class.
Generalizations
Synthesized Properties
-
className : QualifiedName
The name of the class whose extent is to be obtained.
Derived Properties
None
Constraints
[1] classExtentExpressionExtentType
The given type name must resolve to a non-template class.
[2] classExtentExpressionLowerDerivation
The multiplicity lower bound of a class extent expression is 0.
[3] classExtentExpressionTypeDerivation
The type of a class extent expression is the given class.
[4] classExtentExpressionUpperDerivation
The multiplicity upper bound of a class expression is *.
Helper Operations
None
13.2.10ClassificationExpression
An expression used to test the dynamic type of its operand.
Generalizations
Synthesized Properties
The name of the type that the operand is to be tested against.
Derived Properties
Whether the test is for the operand to have the given type directly or to only conform to the given type.
-
referent : ElementReference
Whether the test is for the operand to have the given type directly or to only conform to the given type.
Constraints
[1] classificationExpressionIsDirectDerivation
A classification expression is direct if its operator is "hastype".
[2] classificationExpressionLowerDerivation
A classification expression has a multiplicity lower bound that is the same as the lower bound of its operand expression.
[3] classificationExpressionOperand
The operand expression of a classification expression must have a multiplicity upper bound of 1.
[4] classificationExpressionReferentDerivation
The referent of a classification expression is the classifier to which the type name resolves.
[5] classificationExpressionTypeDerivation
A classification expression has type Boolean.
[6] classificationExpressionTypeName
The type name in a classification expression must resolve to a classifier.
[7] classificationExpressionUpperDerivation
A classification expression has a multiplicity upper bound of 1.
Helper Operations
None
13.2.11CollectOrIterateExpression
A sequence expansion expression with a collect or iterate operation.
Generalizations
-
SequenceExpansionExpression
Synthesized Properties
None
Derived Properties
None
Constraints
[1] collectOrIterateExpressionLowerDerivation
A collect or iterate expression has a multiplicity lower bound that is the product of the bounds of its primary and argument expressions.
[2] collectOrIterateExpressionTypeDerivation
A collect or iterate expression has the same type as its argument expression.
[3] collectOrIterateExpressionUpperDerivation
A collect or iterate expression has a multiplicity upper bound that is the product of the bounds of its primary and argument expressions.
Helper Operations
None
13.2.12ConditionalLogicalExpression
A binary expression with a conditional logical expression, for which the evaluation of the second operand expression is conditioned on the result of evaluating the first operand expression.
Generalizations
Synthesized Properties
None
Derived Properties
None
Constraints
[1] conditionalLogicalExpressionLower
A conditional logical expression has a multiplicity lower bound of 0 if the lower bound if either operand expression is 0 and 1 otherwise.
[2] conditionalLogicalExpressionOperands
The operands of a conditional logical expression must have type Boolean.
[3] conditionalLogicalExpressionTypeDerivation
A conditional logical expression has type Boolean.
[4] conditionalLogicalExpressionUpper
A conditional logical expression has a multiplicity upper bound of 1.
Helper Operations
[1] updateAssignments ( ) : AssignedSource [*]
If a name has the same assigned source after the second operand expression as before it, then that is its assigned source after the conditional logical expression. If a name is unassigned before the second operand expression, then it is considered unassigned after the conditional logical expression, even if it has an assigned source after the second operand expression. Otherwise its assigned source after the conditional logical expression is the conditional logical expression itself.
[2] validateAssignments ( ) : Boolean
The assignments before the first operand expression of a conditional logical expression are the same as those before the conditional logical expression. The assignments before the second operand expression are the same as those after the first operand expression.
Share with your friends: |