"Ethics as Executable Code."
Airlock is a high-assurance reference monitor written in Haskell. It enforces constitutional constraints on AI actions using Compile-Time Guarantees rather than runtime heuristics.
This kernel follows the Functional Core / Imperative Shell pattern to ensure zero side effects in decision-making logic.
- Type-Level Security: Commands carry their
ImpactLevel(Safe, Critical, Existential) in the type signature. - Impossible States: The compiler prevents critical violations before the code even runs.
- Pure Logic: Audit and Interpretation are purely mathematical functions (no IO).
- Forensic Determinism: Every action produces a deterministic hash for auditing.
- Multi-Signature: "Existential" (dangerous) commands require a quorum of 2 approvals.
This code was verified using the online compiler: Play.Haskell.org
To run it yourself:
- Copy the content of
Main.hs. - Paste it into Play.Haskell.org.
- Click "Run".
Main.hs: The complete, single-file certified kernel core.
Created by AndrΓ© Luiz Trindade