Deploy POP-2 to Europe β Robin Popplestone π΄σ §σ ’σ ³σ £σ ΄σ · + Rod Burstall π΄σ §σ ’σ ³σ £σ ΄σ · (University of Edinburgh 1966), the Stack-Based AI Language That Founded the Edinburgh School on EU Infrastructure in 2026
Every major tradition in programming language design has a founding institution. For formal type theory in Europe it was Edinburgh β specifically the combination of a pioneering AI department, a radical new programming language, and a cluster of researchers who between them reshaped what programming meant for an entire generation of European computer scientists.
In 1966, Robin Popplestone π΄σ §σ ’σ ³σ £σ ΄σ · and Rod Burstall π΄σ §σ ’σ ³σ £σ ΄σ · at the University of Edinburgh created COWSEL β and from it, the language that became POP-2 in 1970. POP-2 was the first language designed at a European university specifically for artificial intelligence research. It was interactive, stack-based, dynamically typed, with first-class functions, list processing inspired by LISP, and an extensible compiler that could modify itself at runtime.
What grew from POP-2 over the following decades was remarkable: Edinburgh Prolog (with the Warren Abstract Machine still used in every Prolog implementation today), Robin Milner's ML type system (the intellectual ancestor of OCaml, Haskell, and Rust's type inference), the Freddy robot (the first autonomous robot to assemble objects from visual plans), and Poplog β a multi-language AI programming system still actively maintained as GNU Poplog, deployable on any EU Linux server today.
The Edinburgh School of Artificial Intelligence
In 1963, the University of Edinburgh founded one of the world's first dedicated AI research units. By the mid-1960s it had assembled one of the strongest concentrations of AI researchers anywhere in Europe: Donald Michie π΄σ §σ ’σ ³σ £σ ΄σ · (who had worked with Alan Turing at Bletchley Park), Robin Popplestone π΄σ §σ ’σ ³σ £σ ΄σ ·, Rod Burstall π΄σ §σ ’σ ³σ £σ ΄σ ·, and later Robin Milner π΄σ §σ ’σ ³σ £σ ΄σ · π¬π§ (Turing Award 2008) and Gordon Plotkin π΄σ §σ ’σ ³σ £σ ΄σ · (one of the founders of denotational semantics and structural operational semantics).
Edinburgh AI was, from its earliest days, a distinctly European research tradition β empirical, theoretically grounded, and concerned with the formal properties of intelligent behaviour rather than the brute-force numerical optimisation that would dominate from the 1980s onwards. The language that Popplestone and Burstall created reflected this orientation precisely: POP-2 was not a number-crunching tool. It was a language for symbolic manipulation, logical inference, and exploring what a computer could do when given the right abstractions.
The University of Edinburgh was one of twelve founding institutions of ERCIM (the European Research Consortium for Informatics and Mathematics) when it was established in 1989, alongside INRIA π«π·, CWI π³π±, and GMD π©πͺ. The intellectual tradition that COWSEL and POP-2 founded fed directly into Europe's capacity for formal methods research β and through Edinburgh Prolog and ML, into the entire discipline of programming language theory.
COWSEL β The First Edinburgh Language (1966)
COWSEL (Continuous Operator Working Space on Edinburgh Logic) was a small experimental language designed by Robin Popplestone and Rod Burstall in 1966. The name was partly whimsical β Edinburgh was not above naming its languages after animals β but the design was serious: COWSEL was an attempt to build a LISP-like symbolic processing language on a stack-based execution model, with interactive evaluation and the ability to define new syntax at runtime.
COWSEL drew directly from LISP's list processing model: data was represented as nested lists, the fundamental operation was applying a function to a list of arguments, and programs were themselves data that could be manipulated as lists. But COWSEL departed from LISP in a critical respect: where LISP used a recursive evaluation model (function application reduces to inner function applications in a tree), COWSEL used a stack-based execution model β programs were sequences of operators applied to a data stack.
This was not merely an implementation detail. The stack-based model made COWSEL's execution semantics transparent and inspectable in a way that recursive LISP evaluation was not: every intermediate computation state was visible as a stack snapshot. This would become one of the defining properties of the POP family β programs and their execution states were always accessible, always modifiable, always part of the system's own data.
POP-2 β The Refinement (1970)
By 1970, Popplestone and Burstall had refined COWSEL into POP-2 β a cleaner, more principled language that became the primary programming tool for Edinburgh's AI Department throughout the 1970s.
POP-2 retained COWSEL's stack-based execution model but added a proper procedure definition syntax, pattern matching on lists, arrays, and records, and β crucially β incremental compilation: POP-2 code was compiled, not interpreted, but compilation happened interactively. You could type a procedure definition at the prompt, have it compiled immediately, and call it in the same session. This made POP-2 the first compiled interactive language in widespread use β combining the performance of compilation with the exploratory workflow of interpretation.
Stack-Based Execution: Transparent Computation
POP-2's stack model meant that every expression pushed a result onto the data stack, and every procedure consumed arguments from it:
define square(x);
x * x
enddefine;
square(5) =>
** 25
The => operator printed the top of the stack. Because everything was stack-accessible, POP-2 programs could examine and modify their own execution state at runtime β a property that made it ideal for exploratory AI research where you needed to understand exactly what the program was doing at every step.
First-Class Functions: Procedures as Data
In POP-2, procedures were first-class values that could be passed as arguments, returned from functions, and stored in data structures:
define apply_twice(f, x);
f(f(x))
enddefine;
define add3(x);
x + 3
enddefine;
apply_twice(add3, 10) =>
** 16
This was 1970 β four years before Scheme formalised closures, seven years before ML introduced parametric polymorphism. POP-2's first-class functions were the practical foundation on which Edinburgh researchers built exploratory AI programs that could modify their own behaviour at runtime.
Dynamic Typing with Runtime Type Checking
POP-2 was dynamically typed, but not silently so. Every value carried a type tag, and type errors were caught at runtime with meaningful diagnostics:
define safediv(a, b);
if b = 0 then
mishap('Division by zero', [^a ^b])
else
a / b
endif
enddefine;
The mishap procedure β POP-2's equivalent of an exception β printed a message, the offending values, and a stack trace. This was 1970: structured error handling with diagnostic context before Ada, before C++ exceptions, before Java. The influence on POP-11's error system β and through Poplog's Common Lisp and Prolog integrations β is direct.
Pattern Matching on Lists
POP-2 included pattern matching on lists using the ==> operator, a direct inheritance from COWSEL's LISP-style list processing:
define first_element(list);
list ==> [?x ??rest];
x
enddefine;
first_element([a b c d]) =>
** a
The ? prefix bound a single element, ?? bound the rest of the list. This pattern matching syntax β where the pattern appears as literal list structure with binding variables embedded β directly influenced the pattern matching in Standard ML (developed at Edinburgh by Robin Milner in the 1970s) and Prolog (also developed at Edinburgh by Robert Kowalski, David Warren, and Fernando Pereira).
Freddy β The First EU Robot to Think
The most striking demonstration of POP-2's capabilities was the Freddy robot project at Edinburgh. Between 1969 and 1976, a team led by H. Christopher Longuet-Higgins π΄σ §σ ’σ ³σ £σ ΄σ · π¬π§ (FRS, cognitive scientist) and Robin Popplestone built Freddy II β a computer-controlled robotic arm with a camera, programmed in POP-2, capable of recognising scattered objects on a table and assembling them into a model toy car from a declarative assembly plan.
This was not pick-and-place automation. Freddy II performed visual scene understanding (identifying objects by shape in camera images), spatial reasoning (computing how to grasp and position objects), and plan execution (following an assembly sequence while recovering from errors). All of it was written in POP-2.
For the late 1960s and early 1970s, this was genuinely astonishing: a robot that looked at a scene, understood what it saw, made a plan, and executed it. Freddy was the first existence proof in Europe β arguably in the world β that a general-purpose AI programming language could support autonomous physical manipulation.
Freddy was also the first public demonstration of EU AI Act concerns in practice, forty years before the EU AI Act existed: a system making autonomous decisions that had physical consequences, operating in an uncontrolled environment, requiring safety constraints and failure recovery. The questions Edinburgh researchers were asking about Freddy in 1972 β How do we specify what the robot should do? How do we verify it is doing the right thing? How do we recover when it fails? β are the questions the EU AI Act's high-risk system requirements are designed to answer today.
POP-11 and Poplog β The Living Legacy
POP-2 evolved into POP-11 in 1978, developed by John Gibson π¬π§ at the University of Sussex (working with the Edinburgh group). POP-11 extended POP-2 with a cleaner syntax, a richer standard library, and β most importantly β the foundation of Poplog: a multi-language AI programming environment that integrated POP-11, Common Lisp, Standard ML, and Prolog into a single shared virtual machine.
Poplog's shared virtual machine was technically remarkable: all four languages compiled to the same Poplog VM bytecode, which meant they could call each other's procedures directly, share data structures, and interoperate without marshalling or FFI overhead. A Prolog rule could call an ML function. An ML program could use Lisp macros. POP-11 code could embed Prolog goals as first-class expressions:
define classification(obj);
prolog_eval([animal(^obj, ?Class)]);
Class
enddefine;
This level of inter-language integration β four AI languages sharing one memory model and call convention β was not achieved again at the same depth until Racket's macro system, and arguably has not been fully replicated since.
GNU Poplog β the open-source release of the full Poplog system, including POP-11, Common Lisp, ML, and Prolog β has been actively maintained by Aaron Sloman (University of Birmingham) and the Poplog community. The fully open-source release under the MIT licence was completed in 2020. GNU Poplog compiles and runs on modern Linux x86-64, making it deployable on any EU server today.
From POP-2 to ML β The Edinburgh Type Revolution
The deepest intellectual legacy of the Edinburgh POP-2 tradition was Robin Milner's ML.
Robin Milner π΄σ §σ ’σ ³σ £σ ΄σ · π¬π§ arrived at Edinburgh in 1973, working alongside Popplestone, Burstall, and Plotkin in the AI Department. His experience with POP-2 β its dynamic typing, its first-class functions, its list processing β directly shaped his thinking about what a better type system for functional programming might look like.
ML (Meta Language, 1973) was first designed as the metalanguage for the LCF (Logic for Computable Functions) theorem prover β itself a direct descendant of Edinburgh's AI research tradition. But the type system Milner designed for ML transcended its origins: Hindley-Milner type inference, which allows a compiler to deduce the complete types of all expressions without any type annotations, became one of the most influential ideas in the history of programming language design.
The lineage is direct:
- POP-2 (1970) β interactive compiled functional language, Edinburgh
- ML / LCF-ML (1973) β type-inferred functional metalanguage, Edinburgh, Milner
- Standard ML (1983) β formalised at Edinburgh + Cambridge + CMU
- Caml / OCaml (1987/1996) β Xavier Leroy π«π· at INRIA Paris, Europe's ML
- Haskell (1990) β pure lazy functional, Simon Peyton Jones π΄σ §σ ’σ ³σ £σ ΄σ · π¬π§ (Edinburgh-trained, Glasgow, then Microsoft Research Cambridge)
- Rust (2010) β ownership types via Hindley-Milner, Graydon Hoare at Mozilla
Every time a Rust compiler infers a lifetime, every time an OCaml function is compiled without type annotations, every time Haskell's type checker rejects an ill-typed program β the intellectual thread runs back through Milner's ML, through Edinburgh's AI department, through the first-class functions of POP-2, to Popplestone and Burstall at Edinburgh in 1966.
Edinburgh Prolog β The Warren Abstract Machine
The other major Edinburgh legacy from the POP-2 era was Prolog. While Prolog itself was invented by Alain Colmerauer π«π· (UniversitΓ© d'Aix-Marseille, 1972), its practical implementation was created at Edinburgh.
David Warren π¬π§ (Edinburgh, 1977) developed the Warren Abstract Machine (WAM) β the virtual machine architecture that underpins virtually every Prolog implementation that has ever existed. The WAM's choice points, environments, heap, and trail are still the implementation model for SWI-Prolog, GNU Prolog, YAP, and Scryer Prolog today. Without Edinburgh's POP-2 culture of stack-based machine design β a culture that made thinking about virtual machines natural β the WAM might have looked very different.
Fernando Pereira π΅πΉ π¬π§ (Edinburgh, later SRI International) and David Warren collaborated on Edinburgh Prolog and on the development of Definite Clause Grammars (DCGs) β a Prolog extension for natural language parsing that remains widely used in computational linguistics. DCGs are deployed in EU natural language processing systems, in legal text analysis, and in EU regulatory document parsing tools today.
GDPR, EU AI Act, and Symbolic AI
POP-2 and Poplog represent a tradition of AI that is profoundly relevant to EU regulatory compliance β more so, in some ways, than modern neural AI.
EU AI Act Art. 13 β Transparency and Explainability
The EU AI Act's most demanding requirement for high-risk AI systems is Art. 13: transparency β the ability to explain how a system reached its decision in terms that humans can understand and audit. This is trivially satisfiable for symbolic AI systems like those built in POP-2 or Prolog: every inference step is explicit, every rule is readable, every conclusion is traceable to the premises that produced it.
A POP-2 or Prolog-based medical diagnosis system can produce an explanation of its reasoning in natural language, cite the specific rules it applied, and identify the evidence it weighted β because the rules and evidence are right there in the program, readable by any engineer. A deep neural network cannot do this. The EU AI Act's explainability requirements are, in effect, an argument for the POP-2/Poplog tradition of symbolic AI that Edinburgh pioneered.
GDPR Art. 22 β Automated Individual Decision-Making
GDPR Art. 22 restricts automated decisions that significantly affect individuals, and requires that such systems provide meaningful explanations and allow human review. Symbolic AI systems β expert systems, rule-based classifiers, logic programs β satisfy this requirement structurally: the decision trace is the explanation. Every Poplog or Prolog production system that makes a classification decision can, by construction, produce a trace of which rules fired and in what order.
NIS2 β Critical Infrastructure Verification
Edinburgh Prolog's descendants β SWI-Prolog, GNU Prolog β are used in formal verification tools for critical infrastructure throughout Europe. The use of logic programming for protocol verification (model checking of network protocols), safety property specification, and regulatory compliance checking is an established practice in EU industrial computing. The intellectual foundation for this use was laid by Kowalski, Warren, and Pereira at Edinburgh in the 1970s.
Deploying GNU Poplog on sota.io
GNU Poplog runs on Linux x86-64 and is installable from the GetPoplog GitHub repository. The deployment stack on sota.io uses a multi-stage Docker build:
FROM ubuntu:22.04 AS builder
RUN apt-get update && apt-get install -y \
wget curl git build-essential \
libx11-dev libxt-dev libxext-dev \
&& rm -rf /var/lib/apt/lists/*
# Install GNU Poplog
RUN wget -q https://github.com/GetPoplog/Poplog/releases/download/v16.0001/poplog_16.0001_amd64.deb \
&& dpkg -i poplog_16.0001_amd64.deb \
&& rm poplog_16.0001_amd64.deb
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y \
libx11-6 libxt6 libxext6 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/poplog /usr/local/poplog
ENV PATH="/usr/local/poplog/current_usepop/pop/bin:$PATH"
ENV usepop="/usr/local/poplog/current_usepop"
COPY . /app
WORKDIR /app
CMD ["/usr/local/poplog/current_usepop/pop/bin/pop11", "app.p"]
A minimal POP-11 HTTP service using Poplog's TCP socket library:
uses poplog_net;
define handle_request(sock);
lvars line = readline(sock);
lvars response = [200 'OK' 'Hello from EU POP-11'];
writeline(sock, response)
enddefine;
define start_server(port);
lvars server = tcp_server(port, handle_request);
server()
enddefine;
start_server(8080);
sota.io automatically handles TLS termination, health checks, and PostgreSQL provisioning β allowing your POP-11 or Prolog application to focus on symbolic computation rather than infrastructure.
EU compliance: All computation on sota.io runs on servers in Germany, within EU jurisdiction. GDPR Art. 44β49 data transfer restrictions are satisfied by default β no US Cloud Act exposure, no Schrems II risk. For AI systems subject to EU AI Act requirements, the deployment environment, training data, and inference infrastructure all remain in EU data sovereignty.
See Also
- Deploy Hope to Europe β β Rod Burstall π΄σ §σ ’σ ³σ £σ ΄σ · (University of Edinburgh 1980): algebraic data types and pattern matching β the Edinburgh language after POP-2
- Deploy Standard ML to Europe β β Robin Milner π΄σ §σ ’σ ³σ £σ ΄σ · (Edinburgh/Cambridge): Hindley-Milner type inference, OCaml and Haskell's common ancestor
- Deploy Prolog to Europe β β Alain Colmerauer π«π· (Marseille) + Warren Abstract Machine (Edinburgh): EU logic programming
- Deploy OCaml to Europe β β Xavier Leroy π«π· (INRIA Paris): ML lineage in Europe, the functional language behind Jane Street and MirageOS
- Deploy Isabelle to Europe β β Lawrence Paulson π¬π§ (Cambridge) + Tobias Nipkow π©πͺ (TU MΓΌnchen): formal proof at Edinburgh scale, seL4 verified OS
- Deploy to Europe: All 97 Languages β β Complete guide to EU-native deployment for every language