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



Download 1.74 Mb.
Page51/62
Date28.01.2017
Size1.74 Mb.
#9041
1   ...   47   48   49   50   51   52   53   54   ...   62

18.12break Statements


  1. A break statement maps to an empty structured activity node with a control flow to an activity final node. The activity final node is placed in the outermost structured activity node mapped from the target statement of the break statement.

18.13return Statements


  1. A return statement is mapped to a structured activity node containing the mapping of the return expression connected by an object flow to an output pin of the structured activity node. This output pin is, in turn, connected by an object flow to an output activity parameter node for the return parameter of the enclosing behavior. The structured activity node is connected by a control flow to an activity final node placed directly at the top level within the activity enclosing the return statement.

18.14accept Statements


Simple accept Statements

  1. A simple accept statement maps to an accept event action (see fUML Specification, Subclause 7.5.4.2.1) with triggers for each of the named signals. If the accept statement defines a local name, then the result output pin of the accept event action is connected by an object flow to a fork node, which acts as the assigned source for the local name. Otherwise the accept event action has no result output pin.

Compound accept Statements

  1. A compound accept statement maps to a structured activity node containing an accept action with triggers for each of the signals mentioned in any of the clauses of the accept statement. The result output pin of the accept event action is connected by an object flow to a fork node, which is further connected to conditional logic that tests the type of the received signal.

  2. Each block in a compound accept statement is mapped as a block statement (see Subclause 18.3), with a control flow from the conditional logic mentioned above, corresponding to the appropriate type(s) of signals for that block. The fork node mentioned above acts as the source for the assigned value of the local name defined in the accept clause for the block, if any.

  3. For any name assigned within one or more blocks of the accept statement, a corresponding output pin is added to the structured activity node mapped from the accept statement. This output pin becomes the source for the assigned value for the name after the accept statement. The assigned source from each block assigning the name is connected by an object flow to the corresponding output pin. For each block that does not assign the name, a structured activity node is added to the mapping of the block as follows.

  • The structured activity node has one input pin and one output pin, with an object flow from the input pin to the output pin contained within the structured activity node.

  • There is an object flow from the assigned source of the name to the input pin of the structured activity node.

  • There is an object flow from the output pin of the structured activity node to the corresponding output pin for the name of the enclosing structured activity node for the accept statement.

18.15classify Statements


  1. A classify statement maps to a structured activity node containing a reclassify object action (see UML Superstructure. Subclause 11.3.9 and fUML Specification, Subclause 7.5.4.2.4) and the mapping of the target object expression, the result source element of which is connected by an object flow to the object input pin of the reclassify object action. The from classes for the classify statement are the old classifiers for the reclassify object action and the to classes are the new classifiers. If the classify statement is reclassify all, then the reclassify object action has isReplaceAll=true.

19Units Mapping


This clause defines the mapping of Alf units to UML. The abstract syntax for Alf statements is described in Clause 14.2.

19.1General


Unit Definition

  1. A unit definition maps to a specific kind of namespace according to the namespace definition for the unit definition, as given in the appropriate subsequent subclause. If a namespace declaration is given, the namespace mapped from the unit is an owned member of the declared namespace. If no namespace declaration is given, then the unit must be a model unit and what namespace owns it, if any, is not defined by the Alf specification.

  2. If the unit is a model unit, then it has empty visibility. Otherwise, the unit visibility is given by the stub declaration for it in the definition of its owning namespace.

Import Reference

  1. An element import reference maps to an element import from the namespace to the named imported element. The element import visibility is as given by the import visibility indicator. If there is an alias part, then the given unqualified name becomes the element import alias.

  2. A package import reference maps to a package import from the namespace to the named package. The package import visibility is as given by the import visibility indicator.

Stereotype Annotation

  1. A stereotype annotation, other than for the special cases given in Table 10 -7, maps formally to the application of the identified stereotype to the element mapped from the annotated member.. However, an implementation may also use such stereotypes to specify special implementation-specific semantics for the annotated element, except for the standard stereotypes «Create» and «Destroy», which are used in the standard Alf mapping for constructors and destructors and «ModelLibrary», which is used to suppress the inclusion of implicit imports.

19.2Namespace Definitions


  1. A namespace definition maps to a namespace and its owned members, as specified for each kind of namespace definition in the appropriate subsequent subclause.

  2. A visibility indicator maps to the visibility of the named element mapped from the definition containing the visibility indicator, with an empty visibility indicator mapping to a visibility kind of “package”.


Download 1.74 Mb.

Share with your friends:
1   ...   47   48   49   50   51   52   53   54   ...   62




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

    Main page