LawVM compiles amending acts into point-in-time legal state.

An open-source replay compiler that reconstructs what the law says at any date from the amendment stream that changed it — with typed operations, full provenance, and explicit failure classification.

Corpus replay

690
Finnish statutes replayed from raw amendment acts. 0.65% mean text distance (Levenshtein). ~420 produce text identical to Finlex. 490 at ≥95% structural match.

Verified findings

77+
Cases where the official consolidation is demonstrably wrong and LawVM documents why. Every divergence is being systematically investigated and classified.

Divergence classes

15
Root cause categories. Replay defects, source gaps, editorial artifacts, and oracle divergences are explicitly separated — not collapsed into one error bucket.

As of 2026-04-16. Corpus: 690 fully replayable statutes (curated from 3,591 amended Finnish statutes).

Research software. Finland frontend active. Other frontends experimental.

See Finland evidence Read the architecture Get started GitHub
amendment act parse typed ops resolve targets replay PIT state compare classify

Why this exists

Legal text is not static. It is an incrementally maintained system: thousands of amendments applied over decades by distributed authors with partial authority. The law at any moment is the accumulated result.

Most legal databases present an editorial consolidation — a human-curated snapshot. LawVM takes a different approach: replay the amendment chain from primary sources, preserve what happened, and make the result auditable.

That means typed operations instead of string patches. Point-in-time materialization from explicit timelines. Findings and source-pathology traces instead of silent cleanup. A way to separate replay defects from editorial artifacts.

Read Why Law Is Law-Shaped for the full argument.

Current state

Finland is the active reference frontend and the main proving ground. It is where the replay model, normalization rules, editorial adjudication, and residual-review workflow are exercised against a real corpus. See the Finland showcase.

Other frontends exist at different maturity levels: Estonia (consistency verification of binding consolidated law), the UK (version graph and effect feed replay), Norway and Sweden (experimental). See jurisdiction status.

Layer 0

LawVM is deliberately narrow. It computes what the legal text says at a point in time. It does not compute what the law means (interpretation), how it is applied in practice, or what it costs. Those are higher layers that build on a correct text-state substrate.

The design principle: keep the text-state kernel narrow, explicit, stable, and anchor-rich. That is what makes it useful as infrastructure for everything above.

Get started

uv sync
uv run lawvm replay 2002/738 --as-of 2024-01-01
uv run lawvm diff 2002/738
uv run lawvm explain 2002/738

GitHub repository