Foundations

Free Assembly: A Calculus of Composition by Name

Version of 2026-11-11, foundations@966e2d3 · Markdown

Lachlan Douglas — July 2026

Abstract

A logical, or rules-based, system has a form and any number of instances. The form is the system's parts and how they connect, one and abstract, settled from the parts' declarations before anything is built. Each instance is built from the form, concrete, part by part, each part after those it draws on. Each part states what it requires and what it provides, and the form follows from the declarations. The form also fixes the order in which an instance is built. That order is partial, and a substrate may take two parts that wait on each other for nothing in either order or at once (§7). The form itself is assembled from parts set side by side, and the order of assembly makes no difference. This paper gives the form's assembly its calculus. The operator ⊕ unions the parts and re-derives the wiring by name-matching over the whole union at once. A named requirement with two candidate providers is an error. A requirement with none stays open. A requirement bound by role is ranked instead, by nearest enclosing scope (§4), an extension with weaker laws. By-name merging is associative when the composite is a function of the union and incompleteness is permitted, and its wiring is frame-local when the pair determines the edge and ambiguity is refused. A pairwise merge takes its order from the bracketing, and the whole union has no bracketing to take one from.

Compositions form an algebra under ⊕, a cancellative partial commutative monoid of the shape separation logic gives its heaps, and its laws are those of disjoint union. Uniqueness-or-error governs the exclusively keyed settled values as well as the named wiring, the accumulating kinds collecting losslessly instead. A target configured twice is refused as a named requirement provided twice is, so the operator selects among nothing. Composition being by disjoint union, a composite together with one operand determines the other. Composing with disjoint parts never disturbs a wiring already derived by name or a value already settled, the frame property. Binding by role does not have it. Normalisation takes every declaration to one outcome, a normal form or a defined error, whatever order the parts were assembled in.

Two characterisations follow, each a hypothesis on the calculus set beside a classical theorem. The first says what can be known early. When normalisation is a procedure that halts on every declaration, the finitary case, what the composition settles can be determined from its declaration. That is this paper's answer to what a system is in form. Once the substrates include a universal machine, whether it halts when run cannot be determined. Normalisation and operation fall on opposite sides of the decidable/undecidable line. The coincidence is contingent. It fails once the declarations' values are written in a Turing-complete language.

The second observes that normalisation needs no notion of time, because the carrier is first-order by construction. Step-indexing is the apparatus for self-referential state, and the calculus cannot express any. A reference is an address and ranges over no predicate on configurations, so the carrier cannot occur within itself. Self-reference enters only with an extension, reflection, a reference that reads the normal form it is part of. Read extensionally, reflection leaves the carrier equation with no solution in Set, by Cantor's argument, and step-indexing is one standard repair. The finitary calculi are a proper subclass of the predicative ones, predicative here meaning that the carrier equation has a solution in Set. A calculus with extensional reflection, its references predicates over composites, has no carrier in Set, and so lies outside the class of which finitarity is asserted. With reflection written in finite syntax, expressive enough to carry every partial computable predicate, it loses the decidable normalisation alone. A calculus with a Turing-complete configuration language loses the same and nothing more.

Past a delegation boundary, building and running belong to external substrates. ⊕ is the parallel complement to the sequential calculus of Fettke and Reisig, which joins modules end to end through directed interfaces. Under the encodings §8 quantifies over, no commutative restriction of their operator reproduces ⊕; that no encoding keeping the interfaces embeds it is argued rather than proved.


1 The two strata, and the two modes of composition

Consider systems, parts connected to work together. A pump and its pipes are a system. So are a shop and its suppliers, and a program and its database.

Some systems are governed by rules. In a rules-based system, stated rules say what a part can be, how parts may connect, and what the whole may do. A chess position is rules-based. A database under its schema is rules-based. A fleet of containers under an orchestrator is rules-based. Call such systems logical.

Designing a system involves many decisions. This paper is about two of them: which parts to use, and how the parts connect. Call the connections the wiring. Parts and wiring together are the system's composition. A common record of a composition is a diagram, with boxes for the parts and lines for the wiring. For a logical system, the composition can settle what the system is in form. Settled means decided in advance. Once the composition is recorded, any question about what the system is in form can be answered from the record, before a single part exists. Assembling the instance then adds no decisions. Build the parts, and wire them as recorded.

For a logical system, the composition can be written down in full, every part named, and what each part requires and provides stated. Call such a record a declaration, a declared composition. A declaration is itself rules-based. It is finite, and stated rules say what may appear in it, so a machine can read one. The machine normalises the connections, pairing each requirement with the part that provides it. That normalising needs nothing but the declaration, so it can happen before the system is assembled. That is the special feature of a logical system, and §10 gives the condition under which a system has it. Call the normalising, done in that early position, normalisation (§4).

All of this can be made exact. The composition becomes a mathematical object. Combining compositions becomes an operator. The claims above are proved in §§3 to 5. Assembly order cannot matter (§3, §4), and normalisation terminates with one settled outcome (§4, §5), each a short consequence of disjoint union and finiteness. The line between what that outcome settles and what only running shows falls where §5 places it. This paper presents that mathematics, a calculus called free assembly, whose operator ⊕ assembles parts and normalises their wiring.

The system that results exists twice over. The form is what the declaration normalises to: one, abstract, and settled before anything is built. An instance is a concrete system built from the form, and one form may be built many times. The two are assembled from different materials, the form from declarations, an instance from built parts.

The composition is the paper's answer to what a logical system is in form. What the system is in operation, once an instance is assembled and running, is its operation. Build a part a different way, and the composition is unchanged. Wire the parts differently, and it is a different composition. The two answers are distinct. It calls them the system's two strata. The compositional stratum holds what the system is in form. The operational stratum holds what it is in operation. Normalisation completes at the normalisation point, where the form stands settled. The strata meet later, at the operation point, where a realised instance begins to run. The calculus stops at the first of these. The settled form may then stand, normalised and not yet handed over. At the delegation boundary, a normalised composition is handed to a substrate, something external that builds and runs the system (§7).

The stages a system passes through, and the three crossings §§4, 5 and 7 place on them. A declaration assembles and normalises to a normal form (§3, §4). Past the delegation boundary a substrate realises an instance from that form (§7). The instance's own running begins at the operation point. Everything left of that point is what the system is in form, and is settled by reading the declaration; whether the running halts, to the right of it, is not (§5).The stages a system passes through, and the three crossings §§4, 5 and 7 place on them. A declaration assembles and normalises to a normal form (§3, §4). Past the delegation boundary a substrate realises an instance from that form (§7). The instance's own running begins at the operation point. Everything left of that point is what the system is in form, and is settled by reading the declaration; whether the running halts, to the right of it, is not (§5).

This paper distinguishes two modes of composition, because a system is assembled twice, as an instance and as a form. One mode joins parts in sequence. The output of one part becomes the input of the next. Order matters, since A-then-B and B-then-A are, in general, different systems. This is the mode an instance's dataflow exhibits. Category theory writes it as g ∘ f, and Fettke and Reisig recently gave it a calculus over declared modules [Fettke–Reisig], so that mode is, to that extent, settled. The mode that settles a form is the question that remains. It sets parts side by side. Each part declares what it requires and what it provides. The wiring pairs each requirement with a provider. Order contributes nothing. Assembling A beside B and assembling B beside A yield the same form.

Call the first mode sequential and the second parallel. Both compose declarations, and they differ in how they match: by label and ordinal position, between two adjacent interfaces, against by name over the whole union at once. The parallel mode is the one that settles a form, and it composes up to the normalisation point, where the form stands assembled. Sequence is what lies past that point, in the dataflow the built thing runs on. Free assembly is a calculus of the parallel mode. In algebraic terms, the parallel mode is commutative. Section 3 shows it is also a separating composition, in the sense separation logic gives the word. Two composites join only when their parts do not overlap. Section 8 shows that, under the encodings it quantifies over, no commutative restriction of the sequential operator reproduces the parallel mode, and argues that, under an encoding that keeps the interfaces, it is no fragment of the sequential one.

By-name parallel composition has been given algebras before. In Bracha's Jigsaw, modules merge by name. The merge is commutative and associative, and a name defined twice is an error [Bracha]. In Cardelli's linksets, program fragments link by name. The linking is confluent and terminating [Cardelli]. Both algebras are partial. Some pairs have no combination. Neither derives the wiring from the whole assembly at once. Neither obtains a separating monoid (§3) or a frame property (wiring derived on the union survives further composition, §3), and the parallel mode has both here, for its named ports and fragments. The delegation boundary of §7 is a stance the calculus takes rather than a property of its algebra. The frame property holds of ⊕. The abstract binding of §4 consults more than a pair and stands outside it (Prop 4.8).

Terminology: part, component, module. The field has no settled name for the unit of composition. Fettke and Reisig range over "modules, or components, parts, constituents" within a single sentence [Fettke–Reisig]. This paper sorts the three names by a single axis, information hiding. A part is the general term, any unit of composition that bears an interface of ports, the named points where it requires or provides connections. Section 3 treats parts as the resources of a separation algebra.

A component is a part wired transparently. Every dependency of a component is visible at its interface, and nothing is hidden [Szyperski]. A module is a part that seals an internal composition behind its interface [Parnas]. Both kinds bear an interface. They differ in sealing alone. The calculus of this paper is flat. Every part is wired in one carrier, and no part hides an interior. Every part here is therefore a component. A composite reused as one sealed unit would be a module, and modules are out of scope.

The development below speaks of parts, the general term, because ⊕ composes by one rule whether or not a part hides an interior. None of this corrects Fettke and Reisig. Their "module" is the broad composable-unit sense standard across the field. The three-way split only adds precision to it.

One discipline governs ⊕, over named ports and fragments: static well-formedness. A named required port may be wired to at most one provider, and a configurable slot may be set by at most one part. Two candidate providers for one named requirement is an error, and so is a second part configuring a slot. A requirement with no candidate stays open and a slot no part configures is unset, and §2 permits both. Whether a composition is well-formed is settled by reading the declaration, the criterion deduced, not measured.

The calculus has a second discipline, and it is weaker. An abstract required port, bound by role, is bound by the normaliser of §4, which ranks its candidates by nearest enclosing scope and refuses only a tie in the nearest scope holding any. That ranking is determinate and not frame-local (Prop 4.8). The claims of this section and of §3 are stated for named ports and fragments, and bind is an extension with weaker laws.

The claim, and its scope. The contribution is the securing discipline behind the wiring of named ports and fragments, four clauses in two pairs. Associativity is secured by two: the composite is a function of the union, and incompleteness is permitted, of an unmet requirement, an unset target and key, and a dangling fragment alike. The frame property is secured by two more: the requirement–part pair determines the edge and nothing else in the set does, and ambiguity is refused, of a named requirement and of a target alike (§2, §3). Dropping any one costs its property. Drop the first and associativity goes with it (Remark 8.1). Drop the second and associativity goes as well. A requirement that two parts leave open and a third closes makes one bracketing undefined where the other is defined, so permitting the count of none is what leaves well-formedness downward closed (Remark 3.6). Drop the third and a derived edge can turn on what else the set holds, an edge that reads the pair to choose a candidate and the whole set to choose the port among them being enough, so it need not survive restriction. Drop the fourth and the frame property fails, since a disjoint frame can re-rank (Prop 4.8). (𝒞, ⊕, ∅), the algebra §3 builds, composes parts by disjoint union and settles values under one uniqueness rule for the exclusive kinds and lossless collection for the accumulating; normalisation runs as a finite chain of total functions (§4).

The calculus is static. Operation is delegated to substrates, and the paper models no running behaviour beyond what Proposition 5.1 imports from its universal substrate. The calculus describes systems whose dependency relation is acyclic. A cycle leaves no order in which to realise the parts (§7), so it is refused at normalisation, although mutual dependence is ordinary in deployed systems. Daedal, the engine that realises the calculus, resolves a pinned reference by the address a pin names (Def 4.9) and an unpinned one by the scope ranking of bind. §9 says what of the results the engine keeps.

The non-embedding from the sequential calculus is argued model-theoretically. No refused functor is exhibited. The decidability result is where the line falls, and no new undecidability is proved. A further claim, that composition is prior to computation as such and grounds it, is not made here.

The terms above are used throughout, in these senses.

term sense
part the unit of composition, bearing named ports
wiring which requirement is met by which provider
composition parts together with their wiring
declaration the written record of a composition
normalisation deriving the wiring and the settled values from the declaration alone
normalisation point where normalisation completes and the form stands settled
form what a declaration normalises to: one, abstract, settled before anything is built
delegation boundary where a normal form is handed to a substrate
substrate whatever builds and runs the system; external to the calculus
realisation a substrate's making of an instance from the form
instance a concrete system built from the form; one form, many instances
operation point where a realised instance begins to run
operation what an instance does once it runs

2 The calculus

Four things make up the calculus. A part is the unit that declares what it requires and what it provides. A configuration is a set of parts together with their wiring and their settled values. Satisfaction and well-formedness are the discipline the wiring is derived from. The operator ⊕ composes configurations by re-deriving everything on the union. Definitions 2.1 to 2.5 build them in that order, and Definition 2.6 closes with the composite, the element of the carrier §3 takes up. A part carries two sorts of declared data, ports for the wiring and fragments for the settled values, and each sort gets its own derivation.

Fix a countable set Λ of names, with decidable equality. 𝒩 = Λ*, the finite paths of names, is the set of addresses, the empty path the root. Addresses are hierarchical by construction. The prefix order on 𝒩 is containment.

Definition 2.1 (Part). A part is a triple m = (ι, P, F). The address ι ∈ 𝒩 locates the part. P is a finite set of ports, so a part declares no two identical ports. F is the part's fragment map, described after the ports. Write id(m) = ι. A set of parts is identified when its members have pairwise-distinct addresses.

Ports. A port has a polarity in {!, ?} and a mode in {named, abstract}. Polarity ! marks a provided port and polarity ? a required one. A provided port carries a name in Λ, and the provided ports of one part carry pairwise-distinct names. A required port's mode fixes what it carries. An abstract required port carries a name, its role (§4). A named required port carries a reference, a nonempty path in 𝒩; a one-segment path is read as a plain name.

port polarity carries
provided ! a name in Λ, pairwise-distinct within the part
self-port ! no name; matched by address alone (Def 2.3)
required, named ? a reference, a nonempty path in 𝒩
required, abstract ? a name, its role (§4)

The self-port. Besides its declared ports, every part bears one canonical provided self-port. The self-port stands for the part as a whole. It carries no name, counts among the part's provided ports, and is matched by address alone (Def 2.3).

Fragments. A fragment is a value the part contributes, drawn from a fixed first-order set V of values, taken throughout with a computable coding and decidable equality, so that a declaration is finite data and §5's finitarity is well-typed. Every fragment carries a target address in 𝒩, naming the part that receives it, and belongs to a configuration kind. Keys are drawn from a fixed first-order set 𝒦. The kind fixes how the fragment is collected and how far it may reach (Def 2.3). An exclusive kind is tagged with a key, and its target address is the declaring part's own address ι or an address extending ι by one segment: a part configures itself or one of its constituents, and reaches no further. An exclusive fragment is an instruction, and instruction follows containment; an accumulating fragment is data, which a target may collect from anywhere. An accumulating kind carries no key, and its target may be any address. The map F assigns to each configuration kind a finite set of the part's fragments of that kind. F is key-injective: within one part, at most one fragment per target and key. A part carries at most one accumulating fragment per kind and target, so within one collector the contributions have pairwise-distinct source addresses (Def 2.3).

For an instance of all of this: a part at the address data/store carries one provided port of name store. Call this one store, after the last segment of its address. A part data, at the top-level address data, carries one exclusive fragment keyed endpoint whose target address is data/store. data holds store as its constituent, which is how far an exclusive fragment reaches. A part service, at the top-level address service, carries a named required port of reference store and a provided port of name api. Each is a part in full, an address with its ports and its fragment map, and Example 4.6 completes the three into a composition.

Named ports bind by reference (a point-to-point requirement wired directly by ⊕, to a provided port matched by name or to a part matched by address); abstract ports bind by role (a non-local requirement bound by the normaliser, §4). Only named ports participate in ⊕.

Definition 2.2 (Configuration). A configuration is a triple C = (M, W, Γ). M is an identified finite set of parts. W ⊆ M? × M! is a wiring, relating the required ports M? to the provided ports M!. A port is located by the part carrying it: M? is the set of pairs (m, r) with m ∈ M and r a required port of m, written m.r, and M! likewise. Two parts declaring the same port are therefore two elements, and the owner of a port is recoverable from it (Def 4.1). Write M?* for the named required ports. ⊕ populates the edges at named required ports (Def 2.3), and the normaliser populates those at abstract ones (§4). Γ holds the settled values, a partial map assigning a fragment or a set of fragments to a target and kind, with a key besides for the exclusive kinds. A target is a part in its capacity as the recipient of configuration. Whether Γ holds what the parts determine is Def 2.6's question rather than this one. Where it does, an exclusive kind's entry is the one fragment declared for that target and key, and an accumulating kind's is the set of the fragments of that kind addressed to the target. Each fragment retains its source address (Def 2.3). Write ‖C‖ = M.

Definition 2.3 (Satisfaction, well-formedness, and the derived wiring).

Satisfaction. A part p satisfies a named required port r iff r has polarity ? and one of two matches holds. The match by name: p carries a provided port whose name is r's reference, a one-segment reference being read as a name. The match by address: r's reference is a segment-aligned suffix of p's address, so the reference a/b matches the addresses a/b and ⋯/a/b and no other. Satisfaction is a property of the pair alone; no ambient set enters it. A part does not satisfy its own required port, so the owner is excluded from the satisfier count. A part matching in both ways is one satisfier; two parts are two.

Well-formedness. An identified part-set M is well-formed, wf(M), iff two counts are at most one. Every named required port in M must be satisfied by at most one part of M. Every pair of a target and an exclusive key must be configured by at most one part of M. A count of none is permitted in both cases. A requirement satisfied by no part is open; a target and key no part configures is unset. A count of two or more is the error ⊕ refuses; call the discipline uniqueness-or-error. It governs the wiring and the settled values alike. The two matchings feed one count, so a reference matching one part's provided name and another part's address is ambiguous like any other double provision.

The derived wiring. On a well-formed M, the wiring function w returns the derived wiring w(M) ⊆ M?* × M!, one edge per satisfied requirement r. When the match is by name, the edge runs to the satisfying part's provided port of the referenced name. When the match is by address and not by name, the edge runs to the satisfying part's self-port. A part matching both ways takes the by-name edge. w is defined on well-formed sets only.

Besides ports, each part carries configuration fragments through its map F (Def 2.1), of two kinds.

Exclusive kinds. An exclusive kind (a configure) is keyed, and reaches the declaring part itself or one of its constituents and no further (Def 2.1). For a target t and key k, a configurer of (t,k) is a part carrying a k-fragment addressed to t. On a well-formed M there is at most one, so the configuration function γ, which yields Γ as w yields W, records it and has nothing to choose between. Two configurers of one (t,k) is the error wf refuses, on the same ground as a doubly satisfied requirement: the declaration does not say which governs, and the calculus refuses rather than choosing silently. A (t,k) no part configures is unset, and what a receiving part does absent an instruction is its own affair, past the delegation boundary (§7).

Accumulating kinds. An accumulating kind (a contribution) carries no key, and is collected per kind by the addressed target. Every part carrying such a fragment contributes it to the collector that its target address keeps for that kind, and the contributing part may sit anywhere, ancestor or not. γ keeps every such fragment; no winner is chosen, so the collection is lossless. The kept fragments form a set, their source addresses pairwise distinct (Def 2.1). No order is imposed on them. A consumer needing one computes it from the sources the collector carries, and which order to compute is a matter for the substrate (§7).

kind reach keyed γ keeps
exclusive the declaring part or one of its constituents yes the one fragment declared for that target and key
accumulating the part the fragment addresses, anywhere no every fragment addressed to that target, each tagged with its source

Dangling fragments. A fragment of either kind whose target address is the address of no part of M is dangling: it reaches no target, and γ passes over it. Dangling is not ill-formedness. A wider union may supply the part addressed, so refusing it pairwise would make ⊕ depend on the order of assembly, and a singleton part that configures a constituent would not be a composite, as data alone would not in Example 4.6. Like a cyclic wiring (§7), a dangling fragment in the assembled whole is settled at normalisation, which yields a defined error and no normal form. Addresses are unique in an identified set, so no ambiguous target arises.

γ is thus a total function, and it selects among nothing. Where a fragment reaches a target, γ records it; no fragment is ever dropped in favour of another.

On the parts above: service's required port is satisfied by store twice over, by the name of the port store provides and by store's address, the reference store being a segment-aligned suffix of data/store. That is one part, so one satisfier, and the set is well-formed. data satisfies nothing, providing no port of that name and bearing an address the reference does not end.

The reach of an exclusive fragment has a cost. It extends one segment, so the configurers of a target and key can only be the target itself and its parent, and a part cannot declare a default for a key its parent sets; the two are a double configuration, and wf refuses it. Refinement is carried by the accumulating kind instead (§9).

Lemma 2.4 (Downward closure of wf). If M' ⊆ M and wf(M), then wf(M'). Proof. Both counts fall under a subset. A named required port r ∈ M' is also in M, and its satisfiers in M' are a subset of those in M, which number at most one. A target and key configured in M' is configured in M, and its configurers in M' are likewise a subset of those in M. ∎

Definition 2.5 (Free assembly). For C₁=(M₁,W₁,Γ₁), C₂=(M₂,W₂,Γ₂) with id(M₁)∩id(M₂)=∅ and wf(M₁∪M₂): C₁ ⊕ C₂ = (M₁∪M₂, w(M₁∪M₂), γ(M₁∪M₂)). Both the wiring and the settled values are re-derived on the union. ⊕ is undefined on address collision or ¬wf(M₁∪M₂). The empty configuration is ∅ = (∅,∅,∅).

The operands' wirings are discarded, and the composite's wiring is re-derived on the whole union. This global re-derivation is the defining move of free assembly, and it keeps ⊕ associative, since no match is internalised pairwise, so no bracketing can consume one. Composition is at the level of parts. One composes parts and normalises the whole.

Definition 2.6 (Composite). C is a composite iff wf(‖C‖), W = w(‖C‖), and Γ = γ(‖C‖): its wiring and its settled values are exactly what its part-set determines. Let 𝒞 be the set of composites. Equality on 𝒞 is by parts, in full: address, ports, and fragment map, with W and Γ agreeing wherever the parts do, being functions of the part-set.


3 ⊕ as a separating composition

Composition under ⊕ has the algebra of a separation logic heap. Theorem 3.1 gives the monoid laws, cancellation among them; Proposition 3.2 says that the settled values of anything that normalises determine the fragments they came from; Proposition 3.3 gives the frame property, of the wiring and of the settled values alike; Corollary 3.4 settles decomposition. The section closes on what cancellativity supplies and what it does not.

Theorem 3.1. (𝒞, ⊕, ∅) is a cancellative partial commutative monoid. Proof. Equations between possibly-undefined composites are read as Kleene equality: both sides defined and equal, or both undefined.

  • Closure. A defined C₁⊕C₂ has wiring w(M₁∪M₂) and settled values γ(M₁∪M₂), hence a composite, in 𝒞.
  • Commutativity. ∪ and ∩ are symmetric, so definedness is symmetric; M₁∪M₂=M₂∪M₁, and w and γ being functions of the union give equal results.
  • Associativity. Each side is defined exactly when the addresses are pairwise disjoint and wf(M₁∪M₂∪M₃). The full-union condition is the same on both sides, and Lemma 2.4 supplies the binary well-formedness each side also needs along the way. When defined, both sides equal (M₁∪M₂∪M₃, w(M₁∪M₂∪M₃), γ(M₁∪M₂∪M₃)), since w and γ depend only on the union. For γ there is nothing further to check: on a well-formed union each target and key has at most one configurer, so γ gathers the fragments declared and selects among none.
  • Unit. For C∈𝒞, C⊕∅ = (‖C‖, w(‖C‖), γ(‖C‖)) = C since C is a composite.
  • Cancellativity. If C₁⊕C₃ = C₂⊕C₃ (both defined), then M₁∪M₃ = M₂∪M₃ with id(M₃) disjoint from both, so M₁ = (M₁∪M₃)∖M₃ = M₂, and W and Γ follow (Def 2.6).

∎

⊕ is partial (Def 2.5), the partiality being address collision and uniqueness-or-error (Def 2.3), the second covering a doubly configured target as well as a doubly satisfied requirement.

Proposition 3.2 (the settled values determine the declared fragments). Let wf(M) hold and no fragment of M dangle, every one addressing a part of M (Def 2.3). Then from γ(M) the fragment map of every part of M can be read off, so a composite's settled values and its declared fragments determine each other. Every normal form meets the hypothesis, normalisation refusing a dangling fragment (Def 4.2). Proof. Each fragment retains its source address (Def 2.2). For an exclusive kind, wf admits at most one configurer of each target and key, and γ records that fragment with its source, so the k-fragments of every part are recovered by reading Γ and grouping by source. For an accumulating kind, γ keeps every fragment and the sources are pairwise distinct within a collector (Def 2.1), so the same reading recovers them. Under the hypothesis γ passes over nothing, so no fragment of M is absent from γ(M) and none is added. ∎

Cancellation costs nothing here. Disjointness lets set subtraction read M₁ = (M₁∪M₃)∖M₃ (Theorem 3.1), and W and Γ follow the parts, being functions of the part-set (Def 2.6). Remark 8.1 sets the associativity against the pairwise by-name merge that loses it.

Cancellative is short of invertible. ⊕ has no inverse, no part that un-provides another. Like addition on the naturals, it cancels and does not undo.

Separating composition. Separation logic's resources form a partial commutative monoid, the canonical instance being heap composition h₁*h₂, defined iff dom(h₁)∩dom(h₂)=∅ [Reynolds; Calcagno–O'Hearn–Yang]. Free assembly is the same shape, with address-disjointness in the role of domain-disjointness. It cancels as the heap does, since disjoint union forgets nothing. (𝒞, ⊕, ∅) is a separation algebra in the sense of Calcagno–O'Hearn–Yang, meeting the cancellativity axiom that Dockins, Hobor and Appel also keep among theirs [Calcagno–O'Hearn–Yang; Dockins–Hobor–Appel]. Separation theories more broadly treat cancellativity as optional, and BBI cannot define it [Brotherston–Villard].

The calculus-specific content is the wiring w and the configuration function γ layered over the resource monoid, the structure that turns disjoint resources into a connected, configured system.

Proposition 3.3 (Locality of the derived form). Let M' ⊆ M with wf(M). (i) w(M') = w(M) ∩ (M'?* × M'!). (ii) to every target in M', γ(M') assigns what γ(M) assigns it, restricted to the fragments whose source lies in M'; to a target outside M' it assigns nothing. Proof. Lemma 2.4 gives wf(M'), so both derivations are defined on each side. (i) Satisfaction is a property of the requirement–part pair alone (Def 2.3), and the pair determines the edge's port, so the edges within M' are exactly the edges of M whose requirement and satisfying part both lie in M'. (ii) A fragment is declared by a part and addressed to an address, and γ records it exactly when that address is a part of the set γ is given (Def 2.3). A fragment recorded by γ(M') has its source and its target in M', hence in M, so γ(M) records it too. A fragment of γ(M) whose source and target lie in M' is declared in M' and addressed within M', so γ(M') records it. Well-formedness leaves γ no choice of which fragment to record for a target and key, so the two agree. ∎

Proposition 3.3 is the calculus's frame property, and the two clauses say one thing of the two halves of the derived form: each derived item depends on the pair it relates and on nothing else in the set. Taking M=‖C‖∪‖D‖, M'=‖C‖, clause (i) gives w(‖C‖) ⊆ w(‖C⊕D‖). Composition with a disjoint frame never disturbs an established wiring; no new wiring rebinds a port of C already wired, and new edges attach only to C's open required ports or to its provided ports. This is the wiring analogue of separation logic's frame rule, the locality on which local reasoning would rest; the calculus proves the locality and builds no program logic over it.

Clause (ii) reads the same way for the settled values. A disjoint frame cannot displace an established value, since a second configurer of one target and key leaves the union ill-formed and C⊕D undefined. It can only set a target and key that C left unset, add its own fragments to a collector C had begun, or supply the part that a fragment of C was addressed to. Every fragment recorded for C is recorded again for C⊕D, from the same source. Extension can settle what was unset, and cannot alter what was settled.

The abstract binding of §4 is the one stage that is not frame-local (Prop 4.8), and the failure is not peculiar to the nearest-enclosing rule. Any ranking that strictly prefers a nearer candidate re-ranks when an extension supplies one, so no binding discipline that consults proximity in that way can be frame-local. Proposition 4.8 proves the nearest-enclosing instance; the argument applies to any ranking that strictly prefers a nearer candidate. The literature on scope-directed implicit resolution proves coherence and stability under type substitution, resolution being unchanged when a term acquires a more specific type [Schrijvers et al.]. Proposition 4.8 concerns extension of the composition rather than of a type, and neither property reduces to the other.

Corollary 3.4 (unique decomposition). In (𝒞, ⊕, ∅) the indecomposable elements, the composites other than ∅ that are no join of two composites other than ∅, are exactly the singleton composites, and every composite is the join of the singletons of its parts, uniquely. Proof. Let C be a composite with at least two parts and M' a non-empty proper subset of ‖C‖. Both M' and its complement are well-formed (Lemma 2.4) and address-disjoint, so the composites they determine compose to C, and C is decomposable. A singleton admits no such split, ∅ being the unit. A decomposition into indecomposables is a set of singletons whose part-sets union to ‖C‖, and ⊕ unions part-sets disjointly, so the set is exactly the singletons of ‖C‖. ∎

Remark 3.5 (teardown and refactoring without subtraction). Cancellativity supplies no subtraction operator, and nothing needs one. Because the normal form is a function of the part-set (Corollary 4.3), removing a part is re-normalisation of the smaller set, and no inversion of ⊕ is involved. Refactoring reasons one level up: two part-sets are interchangeable in a context C exactly when C⊕A and C⊕B normalise alike, agreeing in wiring and settled values. Normalising alike is coarser than A = B: two parts differing only in a provided port that nothing in the context requires normalise alike, since w draws an edge only for a satisfied requirement (Def 2.3), and differ as declarations. The coarser, observational equality is the property refactoring wants.

Remark 3.6 (what the discipline secures, in general). Theorem 3.1 and Proposition 3.3 use nothing of w and γ but two facts about them. Let P be any predicate on identified finite part-sets that is downward closed and holds of ∅, and f any function defined on the sets satisfying P. Write M₁ ⊗ M₂ = (M₁∪M₂, f(M₁∪M₂)), defined when the addresses are disjoint and P(M₁∪M₂) holds. Then (⊗, (∅, f(∅))) is a cancellative partial commutative monoid, by Theorem 3.1's proof read with f for (w, γ) and P for wf. Closure and the unit are immediate. Commutativity follows from the symmetry of ∪ and ∩, associativity from P's downward closure supplying the binary conditions each bracketing needs, and cancellativity from disjoint subtraction. Where f is in addition local, f(M') being what f(M) assigns within M', the frame property follows by Proposition 3.3's proof read the same way. This calculus is the instance P = wf, f = (w, γ).

So §1's discipline is this lemma's hypotheses in the calculus's own terms. The composite being a function of the union is f being a function at all, and it buys the algebra. An unmet requirement being permitted is P's downward closure, and it buys associativity. Two things leave f local, and the lemma above takes locality as a hypothesis rather than deriving it. Candidacy reads the requirement–part pair and nothing else in the set (Def 2.3). For named ports and fragments, ambiguity is refused rather than ranked, where a discipline that ranked candidates would re-rank under a disjoint frame, as binding does (Prop 4.8). A variant calculus, over a different fragment regime or a different ranking, inherits both by checking the three hypotheses.


4 Normalisation: assembly and binding

After assembly, named ports are wired and the values are settled by γ (Def 2.3); the abstract required ports (matched by role) remain. A normaliser N = bind, applied once, discharges them. Neither ⊕ nor N introduces new parts or ports, as both definitions show, and the property is part-preservation.

Definition 4.1 (Binding). A candidate for an abstract required port r is a provided port that carries r's name and belongs to a part other than r's own, the owner being excluded as it is for named ports (Def 2.3). A scope is an address prefix, and its region is the set of parts whose addresses it prefixes. Let ≺ rank, for each abstract r, its candidates as a function of C's structure (parts + containment). bind(C) keeps the parts and adds wiring, taking each abstract r in turn. With no candidate, r stays open. With a unique ≺-minimal candidate, that candidate is wired. With a non-unique minimum, bind(C) is undefined, which is an error. The calculus fixes ≺ as the nearest-enclosing-scope ranking, which is the discipline of scope-directed implicit resolution [Oliveira et al.; Schrijvers et al.]. Walk the containment chain outward from r's owning part, beginning at the owner's parent scope, or at the root scope when the owner sits at the root address and has no parent. The first enclosing scope whose region contains any candidate wins. Outer scopes are not consulted. Every candidate in the winning scope's region ranks ahead of every candidate outside it, and candidates within the winning scope tie. So bind wires r when the winning scope holds exactly one candidate, errs when it holds several, and leaves r open when no scope on the chain holds any. The provider need not enclose r; the scope encloses, and the provider sits anywhere within its region. This fixed choice makes the normal form canonical and unique. That the choice is structural, a function of the assembled parts and containment, matters separately. Any structural ranking would yield a deterministic bind, so the determinacy results below turn on structurality alone. The particular rule decides only which normal form is the canonical one.

An instance of the walk: let the port's owning part sit at a/b/p and carry an abstract required port, and let the one part providing that name sit at a/q. The walk starts at the owner's parent scope, a/b, whose region holds no candidate; it steps out to a, whose region holds a/q; that scope wins and the candidate binds. Proposition 4.8 takes up the same arrangement.

bind is a function of C, part-preserving, and idempotent. The configuration function γ that ⊕ carries (Def 2.3) is likewise a function of the part-set and part-preserving, and it selects among nothing: on a declaration that normalises, every declared fragment reaches the settled Γ and can be read back from it (Prop 3.2). bind only adds wiring. Normalisation therefore consumes nothing. Every stage is a function of the whole declaration, and the declaration survives normalisation intact.

Definition 4.2 (Assembly and normalisation). For a finite identified set S of parts with wf(S), A(S) is the ⊕-fold of the singleton composites ({m}, w({m}), γ({m})), m ∈ S, taken in any order, and A(∅) = ∅; by Theorem 3.1 this is (S, w(S), γ(S)), independent of order and bracketing. (N ∘ A)(S) is the normal form of S. The name is the rewriting tradition's [Church–Rosser], and the sense is the one that carries over: an outcome reached whatever order the parts were taken in, and unique. Normalisation here is a function rather than a rewrite relation, so a normal form is what the function returns rather than a term to which no rule applies. Normalisation ends with two global checks on the assembled whole: no fragment of either kind may dangle, every one addressing a part of S (Def 2.3), and the dependency relation the derived wiring induces must be acyclic (§7). Either failing is a defined error and yields no normal form. On an S that is not identified, or is not well-formed, the map returns the refusal of Def 2.5 as its defined error, so that it is defined on every finite S.

Corollary 4.3 (Determinacy of normalisation). For every finite identified set S of parts with wf(S), (N ∘ A)(S) is a well-defined function of S, returning a normal form or one of the defined errors of Def 2.3, Def 4.1 and §7. Under the canonical ranking of Def 4.1, the outcome depends only on the parts composed; assembly order, bracketing, and normalisation scheduling contribute nothing. Proof. By Theorem 3.1, A(S) is determined by S alone, and N is a function with no internal schedule. The errors are determined with it: a non-unique ≺-minimum, a dangling target address, and a cyclic dependency relation are all properties of the assembled parts. ∎

The normal form is also a certificate: reaching it witnesses that the composition is determinate, settled by its parts alone; the uniqueness-or-error discipline leaves normalisation nothing to choose beyond the fixed ranking of Def 4.1, since it wires, errs, or leaves open. Composing further parts re-derives the wiring and may re-rank the binding of an abstract port (§3), and the extended whole requires a fresh certificate. A port pinned by Def 4.9 keeps its edge (Prop 4.10).

A normal form in which bind has bound an abstract port carries wiring beyond w(‖C‖) and so is not an element of 𝒞 (Def 2.6). The exclusion is deliberate. 𝒞 is the carrier of assembly, closed under ⊕ (Theorem 3.1). The normal form is normalisation's output, what the delegation boundary later hands over (§7). It enters further ⊕ only through its part-set. Def 2.5 accepts a normal form as an operand, discards its wiring along with the rest of the operand wiring, and re-derives on the union. Hence bind(C) ⊕ D = C ⊕ D. The bindings are shed by composition and re-made only by the next normalisation. Composition proceeds from parts alone. To extend a composite, compose the part-sets and re-normalise (Def 4.2). A normal form remains a configuration triple, finite and first-order exactly as §6 treats the carrier; what it gives up is only membership in the algebra.

Normalisation consults nothing outside the declaration. Ports, references, fragments, and containment are declared data, and no value produced by realisation or operation enters w, γ, or bind. Normalisation is therefore a function of the declaration alone, which is §1's criterion made a property of the map.

Remark 4.4 (single pass). Part-preservation makes N single-pass, since binding exposes no new ports, so one pass saturates.

Remark 4.5 (generation is staged rather than forbidden). Part-preservation does not outlaw generative module systems, functors, or macros; it stages them. Such expansion is a prior elaboration that produces the part-set, after which normalisation runs part-preserving over the result: expansion first, then the part-preserving pass. Excluded is generation interleaved with normalisation, where normalising a part creates further parts needing normalisation. That interleaved case is the self-referential one whose absence §6 names, and it admits a precise condition: generation that is well-founded (each added part strictly smaller than its emitter in a fixed well-founded order) terminates, an ordinary inductive construction. Termination alone does not restore order-independence: two generators whose outputs depend on what is already present can terminate under every interleaving and still produce different part-sets, so the confluent core survives only when the generation steps also commute. Unbounded generation is computation, and belongs past the normalisation point as any other non-terminating act does.

Example 4.6 (a data service). Take the three parts of §2, store, data and service, and add two more, at the top-level addresses seed and catalog. data's endpoint fragment has the value ⟨127.0.0.1, 7000⟩. seed requires one named port with reference store. catalog carries an accumulating fragment of kind records whose target address is data/store, with the value [⟨A-100, Widget, 9.99⟩, ⟨A-101, Gadget, 12.50⟩]. Let S be these five.

Assembly unions the parts and re-derives on the union (Def 2.5). Both service's and seed's required ports carry the reference store, each satisfied by the one part store as §2 showed, and the match by name takes the edge. So w(S) = {(service.?store, data/store.!store), (seed.?store, data/store.!store)}, both wirings found in one global pass and present in neither operand. γ(S) records the one configurer of (data/store, endpoint), which is data, and collects the records list into data/store's collector for that kind. The two fragments reach their target by different routes. data may configure store because store is its constituent; catalog sits in another branch and reaches the same target because an accumulating fragment may address any part. No abstract port remains, so N = bind adds nothing, and (N ∘ A)(S) = (S, w(S), γ(S)) is the normal form, its Γ giving (data/store, endpoint) ↦ ⟨127.0.0.1, 7000⟩ and (data/store, records) the collector holding catalog's one contribution, the list [⟨A-100, Widget, 9.99⟩, ⟨A-101, Gadget, 12.50⟩]. Composing the five in any order yields the same normal form (Corollary 4.3): the wiring is re-derived on the union rather than accumulated pairwise, so no order exposes or withholds a match. Had store also carried an endpoint fragment addressed to itself, the set would have two configurers of one target and key, and ⊕ would refuse it (Def 2.3). Refusal reaches the wiring the same way. Add a part cache at a top-level address, providing a port of name store: service's requirement then has two satisfiers, wf fails on the union, and every bracketing of the six parts is equally undefined.

The normal form of Example 4.6. Both required ports ?store, on service and seed, are re-derived on the union to the single provided !store of data/store (the solid arrows); neither wiring is present in any operand. data's exclusive endpoint fragment, which reaches data's constituent, and catalog's accumulating records contribution, which reaches across a branch, normalise by kind into Γ (the dashed arrows and box). service's !api has no consumer. Any assembly order gives this same form (Corollary 4.3).The normal form of Example 4.6. Both required ports ?store, on service and seed, are re-derived on the union to the single provided !store of data/store (the solid arrows); neither wiring is present in any operand. data's exclusive endpoint fragment, which reaches data's constituent, and catalog's accumulating records contribution, which reaches across a branch, normalise by kind into Γ (the dashed arrows and box). service's !api has no consumer. Any assembly order gives this same form (Corollary 4.3).

Remark 4.7 (equivariance: by name means by equality). Nothing in the calculus reads inside a name segment. Every definition consults Λ and 𝒩 through segment equality and path structure alone. Satisfaction compares a reference with a carried name, or matches it as a segment-aligned address suffix (Def 2.3). Well-formedness counts satisfiers. A fragment of either kind matches its target address against a part's address, and an exclusive one is counted per key. Depth, prefix and suffix are path structure, indifferent to which segments compose the path. The whole construction is therefore equivariant under renaming of segments. Take an injective renaming π of the name segments, applied to names directly and to addresses, references, target addresses and pin addresses (Def 4.9) segment-wise, so that path structure is preserved. Then π·(C₁ ⊕ C₂) = π·C₁ ⊕ π·C₂, with definedness preserved in both directions, and (N ∘ A)(π·S) = π·(N ∘ A)(S). The normal form is a function of the pattern of sameness and distinctness among the declared segments and of the shape of the paths they compose, never of the segments themselves. This is the sense of by name in the title, the sense that the nominal tradition gives the word [Pitts]: a name is an atom bearing only equality, and the calculus uses no more of it. Equivariance holds under every injective renaming, with no clause excepted, since a collector is a set and imposes no order for a renaming to disturb (Def 2.3). A pin is an address, satisfied by equality of address, so the same argument covers a calculus that admits pins (Def 4.9).

Proposition 4.8 (binding is not frame-local). Under the nearest-enclosing ranking of Def 4.1 there are composites C and disjoint D, every composition and binding defined, in which an abstract port bound by bind(C) binds to a different provider in bind(C ⊕ D). Proof. Take the arrangement after Def 4.1: owner at a/b/p, unique candidate at a/q, winning scope a. Let D add, at a fresh address under a/b, one part providing the port's name. The walk now stops at a/b, the nearer scope, and binds its candidate. ∎

Definition 4.9 (Pin). A pin on a named required port is an address in 𝒩 declared with the port, extending the ports of Def 2.1. A part satisfies a pinned port iff its address is the pin and it satisfies the port by Def 2.3. Well-formedness and the derived wiring are otherwise as in Def 2.3, the pinned port counting among the named required ports. To pin an abstract required port that bind(C) wires is to replace it, on its part, by a named required port whose reference is the port's name and whose pin is the address of the part bind(C) wired it to. A pin whose address names no part of the set leaves its port open, as a dangling fragment reaches no target (Def 2.3).

Proposition 4.10 (pinned wiring is bind's, and frame-local). (i) Let bind(C) be defined on a composite C and wire an abstract port r to the provided port of name n on a part q, and let C° be C with r pinned (Def 4.9). Then ‖C°‖ is well-formed, and its derived wiring wires the pinned port to q.!n, the target bind(C) gave r. (ii) With pinned ports admitted, Lemma 2.4, Theorem 3.1 and Proposition 3.3 hold. In particular, for a composite C and a disjoint D with C ⊕ D defined, every pinned edge of C is an edge of C ⊕ D, and a pinned port open in C can be wired in C ⊕ D only to the part at its pin. Proof. (i) Addresses are pairwise distinct, so the only part of ‖C°‖ at id(q) is q. A candidate belongs to a part other than the port's owner (Def 4.1), so the replacement leaves q's ports unchanged, and q carries a provided port of name n, the pinned port's reference, so q satisfies it by name and is its one satisfier. By Def 2.3 the edge runs to q.!n. The replacement changes no provided port and no address, so every other named required port keeps its satisfiers, and the pinned port has one, so wf(‖C°‖) holds with wf(‖C‖). (ii) Whether a part satisfies a pinned port depends on that part's address and ports alone, so satisfaction stays a property of the requirement–part pair, and the pair determines the edge. A pinned port has at most one satisfier in any identified set, so it never makes a set ill-formed. Lemma 2.4 and Theorem 3.1 follow by their proofs, as Remark 3.6 sets out, and Proposition 3.3 by its proof, which reads only the pair-locality of satisfaction. Its clause (i), with M = ‖C‖ ∪ ‖D‖ and M' = ‖C‖, gives the edge statement, and a pinned port's satisfier in any set is the part at its pin, if there is one. ∎

In the arrangement of Proposition 4.8, pin the port at a/q. The part that D adds under a/b provides the port's name and is not at the pin, so the extension that re-ranks the unpinned port leaves the pinned one wired to a/q. A pin is bind evaluated once and written into the declaration. An unpinned named reference keeps Def 2.3's reading, so even a full address such as a/q is matched as a suffix, and where a part at a/q is present an extension that adds one at x/a/q leaves the union refused; a pin admits only the part at its address.

5 Decidability: the decidable/undecidable line, placed

The first characterisation says what can be settled by reading a declaration: normalisation is decidable, operation is not, and the line between them falls in one place. Stating it needs a class of calculi, since the coincidence is contingent: the base calculus exhibits it, and the variations of this section and §6 are the calculi that lose it.

Throughout this section and §6, a composition calculus is the calculus of §2 with two points of variation: a reference discipline (§6), and an evaluation stage, a partial computable function E : V ⇀ V. Lifted to part-sets, E applies to every fragment value of every part and to nothing else, and normalisation becomes N ∘ A ∘ E. wf reads no value, so the order of E and the well-formedness check changes neither the verdict nor any normal form. Targets, keys and ports are left untouched, so wf, Lemma 2.4 and Theorem 3.1 hold of the varied calculus unchanged. A value on which E diverges makes normalisation diverge. The base calculus has the trivial stage, the identity, and a configuration language is an evaluation stage by another name (Remark 5.2); a language that computes the part-set itself, rather than fragment values, is generative elaboration, staged before normalisation as in Remark 4.5.

Call a composition calculus finitary when its normalisation map, from a finite declaration of parts to a normal form or a defined error, is a total computable function. The calculus of §2 is finitary. Whether the union is well-formed is a finite count (Def 2.3), and Def 4.2 returns that refusal as the map's outcome. On a finite part-set there are finitely many requirements and candidate providers, the structural ranking is a finite computation, and γ gathers finitely many fragments and selects among none. The acyclicity check of §7 is a search of a finite relation. So the whole halts with a normal form or a defined error.

Proposition 5.1 (the embedding, and the placement of the line). Let a calculus be finitary, with a delegation boundary that delegates the normal form to external substrates, and let the substrates include a universal machine. Such a calculus realises the machine. Take V infinite and decidable, so that it carries a computable coding of machine-input pairs. A declaration carries the machine's program and input as fragments and delegates the transition function across the boundary (§7), so the running artifact is the universal runner applied to the normal form (Remark 7.1). Normalisation is total computable by the definition of finitarity, so the set of declarations whose normalisation returns a normal form is Δ⁰₁. Among the declarations realised on the universal substrate, the set whose operation halts is Σ⁰₁-complete, so operation sits strictly above normalisation in the arithmetical hierarchy. Proof. Machine-input pairs map computably to such declarations, the standard m-reduction from the halting set of a universal machine. A finite run witnesses that the operation halts, or, on a nondeterministic substrate, that it may halt, so the set is Σ⁰₁; were operation decidable, halting would be. The strict inclusion Δ⁰₁ ⊊ Σ⁰₁ is classical. ∎

The proposition is §1's claim made precise. Its decidable half restates the definition of finitarity, and its undecidable half is Turing's theorem carried across the boundary, so what it records is where the line falls in this calculus. What the system is in form, its composition, is computed from the declaration; whether a realised instance halts is not decidable from it. The two fall on opposite sides of the Δ⁰₁/Σ⁰₁ line. Everything past the delegation boundary belongs to substrates, the realisation of the form as well as the running of what is realised (§7).

Remark 5.2 (scope). Normalisation-finitary is a real restriction. A configuration language that is itself Turing-complete is not finitary, and for it "normalisation" can be undecidable; such a system has, by the criterion of §1, moved that work out of the compositional stratum and into computation, which is exactly where the undecidability lives.

Remark 5.3 (delegation beside the engineered phase distinction). The decidable half alone is familiar, and so is the engineered way of securing it: strong normalisation gives decidable conversion, and the static phase of a staged or two-level language is kept decidable by stipulation, restricting the language until it terminates [Davies–Pfenning; Nielson–Nielson; Turner-TFP]. Shipped configuration languages adopt exactly this rationale when they bar Turing-completeness outright, making termination a design guarantee [Dhall; CUE; Starlark]. For its configuration language the calculus does the same, since finitarity excludes a non-terminating evaluation stage by definition (Remark 5.2). Computation in the operated system is treated differently. It is delegated across the boundary of §7, drawn on independent grounds, and is not excluded from the system, so normalisation halts because what would not halt is on the far side. A calculus that admits a Turing-complete configuration language takes that work back across the boundary and loses the result (Remark 5.2). And the line falls between composition and operation, where the engineered line falls between type-checking and evaluation.


6 Atemporality: normalisation needs no step-indexing

Program logics for running, self-referential state standardly employ step-indexing, the apparatus of guarded recursion and the later modality ▷, to solve recursive domain equations whose recursion variable occurs negatively and to take fixpoints over non-terminating computation [Iris; America–Rutten; Birkedal et al.]. Normalisation requires none, because its carrier is first-order by construction and admits no negative self-occurrence.

Proposition 6.1 (the carrier is first-order; predicative). The carrier 𝒞 is an ordinary set, presenting no recursive domain equation in which it occurs negatively. Proof. Take the constituents in turn, by Definitions 2.1–2.2 and 2.6. A composite is a triple on a finite, identified, well-formed set of parts. A part is a tuple of an address in 𝒩, a finite set of ports, and a finite fragment map. The wiring W is a finite relation on ports, and the settled values Γ (Def 2.2) a finite map to first-order fragments and finite sets thereof. A port is a tuple over the fixed first-order sets of polarities {!,?}, modes {named, abstract}, names Λ, and references 𝒩. A key is drawn from 𝒦.

Every constituent is therefore built by finite product, coproduct, and the finite-powerset functor over those fixed sets. The calculus has two pointers, a named port's reference and a configuration fragment's target address, and both are first-order (𝒩). Containment is carried by the hierarchical addresses (§2), so a scope is a region of the one flat part-set and no part stores a configuration. The carrier therefore contains no occurrence of itself, and in particular none in a function domain or under a contravariant power. It is first-order: a plain set with no recursive domain equation, defined with no appeal to guarded recursion. (Were scopes instead modelled as parts that nest a composite, the carrier would occur once and covariantly: an ordinary inductive datatype, and a fortiori the initial algebra of a strictly positive finitary functor [Adámek]. Covariant self-reference is harmless and the conclusion is unchanged.) ∎

The distinction turns on variance, and self-reference alone is harmless. A covariant occurrence would be an ordinary inductive datatype. What no set construction solves is a negative occurrence. This yields the framework-independent statement that, for carriers of this section's form, predicativity is the absence of negative self-occurrence, of which "needs no step-indexing" is the same statement relative to one framework.

Normalisation adds no recursion of its own. N ∘ A is a finite composition of total, single-pass, part-preserving functions (§4). Assembly is the order-independent ⊕-fold (Corollary 4.3) and N = bind saturates in one pass (Remark 4.4). N ∘ A is computed once and never approached as a fixpoint, so no well-founded recursion, and a fortiori no step-indexing, is invoked.

To state the predicative/impredicative line as an equivalence rather than a single trigger, write the carrier as a functor of its reference discipline. By Definitions 2.1–2.6 a composite is built from the fixed first-order sets by finite product, coproduct, and finite powerset. Those sets are the addresses 𝒩, the names Λ, the polarities {!,?}, the modes {named, abstract}, and the first-order fragment values. Two codomains join them: the one a named port draws its reference from, and the one a configuration fragment draws its target from (Def 2.1). Both are 𝒩 so far. Only the reference codomain is varied below, the target being the poorer pointer and varying identically (Remark 6.4). Collect the fixed part as a finitary polynomial functor K, strictly positive in its argument. What varies is the reference discipline, which Def 6.2 makes precise as a difunctor. The base calculus draws references from the constant 𝒩. A covariant discipline admits references to sub-configurations. Reflection admits references that are predicates over composites, so a requirement may read "bind to the provider for which P holds of the normal form." The carrier then solves the equation Def 6.2 gives it.

Definition 6.2 (reference discipline). A reference discipline gives the admissible references when the carrier is X. Take it as a difunctor R : Set^op × Set → Set, written R(X⁻, X⁺), generated by R ::= B | X⁺ | (X⁻ → D) | R × R | R + R | 𝒫 R, where B ranges over fixed countable first-order sets, those of §2 among them, D over fixed sets, X⁺ is the covariant carrier argument, and 𝒫 is finite powerset. Both B and D are required nonempty. An empty D would let the classification below call a discipline covariant that is not, since X ↦ (X → ∅) is not covariant; an empty B would let a product carrying a contravariant factor collapse to ∅, and a constant discipline solves its carrier equation whatever the factor was. Product, coproduct, and powerset are covariant, and X⁻ → D is the sole entry at which the carrier occurs contravariantly. Its codomain is fixed because a reference denotes: it picks out a part to wire to, and it does not compute a composite. A discipline drawing references from X⁻ → X⁺ would be a different object, and the reflexive equation D ≅ [D→D] lies outside the grammar for that reason, as the repairs cited above lie outside Set. The carrier equation of R is 𝒞 ≅ K(R(𝒞, 𝒞)), with K the fixed constructor collected above. The equation is read over the raw carrier, every triple the constructors generate, and in this section 𝒞 written in the equation and in Propositions 6.3 to 6.6 denotes that raw carrier. Def 2.6's composites are its decidable well-formed subset, defined once a discipline is resolved (below). Call R covariant when its derivation uses no X⁻ → D with |D| ≥ 2, and predicative when its carrier equation has a solution in Set. Predicativity is used here in a stipulated sense, narrower than the classical one, on which an impredicative definition may still have a set-theoretic referent; the obstruction it names is the Cantor argument by which Reynolds showed that polymorphism has no set-theoretic model in classical set theory [Reynolds-1984]. Covariance is read off a derivation, and no functor admits derivations of both kinds, since the injection of Proposition 6.3(ii) would then apply to it. Every result below quantifies over disciplines generated by this grammar, and over the carrier equations they determine. Def 2.3 reads a reference as a path and Def 4.1 a role as a name, so for a discipline drawing references from anywhere but 𝒩 those definitions need supplementing. Call a discipline resolved when it comes with a total computable interpretation of its references into 𝒩. Satisfaction, well-formedness and binding are then defined as in §2 and §4. The interpretation is required computable because one that is not leaves a normalisation map that is total and not computable, which Prop 6.6 would otherwise count as finitary. Claims about the carrier below hold for every discipline of the grammar; claims about normalisation are stated for the resolved ones.

The obstruction that a contravariant occurrence raises is classical. When a set X must contain a distinct element for each predicate on X, Cantor's theorem is violated, since 2^X then injects into X. The same obstruction arose in domain theory, in the reflexive equation D ≅ [D → D], and the repairs are standard: Scott's inverse-limit domains [Scott], metric-space models [America–Rutten], and guarded solutions in the topos of trees [Birkedal et al.], the last being step-indexing, the apparatus of [Iris]. Each repair solves the equation in a category with more structure than Set. What remains to determine is which reference disciplines of the grammar above raise the obstruction at all.

Proposition 6.3 (predicativity iff covariant references). Let R be a reference discipline (Def 6.2). Its carrier equation has a solution in Set iff R is covariant, and reflection is the minimal discipline of the grammar that is not. (i) Let R be covariant. The diagonal X ↦ K(R(X,X)) is then a finitary covariant endofunctor, and its initial algebra is the colimit of 0 → F0 → F²0 → ⋯ [Adámek]. The carrier is a plain set: non-recursive when R is constant, an inductive datatype when R is covariant-recursive, computed with no guarded recursion either way. (ii) Suppose R uses its contravariant argument into a codomain of size at least 2, as reflection does with R(X⁻, X⁺) ⊇ (X⁻ → 2). The equation is then mixed-variance and the Cantor obstruction above applies. Distinct predicates p : 𝒞 → 2 are distinct references, hence distinct ports, and K injects distinct port-tuples, which gives an injection 2^𝒞 ↪ 𝒞, over the raw carrier (Def 6.2), extensional reflection admitting no resolution. A solution requires a category with more structure than Set, and the repaired settings cited above supply one. (iii) In the base calculus the carrier enters the equation only through R, every other constituent of K ranging over a fixed first-order set. The least codomain for which the contravariant occurrence obstructs a set solution is 2, the degenerate X⁻ → 1 ≅ 1 being covariant. Reflection is therefore the minimal feature that forces the carrier out of Set. The carrier is predicative iff its reference discipline is covariant, which is the no-negative-occurrence criterion made precise. Proof. (i) A covariant discipline uses only the finite constructors, so the diagonal is finitary and covariant and has an initial algebra [Adámek]. For a resolved discipline the well-formed carrier is a decidable subset of it (Defs 2.3, 2.6), and normalisation is computed once (§4), with no fixpoint approached.

(ii) Fix a port's other fields. Distinct references then give distinct ports, and K injects distinct port-tuples, so (𝒞 → 2) ↪ K(R(𝒞,𝒞)) ≅ 𝒞 and |𝒞| ≥ 2^|𝒞|, which is impossible in Set. Where the contravariant space sits nested under 𝒫, ×, or +, the same injection composes with a singleton or a fixed choice of the other coordinates. For |D| ≥ 2 a two-element subset of D gives (𝒞 → 2) ↪ (𝒞 → D). Guarding yields a contractive functor with a unique fixpoint in the topos of trees [Birkedal et al.].

(iii) Immediate from the grammar, the carrier occurring only within R. ∎

Remark 6.4 (the criterion is field-uniform). Proposition 6.3 varies the reference codomain, but the same criterion governs every field. Each field of a part or configuration (Defs 2.1–2.2) has a codomain through which the carrier may enter; the wiring W and the settled values Γ add no contravariance, being a relation on ports and a map out of the fixed address set. So the carrier is predicative iff no field uses the carrier contravariantly into a codomain ≥ 2. In the base calculus every field but the reference is a fixed first-order set, so the reference is the only field a discipline can non-trivially widen, and reflection is the minimal violation; widening any other field to 𝒞 → 2 (fragment values, say) breaks predicativity identically. The reference is singled out only as the more expressive of the calculus's two cross-part pointers, the natural site for the widening; a target address widened the same way breaks predicativity identically.

The trigger is specifically impredicative reflection, where the predicate ranges over all configurations, including reflective ones. Stratified reflection lets a level-r predicate range only over configurations below level r. Each reference stays first-order in a lower universe, and R stays covariant in the current carrier, since the predicate ranges over a lower universe already fixed. By Proposition 6.3(i) the construction climbs an ordinary hierarchy 𝒞₀ ⊂ 𝒞₁ ⊂ ⋯ with no step-indexing. The cost is that no top level reflects on itself. This is exactly the predicative/impredicative line of type theory. No reflection, or stratified reflection, leaves the carrier predicative and time-free; impredicative reflection forces the recursive domain equation and the temporal apparatus.

Reflection's failure is itself a compositional fact, read from the reference discipline by §1's criterion, deduced and not measured. What fails is the carrier, and predicativity is the condition that secures it. The predicativity result of Proposition 6.1 stands on its own.

The predicativity characterisation now meets the decidable/undecidable line of §5, and the two are not independent.

Proposition 6.5 (the two costs of reflection). A reflective reference admits two readings. On the extensional reading, a reference is an arbitrary predicate p : 𝒞 → 2, the discipline of Proposition 6.3(ii). The carrier equation then has no solution in Set, so predicativity fails, and with no set carrier there is no normalisation map between sets, so the calculus lies outside the class of which finitarity is asserted. On the syntactic reading, references are written in finite syntax, so only countably many predicates are expressible. Two stipulations fix that reading: the full syntactic discipline expresses every partial computable predicate, and normalisation evaluates the predicate of every reference it normalises. The contravariant argument then lands in a fixed countable set, R is covariant, and by Proposition 6.3(i) the carrier stays a plain set, so predicativity holds. What fails is halting. The expressible predicates of the full syntactic discipline are arbitrary partial computable functions, and the second stipulation obliges normalisation to run every predicate it meets. A reflective reference's predicate is evaluated on the normal form that the evaluation itself helps determine, so normalisation reads its own output, and its result satisfies a partial computable fixpoint equation in that result, an equation neither shown to have a solution nor shown to have only one. Among the expressible predicates are divergent ones, and a declaration whose reference carries one makes normalisation diverge on it. This half records what the two stipulations entail. Normalisation for reflective references is not otherwise defined here, and a normaliser that evaluated predicates only on candidate providers would not meet the second stipulation. Under the stipulations finitarity fails, since a map that is undefined, multi-valued, or divergent on some declaration is not total computable. Syntactic reflection therefore occupies the same cell as a Turing-complete configuration language (Remark 5.2): predicative and not finitary. A deployed system sits in it. The NixOS module system evaluates a fixpoint in which a module reads the merged configuration it helps determine, and a reference that reads its own output is what makes evaluation diverge there [Dolstra–Löh–Pierron]. On either reading the form is no longer settled by reading its declaration alone. Proof. The extensional half is Proposition 6.3(ii), and a carrier outside Set supports no normalisation map between sets. For the syntactic half, the expressible predicates form a fixed countable set, so R is covariant and Proposition 6.3(i) gives the set carrier. The expressible predicates include divergent partial computable functions, and by the second stipulation a declaration whose reference carries one makes normalisation diverge on it. ∎

Proposition 6.6 (finitarity nests in predicativity). The class quantified over is the calculi whose reference discipline is of the form above and resolved (Def 6.2), which have a normalisation map of which finitarity can be asserted. Such a calculus is finitary iff it is predicative and its normalisation map halts on every finite declaration; in particular every finitary calculus is predicative, properly. Proof. (⟹) Let the calculus be finitary. Finitarity makes the normalisation map total computable (§5), hence a function between sets, so both its domain and its codomain are sets. Were the discipline contravariant into a codomain of size at least 2, the carrier equation would have no solution in Set (Proposition 6.3(ii)), and the calculus would have no such sets and no normalisation map, so it would lie outside the class quantified over rather than fail finitarity within it. On the extensional reading in particular, even the declarations normalisation would consume carry references in 𝒞 → 2. The syntactic reading raises no such obstacle; there declarations stay finite, and Proposition 6.5 shows the cost falls on finitarity instead. So the discipline is covariant, and by Proposition 6.3 the carrier is a set, the predicative case. A total computable map on finite declarations halts. Finitary therefore entails predicative and halting.

(⟸) Let the discipline be predicative and resolved. Then 𝒞 is a set (Proposition 6.3(i)), so normalisation is a genuine function between sets. Its assembly-and-bind core N ∘ A is a finite composition of total part-preserving steps (§4). Finitarity is the further condition that the whole map halts on every finite declaration, the evaluation stage applied to the declarations' fragments included (§5). The normalisation map is then total computable, hence finitary.

(Properness) Predicativity does not give halting on its own. A predicative calculus may carry a normalisation stage that diverges with no contravariant occurrence of the carrier: a Turing-complete configuration language (Remark 5.2), whose references are drawn from 𝒩 itself, so the interpretation is the identity and the discipline is resolved. Its carrier stays a first-order set, yet normalisation need not halt: predicative and not finitary. Syntactic reflection diverges the same way (Proposition 6.5), and its interpretation is partial rather than total, so it lies outside the resolved class quantified over here. ∎

The proper gap between the finitary and the predicative classes holds the halting-only failures, of which the Turing-complete configuration language is the one exhibited within the resolved class (Proposition 6.6; Remark 5.2). Syntactic reflection fails the same way, predicative and not finitary, and lies outside that class, its interpretation being partial (Propositions 6.5, 6.6).


7 Realisation, operation, and the delegation boundary

A normal form specifies a system completely and canonically. Running the specified system is a further act. Two stages are delegated across the delegation boundary (§1) to substrates the calculus treats as external oracles.

Realisation directs a substrate to make the form actual (build an image, provision a resource, register each part). Operation is the running of the realised system. Normalisation settles the form, realisation makes an instance of it, and operation runs that instance. Both lie past the delegation boundary, and they differ in kind. Realisation is the substrate's making of the system; operation alone is the system's own act. The delegation boundary is what makes the calculus applicable to real systems.

The substrate builds what the declaration specifies. Past the operation point the instance's running is its own, and the calculus says nothing about it. The two sides of that point differ in what is counted. The form is one and is normalised once; instances are many, and each instance crosses into operation separately. Realisation is the step that produces an instance from the one form, and §5 places the running of that instance beyond decision.

A substrate is an opaque relation from normal-form regions to outcomes. Determinism is not assumed of it, since runtime nondeterminism is what the delegation boundary exists to delegate. The calculus is parametric in the available substrates. Which substrate realises a part is itself declared data, a configuration fragment like any other, and it drives the dispatch.

Realisation is itself an assembly, of the instance rather than the form, and it needs an order, which ⊕ does not carry. The order it needs is fixed by the form. A required port wired to a provided one puts the provider before the consumer, so the wiring induces a dependency relation on the parts, and the schedule is any linear extension of it. Its reverse governs teardown. The form determines that relation completely and leaves free exactly the orderings between parts that depend on neither, which a substrate may take in either order or at once. A collector's presentation is delegated the same way. The form carries each contributed fragment with its source address and imposes no order on the set (Def 2.3), so a substrate that concatenates them fixes an ordering convention of its own, computed from those sources.

A wiring may close a loop, and then no linear extension exists. Whether it does is decidable by reading, so it is settled at normalisation rather than discovered when a schedule is drawn: a declaration whose dependency relation is cyclic yields a defined error and no normal form, as a dangling fragment does (Def 2.3).

A double provision is refused earlier and by a different route. Each satisfaction is a property of a requirement and a part alone (Def 2.3), and no wider union takes a satisfier away, so a second satisfier, once present, stays. wf counts satisfiers, and ⊕ is undefined on a union that holds two: the composition never happens. A cycle admits no such test. It is a property of the whole derived wiring, where wf counts satisfactions that are themselves pair-local and is downward closed for that reason (Lemma 2.4), which is the locality Proposition 3.3's proof reads. Putting both under one name would make wf two conditions of different kinds. An early check would also refuse too much. bind adds edges (§4), and a disjoint frame can re-rank a binding (Prop 4.8), so an edge that closes a loop in one composite need not survive into the normal form of a wider union. The check therefore falls after binding, on the assembled whole, on the normal form the composite would otherwise have been.

A normal form may still carry open required ports, so a composition is legitimately partial: complete as a specification, partial as a closed system.

The normal form of Example 4.6 realises region by region. data/store goes to a key-value process listening at 127.0.0.1:7000 and holding the records its collector settled, service to an HTTP server on port 8080 serving that store, and seed to a one-shot writer that opens the store and writes its first key. data and catalog go to nothing, their fragments already settled into Γ. The schedule is any linear extension of the wiring, a provider before its consumer. The substrate is opaque to the calculus here. The same normal form could be realised by clerks keeping a ledger and answering queries by hand, or by a mix of process and clerk, and ⊕ could not tell which, realisation lying wholly on the far side of the delegation boundary. Which substrate realises a region lies beyond the form.

Remark 7.1 (the run as operation stage). The delegation boundary is also where the undecidability of Proposition 5.1 enters. A machine's description is itself a realised form, so a normal form whose region delegates a transition function to a universal substrate realises a universal machine. Write N ∘ A for the normalisation map of §4 and U for the universal runner the substrate supplies. The artifact is M = U((N ∘ A)(S)), and (N ∘ A)(S) is the determinate description, fixed without running. So a machine's run is the operation stage of the composed system whose description normalisation fixed.


8 The parallel complement to the sequential calculus

The immediate neighbour is the composition calculus of Fettke and Reisig [Fettke–Reisig], whose operator is the sequential one, modules joined end-to-end through directed interfaces, a non-commutative, cancellative algebra generalising concatenation. Fettke and Reisig isolated the calculus of the sequential mode. This paper isolates the calculus of the parallel one, which is the mode that settles a form. Their claim, and their title, is that the sequential operator composes modules once and for all. The disagreement here is with the scope of that claim and with nothing inside it. They isolated the sequential mode and axiomatised it, and that stands. The parallel mode is a second mode of module composition, and Proposition 8.2 shows that no restriction of their operator reproduces ⊕ under any encoding this section quantifies over. Their own diagnosis marks the border. They found by-name merging non-associative and read that failure correctly, and Remark 8.1 locates it in the pairwise merge rather than in by-name matching, so the road they turned back from is the one this calculus takes.

Fettke and Reisig reached the sequential operator by rejecting a by-name merge that is not associative. When three modules share a label, a pairwise merge internalises and consumes the first match, so the result depends on the bracketing. ⊕ is a different by-name operator that avoids exactly this. Feature algebra gives an independent instance of the same diagnosis [Apel–Lengauer–Möller–Kästner]. Its superimposition merges tree nodes by name, keeps each merged node available to a later merge, and is associative. It is not commutative, because overlapping terminals are merged in the order of composition, and its authors note that forbidding that overlap would make it commutative. In both calculi a by-name merge that consumes no match is associative, and they part on whether overlap is ordered or refused. Re-deriving the wiring on the whole union (Def 2.5) consumes no match, so a shared name normalises identically under any bracketing; and a requirement with two providers, the genuinely ambiguous case, is refused under uniqueness-or-error rather than wired order-dependently. So the form's side has a by-name operator, and interaction survives it. The price is that ambiguity is refused where the pairwise merge would silently choose within it. (A shared name that fans in to one provider is wired by re-derivation; one that fans out to two providers is the refused case, where associativity holds in the partial-monoid sense, both bracketings being equally undefined.)

Remark 8.1 (why the pairwise merge fails). A pairwise merge consumes its match, so the bracketing decides which match is consumed first, and the result depends on the bracketing. Fettke and Reisig's repair is composition by two-sided interfaces, proved associative over a global set of symbols by Reisig [Reisig-2019], whom they cite. ⊕ re-derives over the whole union, and the union has no bracketing to take an order from. By-name normalisation operates on the system as declared, which has no order to import. Theorem 3.1's associativity depends on that re-derivation.

Proposition 8.2 (no commutative restriction of the sequential operator is ⊕). A positional sequential operator is commutative on a pair of parts exactly where they do not interact, that is, where their interface labels are disjoint and the composition is mere juxtaposition. This is Fettke and Reisig's own commutativity criterion [Fettke–Reisig, Thm 5, in the numbering of the arXiv PDF]. Their operator commutes on a pair, M·N and N·M being interface-equivalent, iff M and N are not entangled, where entangled means sharing a gate label (their Def 12, likewise). Their commutativity is taken up to interface equivalence throughout, and ⊕'s holds on the nose; the argument below uses only the failure of their commutativity, which the weaker notion already gives. ⊕, by contrast, is commutative wherever it is defined. Its domain includes pairs that do interact through a single-provider wiring, and it refuses the multi-provider case. Under any encoding that identifies parts with modules, and shared names and matched references with shared gate labels, and that carries the sequential operator's commutativity regime to the encoded carrier, that regime excludes every pair ⊕ wires. Proof. Suppose, under such an encoding, that ⊕ were the restriction of the sequential operator to a sub-domain D on which the latter is commutative. Then D would contain no interacting pair, the sequential operator being non-commutative on those. But every wired composite of ⊕ is an interacting pair, so ⊕'s wiring could never arise on D. Hence no commutative restriction of the sequential operator reproduces ⊕. ∎

The broader claim, that ⊕ is no fragment of the sequential operator under any encoding that keeps the interfaces, is argued rather than proved. An encoding that forgets them makes ⊕ a restriction of the transported operator trivially (§10). Under one that keeps them, simulating by-name matching inside a positional operator demands a global gate-index assignment, which destroys the locality the frame property rests on (Prop 3.3). A sequentialisation of a normal form is any linear extension of its dependency relation (§7), one form to many sequences with none canonical; a functor would have to select one, and no selection is canonical. A formal non-embedding awaits both operators in one setting, the question left unanswered in §10.

Compare Moller's theorem that the parallel merge of CCS has no finite equational axiomatisation over the sequential operators without auxiliary operators [Moller], a far stronger result about bisimulation congruence, and a separation of the two modes reached in a different setting. Process algebra's expansion law, which appears to express a finite parallel composition through sequential composition and choice, is no counterexample. It is a schema, one instance per pair of head normal forms, infinitely many equations rather than a finite axiomatisation; and the finite axiomatisations that do exist adjoin exactly those auxiliary operators, the left and communication merges, which Moller's result shows cannot be finitely eliminated. Exhibiting a formal functor relating the two settings would still illuminate; in process algebra the reductive claim is settled in the negative [Moller].


9 Related work

The separating monoid, the frame property, and the sequential/parallel complementarity are each prior art. The separating monoid and the frame property come from separation logic [Reynolds; O'Hearn; Calcagno–O'Hearn–Yang]. The categorical accounts of interconnection by gluing along shared interfaces pair a sequential product with a parallel one: hypergraph categories, structured cospans [Baez–Courser], and wiring-diagram operads [Spivak]. Against the gluing accounts, ⊕ is deliberately the separating counterpart, connecting without merging. The new element is the re-derivation of the binding relation from required-to-provided name normalisation under a uniqueness-or-error discipline, where trace theory takes the independence relation as primitive and separation logic takes the resource keys as given. Earnshaw, Nester, and Román type the trace's actions. Each action carries declared inputs and outputs rather than a bare name, and the traces so typed present effectful categories, with a commuting tensor of the free ones [Earnshaw–Nester–Román-Traces]. The typing governs the sequencing while the commutations come from elsewhere, from the presentation within a system and from the commuting tensor they construct across two systems; ⊕ derives the wiring from the names and refuses the double provision.

Institutional model theory [Goguen–Burstall] treats any logical system abstractly and composes theories within one. Signatures glue by colimit, and the satisfaction condition holds truth invariant under signature morphisms, the change of notation that justifies the gluing, so composition comes prior to interpretation. It works a level above this calculus and leaves the gluing abstract, where ⊕ composes parts within one flat carrier by name normalisation and settles the result under a uniqueness-or-error discipline; the shared shape is composition-before-interpretation, the difference is the level of abstraction and the determinacy.

Module systems with by-name linking include MixML [Dreyer–Rossberg], which is directional and non-commutative where ⊕ is commutative, and Ancona–Zucca's confluent module-operator calculus [Ancona–Zucca], oriented to type soundness and not to a separating monoid. In its POPL 2014 form, Backpack, MixML's descendant, permits unfilled holes and links a module name bound twice only when both bindings are the same module, two distinct implementations being an error [Kilpatrick et al.]. A 2016 draft requires the domains of a union to be disjoint and computes a wiring diagram for a unit's direct dependencies [Yang et al.]. Its linking of two component shapes fills requirements from provisions by module name, and a distinguished failure shape, returned on any error, makes it total. Two shapes that provide one module name fail to link, and the draft remarks that associativity relies on that failure. Its Lemma 2 states that well-formed shapes form a commutative monoid under linking, with the empty shape as identity [Yang et al., §4]. The draft gives no proof of the lemma and records that its metatheory has not been rigorously proved [Yang et al., §7.1]. The draft states no cancellation law and no frame property for linking, which Theorem 3.1 and Prop 3.3 prove of ⊕. A shape records required and provided module names and module identities and carries no configured values, so an algebra of settled values (Prop 3.2) has nothing there to act on. On the securing discipline, the nearest prior is the trait. A trait sum flattens its operands into one whole, and a method defined by two operands is an error the composer must normalise rather than a silent override, so the sum is commutative and associative [Schärli et al.; Ducasse et al.]. Two of the four clauses are therefore two decades old, and they were adopted there for the reason given here, that a composite computed from the whole imports no order from its bracketing. Traits carry no addresses, so no part plays a resource and no separating monoid arises. They carry no configuration at all, so an algebra of settled values under the same discipline is not in question. No frame property is available to them, the flattening reading the whole composite where the frame property holds of a wiring relation preserved under extension. On the by-name axis, the nearest priors are two formalisations of by-name combination. Bracha's Jigsaw merge [Bracha] is a commutative and associative by-name combination of modules with definition conflicts as errors, but it binds by fixpoint over a shared name space, with no wiring relation, no addresses, and no frame property. Cardelli's linkset merge [Cardelli] is a by-name link operation proved confluent and terminating under an export-disjointness partiality, but binary and substitution-consuming, and it states no associativity law, frame property, or algebra of settled values.

By mechanism, the nearest prior is the unification of a configuration language: CUE combines values commutatively, associatively and idempotently over a lattice, order-independently by construction, with conflict as an error [CUE]. The combination is total where ⊕ is partial, it unifies values where ⊕ derives a wiring relation between declared ports, and addresses are not resources it composes, so no separating monoid or frame property arises. The clauses of the securing discipline have precedent, in traits above all, and the symmetric concatenation of record calculi refused a conflict earlier still [Harper–Pierce]. The NixOS module system carries several of the clauses over addressed parts already. Independent modules contribute to hierarchically addressed option paths, and list-typed options collect every definition, in an order that depends on the module order [Dolstra–Löh–Pierron, §5.1]. An option that does not merge and is defined twice is an error, and a double definition is met by priority, keeping only the definitions of the highest priority and refusing only on a tie that the option's type cannot merge [NixOS-manual]. That ranking orders values by declared priority, where the ranking of Prop 4.8 orders candidates by scope. Its cost is the analogue of Prop 4.8's for the settled values, since a module added with a higher priority displaces a value already settled. No mechanism above has the discipline as a proved algebra over both halves of the derived form, the wiring and the settled values, refusing ambiguity in each where the NixOS module system ranks. For module names alone, Backpack's Lemma 2 states, without proof, a commutative monoid in which a double provision fails to link. The draft states neither a cancellation law nor a frame property for linking, which Theorem 3.1 and Prop 3.3 prove of ⊕. Dependency injection [Fowler] and a linker's global symbol resolution [Levine, ch. 5] exhibit a common pattern, and ⊕ gives it proved laws, no encoding of either being offered here. A linker resolves in one pass over a flat table. Compile-time injection, as in Dagger 2 [Dagger], computes the binding graph from the union of the declared modules, with a type and an optional qualifier as the key. It refuses a duplicate binding and collects multibindings into a set or a map. A set drops duplicate elements and a map refuses a key collision. The refusal of a duplicate binding matches the exclusive kind of fragment (Def 2.3). Neither multibinding matches the accumulating kind, which keeps every fragment. What neither practice carries is an associativity law, a frame property, an algebra of settled values, or a delegation boundary. The Concurrent Views Framework [Dinsdale-Young et al.] layers a reification map over a commutative resource monoid, the nearest analogue of wiring-over-a-monoid with a delegation boundary, but its extra structure is interference for concurrency soundness, where ⊕'s is static by-name wiring.

Feature-oriented software development composes features by superimposition, merging feature structure trees by matching nodes' names and types [Apel–Lengauer–Möller–Kästner; Apel–Kästner–Lengauer]. Its introduction sum, also written ⊕, is associative and idempotent, and it is not commutative, because overlapping terminals are merged by language-specific rules. Free assembly refuses the overlap (§8). Two parts at one address do not compose and a key configured twice is refused, so the operator commutes, and an idempotent composition cannot cancel, since i ⊕ i = i ⊕ ξ would give i = ξ. Refinement survives the choice and moves to the receiving part. A part that accepts refinement keeps a collector, every contribution addressed to it is kept with its source (Def 2.3), and the precedence among them is a rule the receiver applies to the collected set. The set carries each fragment with its source and no order of collection, so any function of it, the receiver's precedence among them, is independent of the order in which the parts were composed. The results of §3 and §4 stop at the collection, and the precedence lies past the delegation boundary. In feature composition the later feature overrides, and the result depends on the order in which features are composed. Superimposition merges structure and derives no wiring between parts.

Delta-oriented programming applies deltas that add, modify and remove program elements by name, in an order a partial order constrains [Schaefer et al.]. A product line is unambiguous when every compatible total order yields the same product, a property checked of each product line [Schaefer–Bettini–Damiani]. Here order-independence holds of every composite (Corollary 4.3), a conflict that a delta product line resolves by ordering is refused, and deltas that remove form no cancellative monoid.

On uniqueness of the normal form, the unique-decomposition theory for partial commutative monoids [Milner–Moller; Luttik–van Oostrom] is the structural twin; ⊕'s unique normal form comes from global name-matching (Corollary 4.3). A decomposition order plays no role, and the strict-compatibility and Archimedean conditions of that theory are not assumed, so the distinction is the mechanism. Decomposition itself is settled by Corollary 3.4, the indecomposables being the singletons and the decomposition unique. In the operadic setting a wiring diagram is already a normal form because the symmetric-monoidal laws hold on the nose [Patterson–Spivak–Vagner]; ⊕'s determinacy is instead a fact about computed wiring (Corollary 4.3). The delegation boundary is in the lineage of functorial semantics [Lawvere]. Coordination languages (Reo [Arbab], BIP [Bliudze–Sifakis]) and the process calculi (CCS/CSP/π) carry by-name parallel composition too, but on the behavioural, runtime side; ⊕ is their static counterpart.

The categorical setting for two interacting composition products, one sequential and one parallel, is the duoidal (2-monoidal) category [Aguiar–Mahajan]. Its interchange is generally non-invertible, and recent work uses that for an explicit account of sequential-versus-parallel process composition [Cranch–Struth; Earnshaw–Hefford–Román]. Concurrent Kleene algebra's exchange law is its order-theoretic ancestor [Hoare–Möller–Struth–Wehrman]. The sequential product carries order, the parallel product settles a form, and the interchange relates the two. ⊕ is the partial, separating parallel product of that pairing, deriving its wiring by name under uniqueness-or-error, and its normaliser bind ranks candidates by scope (Def 4.1). The duoidal and produoidal accounts work with total products and a unit-coincidence normalisation, where this calculus has a partial separating tensor and a by-name wiring step. No duoidal structure is claimed for (𝒞, ⊕, ∅), which §3 treats directly as a partial commutative monoid.

Earnshaw, Nester, and Román have since axiomatised the partial case, monoidal categories graded by a partial commutative monoid, where each morphism carries a grade and the tensor of two morphisms is defined exactly when their grades combine [Earnshaw–Nester–Román]. Among the gradings they call particularly well behaved are separation algebras, the cancellative partial commutative monoids, the class in which Theorem 3.1 places (𝒞, ⊕, ∅). There the monoid grades a category of processes; here the monoid is the carrier, the composed configurations, with the wiring layered over it (§3).

The phenomenon of §1, boxes wired to boxes before the system exists, is the subject of architecture description languages, which formalise a system from its components and connectors [Medvidovic–Taylor]. These are closest to the motivation here, and they typically carry no proved-law operator, no confluent normalisation, and no delegation boundary. Among practical systems, purely-functional deployment normalises a declared composition to a normal form before realising it, which is the normalise-before-run pattern of §5 [Dolstra]. Nix and Bazel work this way, and each is a single substrate scoped to build and configuration. ⊕ states the pattern with an explicit parallel operator and proved laws, in a calculus parametric in its substrates (§7). Declarative infrastructure tools, Terraform, Helm, and Crossplane, likewise normalise before applying, but on a single plane and, for the platform-bound ones, a single platform; the present calculus treats such tools as substrates across the delegation boundary.

Daedal, the composition engine that realises this calculus, resolves a strict reference, one that selects a single provider, in one of two ways. A pinned reference resolves by its pin. A pin is written under pin: in the manifest of a root, module or branch that encloses the declaring component and the target, keyed by the declaring component and the reference, and names the address of the part it selects. A region pin covers every declarer inside a branch. A pin for one declarer outranks a region pin, and an inner region an outer one; two of equal rank are refused. Compile honours the applicable pin before any walk and checks only that a part stands at that address and matches the reference, refusing a pin whose target is absent or does not match. The reference then resolves by that address, as a port pinned by Def 4.9 does, and the pinned port of the calculus is frame-local by Proposition 4.10. Region pins rank and so lie outside Def 4.9, and whether a nearer region pin can arrive by a disjoint addition, re-routing a reference as in Proposition 4.8, is unanswered. An unpinned reference is resolved by scope ranking. It is matched by segment-aligned suffix within the declaring component's nearest enclosing scope that holds any match, outer scopes going unconsulted, and several matches in that scope are an error. A cross-cut emitter, an aspect or a component carrying offer:, sends its fragments to every match in that scope instead. A reference to a service resolves by the same walk. The walk is the bind regime of Def 4.1, applied to named references as well as to roles, and by Proposition 4.8 it lacks the frame property. A same-named component added in a nearer scope re-routes an unpinned reference, and the engine records each resolution and refuses to apply such a capture unless it is accepted or the reference qualified. In Daedal the frame property holds of the settings, which resolve without a scope walk under uniqueness-or-error. It is not claimed of the engine's references, pinned or unpinned, while compile accepts an unpinned one. daedal pin proposes for each unpinned reference the provider the walk selects and writes the accepted choice as a pin. The wiring claim of Proposition 4.10(i) is the calculus's. Its engine analogue is that, where the operator accepts the proposal, the pinned reference selects the provider the walk selected. Compile is designed to refuse an unpinned strict reference, so that every strict reference is pinned, and the certificate of a compile is designed to list each selection. That refusal is not yet built, and the compositions in use are not yet pinned, so their strict references still resolve by the walk. Multiplicity is expressed by spatial branches. Two instances of one step sit under distinct enclosing scopes, as host-1/store and host-2/store, which Def 2.3 would count as two providers for a bare store. Scope ranking separates them for a reference declared inside one branch, a bare store declared outside both is ambiguous in the engine as well, and a pin selects one of the two.

In four further places the engine ranks where §2 refuses or reaches further than Def 2.1. Grants of host authority resolve closer-to-root-wins, and the engine counts them part of the normal form, so a ranked override sits among values that §2 settles by uniqueness-or-error. A component authored in a scope shadows an imported component at the same address, where Def 2.5 leaves ⊕ undefined on collision. An exclusive fragment reaches one segment in Def 2.1, and in the engine a scope's setting reaches any depth below the scope, the scope itself excluded, and a leaf component's setting reaches only that component; the engine still refuses a second setter of one key. A setting also fans out to every component in the declaring scope's subtree whose address ends in its target, where a fragment of Def 2.1 addresses one part.

A setting that matches nothing is a compile error. The engine compiles only whole declarations, so this is the refusal of a dangling fragment that Def 4.2 makes at normalisation, and the permission Def 2.3 gives one in an operand has no stage in the engine at which to apply. A strict reference that matches nothing on the whole chain is an error as well, where the calculus leaves the requirement open, even in a normal form (§7). The engine therefore refuses the incompleteness that associativity rests on (§1, Remark 3.6), with two exceptions: a delegated step that nothing binds, which compilation accepts and planning refuses, and an offer bound to an aspect that matches nothing in scope, which is skipped.


10 Conclusion and scope

The contribution is two properties of by-name parallel composition over named ports and fragments, and the discipline that secures them. The discipline has four clauses in two pairs. The first pair yields associativity (Theorem 3.1, Remark 8.1), and with it determinate normalisation (Corollary 4.3). The composite is a function of the union, so it cannot depend on the order its parts arrived in; and an unmet requirement is permitted, which leaves well-formedness downward closed, the hypothesis Remark 3.6 names. The second pair yields the frame property (Prop 3.3). Candidacy is a property of the requirement–part pair alone, so no ambient set enters a derived edge; and ambiguity is refused. A discipline that met a double provision by ranking the candidates would be determinate too, and it would re-rank when a disjoint frame supplied a better one, exactly as binding does (Prop 4.8), so no established wiring would survive extension. The binding of abstract ports in §4 is that ranked discipline, an extension of the calculus with weaker laws, and Daedal resolves its unpinned references the same way (§9). A pin written from bind's choice wires its port as bind did, and the pinned wiring keeps the frame property (Prop 4.10). Refusal also leaves γ nothing to discard, which is why the settled values of anything that normalises determine the fragments they came from (Prop 3.2). Cancellation follows from disjointness of the operands. The algebra is a cancellative partial commutative monoid in the sense of separation algebras, with the laws of disjoint union (Remark 3.6), and the frame property holds of the named wiring and of the settled values alike. The finitary class, on which normalisation and operation split across the decidable/undecidable line, lies properly inside the predicative class (Propositions 5.1, 6.6). Reflection, which widens one of the calculus's own pointers, is the minimal discipline of the reference grammar (Def 6.2) that forces the carrier out of Set (Proposition 6.3, and Remark 6.4 on what else a widened field would do).

The calculus describes systems whose dependency relation is acyclic, since a cycle leaves no realisation order and is refused (§7), and mutual dependence, ordinary in deployed systems, falls outside it. Prop 8.2 is proved for the encodings it quantifies over, by a model-theoretic argument that exhibits no refused functor; the question of a functor relating the two settings is unanswered. Earnshaw, Nester, and Román propose, as a direction, grading by a "partial duoid", an algebraic structure with two monoid structures, possibly partial, one grading the monoidal product and one sequential composition [Earnshaw–Nester–Román, §7]. Their heterogeneous composition at the join a ∨ b suggests the notion [Earnshaw–Nester–Román, Prop. 5.1]. Taking ⊕ as the parallel product of a partial duoid and the composition of [Fettke–Reisig] as its sequential one is a candidate, and Proposition 10.1 tests one transcription of it.

Proposition 10.1 (on part-sets, disjoint union and ⊕ do not interchange). A partial duoid is read here as one set bearing two partial associative products, the parallel one commutative, related by an oriented interchange law: whenever a ⊕ b, c ⊕ d, and (a ⊕ b) · (c ⊕ d) are defined, then a · c, b · d, and (a · c) ⊕ (b · d) are defined and the two composites are equal. The orientation runs from sequential composition of parallel pairs to parallel composition of sequential pairs, the direction of concurrent Kleene algebra's exchange law [Hoare–Möller–Struth–Wehrman]. It is also the direction of the interchange map of a 2-monoidal category when its first product is read as the series product and its second as the parallel product, as in the directed-graph example of [Aguiar–Mahajan, Def. 6.1 and Example 6.17]. The produoidal laxator of [Earnshaw–Hefford–Román, Def. 4.2], read on decompositions, runs the other way. The transcription is equational, and both sources are weaker. With a unit for each, an equational interchange between total products collapses the two into one commutative product, by the Eckmann–Hilton argument [Aguiar–Mahajan, Prop. 6.29 and Remark 6.30; categorically Prop. 6.11]. The duoidal interchange is a morphism that need not be invertible, and concurrent Kleene algebra's exchange law is an inequality. [Earnshaw–Nester–Román] propose the partial duoid as a direction and do not develop it, so this reading is one candidate transcription, and the units are left aside. The parallel product is ⊕ (Def 2.5). The sequential product is the composition of modules of [Fettke–Reisig], written · as in Prop 8.2. An encoding brings the two to one carrier. The one used here identifies parts with modules and names with gate labels, as those of Prop 8.2 do, and is fixed by four clauses.

  • (E1) Each part is an atomic module, whose gates are the part's named ports. A provided port's gate is labelled with its name, and a named required port's with its reference.
  • (E2) The part-set of a module composed by · is the set of its atomic modules, each with its ports unchanged. A gate that · matches moves to the module's interior, and the port stays declared on its part.
  • (E3) · is carried to the carrier for every pair of operands with disjoint addresses, and a collision leaves it undefined, as a collision leaves ⊕ (Def 2.5).
  • (E4) The common carrier is 𝒫, the identified finite part-sets, well-formed or not. ⊕ is Def 2.5 transported along M ↦ (M, w(M), γ(M)), a bijection from the well-formed members of 𝒫 onto 𝒞 (Def 2.6).

Three consequences follow. By (E2), ‖M · N‖ = ‖M‖ ∪ ‖N‖. By (E2) and (E3), · on 𝒫 is that union, defined on the address-disjoint pairs and on no others. By (E4) and Def 2.5, ⊕ on 𝒫 is defined when the addresses are disjoint and wf(M₁ ∪ M₂), and on no other pairs.

Under Kleene equality · is associative, as disjoint union is, and ⊕ is associative and commutative by Theorem 3.1's proof. ⊕ is partial, and by Lemma 2.4 it is undefined whenever an operand is ill-formed. Fettke and Reisig's own · is total [Fettke–Reisig, §2.1, Postulate 3]. Its transport is partial at a collision alone, and the proof below uses no totality. 𝒫 records no interface, so it forgets which side of a module a gate sits on, and with it the order on which Prop 8.2 turns; of · it keeps the part-set and the definedness. Under (E1) to (E4), ⊕ and · do not satisfy the oriented law.

Proof. Write n for a name, and take four distinct segments x₁, x₂, x₃, x₄ ∈ Λ, each distinct from n. Let a = (x₁, {?n}, ∅) carry one named required port of reference n, let b = (x₂, {!n}, ∅) and d = (x₄, {!n}, ∅) each carry one provided port of name n, and let c = (x₃, ∅, ∅) declare no port. Read as singleton part-sets, all four are well-formed and lie in 𝒫. No address ends in n, so no part satisfies a's port by address, self-ports included (Def 2.3). In any part-set the satisfiers of that port are therefore its members among b and d, matched by name. No other part carries a required port, and with no fragments no target and key is configured at all.

a's port has one satisfier in {a, b}, so wf({a, b}) holds and a ⊕ b is defined, wiring a.?n to b.!n. {c, d} carries no required port, so c ⊕ d is defined. By (E2) and (E3), (a ⊕ b) · (c ⊕ d) is defined and equals {a, b, c, d}, the four addresses being distinct. The antecedent holds. That element lies in 𝒫 and is no composite, since a's port has two satisfiers in it, b and d. By (E3), a · c = {a, c} and b · d = {b, d} are defined, and both are well-formed, {a, c} leaving a's port open and {b, d} carrying no requirement. Their union is {a, b, c, d}, on which wf fails, so (a · c) ⊕ (b · d) is undefined (Def 2.5). The consequent fails. ∎

The failure is one of definedness alone. The antecedent's sequential product and the consequent's parallel one have the same part-set, and only ⊕ checks it for well-formedness. Under (E1) to (E4) the reverse orientation holds. A defined (a · c) ⊕ (b · d) has a well-formed union, so a ⊕ b and c ⊕ d are defined by Lemma 2.4, · is defined on their disjoint addresses, and both sides are the one part-set a ∪ b ∪ c ∪ d.

Proposition 10.1 is a statement about 𝒫 alone. On 𝒫, · is commutative and ⊕ is its restriction to the pairs whose union is well-formed, a commutative restriction of the transported · that reproduces ⊕. Prop 8.2 does not exclude it, because 𝒫 lies outside the encodings 8.2 quantifies over. Those carry the sequential operator's non-commutativity on entangled pairs to the encoded carrier, and 𝒫 forgets the interfaces and that non-commutativity with them. The empty part-set is a unit of · on 𝒫 and of ⊕ on its well-formed members, and with that shared unit the oriented law reduces to one implication: for well-formed a and d, if a · d is defined then a ⊕ d is defined. Taking b = c = ∅ in the law gives the implication, and applying the implication to a ∪ b and c ∪ d gives the law back. The proof shows only that the implication fails, so that on well-formed pairs the domain of · is not contained in the domain of ⊕.

The failure is generic to a separating parallel product set against a sequential product defined on more pairs, and is not peculiar to ⊕. Take the subsets of a set, with disjoint union as the parallel product and union as the sequential one, the pair of [Earnshaw–Nester–Román, Example 5.3], whose sequential grade operation is the join [Earnshaw–Nester–Román, Prop. 5.1]. Let a = {1}, b = {2}, c = {2} and d = {1}. The disjoint unions of a with b and of c with d are defined, and so is the union of the two, as every union is. But a ∪ c and b ∪ d are both {1, 2}, and their disjoint union is undefined. The first half of the reduction above needs only a shared unit, so for any two products that share one the oriented law fails whenever the parallel product refuses a pair on which the sequential product is defined, each operand being composable with the unit.

The reverse orientation holds on the subsets, as it does on 𝒫. If the disjoint union of a ∪ c with b ∪ d is defined, then a ∩ b and c ∩ d are subsets of (a ∪ c) ∩ (b ∪ d), which is empty, so both disjoint unions of pairs are defined and both composites are a ∪ b ∪ c ∪ d. The reverse orientation is the one a grading by the subsets needs. As far as the grades go, a parallel composite of two sequential composites is defined when the joins of the grades are disjoint, and that implies that the grades of each parallel pair are disjoint, which is what the sequential composite of the two parallel composites needs.

Which orientation fails, and how, depends on the encoding. Under an encoding in which · consumes the gates it matches and drops the matched ports from the part-set, closer to Fettke and Reisig's operator, a requirement that · has consumed no longer counts toward wf. A sketch, with no carrier and no interface fixed, suggests that the reverse orientation then fails on definedness as well. Let a hold one part requiring n and one providing it, b and c one part providing n each, and d one part declaring no port, the five parts at distinct addresses of which none ends in n. Then a ⊕ b is refused, its requirement having two satisfiers. With the gates placed to match, a · c consumes the requirement against c's provision, and (a · c) ⊕ (b · d) is defined. Whether a restriction of · to the quadruples on which consumption and re-derivation agree remains a partial monoid, and whether its pair with ⊕ then satisfies the law, is open. Prop 8.2 shows that, under the encodings it quantifies over, no commutative restriction of · is ⊕.

In a category graded by a partial duoid, the interchange would stand in for the functor that §8 leaves unexhibited. A functor from the parallel setting to the sequential one must choose a sequentialisation of each form, and §7 gives one form many schedules with none canonical, so a functor would have to select one. In a category graded by such a duoid no schedule need be chosen. Both products belong to one structure, and the comparison between the two modes is the interchange family itself, one instance per quadruple. The two products form no partial duoid on 𝒫 in the orientation transcribed here (Proposition 10.1), and the reverse orientation holds on 𝒫. The proof of Proposition 10.1 uses only the refusal clause. 𝒫 forgets the interfaces, so the question that remains is posed on a carrier that keeps them. A restriction on which the law held there would make the complementarity of §8 a structure, the two calculi the two products of one partial duoid on that restriction.

Further directions of the calculus itself include dynamic reconfiguration, mobility, and failure, each a run-time matter or a succession of recompositions rather than a move of ⊕. One direction lies on the theory rather than the calculus. Impredicative reflection is repairable at the ω-indexed level of the topos of trees (Proposition 6.3), and whether a graded family of reflective features induces a transfinite hierarchy of indexing heights is left unanswered [Svendsen–Sieczkowski–Birkedal].

The calculus applies to the systems its own condition picks out. A system has a compositional layer this calculus captures when it is finitary: a finite composition of interface-bearing parts (§2) whose form is settled by its declaration and read from it, its normalisation halting (§5). One direction is shown, since the calculus of §2 is finitary (§5). The other, that every system meeting the condition is captured, is how the class is drawn and is not a theorem. Finiteness and a halting normalisation are the condition's finitary clause; deduced, not measured is that same criterion; and predicativity, freedom from negative self-occurrence, follows by Proposition 6.6, finitarity entailing it.

The condition is therefore single, and it fails in three ways. A Turing-complete configuration language breaks termination (Remark 5.2). Wiring that turns on runtime values breaks the deduced-not-measured clause (§1, §4). Reflection breaks predicativity on the extensional reading, by leaving no carrier, and termination on the syntactic one (Propositions 6.3, 6.5). Each costs the purely compositional layer. The class so drawn is narrow in principle. It holds the systems that can be specified before they are built, and how much of what is deliberately constructed falls inside it is not a question this paper settles. Outside it are the systems whose form is settled only in the course of their making, of which the calculus claims nothing.


References

  • [Adámek] J. Adámek. Free Algebras and Automata Realizations in the Language of Categories. Commentationes Mathematicae Universitatis Carolinae 15(4):589–602, 1974. (initial algebra of a finitary functor as the colimit of the initial chain)
  • [Aguiar–Mahajan] M. Aguiar, S. Mahajan. Monoidal Functors, Species and Hopf Algebras. CRM Monograph Series 29, American Mathematical Society, 2010.
  • [America–Rutten] P. America, J. Rutten. Solving Reflexive Domain Equations in a Category of Complete Metric Spaces. Journal of Computer and System Sciences 39(3):343–375, 1989. doi:10.1016/0022-0000(89)90027-5.
  • [Ancona–Zucca] D. Ancona, E. Zucca. A Calculus of Module Systems. Journal of Functional Programming 12(2):91–132, 2002. doi:10.1017/S0956796801004257.
  • [Apel–Kästner–Lengauer] S. Apel, C. Kästner, C. Lengauer. FeatureHouse: Language-Independent, Automated Software Composition. ICSE 2009, pp. 221–231. doi:10.1109/ICSE.2009.5070523.
  • [Apel–Lengauer–Möller–Kästner] S. Apel, C. Lengauer, B. Möller, C. Kästner. An Algebra for Features and Feature Composition. AMAST 2008, LNCS 5140, pp. 36–50. doi:10.1007/978-3-540-79980-1_4. (introduction sum a non-commutative idempotent monoid; commutativity given up to permit the superimposition of terminals)
  • [Arbab] F. Arbab. Reo: A Channel-based Coordination Model for Component Composition. Mathematical Structures in Computer Science 14(3):329–366, 2004. doi:10.1017/S0960129504004153.
  • [Baez–Courser] J. C. Baez, K. Courser. Structured Cospans. Theory and Applications of Categories 35(48):1771–1822, 2020.
  • [Birkedal et al.] L. Birkedal, R. E. Møgelberg, J. Schwinghammer, K. Støvring. First Steps in Synthetic Guarded Domain Theory: Step-Indexing in the Topos of Trees. Logical Methods in Computer Science 8(4:1), 2012. doi:10.2168/LMCS-8(4:1)2012.
  • [Bliudze–Sifakis] S. Bliudze, J. Sifakis. The Algebra of Connectors: Structuring Interaction in BIP. IEEE Transactions on Computers 57(10):1315–1330, 2008. doi:10.1109/TC.2008.26.
  • [Bracha] G. Bracha. The Programming Language Jigsaw: Mixins, Modularity and Multiple Inheritance. PhD thesis, University of Utah, 1992. (a by-name module merge proved commutative and associative, with definition conflicts as errors)
  • [Brotherston–Villard] J. Brotherston, J. Villard. Parametric Completeness for Separation Theories. POPL 2014, pp. 453–464. doi:10.1145/2535838.2535844. (separation theories as optional properties of BBI-models, their Def. 3.1; "Cancellativity is not BBI-definable", their Theorem 3.8)
  • [Calcagno–O'Hearn–Yang] C. Calcagno, P. W. O'Hearn, H. Yang. Local Action and Abstract Separation Logic. LICS 2007, pp. 366–378. doi:10.1109/LICS.2007.30.
  • [Cardelli] L. Cardelli. Program Fragments, Linking, and Modularization. POPL 1997, pp. 266–277. doi:10.1145/263699.263735. (a by-name linkset merge under export-disjointness, proved confluent and terminating)
  • [Church–Rosser] A. Church, J. B. Rosser. Some Properties of Conversion. Trans. AMS 39(3):472–482, 1936. doi:10.1090/S0002-9947-1936-1501858-0. (the normal form of the rewriting tradition: unique, and reached in any order)
  • [Cranch–Struth] J. Cranch, G. Struth. Interacting Monoidal Structures with Applications in Computing. arXiv:2411.03821, 2024.
  • [CUE] M. van Lohuizen et al. CUE: Configure, Unify, Execute. cuelang.org, 2018–. (lattice/unification-based configuration; order-independent, conflict-is-error)
  • [Dagger] Dagger 2 documentation, dagger.dev: Dagger Core Semantics (dagger.dev/semantics/) and Multibindings (dagger.dev/dev-guide/multibindings). Accessed 11 November 2026. (a key is a type with an optional qualifier; a component's bindings are the union over the transitive closure of its modules; a duplicate binding is an error; set and map multibindings, a set dropping duplicate elements and a map refusing a key collision)
  • [Davies–Pfenning] R. Davies, F. Pfenning. A Modal Analysis of Staged Computation. Journal of the ACM 48(3):555–604, 2001. doi:10.1145/382780.382785.
  • [Dhall] The Dhall configuration language. Language standard, dhall-lang.org, 2017–. (a total, non-Turing-complete configuration language; guaranteed termination as design rationale)
  • [Dinsdale-Young et al.] T. Dinsdale-Young, L. Birkedal, P. Gardner, M. Parkinson, H. Yang. Views: Compositional Reasoning for Concurrent Programs. POPL 2013, pp. 287–300. doi:10.1145/2429069.2429104.
  • [Dockins–Hobor–Appel] R. Dockins, A. Hobor, A. W. Appel. A Fresh Look at Separation Algebras and Share Accounting. APLAS 2009, LNCS 5904, pp. 161–177. doi:10.1007/978-3-642-10672-9_13.
  • [Dolstra] E. Dolstra, M. de Jonge, E. Visser. Nix: A Safe and Policy-Free System for Software Deployment. LISA 2004, pp. 79–92.
  • [Dolstra–Löh–Pierron] E. Dolstra, A. Löh, N. Pierron. NixOS: A Purely Functional Linux Distribution. Journal of Functional Programming 20(5–6):577–615, 2010. doi:10.1017/S0956796810000195; ICFP 2008, pp. 367–378. (configuration fragments merged from independent modules onto hierarchically addressed option paths; list-typed options accumulate in an order that depends on the module order, §5.1; config passed back into each module, infinite recursion detected by blackholing, §6.3)
  • [Dreyer–Rossberg] D. Dreyer, A. Rossberg. Mixin' up the ML Module System. ICFP 2008, pp. 307–320, doi:10.1145/1411204.1411248; journal version A. Rossberg, D. Dreyer, ACM TOPLAS 35(1):2, 2013, doi:10.1145/2450136.2450137.
  • [Ducasse et al.] S. Ducasse, O. Nierstrasz, N. Schärli, R. Wuyts, A. P. Black. Traits: A Mechanism for Fine-Grained Reuse. ACM Transactions on Programming Languages and Systems 28(2):331–388, 2006. doi:10.1145/1119479.1119483.
  • [Earnshaw–Hefford–Román] M. Earnshaw, J. Hefford, M. Román. The Produoidal Algebra of Process Decomposition. CSL 2024, LIPIcs vol. 288, art. 25. doi:10.4230/LIPIcs.CSL.2024.25. arXiv:2301.11867.
  • [Earnshaw–Nester–Román] M. Earnshaw, C. Nester, M. Román. Monoidal Categories Graded by Partial Commutative Monoids. arXiv:2603.16375, 2026 (v3, 2 Nov 2026). (the tensor of morphisms defined when their grades combine in the grading monoid; separation algebras (the cancellative partial commutative monoids) and effect algebras among the particularly well-behaved gradings; the sequential grade operation the join, total, Prop. 5.1; the powerset under disjoint union and union, Example 5.3; a "partial duoid" grading suggested as a direction in §7 (future work), with no definition, laws or results)
  • [Earnshaw–Nester–Román-Traces] M. Earnshaw, C. Nester, M. Román. Resourceful Traces for Commuting Processes. CSL 2026, LIPIcs vol. 363, art. 28. doi:10.4230/LIPIcs.CSL.2026.28. arXiv:2507.18246. (Mazurkiewicz traces with typed actions presenting effectful categories; the commuting tensor product of free ones)
  • [Fettke–Reisig] P. Fettke, W. Reisig. Once and for all: how to compose modules — The composition calculus. ISoLA 2024, LNCS 15220, Springer, pp. 173–190. arXiv:2408.15031. (theorem and definition numbers cited from the arXiv PDF; the arXiv HTML rendering numbers by section)
  • [Fowler] M. Fowler. Inversion of Control Containers and the Dependency Injection pattern. 2004.
  • [Goguen–Burstall] J. A. Goguen, R. M. Burstall. Institutions: Abstract Model Theory for Specification and Programming. Journal of the ACM 39(1):95–146, 1992. doi:10.1145/147508.147524. (any logical system treated abstractly; theories glue by signature colimit, the satisfaction condition holding truth invariant under change of notation)
  • [Harper–Pierce] R. Harper, B. Pierce. A Record Calculus Based on Symmetric Concatenation. POPL 1991, pp. 131–142. doi:10.1145/99583.99603. (commutative record merge with conflict refused)
  • [Hoare–Möller–Struth–Wehrman] C. A. R. Hoare, B. Möller, G. Struth, I. Wehrman. Concurrent Kleene Algebra. CONCUR 2009, LNCS 5710, Springer, pp. 399–414. doi:10.1007/978-3-642-04081-8_27.
  • [Iris] R. Jung, R. Krebbers, J.-H. Jourdan, A. Bizjak, L. Birkedal, D. Dreyer. Iris from the Ground Up: A Modular Foundation for Higher-Order Concurrent Separation Logic. Journal of Functional Programming 28:e20, 2018. doi:10.1017/S0956796818000151.
  • [Kilpatrick et al.] S. Kilpatrick, D. Dreyer, S. Peyton Jones, S. Marlow. Backpack: Retrofitting Haskell with Interfaces. POPL 2014, pp. 19–31. doi:10.1145/2535838.2535884. (module bindings sequenced; a name bound twice linked when both bindings are the same module, two distinct implementations an error; holes may go unfilled)
  • [Lawvere] F. W. Lawvere. Functorial Semantics of Algebraic Theories. PhD thesis, Columbia University, 1963.
  • [Levine] J. R. Levine. Linkers and Loaders. Morgan Kaufmann, 1999. ISBN 1-55860-496-0. (symbol management: the global symbol table and symbol resolution, ch. 5) [TO VERIFY: ch. 5 content; the chapter is assigned from its title, the text unread.]
  • [Luttik–van Oostrom] B. Luttik, V. van Oostrom. Decomposition Orders—Another Generalisation of the Fundamental Theorem of Arithmetic. Theoretical Computer Science 335(2–3):147–186, 2005. doi:10.1016/j.tcs.2004.11.019.
  • [Medvidovic–Taylor] N. Medvidovic, R. N. Taylor. A Classification and Comparison Framework for Software Architecture Description Languages. IEEE Transactions on Software Engineering 26(1):70–93, 2000. doi:10.1109/32.825767.
  • [Milner–Moller] R. Milner, F. Moller. Unique Decomposition of Processes. Theoretical Computer Science 107(2):357–363, 1993. doi:10.1016/0304-3975(93)90176-T.
  • [Moller] F. Moller. The Nonexistence of Finite Axiomatisations for CCS Congruences. LICS 1990, pp. 142–153. doi:10.1109/LICS.1990.113741.
  • [Nielson–Nielson] F. Nielson, H. R. Nielson. Two-Level Functional Languages. Cambridge University Press, 1992.
  • [NixOS-manual] NixOS Manual, version 26.05, nixos.org/manual/nixos/stable, §"Modularity" (#sec-modularity) and §"Setting Priorities" (#sec-option-definitions-setting-priorities); and Nixpkgs lib/modules.nix (filterOverrides', mkOverride, mkDefault, mkForce) and lib/options.nix (mergeUniqueOption, mergeEqualOption) at tag 26.05. Accessed 11 November 2026. (a unique option defined twice is an error; definitions other than those of the lowest priority value are discarded; mkForce is mkOverride 50 and mkDefault is mkOverride 1000; otherwise a tie is merged by the option's type)
  • [O'Hearn] P. W. O'Hearn, J. C. Reynolds, H. Yang. Local Reasoning about Programs that Alter Data Structures. CSL 2001, LNCS 2142, pp. 1–19. doi:10.1007/3-540-44802-0_1.
  • [Oliveira et al.] B. C. d. S. Oliveira, T. Schrijvers, W. Choi, W. Lee, K. Yi. The Implicit Calculus: A New Foundation for Generic Programming. PLDI 2012, pp. 35–44. doi:10.1145/2254064.2254070. (scope-directed implicit resolution: nearest scope wins, ambiguity within it an error)
  • [Parnas] D. L. Parnas. On the Criteria To Be Used in Decomposing Systems into Modules. CACM 15(12):1053–1058, 1972. doi:10.1145/361598.361623. (information hiding: a module seals an internal secret behind its interface)
  • [Patterson–Spivak–Vagner] E. Patterson, D. I. Spivak, D. Vagner. Wiring Diagrams as Normal Forms for Computing in Symmetric Monoidal Categories. ACT 2020, EPTCS 333:49–64, 2021. doi:10.4204/EPTCS.333.4. arXiv:2101.12046.
  • [Pitts] A. M. Pitts. Nominal Sets: Names and Symmetry in Computer Science. Cambridge University Press, 2013. doi:10.1017/CBO9781139084673. (names as atoms bearing only equality; equivariance).
  • [Reisig-2019] W. Reisig. Associative Composition of Components with Double-Sided Interfaces. Acta Informatica 56(3):229–253, 2019. doi:10.1007/s00236-018-0328-7. (components with a double-sided interface; composition over "just a global set of symbols" associative, "a monoid"; Fettke and Reisig cite it as their [18] for the proof of associativity) [TO VERIFY: body unread, paywalled; the annotation rests on the abstract.]
  • [Reynolds] J. C. Reynolds. Separation Logic: A Logic for Shared Mutable Data Structures. LICS 2002, pp. 55–74. doi:10.1109/LICS.2002.1029817.
  • [Reynolds-1984] J. C. Reynolds. Polymorphism is not Set-Theoretic. In G. Kahn, D. B. MacQueen, G. Plotkin (eds.), Semantics of Data Types, LNCS, Springer, 1984, pp. 145–156. doi:10.1007/3-540-13346-1_7. (the Cantor-style argument; the mixed variance sits in the function-space constructor; classical set theory)
  • [Schaefer et al.] I. Schaefer, L. Bettini, V. Bono, F. Damiani, N. Tanzarella. Delta-Oriented Programming of Software Product Lines. SPLC 2010, LNCS 6287, pp. 77–91. doi:10.1007/978-3-642-15579-6_6.
  • [Schaefer–Bettini–Damiani] I. Schaefer, L. Bettini, F. Damiani. Compositional Type-Checking for Delta-Oriented Programming. AOSD 2011, pp. 43–56. doi:10.1145/1960275.1960283. (unambiguity: every total order compatible with the application order yields the same product)
  • [Schärli et al.] N. Schärli, S. Ducasse, O. Nierstrasz, A. P. Black. Traits: Composable Units of Behaviour. ECOOP 2003, LNCS 2743, Springer, pp. 248–274. doi:10.1007/978-3-540-45070-2_12. (a flattening sum, commutative and associative, with a doubly defined method an error)
  • [Schrijvers et al.] T. Schrijvers, B. C. d. S. Oliveira, P. Wadler, K. Marntirosian. COCHIS: Stable and Coherent Implicits. Journal of Functional Programming 29:e3, 2019. doi:10.1017/S0956796818000242. (coherence and stability under type substitution for nested implicit scoping)
  • [Scott] D. S. Scott. Continuous Lattices. In F. W. Lawvere (ed.), Toposes, Algebraic Geometry and Logic, Lecture Notes in Mathematics 274, Springer, 1972, pp. 97–136. doi:10.1007/BFb0073967. (the reflexive domain D ≅ [D→D] solved by an inverse-limit construction, a mixed-variance equation with a domain solution)
  • [Spivak] D. I. Spivak. The Operad of Wiring Diagrams: Formalizing a Graphical Language for Databases, Recursion, and Plug-and-Play Circuits. arXiv:1305.0297, 2013.
  • [Starlark] The Starlark configuration language. github.com/bazelbuild/starlark. (a deterministic, non-Turing-complete Python-like configuration dialect)
  • [Svendsen–Sieczkowski–Birkedal] K. Svendsen, F. Sieczkowski, L. Birkedal. Transfinite Step-Indexing: Decoupling Concrete and Logical Steps. ESOP 2016, LNCS 9632, Springer, pp. 727–751. doi:10.1007/978-3-662-49498-1_28.
  • [Szyperski] C. Szyperski. Component Software: Beyond Object-Oriented Programming. Addison-Wesley, 1998 (2nd ed. 2002). (a component is a unit of composition with contractually specified interfaces and explicit context dependencies)
  • [Turner-TFP] D. A. Turner. Total Functional Programming. Journal of Universal Computer Science 10(7):751–768, 2004. doi:10.3217/jucs-010-07-0751.
  • [Yang et al.] E. Yang, S. Kilpatrick, D. Dreyer, S. Peyton Jones. Backpack to Work: Towards Practical Mixin Linking for Haskell. Unpublished draft marked "In submission", dated 15 April 2016; Microsoft Research, microsoft.com/en-us/research/publication/backpack-to-work-towards-practical-mixin-linking-for-haskell/. (⊎ "a union which requires the domains of each Σ̃ to be disjoint", §4; "computed the wiring diagram for the direct dependencies of the unit", §3; well-formed shapes under link() a commutative monoid, Lemma 2)

AI language models assisted in the drafting of this work; the author is solely responsible for its content.