AREST Developer Docs

Self-contained reference for building on arest. FORML 2 readings compile to a database schema, constraint rules, state machines, and a REST API with HATEOAS, all from one β-reducer over Backus's FFP algebra.

View the Project on GitHub graphdl/arest

01 · Introduction

arest turns plain-English business rules into running applications. You write sentences like

Order was placed by Customer.
  Each Order was placed by exactly one Customer.

and the compiler produces a database schema, a foreign key, a uniqueness constraint, a state machine, and a REST endpoint. There is no separate ORM definition, no handler boilerplate, and no translation layer.

The approach builds on four decades of published work:

AREST is the composition of these four. A FORML 2 reading is simultaneously a relation schema, a constraint specification, a REST resource, and an FFP object. One sentence occupies all four roles at once. The engine recognizes that identity rather than translating between representations.

When to use it

arest is a fit under these conditions:

When not to use it

It is not a fit under these conditions:

What you will learn in these docs

  1. This file explains why the project exists and when to pick it up.
  2. Writing readings: entity types, fact types, verbs, and instance facts.
  3. Constraints: all 17 constraint kinds, the alethic-vs-deontic split, and violation messages.
  4. State machines: statuses, transitions, events, and facts-as-events.
  5. Derivation rules: forward chaining, join syntax, and the least fixed point.
  6. Compile pipeline: what happens between readings and runnable state.
  7. Generators: SQL, iLayer, XSD, Verilog, and Solidity, plus the opt-in mechanism.
  8. Federation: external systems, credentials, and populate functions.
  9. MCP verbs: the full v1.0 tool surface for agents.
  10. Self-modification: compile, propose, and the Domain Change workflow.

Conventions

Code blocks labelled forml2 contain readings you could save to readings/*.md and then compile. Code blocks labelled bash, json, or a language name show exactly what you would run or write in that language.

Each doc ends with a “What’s next” section that links to the logical next step.