Protocol
ATLExpression
Protocol for ATL expressions that can be evaluated within transformation contexts.
protocol ATLExpression : Hashable, Sendable
Overview
ATL expressions form the computational foundation of the Atlas Transformation Language, providing a rich expression system built upon OCL (Object Constraint Language) with extensions for model transformation. Expressions are evaluated within execution contexts that provide access to source and target models, variables, and helper functions.
Overview
ATL expressions support multiple evaluation paradigms:
-
Navigation expressions: Property access and reference traversal
-
Operation calls: Method invocation on objects and collections
-
Helper invocations: Custom function calls defined in ATL modules
-
Literal values: Constants and primitive data
-
Collection operations: OCL-style collection manipulation
-
Conditional logic: If-then-else expressions for branching
Implementation Notes
All expressions conform to Sendable to enable safe concurrent evaluation within the ATL virtual machine’s actor-based architecture. Expression evaluation is asynchronous to support complex model traversals and transformation operations.
Example Usage
let navigationExpr = ATLNavigationExpression(
source: ATLVariableExpression(name: "self"),
property: "firstName"
)
let result = try await navigationExpr.evaluate(in: executionContext)
Topics
Instance Methods
Evaluates the expression within the specified execution context.
Convert this ATL expression to an ECore expression.
Relationships
Inherits From
Conforming Types
- ATLBinaryExpression
- ATLCollectionExpression
- ATLCollectionLiteralExpression
- ATLConditionalExpression
- ATLExpressionNever
- ATLHelperCallExpression
- ATLIterateExpression
- ATLLambdaExpression
- ATLLetExpression
- ATLLiteralExpression
- ATLMethodCallExpression
- ATLNavigationExpression
- ATLOperationExpression
- ATLTupleExpression
- ATLTypeLiteralExpression
- ATLUnaryExpression
- ATLVariableExpression
See Also
Expressions
Represents property navigation expressions in ATL.
Represents an ATL collection operation expression.
Represents literal value expressions in ATL.