---
title: 'Effects Language (EL): Dual Perspectives'
url: https://www.emergentmind.com/topics/effects-language-el
type: topic
---

# Effects Language (EL): Dual Perspectives

Effects Language (EL) denotes a line of research in which computations are characterized not only by the values they return but also by the effects they perform, and, in one recent formulation, the name of a concrete visual coordination language for automated adversary threat emulation. Across the programming-languages literature considered here, the recurring idea is a decomposition of computation into ordinary results and effectful behavior—state, exceptions, nondeterminism, deferred control, handlers, or observational predicates—together with semantic and type-theoretic machinery for composition, modularity, and analysis [1506.05676][2005.13814][1412.8543].

## 1. From pure denotations to effectful computation

A canonical starting point for EL is the contrast between pure denotational semantics and meanings whose impact extends beyond local scope. In the semantic tradition summarized in “Pragmatic Side Effects,” natural-language denotations are usually modeled in “the simply-typed lambda calculus (higher-order logic),” but discourse anaphora and presupposition projection force systematic type shifts. The paper’s central analogy is that discourse anaphora behaves like mutable state, presuppositions behave like exceptions, and more general pragmatic interaction with conversational context parallels a program’s interaction with its environment through side effects [1506.05676].

The crucial move is a change in denotational type. For dynamic semantics, “the type of a proposition changes into a function from discourse contexts to propositions and updated discouse contexts,” which the paper aligns with the state-passing interpretation familiar from programming languages. A natural rendering is
$$
\text{Prop} \leadsto C \to (\text{Prop} \times C),
$$
parallel to
$$
A \leadsto S \to (A \times S).
$$
Likewise, “We assign to sentences computations that yield simple propositions (i.e., truth values). These computations can incur side effects…,” which is naturally expressed as
$$
\llbracket s \rrbracket : \mathsf{Comp}\;\mathsf{Bool}.
$$
The broader EL-like thesis is the decomposition of “a computation type with two components: the type of value being computed and the set of effects this computation has” [1506.05676].

This perspective matters because it recasts what would otherwise be ad hoc denotational repairs as instances of a general effect discipline. Monads, monad morphisms, and “algebraic effects and handlers” are invoked not merely as analogies but as abstractions for combining multiple pragmasemantic phenomena, especially dynamics and presupposition, within a single compositional framework [1506.05676].

## 2. Program-and-effect calculi

In EL research, effects are not always computational side effects in the narrow sense of state or exceptions. QPEL, the “Quantum Program and Effect Language,” is a combined program-and-effect calculus in which terms describe computations and effects describe predicates or observations on those computations. Its core judgments include
$$
\Gamma \vdash M : A,\qquad \Gamma \vdash \phi\ \mathsf{eff},\qquad \Gamma \vdash \phi \le \psi,
$$
and its effect syntax includes \(0\), orthocomplement \(\phi^\bot\), partial sum \(\phi \ovee \psi\), scalar multiplication \(\phi \cdot \psi\), and effect-level case analysis [1412.8543].

QPEL’s semantic framework is the state-and-effect triangle. In that setting, terms denote arrows in a symmetric monoidal category, effects denote elements of an effect module, and states and effects are related by validity transformations
$$
\alpha : P \Rightarrow Conv_E[S-,E], \qquad \beta : S \Rightarrow EMod_E[P-,E],
$$
with coherence
$$
\alpha_A(p)(x)=\beta_A(x)(p).
$$
This gives a direct formal account of predicate transformers: if \(\Gamma, x:A \vdash \phi\ \mathsf{eff}\) and \(\Delta \vdash M:A\), then substitution yields the semantic pullback
$$
\llbracket [M/x]\phi \rrbracket = P(1_{\llbracket \Gamma \rrbracket}\otimes \llbracket M \rrbracket)(\llbracket \phi \rrbracket).
$$
The paper proves soundness and completeness for derivability with respect to all state-and-effect triangles, and it identifies the case where \(\alpha\) is an isomorphism as the setting in which weakest preconditions in the sense of d’Hondt–Panangaden are available [1412.8543].

A plausible implication is that EL should not be identified exclusively with effect handlers or operational side effects. The research record here supports a broader conception: an effects language may be a calculus in which computations, predicates, and their interaction are jointly internalized, provided the value/effect split is explicit and compositional [1412.8543][1506.05676].

## 3. Modularity, handlers, and deferred control

Standard algebraic effects and handlers provide modularity for many language features, but they do not cover all control phenomena uniformly. “Latent Effects for Reusable Language Components” makes this limitation precise: existing algebraic-effects-and-handlers formalisms “bake in” assumptions about control flow and data flow that exclude function abstraction with effectful bodies, call-by-name, call-by-need, and multistage programming. The paper’s remedy is the notion of a latent effect, whose execution is preserved inside the effect tree until later handlers have been applied [2108.11155].

The key technical object is the latent effect tree
$$
\begin{aligned}
\data\ \Tree\ \sigma\ l\ a\ \where\quad
&\Leaf :: a \to \Tree\ \sigma\ l\ a \\
&\Node :: \sigma\ p\ c \to l() \to (\forall x.\ c\,x \to l() \to \Tree\ \sigma\ l\ (l\,x)) \to (l\,p \to \Tree\ \sigma\ l\ a) \to \Tree\ \sigma\ l\ a.
\end{aligned}
$$
Handling one effect transforms the latent-effect functor \(l\), not merely the result type. This lets deferred subcomputations retain enough latent context to resume later under a different handler regime. The paper’s function-abstraction case study distinguishes call-site and definition-site handling by whether the latent context is supplied at application time or fixed at definition time; the same syntax therefore admits different semantics purely by changing handlers [2108.11155].

The paper’s lazy-evaluation and staging case studies push the same point further. `Suspending`, `Thunking`, and `Reading` are presented as reusable latent effects; call-by-need and call-by-value arise from different handlers over the same syntax; and MetaML-style staging is encoded with `quote`, `unquote`, `push`, and `splice` rather than treated as an extrinsic metalanguage mechanism [2108.11155]. This suggests that an EL aspiring to cover deferred-control features uniformly cannot stop at ordinary algebraic operations with immediate resumptions.

A different answer to the modularity problem appears in “Effects Without Monads: Non-determinism — Back to the Meta Language.” There the proposal is not to generalize handlers, but to factor programs into a tiny, first-order effectful DSL and a rich higher-order host language acting as a macro system. The DSL `NDet` contains only the constructs needed for nondeterministic integer-list computation—`nil`, `cons`, `recur`, `fail`, and `(|||)`—while abstraction, reuse, and higher-order structure live in the host language. The authors explicitly argue that “effects are not married to monads,” and show that the same embedded DSL supports ordinary execution, committed choice, abstract interpretation, and staged code generation [1905.06544].

Taken together, these two lines of work delimit two major EL design strategies. One extends algebraic effects to preserve deferred subcomputations and latent context; the other sharply restricts the object language and delegates abstraction to the meta-language. Both are motivated by reusable components and nontrivial effect interaction, but they impose very different boundaries between effect syntax, control flow, and semantic interpretation [2108.11155][1905.06544].

## 4. Type-and-effect disciplines and implementation strategies

A central implementation issue for EL is how much effect information should be explicit in the core language. “Explicit Effect Subtyping” argues that an implicitly typed Eff-like core is too fragile for an effect-aware optimizing compiler, especially when subtyping silently enlarges dirt sets. The proposed calculus, ExEff, makes each use of subtyping explicit via casts carrying coercions that witness subtyping proofs. Computation types are of the form
$$
A ! \Delta,
$$
and coercions inhabit judgments comparing value types, computation types, and dirts. A sequencing expression whose subcomputations have incompatible dirt sets is elaborated by inserting explicit coercions into a common supertype, rather than relying on hidden subsumption [2005.13814].

This explicitness has two consequences. First, transformed intermediate code becomes locally checkable, because missing coercions surface as type errors rather than latent IR bugs. Second, effect information can drive lowering decisions. The paper gives a monadic translation into a pure target language in which \(T ! \emptyset\) remains pure, while only genuinely non-empty dirt sets are translated into \(Comp(A)\). The result is selective, not uniform, monad insertion [2005.13814].

A more application-driven type-and-effect discipline appears in CallE. There the core design decision is that “effects are just method calls.” Instead of a fixed vocabulary such as `read`, `write`, or `throw`, effects are user-defined method selectors plus `*`, and method declarations carry upper bounds of the form `effect[...]`. The typing rule for invocation records the called method selector as the direct effect, while the sub-effect relation includes the paper’s distinctive Indirect Rule: if method \(T.m\) is annotated with \(\effect[\overline{\eps}]\), then \(T.m \preceq \overline{\eps}\). This lets callers abstract over helpers and library wrappers without enumerating every internal call [1907.04934].

CallE is designed for object-oriented control of privileged operations. The paper gives examples involving `Console.#print`, `File-System.#append`, `Random.#generate`, `SQL-Statement.#prepare`, `Program.#exit`, `Socket.#write`, and generic effects such as `P.#modify`. It also introduces `restrict[\overline{\eps}]\, e`, which checks that an expression’s effect set is bounded by a chosen allowance. A notable claim is that determinism can be enforced by preventing indirect calls to nondeterministic primitives such as random generation or file reading [1907.04934].

At the implementation level, “Eff Directly in OCaml” shows that an algebraic-effects language can be embedded directly and meaning-preservingly into OCaml using either `delimcc` or multicore OCaml effects. Effect instances are represented by prompts, operations by captured continuations packaged with arguments, and handlers by recursive OCaml combinators that implement deep handling. The paper gives a denotational correctness argument in tagless-final style and reports that, in its N-queens benchmark, `Eff_of_multicore` is about 1.2× slower than exceptions on average, whereas `Eff_of_delimcc` is about 8.5× slower and native optimized Eff about 9.9× slower on average [1812.11664].

These works collectively show that EL design spans several strata: source-level effect vocabularies, explicit or implicit IRs, host-language embeddings, and low-level execution models. The common invariant is that the type/effect interface is treated as semantically significant rather than as documentation only [2005.13814][1907.04934][1812.11664].

## 5. Effects Language (EL) as a visual coordination language for adversary emulation

A different and much more literal use of the name appears in “Automated Repeatable Adversary Threat Emulation with Effects Language (EL),” which introduces EL as “a novel directly executable visual coordination language” for automated, repeatable emulation of multi-step attacks attributed to advanced persistent threats. Here EL is not a general-purpose programming-language calculus, but a graph-based execution language whose purpose is to reproduce documented attack campaigns with explicit ordering constraints, branching, parallelism, joins, delays, timeouts, and state-dependent progression [2510.06420].

An EL program is a directed graph
$$
(N,E,\ell),
$$
whose node labels encode watchpoints, effects, delays, timeouts, boolean join conditions, and loop metadata. The principal node forms are guarded effect nodes
$$
g_i(w,e,d,t),
$$
activation nodes
$$
a_i(w,d,t),
$$
logic nodes
$$
b_i(\varphi),
$$
loop count nodes
$$
c_i(c),
$$
and loop exit nodes
$$
x_i.
$$
Entry and goal nodes are designated activation nodes. The language requires at least one entry and at least one goal node, allows multiple parents and children, and constrains loops to a specific syntactic pattern involving a loop count node, a loop exit node, and optionally a break node [2510.06420].

Its operational semantics is stated over execution states partitioned as
$$
(I,D,A,F),
$$
or, when traces are accumulated, \((I,D,A,F,E)\), where \(I\) is inactive, \(D\) delayed, \(A\) active, and \(F\) fired. The main loop polls for alerts from an external watchpoint-monitoring subsystem, activates expired delays, computes triggered nodes, fires them, processes loop counts and loop exits, performs timeout-based garbage collection, and terminates when any goal node fires. The paper proves a partition theorem stating that \(I\), \(\widehat{D}\), \(\widehat{A}\), and \(F\) partition the graph’s nodes throughout execution, a finite-change property for graphs without infinite loops, and a conditional reachability theorem ensuring finite-time termination when there is a path from start to goal, no finite timeouts, all watchpoints are eventually satisfied, and all loop counts are finite [2510.06420].

The worked example codifies part of MITRE’s Wizard Spider scenario. Human RDP interaction is replaced by an EL-based C2 server and a RAT; subsequent branches run concurrently for persistence, discovery, and credential-file theft via shadow copies. The paper also defines “proof of attack” as the execution trace \(E\), printed when execution reaches `done = \top`, and reports efficiency gains: for initial execution, “Without EL” totals 17 months and 27 people versus 15.75 months and 18 people “With EL,” corresponding to a 7% reduction in time and labor; for repeated execution, totals fall from 7 months and 16 people to 2.95 months and 6 people, which the paper states as a 58% reduction in time and a 63% reduction in labor cost [2510.06420].

In this narrow sense, Effects Language is the proper name of a concrete system. Its relation to the broader EL tradition is architectural rather than formal: it treats “effects” as externally implemented attack actions coordinated by a graph semantics, not as algebraic operations or effect-typed computations in the usual PL sense. Still, the shared emphasis on explicit control of effectful behavior, compositional orchestration, and analyzable execution is unmistakable [2510.06420].

## 6. Terminological boundaries and unrelated uses of “EL”

The acronym “EL” is heavily overloaded in the literature. Several papers in the same research vicinity explicitly caution that their “EL” is not an effects language. In description logic, \(\mathcal{EL}\) is the lightweight ontology language with constructors
$$
C,D ::= \top \mid A \mid \exists r.C \mid C \sqcap D,
$$
and is the subject of work on epistemic ontology learning, logical difference between ontology versions, and EL++ embeddings with intersectional closure [1902.03273][1401.5850][2202.14018]. These papers concern entailment, satisfiability, embeddings, and ontology versioning, not computational effects.

A second unrelated tradition uses “EL” for Episodic Logic. There, ULF is introduced as an initial, type-coherent representation for EL aimed at language understanding, with a pipeline
**English → ULF (unscoped) → SLF (scoped) → CLF (contextual / deindexed / canonicalized) → ELF (episodic logical form)**. That EL is an intensional logic with episodes, reification operators such as `k` and `that`, and the episode-characterizing relation `**`, rather than a language of computational effects [1903.09333].

For that reason, “Effects Language (EL)” is best used with explicit qualification. In the programming-languages sense, it refers to languages and calculi organized around the value/effect split, including work on monads, handlers, latent effects, effect subtyping, effect modules, and embedded DSLs [1506.05676][2108.11155][2005.13814][1412.8543]. In the narrower cybersecurity sense, it denotes the graph-based visual coordination language for repeatable adversary emulation introduced in 2025 [2510.06420]. The two senses are historically distinct, even though both foreground the structured management of effectful behavior.

Source: https://www.emergentmind.com/topics/effects-language-el