1 Running a Prolog program

Running a Prolog program involves

  1. creating a file containing the program
  2. saving the file
  3. loading the file into Prolog (called compiling, consulting, or reconsulting the file in Prolog jargon)
  4. finally, calling some goal defined in the program

The version of Prolog we will be using is one which runs on a variety of different platforms and is called SWI-Prolog. At York, it is accessible both on the machines in the elab in the Language Centre and on the university’s Windows network. (Information about how to get your own copy is provided at the end of this documentation.)

 1.1 Getting started
  1.1.1 In the elab
  1.1.2 On a networked Windows machine
 1.2 Creating a Prolog program.
 1.3 The Web
 1.4 An Example
  1.4.1 Saving a file
  1.4.2 Consulting a file
  1.4.3 Posing a goal
  1.4.4 Tracing
 1.5 A note on filenames and directories in Prolog