Abstract and status of claims
Abstract#
An application today is a fleet of cooperating runtimes: phones, browsers, edge isolates, servers, databases, brokers and model hosts. Its contracts, wiring, placement, data, authority and evidence live in separate tools, and the people and agents who change it reconstruct the system from text. We present Reaktor Graph (RG), a typed, multilayer, heterogeneous port hypergraph that serves as the single semantic substrate for such systems, and the Reaktor Graph Language (RGL), its embedding in Kotlin common code. RGL is designed to run natively on every host and, compiled to JavaScript, on an embedded Hermes engine, so that a self-contained subgraph can be shipped as data. RG rests on three primitives: a structure (nodes, owned ports, role-labelled hyperedges and a containment forest, typed by an open signature and fibred over six layers), a computation over the structure (typed message passing along incidences) and a change to it (double-pushout patches). We contribute (i) a minimal signature of fourteen base node kinds built from facets, ports factored into family, role, contract, ownership and quality of service, four connection and ten assertion families, and information-flow labels, tenancy and an effect lattice as facets and rules; (ii) a compositional semantics in which mounting a subgraph is composition in a hypergraph category and replacing one is sound under trace refinement; (iii) theorems on determinism, incremental maintenance and coordination-freedom of traversals, which make dependency injection, navigation, rendering, lifecycle, capability resolution and code-push closure instances of one primitive; (iv) transactional evolution in which independent patches commute and graph diffs replace textual diffs as the unit of review; (v) a data-oriented kernel and a wire protocol, in which reads are traversals, watches are incremental and authorities federate through signed views, with a reference realization in Kotlin on Cloudflare, Google Cloud and Postgres, the capability profile that any other provider must meet, and four further stacks: the reference stack at large scale, a Chinese cloud, another public cloud and an internally hosted corporate stack; and (vi) an integration with the Kotlin compiler in which the graph supplies the facts that thirteen optimisations need, with the conditions under which each is sound. Applied to the 140 published Reaktor design graphs, the type system maps all 648 relations onto its families, reduces 123 role names to 31, finds the family of a connection determined by its port profile in 95% of the connections whose ports imply one, and exposes 21 bindings that silently cross hosts. A survey of 283 features of Reaktor and five systems built on it needed no new kind or family. Five TLA templates, checked with TLC, show why fencing at the store, stable effect identities, transactional outboxes, drained releases and gap-free watches are part of the design. We take Unreal Engine’s Blueprints as the gold standard for typed graphs over a native core, and map twenty recurring problems and eleven classes of multi-runtime systems onto the model, including scientific simulation and neurosymbolic AI. We describe how compilers, test and analysis tools, agents and teams of people and agents work on one graph, argue that a typed system graph is how programming keeps pace as software outgrows the teams that run it, and close with fifteen hypotheses and a twelve-month plan whose acceptance criteria can reject the design.
Keywords: port hypergraphs; attributed C-sets; hypergraph categories; double-pushout rewriting; message passing; multitier and choreographic programming; information-flow control; dynamic software update; TLA; AI agents; edge computing; Kotlin Multiplatform.
Status of claims. Reaktor’s current graph runtime runs in production in a social application and its edge workers; every statement about it in Section 2 cites its source. Reaktor Graph and RGL are specified here and are not yet implemented. The exceptions are the hypergraph definition IR that the current runtime already contains, which RG adopts as its seed, and the artefacts in Section 20, which were executed for this paper and are included with it. The reference realization (Section 13) is the stack we build on first; it is a choice, not a requirement of the design. Listings show proposed interfaces. Theorems are proved in Appendix A or cited. Statements about precedents describe the cited systems, not Reaktor.