{"record":{"id":"N-ABSYS","slug":"absys-did-not-unify-two-unknowns-it-waited","kind":"notebook","title":"Absys did not unify two unknowns. It waited.","dek":"Absys, built at Aberdeen around 1967 and rebuilt here from its designers’ papers, prints the binding environments of Elcock’s examples variable for variable, suspended equations included. One of his examples also favours one order in which Absys may have taken its steps.","abstract":"A note about reconstructing Absys, the language J. M. Foster, E. W. Elcock and their colleagues built for the Elliott 4120 at the University of Aberdeen, which Elcock argued in 1990 was the first logic programming language. No program text or listing of it is known to survive. With a coding agent, the language was rebuilt from three papers: Foster’s Assertions of 1968, extracts of Foster and Elcock’s introduction to Absys 1 of 1969, and Elcock’s retrospective of 1990, read from its page scans. An equation between two unknowns is not solved but suspended until one of them is known; an or splits the computation into derivations that are all pursued, fairly, until each fails or hibernates; and each assertion is accepted as it is typed. Run on the papers’ own examples, the reconstruction gives every result they print, the binding environments of the append and reverse examples variable for variable and Absys 1’s three triples in the paper’s order, and the expected answers for Clark’s students and for setdiff, whose results the paper does not print. Run on inputs chosen here, setdiff gives the right answer if each applied body takes the place of its literal, or if not waits for its variables; taking literals strictly in turn without such a delay, one fair rule among several, gives the wrong one.","created":"2026-11-25","version":"1.0","status":"OPEN","publication":"published","authors":["Chris Hay"],"lineage":"FOSTER 1968 → FOSTER AND ELCOCK 1969 → ELCOCK 1990 → AGENT → THE MACHINE THE PAPERS DESCRIBE → THEIR EXAMPLES RUN","concepts":["ai-agents","source-authority","verification","programming-languages"],"related":["N-JOSS","N-IPLV","N-ATLAS-AUTOCODE","N-BABBAGE"],"media":[],"body":[{"kind":"observation","label":"01 / ASSERTIONS, NOT INSTRUCTIONS","text":"In a paper given in 1967, Michael Foster, of the Computer Research Group at Aberdeen, described a system in which “the basic elements … are not instructions to do something, as are the statements of Algol, but assertions about the data, such as a=b or a+b=c.” His paper was called Assertions: Programs Written without Specifying Unnecessary Order. By 1968 the group had “a working on-line incremental compiler” for it on the university’s Elliott 4120: Absys, the Aberdeen System. A text is a conjunction of assertions, typed one at a time, and as each is accepted, “whatever processing can be done on the basis of data already present in the system is done.” In 1990 Elcock argued that Absys, “essentially completed in 1967”, had been a logic programming language in the full sense, some five years before the first Prolog, in Marseilles around 1972. The program was tied to the machine’s own code, the machine was retired in the mid-1970s and later dismantled, and no listing of the program is known to us. I asked a coding agent to rebuild the language from what its designers published, and to run every example they printed.","references":[{"label":"J. M. Foster, “Assertions: programs written without specifying unnecessary order”, Machine Intelligence 3, 1968","url":"https://archive.org/details/mi3_20200519"},{"label":"J. M. Foster and E. W. Elcock, “Absys 1: an incremental compiler for assertions”, Machine Intelligence 4, 1969 (extracts)","url":"https://hopl.info/showlanguage.prx?exp=357"},{"label":"E. W. Elcock, “Absys: the first logic programming language”, J. Logic Programming 9, 1990","url":"https://doi.org/10.1016/0743-1066(90)90030-9"}]},{"kind":"observation","label":"02 / AN EQUATION THAT WAITS","text":"Elcock describes equality in Absys as a process. Two lists: equate their heads and their tails. A variable and a term: the variable takes the term, and anything that was waiting on it is taken up again. Two different unknowns: the equation is “suspended” and associated with both, until one is known. Prolog would make the two variables one. Absys kept the equation, and waited. So a computation can end with equations still suspended, a “partially solved form”, and Elcock gives one: reversing [1,2,U] into [V|L] ends with L/[2,1] and the suspended equations U = X₃ and X₃ = V. The reconstruction prints that binding environment variable for variable, X₁/1, L₁/[2,U], X₂/2, L₂/[U], L₃/[], L/[2,1], with the same two equations suspended. Typing rev([5],[V]) afterwards wakes them: V becomes 5, then X₃, then U, and the environment is again Elcock’s, down to the names X₄ and L₄ of the variables the new assertion made. Elcock gives no rule for the subscripts; here each alternative of a procedure makes its variables new when it is chosen, a derivation numbers them as it goes, and that reproduces his.","references":[{"label":"Elcock 1990, pp. 10–13: the treatment of equality, and the reverse example","url":"https://doi.org/10.1016/0743-1066(90)90030-9"}]},{"kind":"observation","label":"03 / EVERY ALTERNATIVE AT ONCE","text":"An or in Absys does not choose. It “is distributed through the goal conjunct”, Elcock writes, “essentially creating two new goals which can notionally be regarded as initiating parallel derivations”; in Foster and Elcock’s words of 1969, “unsatisfiable conjunctions disappear when unsatisfiability is detected”, and the conjunctions “in effect constitute parallel non-interacting programs.” Absys pursued them all: “all derivations continue to be incrementally elaborated until found unsatisfiable”, which Elcock calls a fair search rule. A procedure is a relation, so the one definition of append splits [1,2] three ways, or joins two lists, or finds what is missing. The 1969 paper, in its own quite different notation of begin and end, primes and [a;b], gives a problem with its answer: pick r, s and t from three lists so that r+s=t. The result “would be three distinct conjunctions … 1, 3, 4, 1, 1, 2 and 6, 1, 7 respectively.” The reconstruction gives those three, in that order. Where one alternative never ends and the next succeeds at once, the fair search finds the answer; a depth-first search, as Prolog’s is, never reaches it.","references":[{"label":"Foster and Elcock, “Absys 1: an incremental compiler for assertions”, Machine Intelligence 4, 1969 (extracts)","url":"https://hopl.info/showlanguage.prx?exp=357"}]},{"kind":"observation","label":"04 / THE ORDER DOES NOT MATTER, EXCEPT FOR NOT","text":"Foster and Elcock claimed that if data can be found to satisfy all the assertions, “these data are independent of the order in which the operations are performed.” The reconstruction can test that. A text of seven assertions, in which a procedure is applied before it is defined and a list reversed before its members are known, was accepted in all 5,040 orders. Every order gave the same result. In 1,260 of them some assertion ran past its budget of 20,000 steps until a later one cut it short. The cost is not independent of the order: it ran from 34 steps to 22,021. In a smaller text of three assertions, the same three answers of append cost 25 steps in one order and 22,868 in another, most of them an unbounded search stopped by the budget. Of what was tested, the one thing that makes the order matter is not. Here it is decided on the bindings as they stand, and Elcock concedes the point beneath that: “both Absys and PROLOG have the shortcoming that they do not use a safe computation rule.” not(X = 1) then X = 2 leaves no answer; X = 2 then not(X = 1) leaves X = 2. set is built the same way, and presumably behaves the same."},{"kind":"observation","label":"05 / HIS OWN EXAMPLE PREFERS ONE ORDER","text":"On the order in which a derivation takes its next step, Elcock says only that “Absys does not guarantee a particular order of processing of conjuncts”, and what else he says points two ways. An applied goal is “replaced by” the procedure’s body, which suggests the body takes the goal’s place; and “Absys used a fair computation rule”, of which taking every literal strictly in turn is one. His example of Absys-4’s set operator, from “a demonstration of Absys-4 circa 1968”, is printed as a definition only, with no query and no result, and the mem it uses is not defined; the inputs and mem here are ours. Run on [1,2,3,4] and [2,4,6], setdiff gives [1,3] if the body takes the goal’s place. Taken strictly in turn, it gives [1]: the not is decided before the recursion has given its variable a value. Strictly in turn but with not waiting for its variables, it gives [1,3] again, and Elcock mentions delays he does not describe. So the example favours the body in the goal’s place, without proving it. The reconstruction follows it, and keeps the other rules as options, so the difference can be run. Permuting the student example found a second gap: a not applied before a procedure it used was defined counted a derivation that was only waiting as a success. Elcock counts a derivation that ends with suspended equations between variables as a success because “the constraint is always satisfiable”; a waiting application has no such guarantee, so here a not that cannot be decided waits too, and all 120 orders of that text now agree."},{"kind":"observation","label":"06 / THREE MISPRINTS","text":"Elcock renders Clark’s student database in Absys, as a completion. As printed, one alternative of takes reads X - 'SMITH', C - 'C101', with minus signs for equals, and the procedure that asks who is not a maths major applies maths-course, where the one defined is math-course. Typed in as printed, the second leaves the query here waiting for ever for a procedure that is never defined; corrected, Brown, who takes C101 and not C301, is a non-maths-major and Smith is not. The application of append on page 9 has a third, [T₁ = [X₁|N₁]] where [1,2] = [X₁|N₁] is meant. The OCR of the paper garbles every program, so all of them were read from the page images."},{"kind":"connection","text":"The interpreter runs in the browser, compiled from the same Rust source as the command-line version. Type assertions and step through them: each derivation, its bindings and its suspended equations, the tree of alternatives the ors made, and every step on the way.","links":[{"href":"/demos/absys?example=reverse","label":"Elcock’s reverse example, step by step — interactive study"},{"href":"/demos/absys?example=triples","label":"The 1969 triples, in the notation of Absys 1"},{"href":"https://github.com/chrishayuk/absys/blob/main/docs/decisions.md","label":"Every rule of the machine, and the page it rests on"},{"href":"https://github.com/chrishayuk/absys/blob/main/docs/research.md","label":"The experiments, with their numbers"},{"href":"https://github.com/chrishayuk/absys/tree/main/tutorial","label":"A tutorial in ten chapters, every example tested"},{"href":"https://github.com/chrishayuk/absys","label":"Source, examples, language server and editor extension"}]},{"kind":"refusal","title":"WHAT THIS DOES NOT SHOW","lines":["No Absys program text, listing or manual from Aberdeen is known to survive. This is the language as its designers described it, not the program they wrote; where they are silent, the choice made is listed as a decision.","Elcock’s retrospective, the main source, describes “a subset of the language Absys-4” in syntax that takes “some slight liberties” with the original. The 1969 notation was read only from OCR extracts of that paper; its last pages, and Elcock and Gray’s fuller description of 1988, have not been seen.","The order in which a derivation takes its next step is chosen on the evidence of one published example, setdiff, run on inputs chosen here; a fair rule with delayed negation would also run it correctly. The rule that a not or set waits when it cannot be decided was added here, after permuting the texts showed it was needed; it is not in the papers.","The arithmetic of the 1969 notation follows the paper’s examples and Foster’s “pass sets” of 1968; the retrospective shows none.","No Prolog was run. What Prolog would do is from its standard behaviour, not from a comparison made here.","Everything was read and built by one coding agent in one day, from scans and OCR, and has not been checked by a person. Nothing here is claimed as new: Elcock made the case himself, and the history is told elsewhere. A separate fact-check of this note against the papers, by another model, found three quotations, attributions and claims wrong and nine overstated; all are corrected."],"principle":"A language that survives only as a description can be rebuilt as that description; where the description is silent, its own examples are the best witness."},{"kind":"question","text":"What did the rest of Absys-4 look like?","status":"OPEN","detail":"Elcock says the full language, described in a technical report of 1988 with P. M. D. Gray, had higher-order features and simple control mechanisms, and that Absys had user-declared delays. That report, the end of the 1969 paper, and Elcock’s Problem Solving Compilers of 1971, with its “more complex examples”, would test the decisions made here."}],"sources":[{"title":"E. W. Elcock, “Absys: the first logic programming language — a retrospective and a commentary”, Journal of Logic Programming 9(1), 1990, pp. 1–17","url":"https://doi.org/10.1016/0743-1066(90)90030-9","note":"Read in full from the page scans of the Elsevier open archive. Every program and binding environment quoted was read from the images; the OCR garbles them."},{"title":"J. M. Foster and E. W. Elcock, “Absys 1: an incremental compiler for assertions; an introduction”, Machine Intelligence 4, Edinburgh University Press, 1969, from p. 423","url":"https://archive.org/details/machineintellige0004unse","note":"Read only from the OCR extracts of most of its sections quoted on HOPL; the scan is on archive.org for lending only."},{"title":"J. M. Foster, “Assertions: programs written without specifying unnecessary order”, Machine Intelligence 3, Edinburgh University Press, 1968, pp. 387–391","url":"https://archive.org/details/mi3_20200519","note":"Read in full. A design paper; the system it describes was then “partly implemented on an Elliott 4120”. Its “pass sets” are the rule for arithmetic here."},{"title":"chrishayuk/absys","url":"https://github.com/chrishayuk/absys","note":"The interpreter, both notations, the published results as tests, every decision with its evidence, the experiments, a tutorial, a language server and editor extension, and the playground."},{"title":"Coding-agent session, 25 November 2026","note":"The interpreter, the transcriptions and the comparisons were made in this session. Every result in this note can be rerun on the interactive study or with cargo test in the repository."}],"published":"2026-11-26"},"hash":"7be6fc730423c3ca9a09f7217439b1ea47376feeebeea2de9b463e79e88945a4","algorithm":"sha256","provenance":{"id":"N-ABSYS","version":"1.0","recordHash":"7be6fc730423c3ca9a09f7217439b1ea47376feeebeea2de9b463e79e88945a4","revision":{"kind":"initial","summary":"First published: Absys, the assertional language of Foster, Elcock and their colleagues at Aberdeen, rebuilt from the papers of 1968, 1969 and 1990 with a coding agent; Elcock's binding environments for append and reverse reproduced variable for variable, suspended equations included, and the 1969 triples in the paper's order; every order of a seven-assertion text gives one outcome, and of what was tested only not makes the order matter; setdiff, run on inputs chosen here, favours one rule for the order of steps; checked independently against the papers, with three errors and nine overstatements corrected; with a playground that steps through a text an assertion at a time."},"sources":[{"title":"E. W. Elcock, “Absys: the first logic programming language — a retrospective and a commentary”, Journal of Logic Programming 9(1), 1990, pp. 1–17","url":"https://doi.org/10.1016/0743-1066(90)90030-9","note":"Read in full from the page scans of the Elsevier open archive. Every program and binding environment quoted was read from the images; the OCR garbles them."},{"title":"J. M. Foster and E. W. Elcock, “Absys 1: an incremental compiler for assertions; an introduction”, Machine Intelligence 4, Edinburgh University Press, 1969, from p. 423","url":"https://archive.org/details/machineintellige0004unse","note":"Read only from the OCR extracts of most of its sections quoted on HOPL; the scan is on archive.org for lending only."},{"title":"J. M. Foster, “Assertions: programs written without specifying unnecessary order”, Machine Intelligence 3, Edinburgh University Press, 1968, pp. 387–391","url":"https://archive.org/details/mi3_20200519","note":"Read in full. A design paper; the system it describes was then “partly implemented on an Elliott 4120”. Its “pass sets” are the rule for arithmetic here."},{"title":"chrishayuk/absys","url":"https://github.com/chrishayuk/absys","note":"The interpreter, both notations, the published results as tests, every decision with its evidence, the experiments, a tutorial, a language server and editor extension, and the playground."},{"title":"Coding-agent session, 25 November 2026","note":"The interpreter, the transcriptions and the comparisons were made in this session. Every result in this note can be rerun on the interactive study or with cargo test in the repository."}]}}