Skip to content

Introduction to Prolog

Introduction to Prolog

Details

Introduction to Prolog

https://en.wikipedia.org/wiki/Prolog

Speaker: Anne Ogborn

Anne has extensive experience in Prolog and is a contributor to SWI Prolog.

Notes:

  1. Please only RSVP if you intend to come, space is limited.
  2. Please follow the instructions below and come with Prolog installed. We won't be able to spend time on installation during the meetup.

Prolog Installation Notes:

  1. On Windows, download the latest self installer from
    http://www.swi-prolog.org/download/devel

You want the latest devel release. As of this writing it's 8.1.7

  1. On Linux or Mac, using the SWI version manager is simplest

https://github.com/fnogatz/swivm

Install the prerequisites

then install swivm per the instructions (you just curl it). This installs the version manager, now we get SWI-Prolog itself.

In a new terminal

swivm install 8.1.7

this should download and build SWI-Prolog from sources

swivm alias default 8.1.7

This sets things so the swipl command runs version 8.1.7

  1. On Windows, make an empty text file, rename it test.pl and double click
    This starts Prolog.

On Linux/Mac, make an empty file test.pl

and run

swipl test.pl

You should see the console, welcome to SWI-Prolog, and a ?-

At the ?- prompt type

check_installation. (note the period at the end)

and return

You will get a report of the 'health' of your installation.

SWI-Prolog is 'batteries included', so you have a lot of stuff we won't need,
like the java interface. You will need pce library, and either readline or editline.

At the ?- prompt type

edit.

You should get a small GUI editor open. Mac users, if this doesn't happen, you need XQuartz.

Download the class's example files at
https://partyserver.rocks/anniepoo/prologclass.zip

For queries, reach out in the comment section or for installation queries mail to annie@theelginworks.com.

Photo of FOSS Cafe group
FOSS Cafe
See more events
Hasura Bangalore
No 37/38, 80 Feet Rd · Bengaluru, Ka