2.2 Structural Models: What Is Connected to What?

Structural models hold a system still. They suppress most behavior and keep the entities, boundaries, containment, dependency, and flow — what parts exist and which rest on which. It is the most familiar reduction in engineering, and the natural place to begin.

2.2.1 The Canonical Move: Structure and Dependency

A component diagram names which services exist; a dependency graph names which modules rest on which; a call graph names which procedures may invoke which; a data-flow diagram names how information moves through transformations; a deployment topology names what is connected across execution locations. The graphical forms differ, but the reduction is the same: keep the entities and the declared relations, discard the behavior (Figure 2.2-1).

Canonical structural model: a small service architecture A structural opener in the shared grammar. WEB depends on API; API reaches DATABASE and CACHE. A struck-through dashed arrow marks a forbidden bypass from WEB straight to DATABASE around API. Caption: Question, Semantics, Typical analysis. Rust ground marks the structural family. Structural model — what is connected to what? WEB API DATABASE CACHE depends on reaches reaches forbidden bypass Question: What exists, and what is connected to what? Semantics: node = an engineering entity; edge = a declared structural relation. Typical analysis: reachability, path / cut analysis, cycle detection.
Figure 2.2-1. The structural move: entities and typed relations. Nodes are the entities a question needs; edges are the declared relations between them, and the edge label carries the meaning. Its analyses are graph operations — reachability, path, and cycle checks.

The model selects both the entities and the relations. A graph of service boundaries should not carry every helper function; if the question is about architecture, that detail only makes the model worse. And the edge label is where the engineering meaning lives. "A depends on B," "A calls B," and "a record is stored in a database" are different relations; collapsing them into a generic "related-to" edge throws away exactly the distinction the model was built to preserve.

Once structure is explicit, the claims an engineer wants become graph properties. Some are local: component A may not depend directly on component C. Some concern paths: every route from ordinary logic to a format-specific library must cross a sanctioned seam. Some concern the whole graph: the dependency relation must be acyclic. The analyses follow — reachability, reverse traversal to find what depends on a node, cycle detection, impact analysis over a proposed change, and conformance of an observed graph against a declared one. A question that would otherwise mean reading imports, configuration, and deployment manifests becomes an operation over a declared graph.

Static analysis can sometimes derive the graph from the implementation; in other cases engineers declare the architecture as intent. Those are different claims — one describes what the system appears to do, the other what it is supposed to do — and Part III treats the distinction carefully. For now the move is smaller: choose the structural relation that makes the engineering question explicit. DocAble uses that move at two grains.

2.2.2 DocAble: Document-Mutation Structure

DocAble supports several structured document formats through libraries powerful enough to alter their underlying object structures. Those libraries are necessary, but they sit behind a deliberate architectural boundary: most remediation logic works through DocAble's structured-document abstractions rather than reaching into a format-specific implementation directly.

MODEL CARD

Document-mutation model · Structural

The useful model is small. Figure 2.2-2 draws it: remediation logic operates through a structured-document model, which is realized through a format-specific implementation, which finally touches the concrete DOCX, PPTX, XLSX, and PDF formats. It says nothing about queues, retries, deployment, user sessions, or the mechanics of individual repairs. Those facts are real but irrelevant to the question; the reduction preserves only the architectural boundary that matters.

DocAble's document-mutation model: mutation reaches formats through a sanctioned seam Remediation logic operates through a structured document model, the sanctioned seam. That model is realized through a format-specific implementation, which reaches the concrete formats DOCX, PPTX, XLSX, and PDF. The structured document model marks where mutation is supposed to occur; it does not by itself prevent code from bypassing the seam. DOCUMENT-MUTATION MODEL remediation logic operates through structured document model the sanctioned seam realized through format-specific implementation DOCX PPTX XLSX PDF The model marks where mutation is supposed to occur.
Figure 2.2-2. Document-mutation structural model. The reduction preserves one architectural relation: ordinary remediation reaches format-specific mutation through a structured-document seam. Enforcement of that relation is a separate Alignment decision.

The principal property is a path claim: every ordinary route to format-specific mutation crosses the seam, and no route reaches a raw format library directly. The model states that relation and exposes it to checking; it does not, by existing, enforce it. Part III returns to the same relation when a static control flags code that bypasses the seam. The model supplies the architectural claim; the mechanism enforces that claim. This obligation is a hard one — a lint refuses the bypass — but the refusal belongs to Part III.

A structural model carries the opposite risk too. The code moves and the drawing does not, so the boundary it shows quietly stops matching the system. That gap between a model and the system it describes is model drift. Later sections make the correspondence explicit by deriving, generating, or tracing between model and implementation.

2.2.3 DocAble: Computation and Composition

The document-mutation model asked where one kind of change belongs. A second structural question reaches further inside the system: what computations make up remediation, and how do they depend on one another? DocAble runs a document through a collection of registered remediation passes. A pass may detect a condition, produce information a later pass uses, decide whether remediation should proceed, apply a bounded change to the intermediate representation, or edit a larger region directly. That structure exists in the implementation whether or not a model names it. The first reduction is the obvious one: treat each registered pass as a node, and suppress the statements, library calls, and loops inside it.

MODEL CARD

Remediation-computation model · Structural

DocAble's remediation-computation model represents registered computations as nodes and distinguishes two kinds of composition. A data-flow edge means one computation produces information another consumes in producing its result. A control edge means one computation produces information another consults only to decide whether it should run. Treating both as a generic dependency would obscure a consequential distinction: information that contributes to a result is different from information that controls whether the computation occurs. Figure 2.2-3 draws the resulting reduction.

From computations to composition Two panels. Left, computations without composition: a field of faint computation nodes crossed by only two conspicuous hand-authored relations — 125 computations are registered but only two relations were authored as seeds. Center: derive and type the relations. Right, composition made explicit: the projected relations split into two semantics — a payload-bearing group of thirty-three (thirty-two DATA_FLOW and one CROSS_SERVICE) bracketed together, and twenty-four CONTROL_GATE relations. The transformation is two authored seeds to fifty-five projected, typed relations to thirty-three payload plus twenty-four control. derive + type relations COMPUTATIONS WITHOUT COMPOSITION COMPOSITION MADE EXPLICIT RELATION TYPES PAYLOAD-BEARING ×33 DATA_FLOW ×32 Pass A Pass B Produces → Consumes CROSS_SERVICE ×1 Pass B Service cross-boundary payload CONTROL ×24 CONTROL_GATE ×24 Pass A Pass C ConsumesForControl 125 computations 2 authored relations 2 authored + 55 projected, typed relations → 33 payload + 24 control
Figure 2.2-3. From computations to composition. Typing the dependencies among registered computations separates payload-bearing relations — data-flow and cross-service — from control gates that a computation consults only to decide whether it runs.

The same model also records how bounded each computation's effect is: some produce typed patches, some produce them for part of their work and edit directly for the rest, and most edit document state directly. These distinctions do not declare one form universally better. They make previously implicit differences available for engineering questions about composition and mutation.

The computation model remains static with respect to any one run: it records no per-job invocation history, retries, or model fingerprint. Other views can nevertheless attach observations to its stable computation identities. DocAble now joins staged-run telemetry to those identities, so measured latency and cost can be queried alongside the structural model without turning the structural graph into an execution log. The per-session mutation record remains separate: it records what happened to one artifact, not the execution history of the computation graph.

The same identity spine can support additional engineering views without enlarging the structural schema each time. Properties such as complexity, bounded execution, latency, test coverage, and checker trust can live in separate providers keyed by computation identity. Declared properties state engineering intent; measured properties report observation and may have incomplete coverage. An unmeasured latency is therefore unknown, not zero. The model family grows by joining views around stable identities rather than by turning one graph into a model of everything.

The next chapter adds time: what states a thing occupies, and the orderings it is allowed to move through.

© James C. Davis, 2026–present