An implementation of the L4 language for law, with an emphasis on IDE extensions for Visual Studio Code, and a web-only version of the L4 editor.
This repository includes language examples, a compiler toolchain, a visualizer, and integrations with VS Code.
Syntax Highlighting for Boolean-oriented decision logic
Decision Logic Visualization as a ladder diagram circuit
- ✅ Basic language features (functional core, layout parsing)
- ✅ Basic IDE features (highlighting, CHECK, EVAL)
- ✅ Decision logic visualizer (as ladder diagram)
- 🚧 resource libraries for Date, Place, Entity, Currency
- 🚧 Language support for state transition modals
- 🚧 State transition logic visualizer
- 🚧 Web App Auto-Generation for Decision Logic
- 🚧 Web App Auto-Generation for State Transition Logic, abductive reasonign, planning problems
- 🚧 Formal Verification Tooling, enhanced compiler error messages and warnings
An experimental prototype offers a lightweight web-based alternative to VS Code.
Dev Build: for Haskell and JS developers to improve the toolchain and IDE developer experience. Requires Haskell and Typscript.
Quickstart for a local build: for legal engineers to experiment with writing L4 code locally. Download the VS Code extension and get started.
All this documentation is still under construction.
-
Tutorial: Hello, World
- The
DECIDE
stanza - The
ASSUME
environment - Term Substitution
- Example: Must Sing
- Example: The Dog Act
- Example: Vermin
- The
-
Tutorial: British Nationality Act
- Default Logic and
Optional
types with theMaybe
monad - References and Legal Citations
- Temporals
- Default Logic and
-
Tutorial: Automatically Building User-Facing Apps
-
Tutorial: Automatically Generating an AI Chatbot
-
Tutorial: Contracts involving Parties, Obligations, and Deadlines
- visualizing a contract
- abductive reasoning and planning problems
-
Tutorial: Automatically Finding Loopholes
- underspecification, vagueness, and ambiguity
-
Decision Logic
-
State Transitions
-
Functional and Logical Paradigms
-
Source Citations and Versioning
-
Multi-Temporal Logic
- a remark on "shall" as an unfortunate consequence of negotiation-time vs run-time interpretation
-
Operationalization to Web and Mobile Apps
-
Natural Language Generation: exporting to Word and PDF