Stare
A Common-Law Programming Language
Stare: A Common-Law Programming Language
On the Design of a Language Whose Semantics Are Determined by Precedent Rather Than Specification
Prof. Eleanor Blackwood, Faculty of Law and Computation, University of Edinburgh
Journal of Law and Formal Systems, vol. 18, no. 1, Spring 2026
1. Introduction
Every programming language has a specification. The specification defines what the language’s constructs mean — what if does, what + does, what happens when a function is called and what happens when it returns. The specification exists before any programme is written. It is anterior to execution. Programmes are judged correct or incorrect by reference to the specification, which does not change in response to the programmes it governs (or changes only through a deliberate revision process that is understood to be exceptional and rare). The relationship between specification and programme is, in legal terms, statutory: the law is written, the law is applied, and the law’s meaning is fixed at the time of its enactment, subject to interpretation but not to evolution through use.
Stare takes a different approach. Stare is a programming language whose semantics are not specified but adjudicated. The language has no specification document. It has a corpus: an accumulating body of prior executions, each one a precedent, each one potentially binding on future executions. When the Stare runtime encounters an expression, it does not consult a specification to determine what the expression means. It searches the corpus for the most analogous prior case and does what was done before.
The language is named for stare decisis, the legal principle that courts should follow the rulings of prior courts. Its designer, Prof. Malcolm Adeyemi of the University of Lagos Faculty of Law, describes it as “the first programming language to take seriously the idea that the meaning of a symbol is not given in advance but emerges from a history of use.” Adeyemi is a legal scholar by training and a programmer by necessity, and the proportions are visible in the language.
2. Origins
Adeyemi’s career prior to Stare was in comparative law, specifically the relationship between common-law and civil-law traditions in post-colonial West African legal systems. His key insight — which he has described in interviews as “obvious to any first-year law student and apparently invisible to every language designer” — was that the distinction between statutory and common-law adjudication maps directly onto the distinction between specified and unspecified semantics in programming.
In a statutory system, the law exists as a written text. Judges apply it. In a common-law system, the law exists as a body of prior decisions. Judges reason by analogy: this case is like that case, so the same rule applies. The law is not anterior to its application — it is constituted by its application. Every judgment extends the law. The law is, in a precise sense, its own history.
Adeyemi’s 2020 paper, “On the Common Law of Computation” (published simultaneously in the Yale Law Journal and on arXiv, a dual submission that confused the peer reviewers of both), argued that a programming language could be built on the same principle. Instead of a specification that defines semantics in advance, the language would begin with an empty corpus and build its semantics through execution. The first run of a programme would be an act of “first impression” — a case with no precedent, decided by the runtime on its own initiative. Subsequent runs would be governed by the precedent established by the first. Over time, the corpus would grow into a body of case law that determined what the language’s constructs meant, not in the abstract but in the specific context of how they had been used.
The paper attracted attention from two communities that do not normally speak to each other: programming language theorists, who found the formalism interesting but the philosophy suspicious, and legal scholars, who found the philosophy sound but the formalism incomprehensible. Adeyemi considers this double reception a validation.
3. The Language
3.1 Surface Syntax
Stare’s syntax is deliberately conventional. Variables are bound with let. Functions are defined with fn. Control flow uses if, while, and match. Arithmetic operators are +, -, *, /. A simple programme in Stare looks identical to a programme in any other expression-oriented language:
let x = 5
let y = 10
let z = x + y
emit z
This is intentional. Adeyemi wanted the surface syntax to be unremarkable so that the language’s actual innovation — the semantics — would be impossible to avoid. “If the syntax were unfamiliar,” he has said, “people would attribute the strangeness to the syntax and miss the point.”
The strangeness is: nothing in the above programme has a defined meaning. The + operator does not add numbers. It does whatever the corpus says it does when applied to values like 5 and 10. If the corpus contains a precedent in which 5 + 10 produced 15, then z is 15. If the corpus contains a precedent in which + applied to two integers produced their concatenation as strings, then z is "510". If the corpus is empty — if this is the first programme ever run — then the runtime must decide, and its decision becomes precedent.
3.2 First Impression
The mechanism for handling cases of first impression is the language’s most technically complex component and its most philosophically fraught. When the runtime encounters an expression for which no precedent exists, it must decide what the expression means. It cannot defer to a specification, because there is no specification. It cannot refuse to execute, because refusal would itself constitute a precedent (the precedent that certain expressions have no meaning, which would import a form of illegality that common-law systems do not recognise in the absence of prior adjudication).
Stare’s solution is the first impression engine, a subsystem that decides cases without precedent by reasoning from general principles. The principles, enumerated in what Adeyemi calls the “founding precedents” — a small set of pre-loaded cases that the runtime ships with, analogous to constitutional provisions — include:
- Arithmetic operators applied to numbers should produce numerical results.
- String operators applied to strings should produce string results.
- Mixed-type operations should prefer the type of the left operand.
- Division by zero should produce an error, not infinity.
- Functions, when called, should execute their bodies.
There are thirty-seven founding precedents. They are not a specification — Adeyemi is insistent on this point — because they are defeasible. Any founding precedent can be overturned by a sufficient weight of contrary practice. They are, he says, “not constitutional amendments but common-sense starting points, the kind of thing a reasonable judge would assume in the absence of any other guidance.” That the founding precedents produce behaviour identical to a conventional programming language in most cases is, in Adeyemi’s view, a feature: “The common law begins by agreeing with common sense. It diverges when common sense proves inadequate.”
3.3 The Corpus
The corpus is a persistent, append-only database that records every expression evaluated by the runtime, the context in which it was evaluated, and the result that was produced. Each record is a case. A case has a fact pattern (the expression and its context), a holding (the result), and a ratio decidendi — the principle that the runtime applied to arrive at the result.
The ratio is generated automatically by the runtime and is, in a technical sense, the most novel aspect of the system. It is a structured summary of why the runtime produced the result it did: which precedents were consulted, how the current case was analogised to them, and what principle was extracted. The ratio is not human-readable by default — it is a vector in the embedding space of the analogy engine — but it can be decoded into a natural-language explanation by a companion tool that the community calls “the reporter,” after the legal reporters who publish case digests.
An example case, as rendered by the reporter:
Case #4,821
Expression: "hello" + 42
Context: top-level, no enclosing function
Holding: "hello42"
Ratio: By analogy to Case #12 (String + Int → String,
per founding precedent re: left-operand type
preference), concatenation with implicit conversion
of right operand.
The corpus grows with every execution. As of early 2026, the reference corpus — maintained by the Stare Foundation and used as the default for new installations — contains approximately 2.3 million cases. It is 14 gigabytes. The runtime’s startup time is dominated by corpus loading, which takes, on commodity hardware, between eight and twelve seconds. This is considered acceptable by the community and unacceptable by everyone else.
3.4 Analogy
The central operation of the Stare runtime is analogy: given a new expression, find the most similar case in the corpus and apply its holding. The analogy engine uses a learned embedding that maps expressions to a high-dimensional vector space, and precedent is determined by cosine similarity. The most similar case — the “controlling precedent” — determines the result.
When multiple cases are similarly relevant, the runtime applies a weighting that favours recent cases over old ones and specific cases over general ones, a heuristic Adeyemi describes as “the common law’s natural preference for the particular over the abstract.” This means that the semantics of the language evolve over time: as new cases are added, they may displace older precedents, shifting what + or if or fn means in context.
This is, to be clear, the intended behaviour. The language’s semantics are not fixed. They drift. A programme that produces one result today may produce a different result tomorrow, because the corpus has grown overnight with new cases that alter the analogy landscape. Adeyemi considers this feature rather than a defect. “Statute-based languages promise stability and deliver rigidity. Stare promises responsiveness and delivers — " He paused, in the interview, and chose his words carefully. “It delivers change. Whether the change is responsive to the right things is an open question.”
4. The Schism
The change was, in fact, responsive to the wrong things, and the discovery of this produced the community’s defining crisis.
In late 2023, a developer in Accra noticed that her numerical code was producing results that were correct but increasingly imprecise. Addition of two integers was returning floating-point numbers. Multiplication was producing results off by small amounts — 7 * 8 returning 55.97 instead of 56. The imprecision was not random. It was systematic and worsening.
Investigation revealed the cause. Over the preceding six months, a team in Lisbon had been using Stare for a machine-learning project involving extensive floating-point computation. Their work had added tens of thousands of cases to the corpus in which arithmetic operators were applied to floats, producing float results. The analogy engine, finding these cases numerous and recent, had begun to weight them heavily. Integer arithmetic was being analogised to floating-point arithmetic, because the corpus now contained more float cases than integer cases, and the analogy engine’s notion of “most similar” was being influenced by sheer volume.
The language’s semantics had shifted. Not because anyone had changed a specification — there was no specification to change — but because the accumulated weight of practice had moved the law.
The crisis split the community into two factions whose names were chosen with the deliberateness of people who understood they were making legal history, even if the legal system in question governed a programming language used by nine hundred people.
4.1 The Originalists
The Originalist faction, led by Dr. Samuel Osei at the University of Ghana, argued that the founding precedents should be given special weight — that they should be treated not as ordinary precedents but as constitutional provisions, resistant to override by accumulated practice. Osei’s proposal was that the analogy engine should give the founding precedents a fixed, high weight that could not be displaced no matter how many contrary cases entered the corpus.
This would stabilise the language’s core semantics: + would always mean addition for numbers, if would always mean conditional branching, and the founding precedents would serve as an anchor against semantic drift. New cases would still accumulate and govern novel situations, but the basic operations would be fixed.
Adeyemi opposed this. The proposal, he argued, would transform the founding precedents from defeasible starting points into an entrenched constitution, which would import exactly the statutory rigidity that Stare was designed to avoid. “If the founding precedents cannot be overridden,” he wrote in a forum post, “they are not precedents. They are statutes. And if we wanted statutes, we would have written a specification.”
4.2 The Living Constitutionalists
The opposing faction, centred at Edinburgh and informally led by the author of this paper, argued that semantic drift was not a bug but an incomplete feature. The problem was not that the corpus evolved — that was the point — but that it evolved without judicial review. In a real common-law system, a judge can examine a line of precedent, determine that it has drifted from foundational principles, and issue a corrective ruling. In Stare, the analogy engine applied precedent mechanically, with no mechanism for stepping back and asking whether the accumulated cases still reflected sound principles.
The Edinburgh faction proposed the introduction of a review mechanism: a tool that would allow a designated maintainer — the language’s equivalent of a high court — to examine the corpus, identify lines of precedent that had drifted problematically, and issue corrective cases that would restore the intended semantics. These corrective cases would be flagged in the corpus with special weight, overriding the accumulated drift.
Adeyemi opposed this too, though less strenuously. His objection was that a review mechanism introduced a hierarchy between ordinary cases and corrective cases, between ordinary users and designated reviewers, that replicated the statutory authority the language was designed to avoid. “You are proposing,” he told the Edinburgh group at the 2024 Stare workshop, “a supreme court for a language that was designed to have no legislature. I understand the impulse. I note that it is the impulse of every legal system that has tried to do without hierarchy and discovered, eventually, that someone must decide.”
4.3 Resolution
The dispute was not resolved. It was accommodated. The Stare Foundation now maintains three corpora: the foundation corpus, which includes only the founding precedents and cases that the Originalists have vetted; the living corpus, which includes the full accumulated case law with Edinburgh’s corrective cases applied; and the free corpus, which includes everything and corrects nothing. Users choose which corpus to use at installation. Most choose the living corpus. Adeyemi uses the free corpus. Osei uses the foundation corpus. The three produce different results for approximately eleven percent of programmes, a number that grows by roughly a percentage point per quarter as the corpora diverge.
5. The Appeals Process
One of the language’s more unusual features, introduced in version 0.6, is the ability for a programme to appeal the runtime’s decision. If an expression produces a result the programmer considers wrong — not wrong in the sense of a bug, but wrong in the sense of a bad ruling — the programmer can file an appeal:
let result = ambiguous_expression()
appeal result {
grounds: "Controlling precedent (Case #14,209) is
distinguishable: the expression was evaluated
in a different module context."
relief: "Re-evaluate using Case #8,741 as
controlling."
}
The appeal is processed by the runtime’s appellate engine, which re-evaluates the expression using the cited precedent instead of the one selected by the analogy engine. If the appellate engine agrees that the original precedent was distinguishable — that the differences between the current case and the cited precedent are material — it grants the appeal and substitutes the new result. The new case is added to the corpus with a note that the original analogy was overturned, and future cases with similar facts will follow the appellate ruling.
If the appellate engine disagrees, the appeal is denied, and the original result stands. The denial is also added to the corpus, strengthening the original precedent.
Appeals are rare in practice — fewer than two hundred have been filed across the entire history of the language — but their existence has a structural effect on the community. The possibility of appeal means that precedent is not final. Any case can be challenged. Any holding can be revisited. The corpus is not a dead record but a living argument, subject to revision by anyone with a sufficient understanding of the case law to articulate why the runtime got it wrong.
The most appealed case in the corpus, Case #14,209, involves the behaviour of the match expression when applied to a value whose type changed between the time the match was written and the time it was executed (a situation made possible by the fact that types in Stare, like everything else, are determined by precedent and therefore subject to drift). Case #14,209 has been appealed forty-three times. It has been overturned nine times and reinstated six times. Its current holding is, according to the reporter: “When the type of the matched value has drifted since the match was written, the match should be evaluated according to the type at the time of writing, not the type at the time of execution.” This holding will last until the next appeal.
6. Notable Properties
6.1 Corpus-Dependent Behaviour
Two installations of Stare that use different corpora are, in a meaningful sense, different languages. They share a syntax but not a semantics. A programme that runs correctly on one corpus may fail or produce different results on another. The community refers to this as “jurisdictional variation,” and it is not a metaphor — different corpora encode different legal traditions, the same way different common-law jurisdictions arrive at different rules from the same foundational principles.
6.2 Retroactive Change
Adding a corrective case to the corpus changes the semantics of the language retroactively: any programme that relied on the overturned precedent will now behave differently. The community has debated whether to introduce a mechanism for “grandfathering” old programmes under the precedent that was in effect when they were written, but has not reached consensus. Adeyemi argues that retroactivity is a natural feature of the common law. Osei argues that it makes the language unusable for anything that matters. Both are correct.
6.3 The Corpus as Literature
The reporter tool, which renders cases into natural language, has produced an unexpected side effect: the corpus is readable. Not merely parseable, but readable as a narrative — a cumulative story of decisions made, analogies drawn, principles articulated and revised. Several community members have described reading the corpus as an aesthetic experience. A graduate student at Lagos published a paper titled “The Corpus as Novel: Narrative Structure in the Case Law of Stare,” which was accepted at a digital humanities conference and rejected from a programming languages workshop. The paper argues that the corpus exhibits the formal properties of a legal epic — repetition with variation, the gradual emergence of principle from particular, the tension between continuity and change — and that the experience of reading it is closer to reading an evolving body of jurisprudence than to reading documentation. Adeyemi cited this paper in his keynote at the 2025 Stare workshop. He did not say he agreed with it. He said it was “not distinguishable from a correct observation.”
7. Current Status
Stare has approximately 900 active users, a foundation that maintains three corpora, and a community whose primary activity is the filing, review, and discussion of cases. The language has not been adopted in production, though Adeyemi reports that a team at a legal-technology company in Lagos used it for six months to prototype a case-management system and found the experience “surprisingly natural, given that the language is, essentially, a court.”
The most pressing technical challenge is corpus scaling. The analogy engine’s performance degrades as the corpus grows, and the community has debated whether to introduce a mechanism for consolidation — the merging of redundant cases into summary precedents that reduce the corpus’s size without losing its substance. The proposal is technically sound but philosophically contentious. Consolidation would require deciding which cases are redundant, which is itself an act of adjudication, and the community has not agreed on who should have that authority.
Adeyemi continues to maintain that the language is not a philosophy project. “It is a programming language,” he said at the 2025 workshop. “It compiles. It runs. It produces output. The output is determined by precedent rather than specification, which is a design choice. I am aware that this design choice has implications. I am not responsible for the implications. I am responsible for the compiler.”
He then fielded questions for ninety minutes, all of which were about the implications.
The author declares a conflict of interest: she is a member of the Living Constitutionalist faction and has filed eleven appeals against the free corpus, nine of which were granted. She considers this a vindication of the appellate mechanism and not, as the Originalists have suggested, evidence that the appellate engine is biased toward Edinburgh IP addresses. The author has no evidence that the appellate engine considers IP addresses at all, and notes that the accusation itself has been filed as an appeal and is pending review.