IBM Support

Differences between Rhapsody Action Language and Action Language for Foundational UML (Alf)

Question & Answer


Question

What are the differences between Rhapsody Action Language and Action Language for Foundational UML (Alf)?

Cause

There are some syntactic and semantic differences between Alf and Rhapsody Action Language.

Answer

Differences between Alf and Rhapsody Action Language (based on standard "Action Language for

Foundation UML (Alf)" version 1.0.1 - Beta).

The following Alf constructs of minimum conformance level are not supported by

Rhapsody Action Language:

    • unrestricted names (7.5)
    • '_' between digits in natural literals (7.7.2)
    • '::' as a separator in qualified name (8.2)
    • type 'any' (8.2)
    • sequence property access (8.3.6)
    • association read (8.3.9)
    • sequence feature invocation (8.3.10)
    • implicit or explicit object destruction expression (8.3.10)
    • super invocation expression (8.3.11)
    • link operation expressions (8.3.13)
    • class extent expression (8.3.14)
    • sequence construction expression (8.3.15)
    • sequence access expression (8.3.16)
    • cast expression (8.5.5)
    • shift expression (8.6.3)
    • classification expression (8.6.5)
    • conditional-test expression (8.7)
    • compound assignment (8.8)
    • annotated statements (9.2)
    • the local name declaration statement form in which the local name being defined precedes the type name (9.6)
    • the multiplicity indicator in local name declaration statement (9.6)
    • switch statement (9.9)
    • while statement (9.10)
    • do statement (9.11)
    • a 'for' loop variable definition of the form var in expr1 .. expr2 (9.12)
Semantic differences between Alf and Rhapsody Action Language:
    • In Rhapsody Action Language, logical expressions ('^', '|', '&') cannot be used with Boolean operands
    • In Rhapsody Action Language, 'null' represents a "null" value and not an untyped empty sequence
    • Rhapsody Action Language provides hierarchical scoping of local names defined in nested blocks. Variables defined within a block are not visible outside the block. Hence, it is always permissible to define local variables inside if-statements.
    • In Rhapsody Action Language, a first assignment cannot be used to implicitly define a new local name.
    • In Alf, a statement contained in a for-statement must be a block. In Rhapsody Action Language, a single statement can be used.
    • In Alf, a statement contained in an if-statement must be a block. In Rhapsody Action Language, a single statement can be used
    • Alf uses indexes that start from 1 in Sequence Access Expression, while Rhapsody Action Language uses indexes that start from 0.

    The following types supported in Alf are not supported in Rhapsody Action Language:
    • UnlimitedNatural
    • Natural
    • BitString

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"8.0.4","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21646895