Wednesday 3 August 2022

SWI Prolog and SWISH

We'll be using a mature and open source Prolog called SWI-Prolog.

To avoid the complexity of installing and configuring the Prolog language, we'll be using than online service called SWISH accessed through any modern browser:



If you have the technical experience, you can of course download and run SWI-Prolog locally, and even use your favourite code editor with a prolog or swi-prolog specific support, such as the add-on for Microsoft's Visual Studio Code.

We'll be putting all our prolog program examples on GitHub for convenient access:

The files have a suffix .pl and are simply plain text files.

Welcome!

This blog will journey through learning logic programming and Prolog by working through small examples.

This is intentionally a different approach to learning about Prolog as a programming language, or learning about logic from a theoretical perspective.



The idea is that talking through examples helps to learn theoretical concepts by making them real, by seeing the mechanics of how they work, and by actively experimenting and playing ourselves. 

Doing, not just reading, is underestimated as a method for learning and understanding.

The examples will be kept small and focussed, and will progressively illustrate key concepts and themes.

We also won't cover topics which fall outside the core objective of learning to think like a logic programmer - for example, we won't cover how to read or write to files.