Robert Kowalski


Professor Emeritus

Department of Computing
Imperial College London


180 Queen's Gate, London SW7 2BZ, UK.

Email: rak at doc.ic.ac.uk


Curriculum Vitae


A Short Story of My Life and Work


Stone Age Explorations

with Andrew David, published in SUSSEX ARCHAEOLOGICAL COLLECTIONS 157 (2019), 1-29

A report of mesolithic artefacts collected in the Rother Valley south of Petworth, West Sussex.


Logical English Demonstration
with Jacinto Davila.

Proceedings 39th International Conference on Logic Programming, EPTCS 385, https://arxiv.org/abs/2308.14898v1

This short paper illustrates an application of Logical English to a standardised loan agreement.


Logical English for Law and Education
with Jacinto Davila, Galileo Sartor and Miguel Calejo.

In Warren, D., Dahl, V., Eiter, T., Hermenegildo, M., Kowalski, R., Rossi, F. (eds.) Prolog - The Next 50 Years. LNCS, vol. 13900. Springer, Heidelberg (2023).

In this paper we present the key features of Logical English as syntactic sugar for logic programming languages such as pure Prolog, ASP and s(CASP); and we highlight two application areas, coding legal rules, and teaching logic as a computer language for children.


Combining Logic Programming and Imperative Programming in LPS
with Fariba Sadri, Miguel Calejo and Jacinto Davila.

In Warren, D., Dahl, V., Eiter, T., Hermenegildo, M., Kowalski, R., Rossi, F. (eds.) Prolog - The Next 50 Years. LNCS, vol. 13900. Springer, Heidelberg (2023).

Logic programs and imperative programs employ different notions of computing. Logic programs compute by proving that a goal is a logical consequence of the program, or by showing that the goal is true in a model defined by the program. Imperative programs compute by starting from an initial state, executing actions to transition from one state to the next, and terminating (if at all) in a final state when the goal is solved.

In this paper, we present the language LPS (Logic Production Systems) which combines the logic programming and imperative programming notions of computing. Programs in LPS compute by using beliefs, represented by logic programs, to model the changing world, and by executing actions, to change the world, to satisfy goals, represented by reactive rules and constraints.


2022: The Year of Prolog

Organized by The Association for Logic Programming and The Prolog Heritage Association:

"In the summer of 1972, Alain Colmerauer and his team in Marseille developed and implemented the first version of the logic programming language Prolog. Together with both earlier and later collaborations with Robert Kowalski and his colleagues in Edinburgh, this work laid the practical and theoretical foundations for the Prolog and logic programming of today. Prolog and its related technologies soon became key tools of symbolic programming and Artificial Intelligence.

The Year of Prolog celebrates the 50th anniversary of these events and highlights the continuing significance of Prolog and Logic Programming both for symbolic, explainable AI, and for computing more generally. It also aims to inspire a new generation of students, by introducing them to a more human-friendly, logic-based approach to computing."


Logical English on SWISH

A prototype of Logical English (LE) integrated with SWI Prolog on SWISH is now available. The source code and draft manual are accessible from here. For a short 5 minute introduction click here, and for a longer 20 minute overview presented at ProLaLa 2022 ( Programming Languages and the Law) click here.


Logical English for Legal Applications

with Jacinto Davila and Miguel Calejo, presented at XAIF, Virtual Workshop on XAI in Finance, 3 November 2021.

In this paper, we focus on legal applications of LE and the use of meta-(or higher-order) predicates to represent propositional attitudes, such as permission, obligation, notification of a message and designation of the occurrence of an event. We also illustrate an integration of LE with SWISH, the online implementation of SWI Prolog.

The slides, presented at CNL 2021 - Workshop on Controlled Natural Language.
give a more detailed sketch of the state of the online SWISH implementation of Logical English as of 9 September 2021.


Logical English on World Logic Day

Presented online at the University of Texas at Dallas on World Logic Day 2021.
Here
is a link to a video of the talk.

"Logic is ever-present: when you use AI software, when you turn on your computer, when you develop an argument. Logic is a contemporary universal. Yet despite being surrounded by logic, we remain quite unaware of its ubiquity. We often apply logic without knowing that we are doing so. Thus to draw attention to the importance of logic in the development of knowledge, UNESCO has proclaimed 14 January World Logic Day." Audrey Azoulay, Director General of UNESCO

Logical English Meets Legal English for Swaps and Derivatives

with Akber Datoo, published in Artificial Intelligence and Law, online 12 August 2021, https://doi.org/10.1007/s10506-021-09295-3

In this paper, we present an informal introduction to Logical English (LE) and illustrate its use to standardise the legal wording of the Automatic Early Termination (AET) clauses of International Swaps and Derivatives Association (ISDA) Agreements. LE can be viewed both as an alternative to conventional legal English for expressing legal documents, and as an alternative to conventional computer languages for automating legal documents.

LE is a controlled natural language (CNL), which is designed both to be computer-executable and to be readable by English speakers without special training. The basic form of LE is syntactic sugar for logic programs, in which all sentences have the same standard form, either as rules of the form conclusion if conditions or as unconditional sentences of the form conclusion. However, LE extends normal logic programming by introducing features that are present in other computer languages and other logics. These features include typed variables signalled by common nouns, and existentially quantified variables in the conclusions of sentences signalled by indefinite articles. Although LE translates naturally into a logic programming language such as Prolog or ASP, it can also serve as a neutral standard, which can be compiled into other lower-level computer languages.


Logical English

Position paper presented at LPOP 2020, Logic and Practice of Programming (LPOP) 2020, 15 November 2020.

Logical English (LE) is a controlled natural language, in which English sentences are translated into LPS, which is an extension of logic programming, implemented in Prolog.

The ultimate goal of LE is to serve as a general-purpose computer language, which can be understood by a reader without any training in computing, logic or mathematics. It is inspired in part by the language of law, which can be viewed as a programming language that is executed by humans rather than by computers.

LE is a work in progress. There have been several experimental implementations of variants of LE based on LPS or Prolog, focussed primarily on legal applications.

Here are the slides for the talk, which include LE and LPS representations of Euclid's Algorithm for Greatest Common Denominator, inspired by Leslie Lamport's presentation at LPOP. Here are the slides of an earlier Keynote Talk at ReMeP2019, Research Meets Practice, 23-23 Sep 2019, Vienna.


Using SWISH to Realise Interactive Web-based Tutorials for Logic-based Languages

2019, Jan Wielemaker, Fabrizio Riguzzi, Robert Kowalski, Torbjorn Lager, Fariba Sadri, Miguel Calejo. In Theory and Practice of Logic Programming, 19(2), 229-261.

This article describes SWISH, a web front-end for Prolog that consists of a web server implemented in SWI-Prolog and a client web application written in JavaScript. SWISH provides a web server where multiple users can manipulate and run the same material, and it can be adapted to support Prolog extensions. In this paper we describe the architecture of SWISH, and describe two case studies of extensions of Prolog, namely Probabilistic Logic Programming (PLP) and Logic Production System (LPS), which have used SWISH to provide tutorial sites.

See pages 15-22 for an introduction to LPS on SWISH.


LPS On SWISH

LPS aims to fill the gap between logical and imperative computer languages. It combines goals of the logical form if antecedent then consequent with beliefs of the logic programming form conclusion if conditions.

Computation in LPS generates commands to make consequents of goals true whenever antecedents become true. It uses beliefs to decompose problems of determining whether a conclusion is true or of making a conclusion true to sub-problems of determining or making the conditions true.




The online prototype is implemented in Prolog and running on SWI Prolog's SWISH. To try it, click here, go to the Examples menu, and click on LPS Examples or on First steps with LPS.

For more information and more links, go to the LPS website.


LPS in Javascript

Implemented by Sam Yong as an MSc project at Imperial College London. It can be used to run LPS programs in web browsers and the Node.js runtime. To try the sandbox, click here.




lps.js has been extended to build a desktop application, LPS Studio, to visualise LPS programs for interactive storytelling using the Electron framework.

LPS Studio

Logical Contracts

The Logical Contracts Server extends the Swish implementation of LPS, with a view towards representing and executing smart legal contracts. It builds upon several decades of research on the use of logic programming to represent legal documents. But it also exploits the use of reactive rules and causal laws in LPS to represent obligations and prohibitions.

LPS builds upon the event calculus ontology of events, fluents and time, but using destructive state transitions, without frame axioms. As argued by van Lambalgen and Hamm, the event calculus provides a useful framework for formalising natural language expressions of tense and aspect. Logical Contracts aim to exploit this connection between the event calculus and natural language, to provide a simplified natural language representation of contracts.

The examples menu of the Logical Contracts Server contains some preliminary examples of Logical Contracts and their English formulation.


Tutorial: Logic and Smart Contracts

Presented at RuleML+RR 2018 2nd International Joint Conference on Rules and Reasoning 18-21 Sep 2018, Luxembourg.

The use of logic to improve the analysis and drafting of legal documents was advocated already in the 1950s by the legal theorist Layman Allen. It was given a boost in the 1980s with the use of logic programming (LP) to implement a large portion of the British Nationality Act. Arguably, since then, LP in one form or another has been the dominant approach to the representation of legal documents in the field of AI and Law.

In the meanwhile, the field of blockchains and smart contracts has emerged, as a separate development from the field of AI and Law. As a result, there is a large gap between smart contracts implemented in blockchain programming languages, such as Solidity and Serpent, and smart contracts written in the natural language of the law. The resulting smart contracts are hard to verify and difficult for non-programmers to understand.

The gap between blockchain programming languages and logic-based languages for AI and Law has inspired several recent applications of logic-based AI approaches to the implementation of smart contracts and other legal documents. In this tutorial, we survey some of these recent developments, focusing on three main examples: the simplified loan agreement developed by Flood and Goodenough, the rock, paper scissors example used in a blockchain lecture course at the University of Maryland, and the delayed delivery example of the Accord Project.


Satisfiability for First-order Logic as a Non-Modal Deontic Logic

September, 2017, Bridging the Gap between Human and Automated Reasoning.

In modal deontic logics, the focus is on inferring logical consequences of obligations, for example on inferring whether an obligation O mail, to mail a letter, logically implies O [mail or burn], an obligation to mail or burn the letter.

Here I present an alternative approach in which obligations are sentences (such as mail) in first-order logic (FOL), and the focus is on satisfying those sentences by making them true in some best model of the world. To facilitate this task and to make it manageable, candidate models are defined by a logic program (LP) extended by means of candidate action assumptions (A). The resulting combination of FOL, LP and A is a variant of abductive logic programming (ALP).


Obligation as Optimal Goal Satisfaction

with Ken Satoh, In the Journal of Philosophical Logic, 2018, 47(4), 579-609.

Formalising deontic notions, such as obligation, prohibition and permission, is notoriously difficult. Among the many problems are both the problem of reasoning with conflicting obligations, and the related problem of reasoning with contrary-to-duty obligations, which arise when the violation of a primary obligation p is compensated by a secondary obligation q.

In this paper we propose a formalisation in which obligations are interpreted as goals in abductive logic programming (ALP), and satisfying a goal p is understood as generating a classical, non-modal model that makes p true, where some models may be better than others. To say that p is obligatory, is to require that p be true in all best models. To say that p is obligatory, but may be violated, resulting in a less than ideal situation q, means that the real goal is p or q (equivalently if not p then q), and that models in which p is true are better than models in which q is true.

We argue that the ALP approach to the representation of obligations has the advantage that it does not require the invention of a special-purpose logic, but is a general approach, which is suitable for many other applications, including abductive explanations, non-monotonic reasoning, combinatorial optimisation, and reactive systems of the production system variety.


Programming in Logic without Logic Programming

with Fariba Sadri, Theory and Practice of Logic Programming, 2016, 16(3), 269-295.

In previous work, we proposed a logic-based framework in which computation is the execution of actions in an attempt to make reactive rules of the form if antecedent then consequent true in a canonical model of a logic program determined by an initial state, sequence of events, and the resulting sequence of subsequent states. In this model-theoretic semantics, reactive rules are the driving force, and logic programs play only a supporting role.

In the canonical model, states, actions and other events are represented with timestamps. But in the operational semantics, for the sake of efficiency, timestamps are omitted and only the current state is maintained. State transitions are performed reactively by executing actions to make the consequents of rules true whenever the antecedents become true. This operational semantics is sound, but incomplete. It cannot make reactive rules true by preventing their antecedents from becoming true, or by proactively making their consequents true before their antecedents become true.

In this paper, we characterize the notion of reactive model, and prove that the operational semantics can generate all and only such models. In order to focus on the main issues, we omit the logic programming component of the framework.


Reactive Computing as Model Generation

with Fariba Sadri, New Generation Computing, 2015, 33(1), 33-67.

In this paper we propose a logic-based, framework inspired by artificial intelligence, but scaled down for practical database and programming applications. Computation in the framework is viewed as the task of generating a sequence of state transitions, with the purpose of making an agent's goals all true. States are represented by sets of atomic sentences (or facts), representing the values of program variables, tuples in a coordination language, facts in relational databases, or Herbrand models.

In the model-theoretic semantics, the entire sequence of states and events are combined into a single model-theoretic structure, by associating timestamps with facts and events. But in the operational semantics, facts are updated destructively, without timestamps. We show that the model generated by destructive updates is identical to the model generated by reasoning with facts containing timestamps. We also extend the model with intentional predicates and composite event predicates defined by logic programs containing conditions in first-order logic, which query the current state.


History of Logic Programming

Volume 9, Computational Logic (Joerg Siekmann, editor).
In the History of Logic series, edited by Dov Gabbay and John Woods, Elsevier, 2014, pp 523-569.

This history covers some of the highlights of the development of logic programming from the late 1960s into the 21st century. It focuses on a number of issues that continue to be important today:

the difference between solving a goal by theorem-proving and solving it by model generation,
the difference between solving a goal top-down and solving it bottom-up, and
the relationship between declarative and procedural representations.


WUENIC:

I worked with WHO and UNICEF from 2009 to 2013, helping to develop, implement and deploy a set of logical rules to assist in estimating global, country by country, infant immunization coverage. The problem is to reconcile inconsistencies when different sources of data conflict - for example when government reported data is inconsistent with survey data. The purpose of the logical rules is to make the reconciliation and estimation process more transparent and more consistent.

The rules have been implemented in XSB Prolog as a purely declarative logic program, and have been used to assist in making the annual estimates since 2010. In addition to helping to ensure transparency and consistency, the Prolog implementation has also proved useful in providing detailed documentation of the rationale for each of the estimates.

There are two articles describing our work. The first, published in the online journal PLOS-ONE, describes our work for a general audience with little or no computing background. The second, presented at JURISIN 2011, describes the work for a more academic audience and compares it with previous work on the logical formalisation of the British Nationality Act.


Computational Logic and
Human Thinking:
How to be Artificially Intelligent

This earlier draft of a book of the same title, published in July 2011 by Cambridge University Press, presents the principles of Computational Logic, so that they can be applied in everyday life.  I have written the main part of the book informally, both to reach a wider audience and to argue more convincingly that Computational Logic is useful for human thinking. However, I have also included a number of additional, more formal chapters for the more advanced reader.

Here are some extracts from the reviews:

By Thomas A. Blackson, Arizona State University, on the back cover:
"Computational Logic and Human Thinking is a superb introduction both to AI from within a computational logic framework and to its application to human rationality and reasoning. Nothing else comes close. Kowalski writes with philosophical insight and just the right level of technical expertise. He puts the excitement back in AI. This sets Computational Logic and Human Thinking apart from the technically overwhelming, and all too often largely unintuitive and uninspiring, encyclopedic introductions that currently dominate the field.

By Donald Gillies, University College London, on the back cover:
"Artificial Intelligence (or AI) tries to program computers so that they can think intelligently like humans. In this book, one of the pioneers of AI suggests something new and original, namely to use the results of AI to improve human thinking ... Anyone who wants to reason better and more effectively in everyday life should study Robert Kowalski's book."

By Alan Bundy, Artificial Intelligence, June-July 2013:
"Computational Logic and Human Thinking might make an excellent basis for a course on AI for non-science students. It covers a wide range of AI techniques in an accessible form and within a uniform framework, with more technical details available as optional extensions. Moreover, Kowalski's enthusiasm for and dedication to his subject shines through on every page."

By George Luger, Computing in Science and Engineering, July/August 2012:
"In this serious and enjoyable book, Kowalski proposes a specific, utilitarian, and sufficient model, in the scientific sense, of human subject/world communications. And, as Aristotle suggested long ago, the sufficiency of this logic-based representational effort could offer insights that can lead to more coherent reasoning, writing, discussions, and arguments by human agents."

By Corrado Mencar, Computing Reviews, October, 2012:
"In sum, this book could be of greatest value to computer science students and professionals who want to improve their computational thinking and have come to see topical discipline to be applied to everyday problems and situations."

By Luis Moniz Pereira, Association of Logic Programming Newsletter, January 2012:
"The book is within clear grasp of a general higher-educated audience, because of the adept and informal naturalness with which it addresses, explains and exemplifies nevertheless non-trivial issues in knowledge representation and reasoning. It is also a treasure trove for teachers and researchers alike, as it admirably integrates the author's longstanding groundbreaking and fertile research efforts, and expounds with clarity and simplicity the unifying epistemological virtues of the Computational Logic paradigm - one that is supported by a vast community of researchers."

From amazon.com:
"A job well done." "An interesting book." "An excellent book and deserves a wide readership!"

From amazon.de:
"6 von 5 sternen"

By Lornz Demey, Tijdschrift voor Filosofie vol:75 issue:2 pages:395-397:
"Samenvattend kan gesteld worden dat Kowalski erin geslaagd is een boek te schrijven dat zowel de ge nteresseerde leek als de meer gespecialiseerde lezer zal (blijven) boeien."

According to Google translate: In summary we can say that Kowalski has managed to write a book that will facinate both the interested layman as well as the more specialized reader.


Logic for Problem Solving

The book was originally published in 1979 and based on lecture notes written in 1974. The preface describes the goals of the book in the following terms:

This book investigates the application of logic to problem-solving and computer programming. It assumes no previous knowledge of these fields, and may be appropriate therefore as an introduction to

  • logic
  • the theory of problem-solving, and
  • computer programming


Logic for Problem Solving, Revisited

As it says, "In this extended edition, Robert Kowalski revisits his classic text in the light of subsequent developments in a substantial commentary of fifty pages." Here is a copy of the commentary.






Selected bibliography:

Early papers on theorem-proving, logic programming and knowledge representation:

Logic and Education

  • Kowalski, R. Logic as a Computer Language for Children,   In Proceedings of European Conference on Artificial Intelligence, Orsay, France, July 1982. Reprinted in New Horizons in Educational Computing, (ed. M. Yazdani), Ellis Horwood Ltd., Chichester, 1984, pp. 121-144. Reprinted in Progress in Artificial Intelligence, (eds. L. Steel and J. A. Campbell), Ellis Horwood Ltd., Chichester.  

  • Kowalski, R. A Proposal for an Undergraduate Degree in Uses of Logic, In Proceedings of the Prague Unesco Symposium on Artificial Intelligence and Higher Education. (eds. V. Marik, O. Stepankova, and Z. Zdahal), Springer-Verlag, 1990, pp. 94-97.  

  • Kowalski, R. An Undergraduate Degree in Practical Reasoning, Editorial, Journal of Logic and Computation, Vol. 3, No. 3, 1993, pp. 227-229.  

Legal reasoning and argumentation

  • R. Kowalski, Legislation as Logic Programs
    In: Logic Programming in Action (eds. G. Comyn , N. E. Fuchs, M. J. Ratcliffe), Springer Verlag, pages 203-230 (1992) 

  • R. Kowalski, F. Toni, Argument and Reconciliation ,
    In: International Symposium on Fifth Generation Computer Systems '94, Workshop on Legal Reasoning, Tokyo, pages 9-16 (1994)

  • R. Kowalski, F. Toni, Abstract Argumentation ,
    In: Artificial Intelligence and Law Journal 4(3-4), Special Issue on Logical Models of Argumentation, H. Prakken and G. Sartor, eds., Kluwer Academic Publishers, pages 275-296 (1996)

Metalogic programming

Event Calculus

  • Kowalski, R. and Sergot, M. A Logic-based Calculus of Events 
    In New Generation Computing, Vol. 4, No.1, February 1986, pp. 67-95. Also in Knowledge Base Management-Systems, (eds. C. Thanos and J. W. Schmidt), Springer-Verlag, pp. 23-51. Also in The Language of Time: A Reader (eds. Inderjeet Mani, J. Pustejovsky, and R. Gaizauskas) Oxford University Press. 2005.

Abductive Logic Programming 

  • A. C. Kakas, R. Kowalski, F. Toni, The Role of Abduction in Logic Programming , In: Handbook of Logic in Artificial Intelligence and Logic Programming 5, pages 235-324, D.M. Gabbay, C.J. Hogger and J.A. Robinson eds., Oxford University Press  (1998)

From Abduction to Argumentation

Intelligent Agents

  • Kowalski, R., Logic-based Open Systems, Department of Computing, Imperial College, 1985. In Representation and Reasoning. Jakob ph. Hoepelman (Hg.) Max Niemeyer Verlag, T bingen 1988, pp. 125-134.

  • R. Kowalski and F. Sadri, Teleo-Reactive Abductive Logic Programs
    In Festschrift for Marek Sergot.(eds: Alexander Artikis, Robert Craven, Nihan Kesim, Babak Sadighi, and Kostas Stathis), Springer, 2012.

   Miscellaneous papers

  • R. Kowalski, Logic Programming
    MIT Encyclopaedia of Cognitive Science (eds. R A Wilson and F C Keil) MIT Press (1999)

Updated 28 March 2024