Validation Methodology

Short overview of RegelRecht's execution-first validation method and the generate/validate/reverse-check loop.

RegelRecht uses an execution-first approach to validate machine-readable law interpretations. This page is a short overview; for the research background and the full argument, see RegelRecht Validation: From Analysis-First to Execution-First.

From Analysis-First to Execution-First

Traditional approaches analyze law text extensively before writing any code. RegelRecht inverts this:

No

Yes

No

Yes

Law Text

Machine-Readable YAML

Execute with Test Cases

Results Correct?

Validate Against MvT

Faithful to Intent?

Published

Why Execution-First?

Errors surface immediately through execution rather than after lengthy analysis. Test cases from the Memorie van Toelichting (MvT) provide ground truth. Each cycle improves the interpretation based on actual results. And after generation, every element is checked against the source text to catch hallucinated logic.

The Loop: Generate, Validate, Reverse-Check

1. Generate

Create machine_readable sections for law articles, defining inputs, outputs, and operations.

2. Validate & Test

  • Schema validation ensures structural correctness
  • BDD scenarios (derived from MvT examples) verify behavioral correctness
  • The engine executes the law and compares outputs to expected values

3. Reverse Validate

Every element in the machine-readable interpretation is traced back to the original legal text. Any logic that cannot be grounded in the law is flagged as potentially hallucinated.

Memorie van Toelichting (MvT)

The MvT is the explanatory memorandum that accompanies Dutch legislation. It contains:

  • The legislature’s intent and reasoning
  • Concrete examples of how the law should be applied
  • Edge cases the legislature considered

These examples serve as the primary test cases for machine-readable interpretations.

RegelRecht

An exploration by Bureau Architectuur of the Dutch Ministry of the Interior into the possibilities of transparent, executable legislation.

Links

GitHub repository
How it works
Stay informed
Documentation

Contact

regelrecht@minbzk.nl

Part of

Bureau Architectuur
Ministry of the Interior and Kingdom Relations