Legal Contract / Smart-Clause / Law-as-Code DSLs Family Index


Legal Contract / Smart-Clause / Law-as-Code — Family Index

Family overview

This family covers the textual languages used to express legal contracts, regulatory rules, and computational law — the connective tissue between natural-language legal prose and machine-executable code. It splits cleanly into four overlapping sub-currents. The first is law-as-code / computational law: government-backed efforts to translate statute directly into executable form, anchored by Catala (INRIA, France) and OpenFisca (originally France, now international), with academic outposts at Singapore Management University (the L4 language and CCLAW programme), the University of Ottawa (Symboleo), and the University of Bologna / Padua (Stipula). The premise is that tax and benefit law is itself a programming language with bad syntax and worse type-checking, and that re-encoding it in a real DSL surfaces ambiguities and bugs the legislature shipped.

The second current is the smart-clause / smart-legal-contract ecosystem, centred on the Accord Project (an LF Decentralized Trust / Hyperledger-adjacent foundation): Concerto for the data model, Cicero for the contract-template wrapper, and historically Ergo for the executable clause logic — though Ergo was formally deprecated in Q1 2026 in favour of TypeScript as the standard logic language, with Concerto V4 shipping in beta with Rust and .NET runtime targets (Accord Project Tech Working Group Q1 2026). Around it sit OpenLaw’s markup (ConsenSys spin-out, now AI-pivoted post-2025 seed round), CommonAccord’s modular template patterns (James Hazard + Primavera De Filippi), and Ian Grigg’s 1996 Ricardian Contract — the design pattern that quietly underpins most of this work.

The third current is commercial legal-document automation — the un-glamorous but enormously deployed software that big law firms and corporate legal departments actually use: HotDocs (Mitratech, originating from a 1990s Texas attorney’s WordPerfect macros), Contract Express (Thomson Reuters, now generative-AI-assisted and integrated with Westlaw and Practical Law), and the newer CLM-platform smart-clause features in DocuSign CLM, Ironclad, Lexion, and similar. These systems are template-based with controlled-variable interviews and conditional logic, but rarely formal-semantics-rich. They earn the revenue; the academic DSLs publish the papers.

The fourth current is rights expression — ODRL (W3C Recommendation since 2018; ODRL 2.2 still in W3C Community Final Specification Agreement process as of 2026), MPEG-21 REL, and the older XrML. ODRL persists because the W3C anchor keeps it alive for content licensing, data-space governance (Gaia-X, IDSA), and EU Data Act usage policies, despite repeated predictions of its irrelevance. Bridging two siblings, XACML (catalogued in identity-auth-policy) and Akoma Ntoso + LegalRuleML (catalogued in government-civictech) are dual-classified here as well. Across all four currents, the consistent pattern is slow corporate adoption against a fast academic publication cadence — the ProLaLa workshop and the Stanford CodeX consortium publish faster than any law firm changes its template library.

In our deep library

None catalogued. Legal-contract DSLs do not have standalone deep-library notes; all of them sit on host languages already catalogued.

Cross-reference:

  • smart-contract — sibling; covers blockchain smart-contract languages (Solidity, Move, Cairo, Vyper, FunC). Some overlap at Ricardian Contracts, OpenLaw, and Accord Project Cicero, which sit at the seam between legal-prose and on-chain bytecode.
  • government-civictech — sibling; covers Akoma Ntoso and LegalRuleML legislative XML. LegalRuleML is cross-listed here because some of the law-as-code projects (L4, Catala-adjacent) consume or compete with it.
  • identity-auth-policy — covers OPA Rego, Cedar, and XACML. XACML is cross-listed here because it has been used as a licence-policy DSL outside its access-control origins.
  • financial-regulatory — sibling; FpML and ISDA CDM are themselves financial-contract DSLs, but live in the finance-specific note.
  • notation-spec — formal grammars and metalanguages used to define some of these DSLs.
  • citation-formats — legal citation formats (Bluebook, OSCOLA, ECLI) used inside legal-contract documents.
  • tax-forms — tax form schemas that OpenFisca-style rule engines populate.
  • python — host language for OpenFisca’s rule DSL (Python class hierarchy with @formula decorators) and most academic computational-law tooling.
  • typescript — host language for Accord Project Concerto V4 and the new standard for Cicero template logic post-Ergo-deprecation.

Tier 3 family table — Smart-clause frameworks

FormatFirst appearedOriginTypeStatus (2026)URL
Accord Project Concerto2018Accord Project (LF Decentralized Trust; founders Clause Inc., IBM, Hyperledger)TypeScript-based object-modelling language for legal-contract data; classes, relationships, validationActive; Concerto V4 in beta (2026) with Rust and .NET runtime targets, V3→V4 migration complete, beta 0.2.3 shipped (Q1 2026 review)https://accordproject.org/projects/concerto/
Accord Project Ergo2018Accord Project / Clause Inc. (Jérôme Siméon ex-IBM)Strongly-typed functional DSL for smart-clause logic; compiled to JavaScript; designed to be safe and analysableDeprecated (Q1 2026) — formally retired in favour of TypeScript as the standard template-logic language; older Cicero templates still ship Ergo but new authoring is TShttps://docs.accordproject.org/docs/logic-ergo.html
Accord Project Cicero2017Accord Project / Clause Inc.Template engine wrapping a markdown-like contract document + Concerto model + Ergo (or now TS) logic — the “contract triangle”Active; Cicero ≥0.23, with a TipTap-based visual template editor prototyped in 2026 for Template Playgroundhttps://docs.accordproject.org/docs/cicero.html
OpenLaw markup (OML)2017ConsenSys (Aaron Wright, David Roon) → spun out as OpenLaw / TributeDAO; $3.5M AI-pivot seed July 2025Markdown-style markup with [[Variable]] placeholders, conditional blocks, and embedded Ethereum smart-contract callsActive but pivoted to AI-assisted legal access; underlying markup still in use, repo at openlawteamhttps://www.openlaw.io/
CommonAccord (Cmacc)2014James Hazard + Primavera De Filippi + Marc Dangeard + Thomas HardjonoModular template / pattern system; reduces contracts to deal-points + named references, in a Perl-based “Cmacc” engineLow activity / reference-quality; influential but mostly cited rather than deployedhttps://www.commonaccord.org/
Mattereum Smart Property Register2017Mattereum Ltd. (Vinay Gupta)Ricardian-contract-style register binding real-world property titles to on-chain tokens; uses contract templates with arbitration clausesActive in niche (collectibles, art, IP licensing)https://mattereum.com/

Tier 3 family table — Law-as-code (computational law)

FormatFirst appearedOriginTypeStatus (2026)URL
Catala2020 (paper 2021, OOPSLA)INRIA (Denis Merigoux, Nicolas Chataing, Jonathan Protzenko)Functional DSL with default logic as a first-class feature; literate-programming style interleaves law citations with code; OCaml compilerActive; v0.10 (2025) shipped on OCaml/opam; powers the 10k-line French housing-benefits (APL) reimplementation used by DGFiP and CNAF (Inria coverage)https://catala-lang.org/
OpenFisca2011French government (DINUM / Etalab)Python framework + rule DSL (Variable classes with @formula decorators) for tax-and-benefit law; not a standalone language but a constrained Python idiomVery active; deployed in France, NZ, Australia, Tunisia, Senegal, Mali, Côte d’Ivoire, UAE, French Polynesia, Canada (federal eval), Netherlands, Greece, Paraguay, Japan, New Caledonia as of 2026 conferencehttps://openfisca.org/
L4 (CCLAW)~2020SMU Centre for Computational Law (Singapore), led by Meng Weng Wong, Joe Halpern collabFunctional spec language with Controlled Natural Language (CNL) syntax for isomorphism with statute; VS Code extension and IDE toolingActive; 2025 IDE release; Legalese.com is the commercialisation spin-outhttps://github.com/smucclaw
Stipula2022 (ProLaLa)Univ. of Padua + Univ. of Bologna (Silvia Crafa, Cosimo Laneve, Giovanni Sartor)Process-calculus-flavoured DSL; contracts as protocols with permissions, obligations, prohibitions, escrows; formal semantics + type-inference + observational equivalenceActive research; Stipula Editor (React web IDE); 2023 POPL paper on contract amendinghttps://github.com/stipula-language/stipula
Symboleo / SymboleoAC2020University of Ottawa (Daniel Amyot, Aidin Rasti, Marzieh Sharifi, Sepehr Sharifi, Parvizi-Mosaed et al.)Formal specification language for contracts as collections of obligations and powers; statechart semantics; analysis tools; SymboleoAC adds RBAC-style access control (2025)Active research; LLM-based generation from natural-language contracts being explored (2024 arXiv)https://github.com/sepehr-sharifi/symboleo
DataLex1990s (continuing)University of Technology Sydney (Graham Greenleaf, Andrew Mowbray)Rule-based DSL + ISA (Intelligent Statute Annotation) for legal expert systems; quasi-PrologMaintenance / academic legacy but still deployed in Australasian legal-aid toolshttp://www.austlii.edu.au/datalex/
Rules as Code (NZ “Better Rules” / OECD initiative)2018NZ DIA “Better Rules” pilot → OECD GovTechMethodology/community rather than a single language; typically delivered as OpenFisca rulebases in NZ/AU and as Catala in FRActive; OECD Observatory of Public Sector Innovation maintains the umbrella programmehttps://oecd-opsi.org/projects/rules-as-code/

Tier 3 family table — Document automation (commercial)

FormatFirst appearedOriginTypeStatus (2026)URL
HotDocs template language1996 (CAPS Software, Provo, UT)Marshall Morse + Capsoft → LexisNexis → AbacusNext → Mitratech (2020+)Word/PDF templates with HotDocs variables, computations, dialog scripts; interview-driven document assemblyActive; ~30-year-old elder statesman of legal automation; still entrenched in US law-firm and government installationshttps://www.mitratech.com/products/hotdocs/
Contract Express2003 (Business Integrity Ltd., UK)Business Integrity → Thomson Reuters (2015 acquisition)Word-based template DSL with question-tree interviews; tight integration with Westlaw + Practical Law + HighQActive; gen-AI-assisted template authoring added in 2024–2025https://legal.thomsonreuters.com/en/products/contract-express
DocuSign CLM Smart Clauses + Anchor TagsAnchor Tags ~2009; Smart Clauses ~2020 (post-SpringCM acquisition)DocuSign Inc.Anchor tags = inline text triggers (\s1\, \d1\) for auto-placement of signature/date fields; Smart Clauses = versioned, variable-bearing reusable contract provisionsActive; mainstream enterprise CLM standardhttps://support.docusign.com/s/articles/Use-anchor-text-and-custom-fields-to-auto-place-signature-tags-with-DocuSign-CLM
Ironclad Smart Templates / Lexion / Bonsai Legal2017–2020Ironclad Inc. / Lexion (acq. Docusign 2024) / BonsaiDrag-and-drop or markdown-style template editors with conditional clauses, integrations, and AI redlining — proprietary template DSLs, not formally specifiedActive (Ironclad, Bonsai); Lexion absorbed into DocuSign IAM stack post-2024https://ironcladapp.com/contract-templates/

Tier 3 family table — Rights expression languages

FormatFirst appearedOriginTypeStatus (2026)URL
W3C ODRL (Open Digital Rights Language)2001 (Renato Iannella)IPR Systems → W3C Community Group → W3C Recommendation 2018RDF/JSON-LD policy language: Permission, Prohibition, Duty, Constraint over Asset / Party; profiles for content, data spaces, EU Data ActActive; ODRL 2.2 in W3C Community Final Specification Agreement call (2026); used by Gaia-X, IDSA Dataspace Protocol, EU Data Act usage policieshttps://www.w3.org/TR/odrl-model/
MPEG-21 REL (Rights Expression Language)2003 (ISO/IEC 21000-5)ContentGuard (Xerox PARC spin-out) → MPEG / ISOXrML-derived XML rights language; legal predecessor and donor schema to ODRLLargely legacy; still cited in DRM standards but ODRL is the W3C-anchored successorhttps://www.iso.org/standard/36095.html
XACML (eXtensible Access Control Markup Language)2003OASISXML policy DSL with Policy, Rule, Target, Condition, Obligation elements; used for access control and licence policyMature / declining in greenfield (OPA Rego and Cedar are dominant) but still entrenched in enterprise IAM; cross-listed identity-auth-policyhttps://www.oasis-open.org/standard/xacml/
OASIS LegalRuleML2013 (TC formed 2009)OASIS LegalRuleML TC (Monica Palmirani, Guido Governatori)RuleML profile for legal norms; defeasible logic; deontic operators (obligation, permission, prohibition)Active; cross-listed government-civictech; consumed by L4 and similar computational-law projectshttps://docs.oasis-open.org/legalruleml/

Tier 3 family table — Academic / Ricardian / DAO governance

FormatFirst appearedOriginTypeStatus (2026)URL
Ricardian Contracts1996Ian Grigg (Systemics, Ricardo issuance platform)Design pattern, not a language: human-readable signed legal document + cryptographic-hash binding + simple markup tokens extractable by a machine (“Ricardian triple”)Active as concept; widely cited foundation for Accord Project, OpenLaw, Mattereum; Triple-Entry-Accounting conferences 2024–2025 still feature Grigg workhttps://iang.org/papers/ricardian_contract.html
Aragon / Snapshot proposal markdown + BORGsSnapshot 2020; Aragon BORGs Sept 2025Aragon Association / Snapshot LabsMarkdown-structured DAO proposals (Title, Description, Funding, Spec, KPIs); BORGs = “Bylaws-Onchain-Registered-Governance” legal liability wrappers (Sept 2025); MACI anti-collusion + Enclave secret ballots (2025)Active; Aragon’s 2025 push is “rule-based automation” replacing per-proposal votinghttps://www.aragon.org/
Kelsen / Lexon / Lexicon2017–2019Various academic + indie (Lexon: Henning Diedrich)Near-natural-language contract DSLs aiming at lawyer-readable code; small communitiesMostly inactive; cited as design points rather than deployedhttps://lexon.tech/
PDF/A-3 + embedded XML contract payloads2012 (PDF/A-3, ISO 19005-3)ISO / AdobeNot a language but a container convention: PDF/A-3 allows embedding arbitrary XML (e.g. Factur-X invoice payload, or a Ricardian-style contract XML) inside the archival PDFActive; used by EU e-invoicing (Factur-X / ZUGFeRD), cross-link to legal contract deliveryhttps://www.iso.org/standard/57229.html

Notable threads

  • The Accord Project pivot away from Ergo (2026). Ergo was the bet that a purpose-built, strongly-typed functional DSL for contract logic was needed — analysable, free of side effects, restricted to a safe arithmetic-and-date core. The Q1 2026 Tech Working Group review formalised what had been a slow drift: Ergo is deprecated, TypeScript is now the standard template-logic language, and Concerto V4 is shipping Rust and .NET runtimes alongside the existing TS one (Q1 2026 review). This is consistent with the broader pattern across this family — purpose-built legal DSLs lose to “constrained idiom in a mainstream language” because the tooling, training, and hiring problems are solved.

  • Catala is the most theoretically rigorous law-as-code project in the world right now. Catala’s design innovation is treating default logic with priorities as a first-class language feature — the “general case + exception + exception-to-the-exception” structure that pervades statutory law and that crashes ordinary if/else chains. The 2021 OOPSLA paper (Merigoux/Chataing/Protzenko) is the citation; v0.10 (2025) is the current production-ish compiler; the 10k-line French APL housing-benefits reimplementation in production at DGFiP/CNAF is the existence proof. Catala’s reach beyond France is limited mainly by the language barrier of statute itself.

  • OpenFisca is the deployment champion, by a wide margin. Catala publishes papers; OpenFisca ships in 13+ countries (as recorded at the 2026 conference: France, NZ, Australia, Canada (federal eval), Netherlands, Greece, Tunisia, Senegal, Mali, Côte d’Ivoire, UAE, French Polynesia, Paraguay, Japan, New Caledonia). The key reason is pragmatic: OpenFisca’s “language” is just Python classes with @formula decorators — anyone who can hire a Python developer can hire an OpenFisca developer. The cost is that OpenFisca has no formal semantics, no exception-priority defaults, and no proof of correspondence with statute; it is an executable interpretation, not a verifier.

  • Rights expression languages persist despite repeated obituaries. ODRL has been “about to be irrelevant” since ~2010 yet is still alive in 2026 because the W3C anchor + EU regulatory tailwinds (Data Act, data-space governance via Gaia-X / IDSA Dataspace Protocol / IDS-RAM) keep finding it useful. ODRL 2.2 is in the W3C Community Final Specification Agreement call as of 2026, and formal-semantics work continues (e.g. OPAL 2025). XACML is in slower decline as OPA Rego and AWS Cedar dominate greenfield access control, but stays in enterprise IAM by inertia.

  • Commercial document automation eats the academic lunch on revenue, not ideas. HotDocs (1996), Contract Express (2003), and DocuSign CLM Smart Clauses are template-with-conditional-logic systems with no formal semantics, no defeasible logic, no exception priorities — and they run a huge fraction of the world’s actual legal-document production. The 2024–2025 generative-AI feature additions (Contract Express’s AI-assisted authoring, Ironclad/Lexion AI redlining, DocuSign IAM) are the current frontier. The academic computational-law DSLs and the commercial CLM platforms barely overlap in citations, despite nominally solving the same problem.

  • The Ricardian Contract is the design pattern under everything. Ian Grigg’s 1996 formulation — a human-readable signed legal document, a cryptographic-hash identity, and enough markup to let a program extract the load-bearing values — is the ancestor of Accord Project’s contract triangle, OpenLaw’s markup-with-variables, Mattereum’s Smart Property Register, and arguably every “smart legal contract” project that wasn’t pure on-chain bytecode. It is one of those rare cypherpunk-era ideas that did not need to be replaced; it was right the first time.

Citations