← Home
petri-net metamodel composition dsl domain-driven-design

A Tiling for Computation

Prerequisites: The Little Language Thesis for the four primitives, and The Model Is the App for the help-desk example.

Two tiles. A kite and a dart, or two rhombs — pick your classic set. Edge markings that look almost too simple to say anything. And from that: a tiling that never repeats, no matter how far you extend it, while every finite patch of it recurs infinitely often somewhere else. Nobody designs that order in. The two tiles and their local matching rule force it.

That is the picture behind Metamodel: a small, fixed alphabet whose local composition rules generate an unbounded space of specific, checkable things, rather than one system built to swallow every domain. Token standards. Business operations. Game rules. Beat sequences. Now, our own infrastructure. The domains share no vocabulary. Most of them do share an engine, go-pflow, so the claim is about the alphabet they are written in, not about the code underneath being separate.

The alphabet

Four primitives: a place that holds state, a transition that changes it, an arc that connects them, a guard that constrains it. The Little Language Thesis is the argument for why four is enough, and where it stops: the incidence matrix sees places, transitions and arcs, while guards and inhibitor arcs sit outside it and get checked by exploring states. A grammar this small leaves behavior only those places to hide, which is most of why it's checkable. The words on top — balances, transfer, kick_0, trigger, app.vhost — are never the alphabet. They're what a domain sounds like once you've tiled it.

The claim

A model built from this alphabet is a value rather than a program, and the argument is that this is what makes the vocabulary universal instead of merely reusable. Three pieces of that can be checked. Here is what is behind each one, and how far it goes.

Composition is edge-matching

Two tiles meet because their edges agree; two models compose because they share a place. The help-desk model on sim.pflow.xyz (retired) is three components — arrivals, a service, a hazard for customers who give up — with the service and the hazard each attached to the arrivals' queue. A test in the sim source (private, so we can't link it; not re-run for this revision) composes exactly that, passes it through the validation gate every stored model goes through, and checks that a seeded run both serves and loses tickets and that the two-person staff pool is conserved. Beyond naming the shared place, nothing is written to make the components fit — the matching rule is the interface.

Global order is forced

A Penrose tiling's aperiodic order isn't decorated on afterward; it falls out of the matching rule. A Petri net's conservation laws come out the same way — they are vectors in the left null space of the incidence matrix, found after the model is built rather than declared by whoever built it.

The tooling that deploys this ecosystem (private) is the newest instance, and the one where the claim needs the most care. An app's manifest is a handful of fields plus a marking over a lifecycle net, and a step taken out of order is refused because its transition isn't enabled, not because somebody remembered the runbook. The service entry, the vhost and the monitors are derived from the manifest, and a drift audit compares them with the live host. When this post first went up, that audit had just reported thirteen live services with zero drift. We have no record of that run to re-check, and a clean audit is in any case the output of code written to compare two things — it shows the derivation working, not a property the alphabet forces on its own. What the net itself enforces is the ordering.

Convergence is checkable because the model is data

The clearest before-and-after here isn't a metaphor. Between 2022 and 2024 an early version of this idea was ported five times — Rust, Python, Lua, TypeScript, Solidity — and each port was an internal DSL: you wrote code, in that language, that built a net. All five claimed to encode the same thing. None of them could prove it, because the specification lived only in five separate programs that agreed by intention. Four of them are private and were last pushed somewhere between 2022 and 2024; the Solidity one, metamodel-sol, is public and was still taking commits in August 2025, with nothing on it pointing at what replaced it. Whether the five still agreed by the end nobody can say, because there was never anything to diff them against.

pflow-polyglot is the structural fix, for one net. A coffee machine — ten places, six transitions, one guard — is implemented thirty-nine times across ten languages and five forms, and every program has to print the same six-line canonical trace, byte for byte. make parity runs the twenty Go, Rust, Python and JavaScript programs under Bazel and fails on any diff (check_parity.sh); a second gate holds the Ruby, Julia, Haskell, Bash and Lean programs to the same golden but skips, loudly, any language whose toolchain is missing; the two Solidity contracts are in neither. model.json feeds only the generated form. The others are independent rewrites, which is the point — an identical trace from them isn't shared code agreeing with itself. A second golden pins the whole reachable state space, 16 markings, so the programs are held to the same machine and not just the same path through it. The specification moved out of the programs and into two files the programs are diffed against. That is one net, and the polyglot repo doesn't use go-pflow at all: it shows the alphabet can be held to a single contract across languages, not that every domain above has been.

What "universal" means here

A tiling has no edges and no center — every patch is built the identical way, out of the identical two shapes, and no patch is privileged over any other. That's the shape of the claim: the same four primitives, relabeled, have now been used for systems that share nothing at the domain level — a help desk, a token standard, a drum machine, a fleet of live web services. The stronger version says each of them inherits composability, conservation and checkability from the alphabet rather than from its author remembering to ask. What has been checked is narrower: the help desk composes and conserves its staff pool under test, the coffee machine agrees with itself in ten languages, and the conservation laws of any of these nets can be read off its incidence matrix. Whether the parts the matrix can't see — guards, inhibitor arcs — come along for free in the same way is something none of these cases shows yet.

The palette is small on purpose, and that is the reason a different implementation in a different language can pick up one of these tiles and know how it fits. pflow-polyglot is thirty-nine programs doing that, for one tile.

What Changed

Revised 2026-11-14 against the pflow-polyglot README and parity script, the help-desk composition test in the sim source, the deployment tooling's app manifests and the Metamodel roadmap in the book repo. Nothing was re-run.

  1. Polyglot. The post said one model.json drives thirty-nine implementations under a check that fails the build. model.json feeds only the generated form; the rest are independent rewrites held to a golden trace. The Bazel gate fails on twenty programs, the native gate skips missing toolchains, and Solidity is in neither. It is also one net, in a repo that doesn't depend on go-pflow.
  2. Drift audit. "Thirteen live services with zero drift" was offered as a property no code guarantees. A drift audit is code comparing derived artifacts with the live host, and that run can't be re-checked. The lifecycle net's ordering is the part the alphabet enforces.
  3. Shared code. "Zero shared code" between domains was wrong: the help desk, the token standards and the sequencer all build on go-pflow. The claim is about the alphabet.
  4. The five ports. They did not all go quiet together; the Solidity port was still taking commits in August 2025.
  5. Universality. "Every one of them inherited the same free properties because the alphabet forces them" is now stated as the claim, next to what has actually been checked.
  6. sim is retired (2026-11-24). The help-desk model lived on sim.pflow.xyz, which no longer runs; the link now goes to sim's lineage record, and the test that holds the composition stays private.

Related: The Model Is the App · The Little Language Thesis · The Proof Form · Byte-Exact Across Four Languages · Earned Compression

×

Follow on Mastodon