Documentation Language: Swift

Framework

ATL

A pure Swift implementation of the https://eclipse.dev/atl/ for model-to-model transformations.

Overview

ATL provides a declarative approach to model transformation, allowing you to specify how elements in a source model should be transformed into elements in a target model. The transformation rules are pattern-matched against the source model, and corresponding target elements are created automatically.

This implementation follows the https://eclipse.dev/atl/documentation/ and is related to the https://www.omg.org/spec/QVT/ standard, whilst providing a modern Swift API for integration with the ECore metamodelling framework.

Key Features

Quick Example

import ATL
import ECore

// Parse the transformation
let parser = ATLParser()
let module = try await parser.parse(URL(fileURLWithPath: "Class2Table.atl"))

// Create and configure the virtual machine
let vm = ATLVirtualMachine(module: module)
try await vm.registerSourceMetamodel(umlMetamodel, as: "UML")
try await vm.registerTargetMetamodel(dbMetamodel, as: "DB")
try await vm.registerSourceModel(classModel, as: "IN")

// Execute and get results
let result = try await vm.execute()
let tableModel = result.targetModels["OUT"]

Topics

Essentials

A
Getting Started with ATL

Learn how to add ATL to your project and create your first model transformation.

A
Understanding ATL

Learn the fundamental concepts of the Atlas Transformation Language.

Transformation Execution

C
ATLVirtualMachine

Actor responsible for executing ATL transformations.

C
ATLExecutionContext

Execution context for ATL transformations, coordinating between ATL constructs and the ECore execution framework.

S
ATLExecutionStatistics

Statistics tracking ATL transformation execution performance and behaviour. Comprehensive execution statistics for ATL transformation monitoring.

Modules and Rules

S
ATLModule

Represents an ATL (Atlas Transformation Language) module.

S
ATLMatchedRule

Represents an ATL matched rule for declarative transformation.

S
ATLCalledRule

Represents an ATL called rule for imperative transformation.

S
ATLHelper

Represents an ATL helper function.

Expressions

P
ATLExpression

Protocol for ATL expressions that can be evaluated within transformation contexts.

S
ATLNavigationExpression

Represents property navigation expressions in ATL.

S
ATLCollectionExpression

Represents an ATL collection operation expression.

S
ATLLiteralExpression

Represents literal value expressions in ATL.

Parsing

?
ATLParser

Parser for ATL (Atlas Transformation Language) files

Model Adapters

S
ATLSourceModel

Adapter for ATL source models to conform to ECore IModel interface.

S
ATLTargetModel

Adapter for ATL target models to conform to ECore IModel interface.

S
ATLModelAdapterFactory

Factory for creating model adapters from ATL execution context.

Errors

E
ATLExecutionError

Errors that can occur during ATL expression evaluation.

E
ATLParseError

Errors that can occur during ATL parsing

Classes

C
ATLResource

A resource for managing ATL modules with XMI serialization support.

Protocols

P
ATLHelperType

Protocol for type-erased ATL helper storage.

P
ATLRuleType

Protocol for ATL rule types (matched and called rules).

P
ATLStatement

Protocol for imperative statements in ATL called rules.

Structures

S
ATLBinaryExpression

Represents binary operation expressions in ATL.

S
ATLCollectionLiteralExpression

Represents an ATL collection literal expression.

S
ATLConditionalExpression

Conditional expression for if-then-else constructs.

S
ATLErrorContext

Error context for tracking issues during ATL execution.

S
ATLExpressionXMIParser

Parses ATL/OCL expressions from Eclipse ATL XMI format.

S
ATLExpressionXMISerializer

Serializes ATL/OCL expressions to Eclipse ATL XMI format.

S
ATLHelperCallExpression

Represents helper function invocation expressions in ATL.

S
ATLHelperWrapper

Type-erased wrapper for ATL helpers to enable parser instantiation.

S
ATLIterateExpression

Represents an ATL iterate expression with complex syntax.

S
ATLLambdaExpression

ATL Lambda Expression for OCL iterator operations.

S
ATLLazyBinding

Lazy binding for deferred property assignment in ATL transformations.

S
ATLLetExpression

Represents let expressions in ATL/OCL for local variable bindings.

S
ATLMethodCallExpression

Method call expression for OCL-style method invocations.

S
ATLOperationExpression

Represents an ATL operation call expression.

S
ATLParameter

Represents a parameter for ATL helpers and called rules.

S
ATLPerformanceMetrics

Performance metrics for detailed analysis.

S
ATLPropertyBinding

Represents a property binding in ATL target patterns.

S
ATLSourcePattern

Represents the source pattern of an ATL matched rule.

S
ATLTargetPattern

Represents a target pattern for element creation in ATL rules.

S
ATLTraceLink

Trace link between source and target elements in ATL transformations.

S
ATLTupleExpression

Represents an ATL/OCL tuple expression with typed fields.

S
ATLTypeLiteralExpression

Represents type literal expressions in ATL/OCL.

S
ATLUnaryExpression

Unary operation expression for not, minus, etc.

S
ATLVariableExpression

Represents a variable reference expression in ATL.

S
ATLXMIParser

Parses Eclipse ATL XMI format into ATL modules.

S
ATLXMISerializer

Serializes ATL modules to Eclipse ATL XMI format.

S
ElementCreationStatistics

Statistics about element creation in target models.

Enumerations

E
ATLBinaryOperator

Binary operators supported in ATL expressions.

E
ATLCollectionOperation

Collection operations supported by ATL expressions.

E
ATLExpressionNever

A phantom type representing an ATL expression that can never be instantiated.

E
ATLModelError

Errors that can occur during ATL model operations.

E
ATLResourceError

Errors that can occur during ATL resource operations.

E
ATLUnaryOperator

Unary operators supported in ATL expressions.

E
ExpressionParseError

Errors that can occur during expression parsing.

See Also

Related Documentation