Back to app index

Operadic composition for complex systems

A worked explanation (based on “Operads for complex system design specification, analysis and synthesis”) and how the same ideas can frame a “shed halfway up a mountain” Petri net and its WBS.

Operads in one page

Core idea: An operad is a formal language for building big things out of smaller things, where composition is “plugging a whole design into a component slot.” In complex systems terms: you get hierarchy with type-safe interfaces and a disciplined way to attach multiple analyses to the same architecture.

Typed operads: “many inputs → one output” operations

Foley et al. focus on a typed (a.k.a. coloured) operad. It has:

  • Types T (think: interface/boundary labels),
  • Operations O(X1,…,Xn;Y) (an operation f : ⟨Xi⟩ → Y),
  • Composition by substitution: if f : ⟨Yi⟩ → Z and each gi : ⟨Xij⟩ → Yi, then you can form f ∘ (g1,…,gn) : ⟨Xij⟩ → Z.

Why this is specifically useful for complex systems

The paper pushes a three-layer separation:

  1. Composition separates subsystem designs into modules (hierarchical decomposition).
  2. Functorial semantics separates the abstract design language (“syntax”) from computational models (“semantics”).
  3. Natural transformations align multiple semantic models of the same design (e.g., state vs KPIs).
Glossary: syntax, semantics, algebras, functors (in this operads-for-design sense)

In the “systems view,” an operation is an architecture, and you interpret (evaluate) architectures via functorial semantics: a mapping Model : O → Sem to some semantic context (sets/functions, probabilities, dynamical equations, etc.).

An “operad algebra” is such an interpretation; natural transformations/algebra homomorphisms then align interpretations (“extract KPIs from state” while respecting composition).

Four views of operads

Foley et al. highlight tree (hierarchy), API (typed composition), equational (laws/contracts), and systems (architectures + functorial semantics).

Tree view: each operation is a step in hierarchical decomposition; composing operations builds a tree. Coherence ensures that “refine Sub1 then Sub2” equals “refine Sub2 then Sub1” when both yield the same fully-refined tree.

System (Y) op : ⟨Sub1,Sub2⟩→System Sub1 (X₁) Sub2 (X₂) op₁ : ⟨Sub11,Sub12⟩→Sub1 Sub11 Sub12
Type (interface/boundary) Operation (decomposition step)

If you read WBS trees as “a deliverable assembled from sub-deliverables,” you are already thinking operadically. The operad adds a formal, reusable notion of “plug a refined sub-tree into the parent.”

API view: treat the operad as a strongly typed “API” where operations are methods with signatures ⟨X₁,…,Xₙ⟩ → Y. Type discipline controls what can be composed, like a compiler rejecting mismatched types.

Project analogy:
A “work package” can have an interface like ⟨SiteReady, MaterialsOnSite, CrewAvailable⟩ → FoundationReady. Any refinement you “plug in” must output FoundationReady if it is to satisfy that slot.
How this differs from “just a tree”

Trees say “Sub1 is inside System.” Typed operads say “Sub1 must present the right interface to System,” and composition is only legal when those interfaces match. The paper stresses types as boundaries, not “the systems.”

Equational view: beyond “what can compose,” you can declare equations between different hierarchical decompositions (different trees) that represent “the same system.” These act like contracts or rewrite rules.

Paper’s key pattern:
Two decompositions can be related by a common refinement (e.g. their LSI example: f(l,t)=g(s,a)).

Project analogy: “deliverable decomposition” and “trade decomposition” can be equated when they refine to the same lowest-level work packages (or a common refinement exists).

Systems view: interpret f : ⟨Xᵢ⟩ → Y as a system architecture: the Xᵢ are component interfaces, and Y is the environment/system boundary. Composition is nesting: “one engineer’s system becomes the next engineer’s component.”

Then attach multiple analyses as functorial semantics and align those analyses with natural transformations/homomorphisms.

Same architecture
WBS / decomposition tree (syntax)
Different semantics
Cost, duration, risk, logistics…
Aligned semantics
KPIs extracted from state must respect composition
Where do wiring diagrams and network operads fit?
  • Wiring diagram operads (top-down): explicit interfaces + nesting; great for multiple decompositions + equations.
  • Network operads (bottom-up): generate composite designs/plans from atomic types + link templates.

How operads describe hierarchical project components

A WBS is essentially a hierarchical decomposition. The operad “tree view” captures exactly this: operations are decomposition steps; composing operations builds a refinement tree, and coherence guarantees refinements don’t depend on the order you expand pieces.

Concrete mapping: WBS as operad syntax

Project notion Operad notion How to read it
Deliverable / interface label Type X “This work package produces/consumes this kind of thing / boundary condition.”
Decomposition step Operation f : ⟨X₁,…,Xₙ⟩ → Y “If you have these sub-deliverables, you get the parent deliverable.”
Refine a work package Operadic composition (substitution) “Plug the refined sub-tree into the parent slot.”
Alternative decompositions Equations between trees “Two views are ‘the same system’ if they share a common refinement.”
Why the paper insists types are “interfaces/boundaries,” not “the systems themselves”

This is the key to keeping the syntax stable while swapping semantics: you can change what you treat as the interface (deliverables vs resources vs approvals) without changing the underlying compositional story.

Petri nets ↔ operads in the paper

The paper’s SAR-tasking example is the direct bridge: they say it’s enough to give a Petri net as a template, from which a network operad is constructed; transitions correspond to primitive tasks, token-colours to agent types.

Reusable lesson for projects:
Use a Petri net as generative syntax (primitive tasks + resources/conditions), then build an operad of composite plans so only compositions respecting that logic are even formable.
Why Petri nets are a natural “generator language” here

Petri nets already present monoidal process structure (concurrency, resource flow); operadic “substitution” adds the hierarchy/refinement dimension.

Can the shed-halfway-up-a-mountain Petri net and its WBS be framed operadically?

Yes—if you choose your types (interfaces/boundaries) carefully—either as deliverables (WBS-style) or as resource/condition states (Petri-style), and then treat: (A) the Petri net as a generator template for primitive tasks, and/or (B) the WBS as the operad syntax whose semantics are Petri nets + schedule/cost/risk models. The payoff is “type-safe” generativity: only hierarchies/schedules compatible with the physical logic are constructible.

A minimal toy “shed on a mountain” Petri net

Places = conditions/resources; transitions = tasks. (Tiny, illustrative, not a full build spec.)

P0: Permit+Design OK P1: Materials at Trailhead P2: Site Prepared P3: Materials On Mountain P4: Foundation Ready P5: Framing Ready P6: Roof On P7: Shed Complete T1: Prep Site T2: Haul Materials Up T3: Pour+Set Foundation T4: Frame Walls T5: Install Roof T6: Finish/Closeout
Place (condition/resource state) Transition (task)

Two operadic framings (choose based on what you want to generate)

Framing A: Petri net as template → network operad of feasible task plans

Primitive transitions (T1…T6) become generators; token-colours (Crew, Lumber, Concrete, AccessWindow, etc.) control legality. The operad’s operations then represent composite plans built from these primitives—only those that are syntactically feasible under the template can be formed.

Framing B: WBS operad as syntax → Petri net + schedule models as semantics

Treat WBS refinement steps as operad operations (syntax), then interpret each operation as: (i) a Petri net fragment (physical/enabling logic) and (ii) duration/cost/risk functions (schedule semantics). Natural transformations align “state” and “KPIs” so aggregation commutes with refinement.

Markings as schedule options

If you treat different markings as different feasible logistical states (materials staged vs not, crew on-mountain vs trailhead, etc.), then reachability constrains which schedules are realizable; the operad viewpoint says “only schedules that can be assembled from legal substitutions are even expressible.”

Practical tip: interface choice for the shed (keeps the operad clean)
  • Deliverable-typed: FoundationReady, FramingReady, … (WBS-native)
  • Resource/condition-typed: MaterialsOnMountain, CrewOnSite, WeatherWindow, … (Petri-native)

Mixing both is possible but you usually get a cleaner first pass by privileging one typing discipline and deriving the other by a homomorphism (“extract deliverables from resources” or vice versa).

Takeaways

  1. Operadic composition is substitution. It’s the formal version of “refine a component, then plug it into the bigger design,” with type-matching preventing nonsense.
  2. WBS fits the tree/API views almost directly. Operads add explicit interface typing, equations relating alternative decompositions, and a principled way to attach multiple semantics (cost/schedule/risk) to the same structure.
  3. Your shed Petri net can be ‘operadic’ in two ways: as a template generating composite task plans (network operad), or as a semantic interpretation of a WBS operad, aligning physical logic with KPIs via functorial semantics.
  4. Design-space exploration becomes disciplined. You get “no syntactically invalid designs,” and you can do lazy evaluation: coarse semantics first, expensive semantics later, without losing compositional coherence.
Primary reference

Foley JD, Breiner S, Subrahmanian E, Dusel JM (2021) Operads for complex system design specification, analysis and synthesis, Proc. R. Soc. A 477:20210099.

Coda: If you want a perversely powerful next step, treat “change requests” as equations you may or may not choose to impose on the WBS-operad, and study which semantic models stop commuting first when the equation is added.