Ad/2010-08-01 Concrete Syntax for a uml action Language for Foundational uml (Alf) Second Revised Submission



Download 1.74 Mb.
Page39/62
Date28.01.2017
Size1.74 Mb.
#9041
1   ...   35   36   37   38   39   40   41   42   ...   62

13.2.13ConditionalTestExpression


An expression that uses the value of one operand expression to condition the evaluation of one of two other operand expressions.

Generalizations

Synthesized Properties

  • operand1 : Expression

The first operand expression, which provides the condition to be tested.



  • operand2 : Expression

The second operand expression, to be evaluated if the condition is true.



  • operand3 : Expression

The third operand expression, to be evaluated if the condition is false.

Derived Properties

None
Constraints

[1] conditionalTestExpressionAssignmentsAfter

If a name is unassigned after the first operand expression and has an assigned source after one of the other operand expression, then it must have an assigned source after both of those expressions.


[2] conditionalTestExpressionAssignmentsBefore

The assignments before the first operand expression of a conditional-test expression are the same as those before the conditional-test expression. The assignments before the second and third operand expressions are the same as those after the first operand expression.

[3] conditionalTestExpressionCondition

The first operand expression of a conditional-test expression must be of type Boolean and have a multiplicity upper bound of 1.

[4] conditionalTestExpressionLowerDerivation

The multiplicity lower bound of a conditional-test operator expression is the minimum of the multiplicity lower bounds of its second and third operand expressions.

[5] conditionalTestExpressionTypeDerivation

The type of a conditional-test operator expression is the effective common ancestor (if one exists) of the types of its second and third operand expressions.

[6] conditionalTestExpressionUpperDerivation

The multiplicity upper bound of a conditional-test operator expression is the maximum of the multiplicity upper bounds of its second and third operand expressions.


Helper Operations

[1] updateAssignments ( ) : AssignedSource [*]

Returns unchanged all assignments for local names that are not reassigned in either the second or third operand expressions. Any local names that have different assignments after the second and third operand expressions are adjusted to have the conditional-test expression as their assigned source.


13.2.14EqualityExpression


A binary expression that tests the equality of its operands.

Generalizations

  • BinaryExpression

Synthesized Properties

None
Derived Properties



Whether the test is for being not equal.

Constraints

[1] equalityExpressionIsNegatedDerivation

An equality expression is negated if its operator is "!=".

[2] equalityExpressionLowerDerivation

An equality expression has a multiplicity lower bound of 1.

[3] equalityExpressionTypeDerivation

An equality expression has type Boolean.

[4] equalityExpressionUpperDerivation

An equality expression has a multiplicity upper bound of 1.


Helper Operations

None

13.2.15Expression


A model of the common properties derived for any Alf expression.

NOTE: The derivations for all properties of Expression except AssignmentsAfter are specific to its various subclasses.



Generalizations

  • SyntaxElement

Synthesized Properties

None
Derived Properties



  • assignmentAfter : AssignedSource [*]

The assigned sources for local names available lexically after this expression. This includes not only any assignments made within the expression, but also any assignments that are unchanged from before the expression.



  • assignmentBefore : AssignedSource [*]

The assigned sources for local names available lexically before this expression.



  • lower : Integer

The statically determined lower bound of the multiplicity of this expression.



  • type : ElementReference [0..1]

A reference to the element that specifies the statically determined type for this expression (if any).



  • upper : UnlimitedNatural

The statically determined upper bound of the multiplicity of this expression.

Constraints

[1] expressionAssignmentsAfterDerivation

The assignments after an expression are given by the result of the updateAssignments helper operation.

[2] expressionUniqueAssignments

No name may be assigned more than once before or after an expression.

Helper Operations

[1] updateAssignments ( ) : AssignedSource [*]

Returns the assignments from before this expression updated for any assignments made in the expression. By default, this is the same set as the assignments before the expression. This operation is redefined only in subclasses of Expression for kinds of expressions that make assignments.


13.2.16ExtentOrExpression


The target of a sequence operation, reduction or expansion expression, which may be either a primary expression or a class name denoting the class extent.

Generalizations

None


Synthesized Properties

  • name : QualifiedName [0..1]

If the target is a qualified name, then that name, before it is disambiguated into either a name expression or a class name.



  • nonNameExpression : Expression [0..1]

The target primary expression, if it is not a qualified name.

Derived Properties

  • expression : Expression

The effective expression for the target.

Constraints

[1] extentOrExpressionExpressionDerivation

The effective expression for the target is the parsed primary expression, if the target is not a qualified name, a name expression, if the target is a qualified name other than a class name, or a class extent expression, if the target is the qualified name of a class.


Helper Operations

None



Download 1.74 Mb.

Share with your friends:
1   ...   35   36   37   38   39   40   41   42   ...   62




The database is protected by copyright ©ininet.org 2024
send message

    Main page