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



Download 1.74 Mb.
Page45/62
Date28.01.2017
Size1.74 Mb.
#9041
1   ...   41   42   43   44   45   46   47   48   ...   62

17.10Feature Invocation Expressions


  1. A feature invocation expression is mapped as either a single instance feature invocation or a sequence feature invocation. For each kind of invocation, the result source element of the mapping of the feature expression is connected by an object flow to the appropriate target activity node.

  2. A single instance feature invocation is mapped as either a non-destructor operation call, an explicit destructor call, an implicit destructor call or a signal send.

  3. A sequence feature invocation is mapped as an expansion region similarly to a collect expression.

Operation Call

  1. An operation call (that is not a destructor call) maps to a call operation action for the named operation. The result source element mapped from the primary expression of the feature invocation expression is connected by an object flow to the target input pin of the call operation action.

  2. The call operation action has argument and result input and output pins corresponding to the parameters of the operation. These pins are connected to the appropriate mapping of argument and result expressions from the tuple (see Subclause 17.8). If the operation has a return parameter, then the output pin of the call operation action corresponding to that parameter is the result source element for the feature invocation action. Otherwise it has no result source element.

Destructor Call

  1. If an operation call is a destructor call, and the feature invocation expression is not itself within the method of a destructor, then the call operation action is followed by a destroy object action for the target object with isDestroyOwnedObjects=true and isDestroyLinks=true. If the feature invocation is within the method of a destructor, the destroy object action is conditioned on a test that the target object is not the context object.

NOTE. Object destruction is always done with isDestroyOwnedObjects=true and isDestroyLinks=true, because this is the expected high-level behavior for object destruction.

  1. If operationcall is an implicit object destruction expression, then it is mapped to just a destroy object action, as above, without any operation call.

Signal Send

  1. A signal send maps to a send signal action for the named signal. The result source element mapped from the target expression of the feature invocation expression is connected by an object flow to the target input pin of the send signal action.

The send signal action has argument input pins corresponding to the attributes of the signal. Each argument input pin of the send signal action is the target of an object flow whose source is the result source element of the argument expression (if there is one) mapped from the tuple (see Subclause 17.8) for the corresponding signal attribute.

A signal send has no result source element.


17.11Super Invocation Expressions


Once the target operation a super invocation expression is determined, the expression is mapped as a behavior invocation to the method of that operation (see Subclause 17.9).

17.12Instance Creation Expressions


  1. An instance creation expression maps as an object creation expression or a data value creation expression.

Object Creation Expression

  1. An object creation expression maps as either a constructed object creation or a constructorless object creation. If the class of the object being created is an active class, then the mapping also includes the starting of the behavior of that object.

  2. If the object creation expression is not constructorless, then the expression maps to a create object action for the class of the constructor operation. The result of the create object action is used as the target instance for an invocation of the constructor, mapped as for a feature invocation expression (see Subclause 17.10). The result source element of the object creation expression is the result output pin of the call operation action for the constructor operation.

  3. If the object creation expression is constructorless, then the expression maps to a create object action for the identified class. If none of the attributes owned or inherited by the class have default values, then the result source element of the expression is the result output pin of the create object action. Otherwise, the result output pin of the create object action is connected by an object flow to a control-flow sequenced set of structured activity nodes containing write structural feature actions for setting the default values of any attributes of the newly create object that have them.

NOTE. It is possible to notate in Alf a constructorless instance creation for any class. However, default values for attributes are value specifications (see UML Superstructure, Subclause 7.3.44), and the only kind of value specifications supported in fUML are literal specifications and instance values, not general expressions (see fUML Specification, Subclause 7.2.2.1). The mapping given here will support any kind of value specification as a default value, but the result will not conform to the fUML subset if the value specifications are outside that subset.

  1. If the class of the object being created is an active class, then a fork node is added to the mapping with an object flow from the original result source element, and that fork node becomes the new result source element. The fork node is connected by an object node to the object input pin of a start object behavior action. In this case, the entire mapping is always placed within a structured activity node.

NOTE. Classifier behaviors with parameters are not supported by Alf, nor is the asynchronous starting of an instance of an activity with parameters. However, it is possible to notate the instantiation of an activity as a class as long as the class has no parameters, in which case the activity will, in fact, begin asynchronous execution.

Data Value Creation Expression

  1. A data value creation expression maps to a value specification action with an instance value for the named data type. If the tuple for the expression is non-empty, then the value specification action is the target of a control flow whose source is the structured activity node mapped from the tuple (see Subclause 17.8). Further, the result of the value specification action is fed through a sequence of write structural feature actions with values coming from the result source elements for the argument expressions.

If the data value creation expression has an empty tuple, then the result source element is the result pin of the value specification action. Otherwise, the result source element is the result of the sequence of write structural feature actions.


Download 1.74 Mb.

Share with your friends:
1   ...   41   42   43   44   45   46   47   48   ...   62




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

    Main page