6.5.1 Proposals shall define a concrete textual syntax for the action language, so that modelers can use text in executable UML models.
|
See Clauses 8 to 10, where the syntax for Alf is defined in detail.
|
6.5.2 Proposals shall define a computationally complete language.
|
Alf provides a computationally complete textual notation at all conformance levels.
|
6.5.3 Proposals shall reuse existing OMG language specifications where possible, so that consistency is maintained within OMG standards.
|
Alf is based semantically on UML 2 and the fUML specification. It adopts a number of notations based on the OMG OCL language specification for manipulating flows of sequences of values (see Subclauses 8.3.17 to 8.3.23).
|
6.5.4 Proposals shall provide a mapping from statements in the concrete syntax to the foundational subset of actions in the Executable UML Foundation, so that the concrete syntax has a defined semantics within UML. It is not necessary to employ every construct in Foundational UML.
|
See Part IV, where all syntax for Alf is mapped to fUML. See Clause 6 for a list of the few cases of fUML constructs that are not completely covered in Alf.
|
6.5.5 Proposals shall provide mechanisms for input/output that map to the corresponding input/output constructs specified in the Executable UML Foundation, so that modelers can at least write “Hello world.”
|
Alf presumes the use of an implementation of the fUML Foundational Model Library BasicInputOutput package for basic input and output.
|
6.5.6 Proposals shall provide mechanisms for interfacing to user-specified input/output packages, so that modelers may provide their own input/output packages.
|
Such packages must be provided with a UML model defining their interfaces. Such an interface defines behavioral features that may be invoked using Alf (see Subclause 8.3.7).
|
6.5.7 Proposals shall include standard arithmetic and logical capabilities (directly through the syntax or by a combination of syntax and libraries), so that modelers may do arithmetic and perform tests. These capabilities must cover at least those defined in Subclause 9.2 of the Executable UML Foundation.
|
Alf presumes the availability of an implementation of all the primitive behaviors defined in Subclause 9.2 of the fUML Specification. Special operator syntax is also provided to allow the usual prefix/infix notation for standard arithmetic and logical operations (see Clause 8).
|
6.5.8 Proposals shall include mechanisms to invoke user-specified operations, so that modelers may call new or legacy code.
|
Alf provides an @external annotation that an implementation can allow on operations to indicate they are implemented using legacy code (see Subclause 10.1). How the implementation is actually attached to the UML model is tool specific, however.
|
6.5.9 Proposals shall include a notation for comments, so that modelers may communicate models to others.
|
Alf allows both typical lexical comments, which are not parsed or mapped to fUML (see Subclause 7.4.1), and model documentation, which are parsed and mapped to UML comment elements in the target model (see Subclause 7.4.2 and syntactic references in subsequent clauses).
|
6.5.10 The language shall have a mechanism for transferring control to non-UML “programs,” whether hardware or software, so that models may interact with non-UML code and hardware.
|
A non-UML “program” may be provided with a UML model defining its interface (typically as a class or package). Alf provides an @external annotation that an implementation can allow on a class or package from the interface model to indicate that it is to be implemented by the non-UML program (see Subclause 10.1). However, the Alf standard does not otherwise specify how the UML model is actually associated with the non-UML program.
|
6.5.11 The language shall allow inline embedding of target programming code, so that modelers may shoot themselves in the foot.
|
See Subclause 9.3.
|
6.5.12 The language shall define a label so that modelers not fully committed to an action language may embed action language fragments in OpaqueExpressions.
|
The language label for Alf is “Alf”.
|