arXiv:2610.28912cs.AIOct 2026

Manuscript Offprint

arXiv:2610.28912

Simply Logical -- The First Three Decades

Peter Flach, Kacper Sokol, Jan Wielemaker

Peter Flach 1^{1}[0000-0001-6857-5810], Kacper Sokol 1^{1}[0000-0002-9869-5896], and Jan Wielemaker 2^{2}[0000-0001-5574-5673]

1^{1} Intelligent Systems Laboratory, University of Bristol, United Kingdom

{peter.flach, k.sokol}@bristol.ac.uk

2^{2} SWI-Prolog Solutions b.v., Netherlands

jan@swi-prolog.org

Abstract. This paper charts the evolution of the Prolog textbook Simply Logical – Intelligent Reasoning by Example from print with runnable programmes on a 3.5-inch diskette published in 1994, via various intermediate online versions, to the fully interactive online edition available today. Our aim is to investigate – from both the writer's and the reader's perspectives – the potential impact of technology on educational materials. The three authors of this paper present three distinct and complementary points of view, which come together to shape an interactive online book that offers an immersive learning experience. Peter describes the philosophy behind the original book and experiences teaching from it. Jan demonstrates how contemporary web programming has enabled a fully interactive realisation of the book's philosophy. Kacper reports how different technologies can be adopted to build a versatile authoring toolkit that underpins the interactive online edition of the book. Collating these distinct yet coherent perspectives allows us to reflect on future opportunities for interactive Prolog teaching materials arising from the continuous development of web technologies. The insights we offer should be of interest to teachers of Prolog as well as those wanting to find out about the latest educational technologies.

Keywords: Education · Learning · Textbook · Interactive · Prolog · SWI-Prolog · SWISH · Artificial Intelligence · Logic Programming

1 The Paperback

(Peter Flach)

As a beginning lecturer at Tilburg University in the early 90s of the previous century I started teaching a module on Artificial Intelligence (AI), then an emerging specialist topic within the still young discipline of computer science. Initially using a general AI textbook [10] I started devising practical exercises and coursework assignments in Prolog, which I had come across a couple of years before. These grew into a set of lecture notes that eventually became the Simply Logical – Intelligent Reasoning by Example book [7]. I ended up publishing with John Wiley after I had a chat with a representative at a conference; they were very helpful and even suggested the title. I was fortunate in finding Bob Kowalski willing to write a foreword, in which he very graciously wrote that my book

Peter Flach, Kacper Sokol, and Jan Wielemaker

relieved him of the temptation to write a revised edition of his own book, Logic for Problem Solving [9].

Rather than trying to cover all of AI, which even then had grown into a diverse field, I decided to focus on reasoning in various forms: deductive, inductive, reasoning with natural language, reasoning with incomplete information, etc., which approach is captured by the “intelligent reasoning” part of the book’s title. The “by example” moniker reflected the didactic philosophy: teaching by showing, learning by doing. Every AI technique discussed was accompanied by a Prolog programme implementing it. These programmes served two didactic purposes. By running them, the student could get a feeling what a particular technique is all about. But perhaps more importantly, the declarative reading of each programme was an integral part of the explanation of the technique it implemented. For the more elaborate programmes, special attention was paid to their stepwise development, explaining key issues along the way. My hope was that the reader would mount the accompanying 3.5” diskette into their computer, and try out the Prolog programmes alongside reading the book. While this was perhaps optimistic back then, the online format available today integrates the “showing” and “doing” sides of the educational coin very well, as will be demonstrated below.

I still use Simply Logical in my lectures as an introduction to both logic programming and AI. Treating the subjects side by side allows for some pretty powerful examples, such as a resolution prover for full clausal logic as a demonstrator for breadth-first search. Rather than modernising the text I have opted for modernising the demonstrators and programming assignments. For example, the natural-language question-answering programme described in Chapter 7 of the book, which nowadays we would call a chatbot, was developed into an Amazon Alexa skill. This demonstrates the power of a hybrid system consisting of speech-to-text and text-to-speech components enabled by deep learning, and a logical engine in the middle capable of explainable logical reasoning. Other material developed over the years includes a Prolog-driven agent that needs to solve a logical puzzle while moving around in a grid world and a Reveal.js slide deck that can be used for self-study and trying out Prolog programmes without leaving the browser. The latter is based on SWISH, which Jan introduces in the following section.