paper:2021-10-16-stefan-lesser-elephant-pdf-26c323Elephant 2000: A Programming Language Based on Speech Acts
TL;DR
Elephant 2000, a programming language proposed by John McCarthy at Stanford, establishes that program correctness can be partially defined through the semantics of speech acts—specifically that programs can be held to standards of truthfulness, responsiveness, and commitment-fulfillment without requiring Hoare axioms or a separate theory of programming. The language introduces abstract performatives as its core instrument: formal analogs of Austin's (1962) and Searle's (1969) illocutionary acts—requests, promises, commitments, questions, answers, permissions—whose correctness conditions are automatically derivable from program text as logical sentences. Programs are themselves logical sentences (or syntactic sugarings thereof), a design illustrated through the intermediate languages Algol 48 and Algol 50, which represent Algol 60 fragments as recursion equations over explicit time indices; correctness of the Algol 50 multiplication program, for instance, is expressed as a universally quantified sentence provable from the program sentences plus Peano arithmetic alone. The language targets transaction processing and electronic data interchange applications—including the X12 standard and McCarthy's 1982 Common Business Communication Language (CBCL)—where programs belonging to different organizations must exchange obligations. A key design decision is that Elephant source programs can refer directly to the past via a virtual history list, eliminating the need for explicit data structures in source code while leaving compilers (targeting Common Lisp or C) to generate appropriate object-level structures. The paper argues this implies that program verification in commercial and inter-organizational settings can proceed from first-order logic alone, that illocutionary and perlocutionary correctness conditions correspond precisely to input-output versus accomplishment specifications, and that the philosophical complexities of obligation can be largely bypassed by specifying only whether commitments are fulfilled.
What to take away
- 1. Elephant 2000 programs are themselves logical sentences (or statement-by-statement syntactic sugarings of logical sentences), so their extensional correctness properties follow as logical consequences without requiring Hoare axioms or any intervening theory of programming.
- 2. The language introduces abstract performatives—internal commitments, promises, requests, questions, acceptances—as first-class program constructs whose correctness conditions (truthfulness, responsiveness, commitment-fulfillment) can be generated automatically from program text.
- 3. The correctness of the Algol 50 multiplication program is expressed as the sentence ∀mn(n≥0 ⊃ ∀t(pc(t)=0 ⊃ ∃t′(t′>t ∧ pc(t′)=6 ∧ p(t′)=mn))), provable from the program's recursion equations plus standard Peano arithmetic with no special programming logic.
- 4. Elephant source programs eliminate explicit data structures by referring directly to the past via a virtual history list; a compiler targeting Common Lisp or C constructs necessary object-level data structures automatically.
- 5. The illocutionary/perlocutionary distinction maps directly onto input-output specifications (verifiable from program semantics alone) versus accomplishment specifications (requiring axioms about the physical world), as illustrated by an airline reservation program and an air traffic control program.
- 6. An airline reservation in Elephant 2000 is expressed using commitment, make, exists, and cancel as primitive Elephant-defined operations, with fullness defined as card{psgr | exists commitment admit(psgr,flt)} = capacity flt, requiring no separate reservation data structure.
- 7. Responsiveness of answers—beyond mere truthfulness—requires a logical apparatus using separate notations for objects and concepts (from McCarthy 1979b), formalized as knows-what(pat, Telephone Mike) ≡ ∃x(telephone-number x ∧ knows-that(pat, Equal(Telephone Mike, Concept1 x))).
- 8. The paper raises the open question of whether a theorem guaranteeing that circumscribing the arises, outputs, and revoke predicates correctly limits program behavior to specified events can be precisely formulated and proved, noting this 'remains to be precisely formulated and then proved.'
- 9. A replicable methodology choice: Algol 48 represents Algol 60 programs as recursion equations over three explicit time-indexed functions—p(t), i(t), pc(t)—sorted by variable rather than sequentially by time, yielding a statement-by-statement syntactic transformation to logical sentences.
- 10. McCarthy argues that Elephant 2000 programs can perform speech acts 'as genuinely as do humans,' directly contesting Searle's (1984) position that computers cannot really promise, on the grounds that human institutional speech acts (e.g., giving a reservation) are themselves often stripped of the full intentional conditions Searle requires.
Peer brief — for seminar discussion
McCarthy's Elephant 2000 paper, originating in 1989 and revised through 1994, proposes a programming language whose defining feature is that communication inputs and outputs are meaningful speech acts in the sense of Austin (1962) and Searle (1969), and that program correctness is partly constituted by the proper performance of those acts. The primary mechanism introduced is the abstract performative—an internal commitment, promise, request, permission, or answer that carries correctness conditions derivable automatically from program text as first-order logical sentences. Because Elephant programs are themselves logical sentences (or syntactic sugarings reducible statement-by-statement to logical sentences), their properties follow directly from those sentences plus domain axioms, making Hoare-style proof systems or separate theories of programming unnecessary. This is first demonstrated through two intermediate languages, Algol 48 and Algol 50: Algol 48 encodes an Algol 60 multiplication loop as recursion equations over explicitly time-indexed variables p(t), i(t), pc(t), and the correctness statement ∀mn(n≥0 ⊃ ∀t(pc(t)=0 ⊃ ∃t′(t′>t ∧ pc(t′)=6 ∧ p(t′)=mn))) is proved from those equations and Peano arithmetic alone. Algol 50 extends this with reified state vectors using McCarthy's (1963) assignment and contents functions a(var,val,ξ) and c(var,ξ). The main load-bearing finding is that this architecture scales to interactive programs: an airline reservation program is fully expressible using commitment, make, exists, and cancel as primitives—with flight fullness defined as card{psgr | exists commitment admit(psgr,flt)} = capacity flt—and no explicit reservation data structure in source code. The paper further distinguishes input-output specifications (illocutionary, verifiable from program semantics alone) from accomplishment specifications (perlocutionary, requiring world axioms), arguing both should be formulated and related for any non-trivial interactive program. The target application domain is electronic data interchange and transaction processing, specifically situations like X12 standard document exchange and the Common Business Communication Language proposed in McCarthy (1982), where programs belonging to independent organizations must exchange legally binding obligations with minimal human supervision. An alternative formal approach the paper could have used—and explicitly rejects—is temporal logic, which Francez and Pnueli (1978) employed for cyclic programs; McCarthy argues temporal logic is too weak to express many important program properties compared to explicit time in first-order logic. The most contestable aspect is the paper's claim that Elephant programs can perform speech acts 'as genuinely as do humans,' which is asserted as a rebuttal to Searle (1984) but rests on the design-stance argument from Dennett (1971) rather than any formal result—a critical reader would press hard on whether stripping speech acts of their full intentional and institutional conditions (sincerity, authority, legal obligation) produces genuine speech acts or merely a useful formal simulacrum, and whether the automatic generation of intrinsic correctness conditions from program text has been demonstrated beyond the toy reservation example. The paper also acknowledges that a key theorem—that circumscribing arises, outputs, and revoke correctly restricts program behavior to specified events, analogously to the closed-world assumption in logic programming—'remains to be precisely formulated and then proved,' leaving the formal foundations of the compiled implementation incomplete.
Methods (1)
- knows-what formalizationA logical definition using Concept1 to formalize knowing the answer, for specifying responsiveness.
Frameworks (2)
- Algol 48Hypothetical preliminary version of Algol 50 using recursion equations and explicit time; illustrates representation of programs as logical sentences.
- Algol 50Hypothetical programming language using reified variables and state vectors as warmup for representing Elephant programs as logical sentences.
Claims (34)
- Elephant programs that interact non-trivially with the outside world can have both input-output specifications, relating the programs inputs and outputs, and accomplishment specifications concerning what the program accomplishes in the world. These concepts are respectively generalizations of the philosophers' illocutionary and perlocutionary speech acts.
Fifth abstract claim.
- Programs that engage in commercial transactions assume obligations on behalf of their owners in exchange for obligations assumed by other entities. It may be part of the specifications of an Elephant 2000 programs that these obligations are exchanged as intended, and this too can be expressed by a logical sentence.
Sixth abstract claim.
- The correctness of programs is partly defined in terms of proper performance of the speech acts. Answers should be truthful and responsive, and promises should be kept. Sentences of logic expressing these forms of correctness can be generated automatically from the form of the program.
Second abstract claim.
- Communication inputs and outputs are in an I-O language whose sentences are meaningful speech acts approximately in the sense of philosophers and linguists. These include questions, answers, offers, acceptances, declinations, requests, permissions and promises.
First key claim in the abstract.
- Austin points out that uttering a promise creates an obligation in a public sense. This will be important also for computer programs, since a promise by the program may create an obligation, perhaps legal, on the part of the organization operating the program.
Importation of Austin's idea to programs.
- Proving that a program meets accomplishment specifications must be based on assumptions about the world, the information it makes available to the program and the effects of the program's actions as well as on facts about the program itself.
Claim about the nature of accomplishment verification.
- What type 1 and type 2 obligations are, e.g. the legal requirements they impose, how they are to be treated when they conflict with other considerations, and the consequences of their non-fulfillment, is subject to institutional definition.
Claim that obligation types are institution-dependent.
- Many kinds of human speech act are relative to social institutions that change, and the exchange of speech acts among computer programs will often involve the design of new institutions prescribing the effects of speech acts.
Claim about designing institutions for program speech acts.
- An airline reservation program's input-output specification is that it not order the admission of more passengers than the capacity of the flight. It is an external fact that the plane will hold its capacity and not more.
Example distinguishing input-output and external facts.
- For some purposes, it will be convenient to settle for specifications in terms of fulfilling internal commitments, and sometimes the public character of promises will have to be taken into account in the specifications.
Trade-off between internal and public obligations.
Hypotheses (4)
- It seems likely that the simple cases will be most useful in the initial applications of Elephant 2000 and similar languages.
Prediction about initial usage.
- We hope that programs using performatives will be easier to write, understand, debug, modify and (above all) verify.
Hope expressed about the benefits of Elephant-style programs.
- Perhaps we will need three levels of specification, internal, input-output and accomplishment.
Speculation about specification hierarchy.
- We may need to consider joint speech acts such as making an agreement.
Speculation about future extensions.
Questions (8)
- How can we formally specify and verify that answers to questions are responsive rather than merely truthful?
Core problem requiring logical apparatus beyond simple truth conditions; McCarthy proposes solution using concept notation from McCarthy 1979b.
- How should we define an airline reservation for the purposes of an Elephant reservation program?
Better question about minimal definition for the program.
- What must be true in order that a speech act of a given kind be successfully performed?
Key question shared with philosophers about successful speech acts.
- What class of sentences to allow as expressing various kinds of commitments?
Open problem on the expressiveness of commitment sentences.
- What do we want to say about airline reservations to our program?
Question guiding minimal specification.
- Which speech act uses require AI/intentionality vs which do not?
- What are the program's commitments when it is in a given state?
Question about dynamically queryable commitments.
- What is an airline reservation?
Question posed and then dismissed as the wrong question for program design.
Related work— refs + corpus + external arXiv
Cited / in-corpus / arXiv badges show which signals surfaced each row. Multi-source rows weighted higher.
- Opening the Hood of a Word Processorin corpus1984≈ 79%
- Formal that "Floats" High: Formal Verification of Floating Point ArithmeticVaisakh Naduvodi Viswambharan, Deepak Narayan Gadde Hansa Mohanty2026≈ 78%
- Do Language Models Follow Occam's Razor? An Evaluation of Parsimony in Inductive and Abductive ReasoningAbulhair Saparov Yunxin Sun2026≈ 77%
- Theory Under Construction: Orchestrating Language Models for Research Software Where the Specification EvolvesNikolaj Bj\"orner Halley Young2026≈ 77%
- Intent Formalization: A Grand Challenge for Reliable Coding in the Age of AI AgentsShuvendu K. Lahiri2026≈ 77%
- An Encoding of Abstract Dialectical Frameworks into Higher-Order LogicAlexander Steen Antoine Martina2026≈ 77%
- Beyond Human-Readable: Rethinking Software Engineering Conventions for the Agentic Development EraDmytro Ustynov2026≈ 77%
- Talk Freely, Execute Strictly: Schema-Gated Agentic AI for Flexible and Reproducible Scientific WorkflowsArjun Vijeta, Chris Moores, Oliwia Bodek, Bogdan Nenchev, Thomas Whitehead, Charles Phillips, Karl Tassenberg, Gareth Conduit, Ben Pellegrini Joel Strickland2026≈ 76%
- Crafting a Good Prompt or Providing Exemplary Dialogues? A Study of In-Context Learning for Persona-based Dialogue GenerationYajing Wan, Yuru Zhang, Jing Chen, Ling Cheng, Qian Shao, Yongzhu Chang, Tangjie Lv, Rongsheng Zhang Jiashu Pu2024≈ 76%
- ≈ 76%
- Language Models Are Greedy Reasoners: A Systematic Formal Analysis of Chain-of-ThoughtAbulhair Saparov and He He2023≈ 76%
- ≈ 76%
- Beyond Language: Format-Agnostic Reasoning Subspaces in Large Language ModelsZhiyuan Su Aojie Yuan2026≈ 76%
- A Dual-Task Paradigm to Investigate Sentence Comprehension Strategies in Language ModelsSaku Sugawara Rei Emura2026≈ 76%
- ≈ 76%
- ≈ 76%
- From Literal to Liberal: A Meta-Prompting Framework for Eliciting Human-Aligned Exception Handling in Large Language ModelsImran Khan2025≈ 76%
- Advances in LLMs with Focus on Reasoning, Adaptability, Efficiency and EthicsMuhammad Zaeem Khan, Aleesha Zainab, Saleha Jamshed, Sadia Ahmad, Kaynat Khatib, Faria Bibi, and Abdul Rehman Asifullah Khan2026≈ 76%
- Linda in contextin corpus1989≈ 76%
- Denotational Design: from meanings to programsin corpus2015≈ 75%
- ≈ 75%
- Technical Dimensions of Programming Systemsin corpus2023≈ 75%
- ≈ 74%
- Alignment faking in large language modelsin corpus2024≈ 74%
- ≈ 74%
- Finger Exercises in Formal Concept Analysisin corpus2006≈ 73%
- ≈ 73%
- Towards a theory of conceptual design for softwarein corpus2015≈ 73%
- ≈ 73%
- Taking AI Welfare Seriouslyin corpus2024≈ 73%
+16 more
Similar preprints — Semantic Scholar
Cross-corpus bridges (1)
same_concept_as · Nomic cosineExternal markdown files that talk about the same concept as this entity.
- alexanderElephant 2000: A Programming Language Based on Speech Actspapers/extracted/2021-10-16_Stefan-Lesser_elephant.pdf_26c323.md0.888