Chapter 12

Edges & related work (§6–7)

12.1 The system boundary (§6.1)

A location is inside when the system can modify it exclusively and restore it; otherwise outside, where operations act as id — untracked, unreverted. A coeffect moves the boundary inward by reifying a location behind operations with inverses. Operations that reach outside split into acquisition (open, malloc, fork — installs a record inside; revertible) and emission (write, send — crosses out; not revertible). For emissions: withhold until the state is certain to persist (the output-commit problem), or compensate (delete the file, refund the charge — sagas). Compensations compose LIFO like inverses; but the metatheory's commutation is proved against and does not transfer to the coarser equivalence a compensation restores.

12.2 Multiplexing, access control, languages, cycles, versions

12.3 Related work, positioned

FamilyRepresentativesHow Cordis differs
Monadic effect systemsEffect-TS, ZIO, fp-tsTracking costs a monadic embedding; a withdrawn service leaves its effects in place. Cordis is an overlay with inverses and re-resolution.
Effects as capabilitiesEffektSame "context mediates capabilities" view, but static and for modular interpretation, not reversion.
Reversible effect semanticsHeunen et al., inverse arrowsTwo-sided, global reversibility by construction; Cordis wants one-sided per-atomic-effect inverses supplied by the caller.
Graded typesGranule; coeffects for Java-like languagesStatic; orthogonal.
COP / AOPContextL; AspectJCOP resemblance is nominal (layers don't track or revert; activation isn't dependency-driven). A coeffect is the declared, non-oblivious analogue of an aspect, lifecycle-integrated.
Stateful forward migrationDSU, Kitsune, Erlang code_change, webpack/Vite HMRMigrate state forward with hand-written functions. Cordis reverts to a clean slate and reapplies — in-memory state doesn't survive unless in a longer-lived dependency. More general (no migration code, real unload), less graceful; layering DSU on top is future work.
Developer-authored recoveryOSGi / Eclipse / VSCode unload hooks, Command pattern, sagas, finalizers, event sourcingThe inverse is an unenforced duty. React useEffect is the closest structural pairing but non-composable (top level only; no async or iterator body).
Statically scoped reversalSTM, reversible languages, RCCS, linear types, RAII/RustReversal fixed to a scope in advance; Cordis fixes none and treats lexical resource management as complementary within a component.
Interposed reclamationNooks, shadow drivers, AkesoRuntime-maintained record of acquisitions, but the platform fixes what is recordable; Cordis components introduce effects of their own with an inverse each.
Availability-reactive componentsOSGi Declarative Services, iPOJO, R-OSGiClosest precedent for reactive coeffects; but hand-written, synchronous deactivation callbacks. Cordis reverts accumulated effects and runs async teardown to completion (inertial Unloading).
Value-level reactivityFRP, signalsValue-level and glitch-free within a turn; Cordis is component-level with async lifecycle and no turn (only Thm 71). Complementary — a coeffect can carry reactive values.
Threats to validity the paper names

One ecosystem (Koishi), one host language, observational not controlled, no overhead measurement. Koishi runs Cordis v3; the paper describes v4. The API is marked unstable.