Skip to content

Papers

Implementation Towers

Abstract

A framework for layered implementations with safe domains, observability, liveness, migration, and runtime protocol evidence. The formalization treats concrete systems as partial implementations of abstract ones, then asks which states, traces, controllers, and migration paths preserve the intended checked behavior. This makes architecture questions concrete: which states are safe, which arrows can run, and which migrations preserve evidence across layers.

Implementation towers are the strongest paper-style bridge between Formal Foundry’s product architecture and its Agda libraries.

The local tower library formalizes implementation layers over Cubical Agda categories. The key idea is that a concrete system may implement an abstract one only on a safe concrete domain. That domain, the interpretation into the abstract category, and the concrete category together form a partial implementation.

Core Concepts

The tower formalization treats computations as categories:

  • objects are computation states;
  • morphisms are traces, effects, or transitions;
  • an Implementation is a partial interpretation functor;
  • safety selects the concrete states where interpretation is defined;
  • soundness is functoriality;
  • completeness is split into object, arrow, strong, weak, and operational complete-step forms.

That gives a language for asking precise architecture questions. Can a concrete layer cover every abstract state? Can every needed abstract arrow be implemented between safe concrete endpoints? Does an observation recover a stable state? Does liveness provide a progress step? Can implementation layers compose?

Runtime Evidence

The library then moves toward runtime-facing evidence:

  • RuntimeProtocol bundles completeness, observability, and liveness;
  • protocol views expose packed arrows, safe objects, observations, complete steps, and liveness steps;
  • controller layers model selection, stopping, scheduler branches, and stop-or-step decisions;
  • migration layers model source stabilization, target object completeness, runnable target steps, and target-side liveness;
  • instrumentation layers model transformations, code instrumentation, payloads, profiling, tracing, coverage, and access-control families.

Example Direction

The strongest examples are:

  • a nonlinear finite work-order example with incomparable left-only and right-only states;
  • a partial/replete example where safe states satisfy a visible invariant and unsafe intermediate states are repaired to safe points.

Implementation towers are the formal backbone for layered systems: a way to relate an abstract specification, a concrete implementation, runtime control, migration, and evidence without pretending that one flat proof covers everything.

Download paperOpen the source PDF

Cabinet index

Explore Formal Foundry

Search the archive

Find a page

Type to search the published content.