In Perfect Harmony: Orchestrating Causality in Actor-Based Systems
Vladyslav Mikytiv, Bernardo Toninho, Carla Ferreira · 2026
Read In Perfect Harmony: Orchestrating Causality in Actor-Based Systems by Vladyslav Mikytiv, Bernardo Toninho, Carla Ferreira (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2603-17909.txt.
Introduction
Mikytiv, Toninho, and Ferreira present ACTORCHESTRA, a runtime verification tool for Erlang actor systems. Checks must span many actors whose messages cross in random order. Their framework injects code into OTP-style systems to track causal links on its own. A companion language, WALTZ, turns multi-actor properties into live monitors. Three case studies caught tangled behavioral faults in real systems, they report. Overhead tests weigh the safety gain against run cost.
Catalog record
| CREATOR | Vladyslav Mikytiv, Bernardo Toninho, Carla Ferreira |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 56153 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2603.17909
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
In Perfect Harmony: Orchestrating Causality in Actor-Based Systems Thanks: Vladyslav Mikytiv, Bernardo Toninho, Carla Ferreira Abstract Runtime verification has gained popularity as a lightweight approach for increasing assurance over systems under scrutiny. By performing checks at runtime, it enables dynamic monitoring and alerts for unexpected behavior, thereby improving reliability and correctness. Actor-based systems present significant challenges for runtime verification. Properties frequently span multiple actors with complex causal dependencies, while nondeterministic message interleavings can obscure execution semantics. Moreover, most existing monitoring tools are designed for single-process behavior. This paper presents ACTORCHESTRA, a runtime verification framework for Erlang that automatically tracks causality across multi-actor interactions. The framework instruments Erlang systems that comply with OTP guidelines via targeted code injection. This method establishes the orchestration infrastructure required to track causal relationships between actors without requiring manual modifications to the target system. To ease the specification of multi-actor properties, the framework provides WALTZ, a specification language that automatically compiles properties into executable Erlang monitors that integrate with the instrumented system. Three case studies demonstrate ACTORCHESTRA’s effectiveness in detecting complex behavioral violations in real-world actor systems. Performance evaluation quantifies the runtime overhead of the monitoring infrastructure and analyzes the trade-offs between added safety guarantees and execution costs. I Introduction As software becomes increasingly entangled with today’s society, ensuring correct system behavior is not only a technical requirement but also an ethical necessity. Formal methods have emerged to address the need for thorough verification of software behavior and correctness [ 15 ] . Reactive systems comprise multiple components that interact via message passing, posing unique verification challenges [ 2 ] . While model checking [ 14 ] and theorem proving [ 11 ] can verify system compliance, they face significant limitations: model checking suffers from state space explosion [ 22 ] and theorem proving becomes infeasible due to system complexity. Testing [ 26 ] , a widely used validation approach, may miss critical interleavings and testing scenarios, especially in reactive systems. [ 16 ] . Runtime verification [ 8 , 10 , 28 , 22 ] offers an alternative by monitoring systems during execution. By reasoning over the current execution trace, runtime verification enables compliance checking during execution without constructing the whole state space. A monitor generated from high-level specification languages that define properties of interest runs alongside the system, consuming the trace and issuing verdicts when execution deviates from the specified properties. Actor-based systems, core to concurrency-oriented languages [ 21 ] such as Erlang [ 30 ] and Elixir [ 17 ] , exemplify reactive systems in which autonomous entities (actors) interact via message passing. While the message-centric nature of actors provides a natural trace definition, monitoring these systems presents fundamental challenges: • Causality correlation : How can we track causally related messages across multiple interleaved actor interactions? • Property specification : How do we precisely specify properties spanning multiple interactions while abstracting away nondeterministic message interleavings? • Transparent Instrumentation : Can we inject monitoring capabilities without disrupting system operation or requiring manual code modifications? This work addresses these challenges through a runtime verification framework, named ACTORCHESTRA , designed explicitly for Erlang ’s Open Telecom Platform client-server architectures [ 5 , 13 ] . We focus on systems that implement the gen _ server behavior, which captures common distributed system patterns, including HTTP APIs, service-to-service communication, and microservices architectures. I-A Research Questions Specifically, this work addresses three research questions: RQ1 Can causality across multi-actor interactions in OTP-compliant Erlang systems be tracked automatically? RQ2 Can a specification language support properties spanning multiple actor interactions while abstracting message interleavings? RQ3 What performance overhead is introduced by automated causality tracking and runtime monitoring? I-B Contributions This work presents ACTORCHESTRA , a runtime verification framework for actor-based systems following the Erlang OTP client-server architecture. We make the following contributions: (1) A causality manager that reconstructs live execution traces and assigns causality tokens to messages across multi-actor interactions; (2) A compile-time code injector for Erlang OTP systems that transparently instruments communication with the causality manager; (3) WALTZ , a specification language for expressing causality-aware properties over multi-actor interactions; (4) An empirical evaluation of the overhead of our framework over three case studies. RQ1 is addressed through the conductor and context injection mechanisms ( Section IV-D , Section IV-E ), RQ2 through the WALTZ specification language ( Section V ), and RQ3 through empirical evaluation ( Section VI ). Fig. 1: General structure of ACTORCHESTRA . The context injector transforms Erlang source at compile time; the conductor intercepts all runtime messages, assigns causality tokens, and forwards events to the monitors , which evaluate WALTZ properties over the resulting causally coherent traces. II Background This section outlines the foundational concepts supporting our work, covering runtime verification, the actor-based model, causality in concurrent systems, and Erlang -specific constructs necessary for understanding ACTORCHESTRA . Runtime Verification. We adopt Leucker’s definition [ 22 ] of a run as a possibly infinite sequence of events, where each event is an observable action from the system’s alphabet [ 8 ] . A trace is a sequence of events produced during execution. In runtime verification, monitors operate over finite prefixes of runs, corresponding to the events observed so far. A monitor can be automatically synthesized from a high-level formal specification, interpreting system execution traces to produce verdicts: satisfied , violated , or inconclusive [ 22 ] . Actor-based Model. The actor model [ 3 ] structures computation as independent units (actors) that encapsulate state and behavior and communicate exclusively via asynchronous message passing. Languages such as Erlang and Elixir [ 17 , 5 ] implement this model, enabling dynamic actor creation and concurrent execution. Each actor has a unique process identifier (PID), allowing precise tracking of message sender, recipient, and content. In the context of actor-based systems, the event alphabet corresponds to observable communication events. The messages exchanged between actors naturally define the trace structure that monitors observe and reason about. Open Telecom Platform. The Open Telecom Platform (OTP) provides libraries and design principles for building concurrent, standardized, and fault-tolerant Erlang systems [ 5 , 13 , 20 ] . It introduces behaviors —generic process patterns for common concurrency idioms—where developers implement callbacks while OTP handles supervision, process management, state serialization, and message dispatching. We focus on the gen _ server behavior, which encodes client-server interactions where processes (clients) make calls to a server process and await responses. Of particular importance is the call operation: when a client performs gen _ server:call(ServerPid,Request) , OTP automatically sends the request to the server, blocks waiting for the response, and returns it to the caller when received. The server implements a handle _ call callback to process requests, maintaining state encapsulated within a single process instance, to ensure consistency across all callbacks. The callback returns a tuple {reply,Response,NewState} that instructs OTP to send the response back to the waiting client and update the server’s internal state. Crucially, OTP’s automatic reference generation for call operations provides a foundation for causality tracking. Each gen _ server:call generates a unique reference that binds the (request,response) pair, effectively implementing a local causality relation. III Related Work Runtime verification frameworks [ 18 ] share a common objective: examining execution traces to determine compliance with user-defined properties.