Prolog was born in 1972 at the University of Aix-Marseille, where a small team was trying to get a computer to answer questions written in French. The story of how Alain Colmerauer created Prolog in Marseille is the story of a natural-language parser that turned out to be a general-purpose programming language. Instead of telling the machine how to compute something, a Prolog programmer states facts and rules, and the system searches for answers. The name comes from the French programmation en logique.

How Alain Colmerauer created Prolog in Marseille

Colmerauer had already built Q-systems, a rewriting formalism used for machine translation in Montreal. Back in France he worked with Philippe Roussel on a question-answering system, and in 1971 and 1972 they collaborated with Robert Kowalski of the University of Edinburgh. Kowalski's key insight was that a Horn clause such as "A is true if B and C are true" can be read both as a logical statement and as a procedure: to prove A, prove B, then C.

Roussel wrote a first interpreter in Algol-W in 1972. A more complete version, written in Fortran by Gérard Battani and Henry Méloni in 1973, was the one that spread to other labs. Its core ideas were already in place: resolution theorem proving restricted to Horn clauses, unification for pattern matching, and depth-first search with backtracking.

Edinburgh, the WAM and the ISO standard

Prolog's second home was Edinburgh. David H. D. Warren, together with Fernando Pereira and Luís Moniz Pereira, built DEC-10 Prolog around 1977, the first Prolog compiler. Its syntax became the "Edinburgh" dialect most systems still follow. In 1983 Warren described the Warren Abstract Machine (WAM), an instruction set that became the standard way to implement Prolog efficiently.

The language got a large boost in 1982 when Japan's Fifth Generation Computer Systems project picked logic programming as its foundation.

YearMilestone
1972First Marseille interpreter (Algol-W)
around 1977DEC-10 Prolog compiler at Edinburgh
1983Warren Abstract Machine described
1987Jan Wielemaker starts SWI-Prolog
1995ISO/IEC 13211-1 standard published

How a Prolog program works

A Prolog program is a database of facts and rules. You run it by asking a query. The engine tries to unify the query with the head of a clause, then tries to prove the clause body left to right. When a goal fails, it backtracks to the last choice point and tries the next alternative.

parent(tom, bob).
parent(bob, ann).
parent(bob, pat).

grandparent(X, Z) :- parent(X, Y), parent(Y, Z).

?- grandparent(tom, Who).
Who = ann ;
Who = pat.

There are no loops and no assignment. Variables start with a capital letter and are bound by unification. The same grandparent/2 rule can answer "who are Tom's grandchildren?" or "who is Ann's grandparent?" depending on which arguments are left unbound.

Where Prolog has been used

  • Expert systems and rule engines in the 1980s, especially in Europe and Japan.
  • Natural language processing: Definite Clause Grammars (DCGs) are built into the language. IBM's Watson used Prolog to match patterns over parsed questions when it played Jeopardy! in 2011.
  • Language implementation: Joe Armstrong's first Erlang interpreter at Ericsson was written in Prolog.
  • Scheduling and configuration through constraint logic programming libraries such as CLP(FD).
  • Databases and verification: TerminusDB is partly written in Prolog, and many static analysis tools use Datalog, a Prolog subset.

Today's main implementations are SWI-Prolog, SICStus Prolog, GNU Prolog, Ciao, and newer systems such as Scryer Prolog and Trealla that aim at strict ISO conformance.

Influence and legacy

Prolog defined logic programming as a field. Datalog, Mercury, constraint logic programming and answer set programming all trace back to it. Erlang borrowed its syntax, including lowercase atoms, capitalised variables and clause-based function definitions. The idea of asking a system to find solutions rather than compute them step by step also shaped query languages and type inference engines.

Is Prolog still used today?

Yes, in niches where rules, search and symbolic reasoning matter more than raw throughput: legal and tax rule systems, configuration tools, theorem provers, teaching, and research on neuro-symbolic AI. Knowing how Alain Colmerauer created Prolog in Marseille, from a French parser and Kowalski's reading of Horn clauses, explains why the language still feels so different from everything built around loops and assignment.

Frequently asked questions

Who invented Prolog, Colmerauer or Kowalski?

Both played a role. Alain Colmerauer and Philippe Roussel designed and implemented the language in Marseille in 1972. Robert Kowalski provided the theory of reading Horn clauses as procedures, which is the foundation Prolog is built on.

The project, launched in 1982, wanted machines that could reason and process knowledge in parallel. Logic programming offered a clean, declarative model for that, so the project designed its kernel languages around Prolog-style logic. The hardware goals were not met, but the work produced a lot of research on parallel logic languages.

What is the Warren Abstract Machine in Prolog?

The WAM is a virtual machine and instruction set described by David H. D. Warren in 1983. It compiles Prolog clauses into low-level operations for unification and backtracking. Most serious Prolog compilers since then are based on it or on close variants.