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

A Tiling for Computation

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 the five-fold symmetry in. The two tiles and their local matching rule force it.

That is the picture behind Metamodel: not one system built to swallow every domain, but a small, fixed alphabet whose local composition rules generate an unbounded, non-repeating space of specific, checkable things. Token standards. Business operations. Game rules. Beat sequences. Now, our own infrastructure. Different domains, zero shared code, the same two tiles.

The alphabet

Four primitives, no fifth: 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 — a structural grammar this small can't hide behavior anywhere you haven't declared, 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, stated plainly

A model built from this alphabet is a value, not a program — and that distinction is what makes the vocabulary universal rather than merely reusable.

Three checkable pieces of that claim, each with something already shipped behind it rather than an argument for why it should work:

Composition is edge-matching, not integration. Two tiles meet because their edges agree; two models compose because they share a place, the way the help-desk model in sim.pflow.xyz is built from three separate components glued at a shared queue. Nothing is written to make them fit — the matching rule is the interface.

Global order is forced, not asserted. A Penrose tiling's five-fold symmetry isn't decorated on afterward; it falls out of the two tiles' matching rule. A Petri net's conservation laws work the same way — they fall out of the incidence matrix's left null space, discovered after the model is built, not declared by whoever built it. The tooling that deploys this ecosystem is the newest instance: an app manifest is a handful of fields and a marking, and a drift audit finding thirteen live services with zero drift isn't a property anyone wrote code to guarantee — it's what the alphabet forces once the manifest exists.

Convergence is checkable because the model is data. The clearest before-and-after here isn't a metaphor. Five language ports of an early version of this idea — Rust, Python, Lua, TypeScript, Solidity — were each 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 happened to agree by intention. They went quiet independently, over about two years, and nothing noticed because nothing was checking. pflow-polyglot is the fix, structurally: one model.json, twenty-plus implementations across Go, Rust, Python and JavaScript, held to one golden trace. Not "we tried to keep these in sync." A byte-for-byte check that fails the build if they diverge. The model stopped being a program repeated five times and became a document checked five times.

What "universal" means here

Not one app that does everything. 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 actual shape of the claim: the same four primitives, remixed, have now generated systems that share nothing at the domain level — a help desk, a token standard, a drum machine, a fleet of live web services — and every one of them inherited the same free properties (composability, conservation, checkability) because the alphabet forces them, not because each domain's author remembered to ask for them.

The palette is small on purpose. That's not a limitation to route around later. It's the whole reason a stranger — a different implementation, a different language, a different decade — can pick up one of these tiles and know exactly how it fits.

Further reading

×

Follow on Mastodon