Documentation Language: Swift

Class

ATLVirtualMachine

Actor responsible for executing ATL transformations.

@MainActor final class ATLVirtualMachine

Overview

The ATL Virtual Machine orchestrates the execution of Atlas Transformation Language modules, coordinating matched rule evaluation, called rule invocation, and helper function execution. It provides a concurrent execution environment that maintains transformation state consistency while enabling parallel rule processing.

Overview

The virtual machine operates through several execution phases:

Execution Model

ATL transformations follow a hybrid declarative-imperative model:

Concurrency Design

The virtual machine is implemented as an actor to ensure thread-safe transformation execution. Rule processing can occur concurrently for independent elements while maintaining serialised access to shared transformation state.

Example Usage

let vm = ATLVirtualMachine(module: transformationModule)

try await vm.execute(
    sources: ["IN": sourceResource],
    targets: ["OUT": targetResource]
)

Topics

Initializers

?
init(module:enableDebugging:)

Creates a new ATL virtual machine for the specified module.

Instance Properties

V
module

The ATL module to execute.

V
statistics

Statistics tracking transformation execution.

Instance Methods

F
enableDebugging(_:)

Enable or disable debug output for systematic tracing.

F
execute(sources:targets:)

Executes the ATL transformation with the specified models.

F
executeCalledRule(_:arguments:)

Executes a called rule with the specified parameters.

F
getStatistics()

Retrieves current execution statistics.

Relationships

Conforms To

See Also

Transformation Execution

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.