Law by BogdanovaThe Encyclopedia of Law and Legal Studies

RESEARCH DOSSIER

Machine-Readable Legislation and Legal Semantics

Abstract. Machine-readable legislation comprises digitally structured legal texts, identifiable and versioned legislative resources, semantic descriptions, formalized norms, and, in selected contexts, executable rule representations. This monograph investigates their relationship to statutory interpretation and institutional authority. It compares the European Union's electronic publication and legislative identification infrastructure, United States legislative markup and codification, United Kingdom revision metadata, and selected Rules as Code initiatives. It examines how document models, ontologies, defeasible rules, temporal information, and executable specifications represent different properties of legislation. The research combines doctrinal analysis of selected legal texts, comparative analysis of official documentation, and examination of technical standards and scholarly studies. It argues that legal reliability requires the preservation of authoritative sources, jurisdictional and temporal applicability, interpretive provenance, explicit uncertainty, and accessible review of legally consequential decisions. A worked hypothetical provision demonstrates how apparently simple computational eligibility rules depend on evidence, exceptions, commencement, and the allocation of discretion. The analysis identifies conditions under which formalization can strengthen legislative accessibility and administration while preserving the institutional processes that determine legal meaning.

Keywords: machine-readable legislation; legal semantics; statutory interpretation; legislative drafting; Akoma Ntoso; LegalRuleML; European Legislation Identifier; Rules as Code; legal informatics; temporal reasoning; legal authority; administrative accountability

Scope, Research Questions, and Method

The digital transformation of legislation changes both the means by which legal texts are communicated and the ways in which their contents can be processed. A statute published as a searchable document permits retrieval by phrase; a statute encoded in a structured vocabulary permits retrieval by provision; a semantic graph permits the identification of relations among legal resources; a formal rule representation permits specified inferences; an executable program permits the computation of selected consequences. Each operation creates a different kind of evidence about a legal instrument. Their practical integration requires an account of the differences between them.

The subject of this inquiry is legislation as an institutional artifact and a source of normative meaning. Legislation includes statutes and delegated legislative instruments where the examples make that distinction relevant. Legal semantics concerns the representation and interpretation of the meaning of provisions, the concepts they employ, the relations they establish, and the conditions under which consequences follow. Machine readability denotes the capacity of a machine to parse a representation according to documented conventions. Machine interpretability adds formal semantics sufficient for particular computational tasks. Executability adds a specified procedure for evaluating inputs or deriving outputs. Legal authority concerns the institutional status of an artifact or an act under an applicable legal order.

The central questions are whether structured publication preserves legislative meaning, how formal semantics relates to authoritative interpretation, how temporal and jurisdictional qualifications affect computational results, and what institutional guarantees should accompany automated application. The inquiry treats the correctness of a document transformation, the validity of a formal inference, and the legality of a decision as separately assessable matters. A legally responsible information system can fail at any one of these levels even when the remaining components function precisely.

The comparative method selects institutional practices for their analytical differences rather than their representativeness of all legal systems. European Union electronic publication illustrates the allocation of authenticity by legislation. European identification standards illustrate interoperable metadata. United States resources illustrate structured markup and differences in the authority of codified material. United Kingdom documentation illustrates the consequences of ongoing editorial revision. New Zealand policy exploration and the Catala research project illuminate the transition from representation to execution. Canadian guidance supplies a bounded illustration of administrative accountability for automated decisions.

Technical standards are examined according to their specified function, and policy documents are assessed as statements of institutional objectives or practices. Scholarly claims are attributed to their authors. Hypothetical examples in this monograph are constructed for logical analysis; they do not represent enacted law. The study neither measures adoption rates nor independently benchmarks production software. Its legal propositions are bounded by the specified jurisdiction and source version, particularly the EU publication regulation in its consolidation dated March 14, 2024. The research does not purport to establish the state of every jurisdiction or to furnish individualized legal advice.

The analysis distinguishes an authoritative enactment from derivative representations even when the derivative representation has been prepared by a public authority. This distinction helps separate the epistemic question of whether a representation accurately conveys legal content from the institutional question of what legal effects the representation has. A machine-readable resource can be reliable evidence of law without being the instrument that creates the law. A formally authentic electronic publication can also contain provisions that require complex human or institutional interpretation.

Document Structure and Legislative Identity

Structured representation

The structure of legislation is meaningful. Titles, parts, sections, subsections, paragraphs, schedules, definitions, amendments, and cross-references locate normative expressions within a larger document. A representation that collapses all these elements into one undifferentiated string preserves words but loses accessible information about their relationships. A structured representation can retain those relations in a form that supports searching, editing, rendering, and citation.

OASIS (2018) specifies a legal document vocabulary in Akoma Ntoso Version 1.0. Its approach supplies conventions for identifying and organizing legislative and related documents. The vocabulary allows applications to distinguish structural and descriptive information rather than inferring every relationship from page layout. Its value lies partly in the capacity to separate documentary organization from a particular presentation. A legal document may consequently be rendered on a screen, printed, searched, and linked using a shared representation.

The structure of a statutory provision nevertheless requires substantive care during conversion. A proviso at the end of a subsection may qualify a preceding rule; a definition may govern only one part; a schedule may have effect through an enabling section. A parser that accurately captures the nested paragraph structure may still lack the legal scope of each qualification. The task of documentary markup is to preserve the source and its identifiable components so that subsequent interpretation can proceed against them.

There is a corresponding distinction between syntactic conformance and textual fidelity. An XML document that passes schema validation can still contain a transcription error, omit an amendment, or assign an incorrect identifier. Conversely, a nonconforming document may contain accurate legal language. A responsible conversion process therefore combines schema checks with independent checks of text, provision boundaries, metadata, and reference integrity.

Identity and versioning

Legislative identity extends beyond a file address. A single act may exist in several languages, historical versions, electronic manifestations, and archival copies. Its identity across these expressions must be maintained while distinctions between expressions remain visible. The FRBR-related account in OASIS's XML vocabulary specification (2018) distinguishes levels of resource identity that assist in representing such relations.

Consider an act passed in one year and amended twice. A reference to the act as an instrument identifies an enduring legal resource. A reference to its wording on a specified date identifies a particular expression relevant to interpretation. A reference to a particular XML file identifies one representation of that expression. A downloaded file is a concrete copy whose integrity may be checked separately. These distinctions help ensure that legal arguments are not inadvertently based on wording introduced after the relevant event.

The European Legislation Identifier documentation (Publications Office of the European Union, n.d.) describes an infrastructure with URI identification, a shared ontology, metadata publication, and synchronization. The architecture supports discovery and interoperability across participating systems. Such an identifier permits links among resources even when publishers employ different document workflows. The identifier is especially valuable when an application must distinguish a resource from its expressions and retrieve descriptions of related instruments.

An identifier does not by itself settle whether an instrument is legally applicable, or whether a cited version was authentic at the relevant time. A persistent identifier should therefore be accompanied by precise version and authority information. Resolution of a URI is a network operation; legal identification is an institutional and semantic operation. A system that conflates the two may return an accessible but legally inappropriate version.

Cross-references and dependencies

Statutory texts frequently incorporate definitions, procedures, exceptions, thresholds, and powers from other instruments. Representing these references as machine-resolvable links can significantly improve research and maintenance. The legal effect of a reference, however, depends on its wording and governing interpretation. A link may point to an entire statute while only a particular definition is imported. A reference may adopt another instrument as it stood on a particular date or operate dynamically as that instrument changes. The relevant rule may incorporate conditions without incorporating remedies.

A conversion should therefore preserve the literal reference, its resolved target where known, and the basis for the resolution. Uncertain or ambiguous references should remain marked as such. If a cited section is renumbered, the relation to its predecessor should be retained rather than silently replacing the citation. These measures allow an application to identify affected dependencies when legislative changes occur.

Normative Semantics and Formal Reasoning

The internal organization of norms

Legislation can establish duties, permissions, prohibitions, powers, liabilities, statuses, procedures, remedies, and definitions. These functions are analytically different. A permission may identify conduct that is authorized in specified conditions; a power may enable a competent person to alter legal relations; a duty may require an act or omission. Treating every legal sentence as an ordinary factual implication obscures these differences.

A normative representation requires at least the relevant actors, conditions, consequence, temporal scope, and source. For a duty, the representation may need to identify the person bound, the required action, the deadline, and any qualifying exception. For a power, it must distinguish the conditions of competence from the decision that the competent authority is permitted to make. For a procedural rule, it may need to identify stages and the consequences of noncompliance.

The LegalRuleML Core Specification (OASIS, 2021) provides conventions for representing legal rules and related information, including defeasibility and relationships among statements. The specification is useful because it recognizes that legal reasoning involves conflicts and exceptions, not merely unconditional derivation. Its expressive facilities support the representation of legal semantics; the substantive selection of the appropriate formalization remains the work of legal analysis.

Consider a general rule requiring a license for a specified activity and an exception for a particular emergency. The general rule and exception may both be applicable to a set of facts. Their combination requires determining whether the exception defeats the general obligation, modifies its conditions, or provides a defense after a violation. The classification affects the formal structure and potentially the outcome. A technically valid expression of either structure may be legally inaccurate if the exception has been misunderstood.

Defeasibility and conflict

Classical implication is useful when its antecedent and consequent are fixed. Legal reasoning often requires the possibility that a provisional conclusion changes when further information becomes available. The account of defeasibility in LegalRuleML (OASIS, 2021, section 4.2.1) addresses rules whose conclusions may be displaced by contrary evidence or conflicts. Formal systems can represent such relations explicitly, but the legal reasons for priority must be established independently.

A later enactment may displace an earlier provision in a particular jurisdiction; a specific provision may qualify a more general one; a superior norm may control an incompatible inferior instrument. The use and limits of these interpretive considerations vary by legal order and context. They should be encoded only after a justified determination that a relevant legal relationship exists. A generic priority rule based solely on publication date, for example, might incorrectly override a special provision designed to remain operative.

There are also conflicts that cannot be resolved by a simple ranking of rules. Two plausible constructions may depend on contested statutory purpose, compatibility with a constitutional norm, or the proper characterization of the facts. In such cases the formal representation can expose the competing branches and their consequences while leaving the authoritative resolution to the competent institution.

A machine-readable expression of a norm should retain the distinction between the source text and the interpretation encoded. Explicit representation of a conflict does not settle it. An algorithm that selects one branch through an arbitrary ordering of its inputs may produce a deterministic result, but determinism alone provides no reason for the legal priority of that result.

Rules, facts, and proof

The evaluation of a legal rule requires facts. In administrative systems, those facts may be supplied by an applicant, another public body, a document, a sensor, or an inference from a dataset. A formal rule that is internally consistent can generate an inaccurate decision if the factual inputs are incomplete or unreliable. Conversely, an accurate factual record cannot repair an erroneous rule.

The proof of a legal fact often involves standards and procedural arrangements that differ from ordinary data verification. A dated entry in an administrative record may be evidence of residence, but it may not be conclusive. The legal meaning of the record depends on the applicable evidentiary arrangements. The rule engine should therefore distinguish a fact assumed for computation from a fact established for a legally consequential decision.

A reproducible derivation is valuable because it allows an examiner to identify the premises and inferential steps. Its evidentiary quality depends on the provenance of the facts and rules. A conclusion represented as true within a formal system means that the specified inference succeeded under the chosen semantics and inputs. It does not establish independently that every premise is true or legally sufficient.

Time, Amendment, and Applicable Law

Temporal dimensions

Legislative resources participate in multiple temporal processes. An instrument may be adopted, promulgated, published, enter into force, commence for particular purposes, apply to a class of events, be amended, expire, or be repealed. A database may ingest the instrument on a different date. These events must be distinguished to support historical and prospective legal research.

A provision published in June may commence in September. A rule commencing in September may apply to applications filed after October, with a transitional arrangement for applications already pending. A later amendment may alter the rule in January while preserving the earlier treatment of a defined cohort. A system selecting the provision solely by its most recent publication date would fail to represent these relations.

A helpful distinction is between the date on which an institutional or legally relevant condition is effective and the date on which a dataset records that condition. This distinction supports retrospective reconstruction of both the law applicable to an event and the state of knowledge available to a decision-making system at an earlier time. The two questions may matter in different forms of legal review. A historical correction may improve today's knowledge of an old rule without changing the legally relevant time of the rule itself.

The OASIS (2021) LegalRuleML specification accommodates temporal characteristics in normative representations. Their value lies in allowing temporal qualifications to be associated with legal statements and contexts. The actual applicable periods must be supplied from the relevant source instruments and interpretive analysis.

Amendments and consolidation

Amendments can substitute wording, insert provisions, repeal text, modify application, or preserve consequences for defined situations. A consolidation that merges textual amendments may therefore require additional information about nontextual effects. The state of a consolidated database is not necessarily identical to the complete state of applicable law.

The National Archives' legislation data reuse documentation describes the historical baselines of revised United Kingdom legislation and the disclosure of unapplied amendments. It identifies a specific XML element for recording unapplied effects and explains limitations in the historical version record. These disclosures demonstrate why structured legislation must include information about the editorial completeness of the text rather than merely presenting a date and consolidated wording.

An automated system should treat an outstanding amendment indicator as an issue requiring analysis where it may affect the rule under evaluation. The appropriate response may be to examine the amending instrument, restrict the computation to an unaffected period, or suspend the result pending review. The existence of an unapplied effect does not prove that every result from the provision is wrong, but it does establish a reason to investigate its relevance.

Changes should propagate through downstream representations according to explicit dependencies. An amendment to a definition may alter several provisions even when their own text remains unchanged. An amendment to a commencement schedule may affect the periods for which a computation is permitted. A changed procedural requirement may alter the evidentiary validity of a previously implemented decision workflow without changing the substantive eligibility formula.

Transitional rules and historical reconstruction

Transitional provisions often determine which legal regime governs an event at the boundary between old and new law. They can refer to application dates, pending proceedings, existing licenses, contracts, or rights acquired before a specified event. These rules require more than retrieving successive versions of one section.

Suppose that a new statutory threshold applies from January 1 but applications received before January 1 remain governed by the previous threshold. A person applying on December 31 and receiving a determination in February may still be subject to the old rule. Another applicant filing on January 2 may be subject to the new threshold even if the two applications are decided simultaneously. The relevant version is determined by the transitional rule and the legally relevant event, rather than by the current date.

A historical decision record should capture the facts used, the relevant event date, the applicable legislative version, the rule representation, and the software version. Reconstructing only the legislation is insufficient if the historical system used a different interpretation or omitted a material amendment. A preserved executable artifact and a preserved statutory source support investigation of different questions.

From Statutory Language to Executable Rules

Rules as Code and legislative production

Rules as Code proposes closer coordination between the creation of rules and their computational consumption. Mohun and Roberts (2020), in Cracking the Code, describe a policy approach in which public institutions make official machine-consumable rules available. The proposal addresses the translation that otherwise occurs when multiple organizations independently implement a legal requirement. Its potential benefit is a reduction in inconsistent implementations and improved reuse of public rule information.

The proposal leaves institutional questions open. A government may publish a computational representation for information, make an administrative interpretation available through an interface, or seek legislative recognition of a formal representation. These choices have different legal consequences. Official authorship does not invariably confer the same authority on every format. The terms governing the publication and use of the representation need to identify its relationship to enacted law, correction procedures, and the allocation of responsibility.

The New Zealand Government's (2018) Better Rules discovery report documents a short interdisciplinary exploration that tested assumptions against two legislative examples. Its proposed workflow emphasizes coordination among policy specialists, legislative drafters, and developers. This illustrates the practical problem of translation across professional communities. The discovery's exploratory method supports discussion of opportunities and design questions; it does not establish a general quantified improvement in legal accuracy or administrative outcomes.

An integrated drafting process can be useful even where only the natural-language enactment has legal authority. By formalizing candidate provisions before adoption, drafters may discover missing conditions, conflicting definitions, inconsistent units, and unresolved transition cases. The resulting software can function as an analytical aid during drafting. Whether the software later becomes a legally recognized representation is a separate legislative choice.

Executable specifications

Merigoux, Chataing, and Protzenko (2021) introduce Catala as a language designed for formalizing and executing selected statutory computations. Their research reports proof of correctness for core compilation steps and evaluation against legal examples. The authors describe the formalization process as facilitating collaboration between legal and programming expertise. Those reported results show the possibility of rigorous implementation in selected settings; the cited study does not prove the legal correctness of arbitrary statutory programs.

Compilation correctness concerns preservation of specified semantics across transformations performed by a compiler. The legal correctness of the original specification requires additional justification. A compiler can faithfully implement an inaccurate or incomplete formalization of a statutory rule. Conversely, a carefully reasoned legal specification can produce erroneous results if the compiler or runtime fails to implement it faithfully. Testing and proof should therefore be directed to the relevant layer rather than treated as interchangeable.

Computational specifications are especially promising for calculations with explicit variables, conditions, and mathematical operations. A statutory benefit based on income thresholds, age, and prescribed amounts may have an algorithmic component. However, the definitions of income, household, relevant period, and qualifying status can still involve substantial interpretation. The formalized mathematical component must be connected to legally justified input definitions.

Worked hypothetical: eligibility and exceptions

Consider the following fictional legislative arrangement, created solely for this study. A benefit is available to residents who submit an application during a qualifying period and have assessed annual income of no more than 30,000 monetary units. The general benefit is 2,000 units. A person whose annual income exceeds 30,000 may receive an exceptional hardship award if an authorized officer determines that the prescribed hardship conditions are met. From January 1, 2027, the ordinary income threshold rises to 32,000, but applications received before that date remain governed by the earlier threshold.

This arrangement appears computationally straightforward. It nevertheless contains several different normative elements: ordinary eligibility, the calculation of a fixed amount, a temporal transition, and an exceptional power involving an authorized determination. A complete implementation must distinguish them.

For the ordinary rule, the application date selects the applicable threshold through the transitional provision. Residency and assessed income are legally characterized inputs, not arbitrary database fields. The ordinary amount follows if the eligibility conditions are established. The exceptional route is a separate branch. A positive hardship finding may authorize an award, but the fictional wording does not specify whether the exceptional amount is fixed, whether it equals the ordinary benefit, or whether the officer may choose an amount. It would be inaccurate to assume that the program may assign 2,000 automatically to every exceptional case.

Four contrasting scenarios illustrate the consequences:

Facts assumed for illustration Ordinary-rule result Additional legal question
Resident, income 30,000, application December 31, 2026 Eligible at the earlier threshold Confirm the qualifying period and evidence
Resident, income 31,000, application December 31, 2026 Above ordinary threshold Hardship assessment may be available
Resident, income 31,000, application January 1, 2027 Eligible at the new threshold Confirm the relevant application date
Residency unknown, income 20,000, application January 1, 2027 Ordinary eligibility unresolved Establish residency or apply an authorized evidentiary rule

The first result depends on the inclusive phrase no more than; using a strict less-than comparison would incorrectly reject the boundary case. The second and third cases differ solely by a legally relevant date. The fourth illustrates why missing information must be represented independently from a negative fact. An ordinary-rule evaluation can return an unresolved status rather than assigning an unsupported negative determination.

This analysis can be translated into tests covering the threshold boundary, the transition date, unknown residence, missing income, and the exceptional route. Such tests check the selected formalization against the hypothetical. They do not supply proof that the hardship conditions were met, nor do they create authority to award a benefit. The value of the example is that it reveals several distinct judgments hidden within an apparently simple formula.

Computational determinacy and legal consequences

A deterministic program can produce identical results when supplied with identical inputs and an unchanged runtime. That repeatability is valuable for auditing and consistency. Legal consistency also requires that like cases be treated alike according to legally relevant distinctions. A computational system can violate that requirement if its inputs represent irrelevant differences or if relevant differences are excluded.

Consistency is accordingly a qualified benefit. If several agencies implement the same erroneous translation, central reuse can spread the error across a larger population. Coordinated rule provision should be accompanied by correction mechanisms, change notifications, and independent examination of high-impact interpretations. The scope of reuse should correspond to the legal scope of the represented rule.

Comparative Legislative Infrastructures

European Union

European Union practice illustrates the complementarity of legally recognized publication and metadata interoperability. The electronic publication regulation establishes the status of the official electronic edition within its defined regime. ELI provides identification and descriptive infrastructure. The two instruments address related but different questions: legal authenticity and the discoverability and exchange of legislative resources.

The amended electronic publication regulation makes verifiable integrity and availability significant aspects of the publication infrastructure. The ELI framework supplies a common descriptive model for participating publishers. Their combined significance is that public legal information can have both legally recognized provenance and machine-usable identity. Neither proposition implies that an arbitrary program derived from an official act acquires the same legal status as the act.

For multilingual legal information, the design of metadata and version retrieval should preserve the relevant linguistic expression and the institutional status of that expression. A computational rule may depend on an interpretation of language that needs to remain traceable to the sources examined. This is especially important for comparative analysis across languages and jurisdictions.

United States

The United States illustrates how documentary interoperability coexists with differences in the legal authority of source collections. GPO's Beta USLM XML announcement (2018) describes the application of a LegalDocML-derived schema to selected legislative materials. The initiative shows the importance of common document structure for legislative workflows and downstream access. The 2018 announcement is evidence of the documented project and its historical scope, rather than an exhaustive description of availability in November 2026.

The legal status of codified text is another issue. GPO's United States Code documentation explains the distinction between titles enacted into positive law and titles that serve as prima facie evidence of law, with the Statutes at Large governing in the latter case. Accordingly, a uniform markup structure cannot be interpreted as a uniform rule of evidentiary authority for every title and source type.

An application retrieving a United States statutory provision should therefore retain information about whether it is drawing on a public law, the Statutes at Large, or a codified provision and, when material, the status and currency of the title. In a disputed case, the appropriate legal research may require examination of the underlying enactments. The reliability of the data interface should be evaluated in conjunction with these institutional distinctions.

United Kingdom

The United Kingdom's legislative information environment demonstrates the importance of an editorially maintained version record. The National Archives' documentation of unapplied legislative effects indicates that a revised legislative resource may disclose outstanding changes and historical coverage limits. These features are useful precisely because they reveal the distance that can exist between the database's current representation and the complete legal inquiry.

A researcher using machine-readable UK legislation should distinguish an as-enacted instrument from revised text and relevant commencement or amending instruments. For applications that compute rights or obligations, the outstanding-change indicators need to form part of the decision process. A service that hides such indicators because it can parse the text has removed a material piece of provenance information.

The comparative implication is that good digital legislative infrastructure makes limitations discoverable. Providing metadata about a known gap is an important service in its own right, because it allows the legal researcher to direct further analysis to the relevant instruments and dates.

New Zealand and computational drafting

The New Zealand discovery report examines a different point in the legislative lifecycle: the relationship between policy design, drafting, and digital implementation. Its exploratory work supports considering formalization before implementation rather than waiting until an agency must translate enacted text under operational pressure. The value of this approach is the opportunity to identify issues while the relevant professions can discuss them.

The distinction between a proposal and demonstrated institutional performance remains essential. A discovery project can identify plausible improvements in coordination and articulate a future workflow. Demonstrating that the workflow reduces errors, improves access, or changes legal outcomes would require appropriate comparative evidence, including analysis of the baseline system and the scope of the deployed intervention. This monograph does not claim those results.

Together, these examples show different strengths: authenticity, identification, documentary structure, revision transparency, and early formalization. Their complementarity supports selecting technologies according to the legal function they serve rather than treating one format as a complete solution.

Interpretation, Discretion, and the Boundaries of Automation

Ambiguity, vagueness, and legal construction

Legal language can present ambiguity when more than one interpretation is plausible, and vagueness when application at the boundary of a concept remains uncertain. Context, statutory structure, definitions, purpose, and relevant authority can assist in resolving these issues. The applicable interpretive approach varies across legal orders and questions.

A computational representation makes a choice among plausible readings whenever it must assign a precise meaning to language. Such a choice may be entirely justified. The justification should nevertheless be recorded, especially when an alternative reading would produce materially different outcomes. A formal rule can attach its interpretation to an authoritative provision, identify the conditions assumed, and record the interpretive authorities considered.

Some apparent ambiguity can be resolved through careful drafting. If an income period is undefined, the legislature may specify it. If two different definitions of a term are used inadvertently, the text may be corrected. Formalization can help discover these issues. Other uncertainties may be intentional or reflect the complexity of regulating future situations. Legislation can delegate assessment of reasonableness, public interest, or exceptional circumstances to a competent institution.

A system should distinguish an ambiguity in the text from uncertainty about the relevant facts. A definition may have an agreed interpretation while the applicant's factual situation remains disputed. Conversely, the facts may be agreed while their legal characterization remains contested. Each situation calls for different evidence and different review.

Administrative discretion

The presence of discretion does not make computational assistance useless. A system may identify the statutory criteria governing the exercise of discretion, calculate relevant amounts, retrieve comparable cases, or ensure that procedural steps have been completed. It may also detect that a case satisfies conditions permitting referral to a competent officer.

The authority to exercise the discretion remains governed by the applicable law. A policy or software configuration may guide a decision, but the extent to which it may constrain the authorized decision-maker depends on the legal regime. The institution should identify whether the program is advisory, executes a prescribed calculation, or makes a legally significant determination pursuant to specific authority.

A discretionary decision can require reasons showing that relevant considerations were examined. A computation that returns only a result, without exposing the material inputs and criteria, may be unsuitable for that function. An explanation should distinguish which portions were determined mechanically and which depended on assessment.

The interpretive role of software

Software can regulate conduct through the opportunities and constraints it creates. Diver (2021), in Digisprudence, frames characteristics of computational legalism as questions of legitimacy. The present inquiry draws on that stated concern to distinguish the effectiveness of software constraints from the legal justification for those constraints.

An interface may refuse an application that does not fit its expected schema. A database may require a value for a category that the legislation leaves open. A calculation service may round an amount at an intermediate stage even though the statutory text specifies rounding only at the end. Each design choice can affect practical legal access. Some are routine and justified; others can materially change the operation of a legal scheme.

When such choices are distributed across software components, the responsibility for them can become difficult to locate. It is therefore important to maintain documentation that connects design decisions to legal authority, institutional approval, and correction responsibility. This is particularly important for services used by people who cannot readily choose an alternative implementation.

Verification, Provenance, and Evidence

Different objects of verification

Verification must match the object being checked. Documentary verification asks whether text and structure faithfully represent a source. Metadata verification asks whether the represented identity, dates, status, and relations are accurate. Formal verification asks whether a program or inference satisfies its specification. Legal review asks whether the specification, facts, procedure, and resulting action are justified under applicable law.

The W3C's SHACL specification offers a concrete illustration of one kind of check: constraints on an RDF graph. It can support consistency in metadata publication. It is not an independent legal review. Likewise, the compiler proof reported in the Catala research paper concerns specified computational transformations. It should be interpreted according to the scope of the proof rather than as a general guarantee of compliance.

These distinctions have practical consequences for error reporting. A schema failure may call for correction of markup. A mistaken commencement date requires investigation of the legal source. An unexpected computation may reveal a software defect, an erroneous formal specification, or an incorrect input. The institution should avoid treating all failures as interchangeable technical issues.

Claim-level provenance

Provenance connects a legal statement to its origin, transformation, and use. At a documentary level, provenance identifies the instrument, issuing institution, source version, and publisher. At a semantic level, it records the source passage and interpretive basis for an assertion. At an executable level, it connects the implemented rule to the formal specification, dependencies, test records, and program version.

The same relationship should extend to decision outputs. A legally consequential computation should be capable of being reconstructed from the relevant inputs and rules, subject to applicable privacy and security controls. An examiner should be able to determine why a condition was treated as satisfied, what temporal version was used, and whether an exception was considered.

Preserving the exact source bytes and identifiers of successive transformations helps protect against silent changes. Cryptographic digests can demonstrate that a retrieved artifact is identical to an earlier verified artifact. They cannot establish the correctness of the original artifact or its interpretation. The verification record must therefore pair integrity evidence with substantive review and documented responsibility.

Testing and correction

Boundary tests are particularly valuable in the formalization of threshold rules. They should examine values immediately below, exactly at, and immediately above the threshold; the last instant before and first instant after a commencement date; and the interactions of general rules with exceptions. Tests should also distinguish absent, contradictory, invalid, and confirmed facts.

A change to a rule requires identifying affected dependencies and reexamining relevant tests. A change to the source text may alter the formalization; a change to the formalization may require compiler or program checks; a change to a data provider may require reconsideration of how legally relevant facts are established. The required review should be proportionate to the consequences of each change.

Correction procedures should preserve the distinction between correcting an editorial representation, changing an administrative interpretation, and amending the law. Each change has different authority and potentially different consequences for earlier decisions. A technical correction can reveal that previous computations were wrong; it does not determine by itself what remedies or reconsideration procedures the law requires.

Security, integrity, and resilience

A legislative information system must protect the integrity of authoritative records and the availability of legitimate access. A rule service adds operational dependencies: code repositories, deployment configurations, input systems, authentication, and runtime environments. A compromise in any one of these can affect downstream decisions.

Security measures should be designed according to the function of the system. Publication requires protection against unauthorized alteration and a dependable recovery process. Administrative computation additionally requires controls over personal information, authorization to change rules, and audit records of legally consequential outputs. The allocation of access should permit independent review without unnecessary disclosure of sensitive information.

A resilient system should have a documented response when a source cannot be resolved, an amendment has not yet been evaluated, or an input system is unavailable. Depending on the legal requirements, an appropriate response may involve suspending a computation, preserving the case for human consideration, or operating under an authorized fallback procedure. Silent substitution of a stale rule or fabricated input undermines the reliability of the resulting decision.

Implementation and Institutional Governance

Coordinating drafting, publication, and computation

The development of machine-readable legislative infrastructure should begin with the legal and institutional purpose of each artifact. A publisher concerned with accessible legal research may prioritize structured text, stable identifiers, and revision metadata. An agency calculating a statutory amount may need a versioned executable representation of a narrow subset of provisions. A legislature considering formalized drafting may use computational tests to discover ambiguities before enactment.

These projects benefit from coordinated design without requiring identical technologies. The common requirements are reliable links to authoritative sources, explicit version information, documented meaning, and correction arrangements. Shared standards can reduce unnecessary variation, while jurisdiction-specific profiles can preserve local legal distinctions.

A practical sequence is to establish the authoritative source and its version, preserve the document structure, identify the relevant concepts and dependencies, document the interpretation, specify the computational behavior, verify the implementation, and assign operational responsibility. Each stage has its own reviewable output. The sequence can be iterative: problems discovered in a formalization may lead to reconsideration of the interpretation or drafting. This is an ordinary synthesis of the research findings rather than a claim to establish a new named methodology or doctrine.

Maintenance and public access

A useful legislative information service remains maintained after its initial publication. Identifiers should continue to resolve or provide clear information about replacement and archival resources. Changes to documents and metadata should be discoverable. Formal rules should identify the versions and dependencies from which they were derived. Affected downstream users should receive appropriate notice of significant corrections and amendments.

The synchronization pillar of the ELI documentation illustrates the significance of distributing metadata updates. The broader legal implication is that a shared representation requires a maintenance process as well as a publication format. A technically interoperable resource that becomes stale can cause errors across every dependent system.

Public access also has a substantive dimension. A machine-readable text should remain connected to a readable presentation. People affected by a rule should be able to inspect its legal source and understand the principal conditions governing their situation. Different representations can serve different users, provided that their relationships and legal status are made clear.

Evaluation and institutional choice

The appropriate evaluation of a machine-readable legislative initiative depends on its intended outcome. A document markup project may be assessed for textual fidelity, accessibility, interoperability, and preservation of references. A semantic metadata project may be assessed for completeness, accurate relationships, and discoverability. An executable rules project may be assessed for specified computational behavior, coverage of legally relevant cases, change handling, and the suitability of outputs for the intended institutional use.

Claims about efficiency, reduction of errors, or improved fairness require evidence appropriate to those outcomes. The mere existence of a working prototype or a formally valid representation does not demonstrate such improvements. Comparative evaluations should identify baseline practices, affected populations, types of errors, operational conditions, and the scope of legal rules covered.

Institutional choices should account for the consequences of error. A reference tool that occasionally returns an outdated version can mislead research; an automated eligibility determination based on that version can directly affect an applicant's legal position. Higher-consequence functions warrant more extensive attention to source currency, interpretive authorization, input quality, testing, and access to review.

The research examples reveal a persistent challenge: a common rule service can increase consistency while also creating a shared point of failure. Independent verification, transparent versioning, controlled correction, and the ability to challenge individual results help manage that risk. These practices support the benefits of reuse without treating uniformity as an independent criterion of legality.

Conclusion

Machine-readable legislation is a significant development in the organization, communication, and application of law. Structured documentary vocabularies preserve the identifiable components of legal sources. Metadata standards support discovery and exchange. Ontologies make selected legal relationships explicit. Formal rule representations expose assumptions, exceptions, and inferential relations. Executable specifications enable computation where the relevant rules and inputs can be sufficiently defined.

The analysis establishes the importance of maintaining distinctions among these functions. A document can be authentic without containing a computational specification. A structured text can be faithful while its derived interpretation is mistaken. A program can execute its specification correctly while the specification fails to represent applicable law. A legally authorized decision can employ computational assistance while remaining subject to its governing substantive and procedural obligations.

Comparative evidence shows why legal authority, identity, and temporal applicability require separate treatment. The EU publication regime allocates authenticity to a specified electronic publication process. ELI addresses interoperability of legislative descriptions. US legislative markup and codification demonstrate that common document structure can coexist with different legal evidentiary statuses. UK revision documentation shows why editorial completeness and unapplied amendments matter. The New Zealand discovery project and Catala research illustrate opportunities for collaboration between legal and computational specialists, with conclusions limited to their respective evidence.

The worked hypothetical demonstrates that formalizing even an elementary threshold rule requires decisions about inclusive boundaries, transition dates, evidentiary uncertainty, and the scope of discretionary authority. Identifying these issues during drafting and implementation can improve the quality of legislative information and assist subsequent legal review.

The central analytical conclusion is that the reliability of a machine-readable legislative system depends on the integrity of the relationship between authoritative text, justified interpretation, formal representation, computational behavior, and institutional responsibility. Digital legislation is most useful when these relationships can be inspected, corrected, and reconstructed. The benefits of automation derive from its capacity to perform well-defined operations in a legally accountable process. The authority and meaning of the resulting legal action remain matters for the relevant legal order and its institutions.

References

OASIS Open. (2018, August 29). Akoma Ntoso Version 1.0, Part 1: XML Vocabulary. OASIS Standard. Source

OASIS Open. (2021, August 30). LegalRuleML Core Specification Version 1.0. OASIS Standard. Source

Publications Office of the European Union. (n.d.). ELI: European Legislation Identifier. EU Vocabularies. Accessed November 25, 2026. Source

Council of the European Union. (2013). Council Regulation (EU) No 216/2013 of 7 March 2013 on the electronic publication of the Official Journal of the European Union. Consolidated version of March 14, 2024, as amended. Official Journal L 69, March 13, 2013, pp. 1-3. Source

U.S. Government Publishing Office. (2018, December 4). Beta USLM XML. GovInfo. Source

U.S. Government Publishing Office. (n.d.). United States Code. GovInfo Help. Accessed November 25, 2026. Source

The National Archives (United Kingdom). (n.d.). What data we hold on legislation.gov.uk. Legislation.gov.uk data reuse documentation. Accessed November 25, 2026. Source

New Zealand Government, Service Innovation Lab. (2018). Better Rules for Government Discovery Report. Digital Government. Source

Mohun, J., & Roberts, A. (2020). Cracking the code: Rulemaking for humans and machines. OECD Working Papers on Public Governance, No. 42. OECD Publishing. DOI: 10.1787/3afe6ba5-en. Source

Merigoux, D., Chataing, N., & Protzenko, J. (2021). Catala: A programming language for the law. Proceedings of the ACM on Programming Languages, 5 (ICFP), Article 77. DOI: 10.1145/3473582. Preprint arXiv:2103.03198. Source

World Wide Web Consortium. (2012, December 11). OWL 2 Web Ontology Language Primer (Second Edition). W3C Recommendation. Source

World Wide Web Consortium. (2017, July 20). Shapes Constraint Language (SHACL). W3C Recommendation. Source

Diver, L. (2021). Digisprudence: The design of legitimate code. Law, Innovation and Technology, 13(2). DOI: 10.1080/17579961.2021.1977217. Source

Treasury Board of Canada Secretariat. (n.d.). Algorithmic Impact Assessment. Government of Canada. Accessed November 25, 2026. Source