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.
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.
A sequence feature invocation is mapped as an expansion region similarly to a collect expression.
Operation Call
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.
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
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.
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
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).
An instance creation expression maps as an object creation expression or a data value creation expression.
Object Creation Expression
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.
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.
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.
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
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.