Prolog Instructions --- September 1995. At the UNIX prompt, in the directory where you have (a copy of) the file "foo.pl" that you wish to run, enter the command ^^^Because of Perl, the preferred Prolog extension is now ".prolog" prolog This enters the Quintus Prolog environment. Ignore the seeming error in: * Could not read users file * Existence error * file '/util/q3.2/license3.2/users.qof' does not exist * Unix error : No such file or directory Quintus Prolog Release 3.2 (Sun 4, SunOS 5.3) Copyright (C) 1994, Quintus Corporation. All rights reserved. 301 East Evelyn Ave, Mountain View, California U.S.A. (415) 254-2800 Licensed to University at Buffalo You will see the prompt | ?- At this prompt, the following three commands seem to be equivalent: | ?- ['foo.pl']. OR | ?- compile('foo.pl'). OR | ?- consult('foo.pl'). Notice the /single/ quotes, and the period, which terminates every Prolog command. Prolog will respond % yes (a la Marv Albert) Then all items declared in the file are available to be run. Some of the files in the "CodeSamples" directory (not written by KWR) generate syntax errors that /do no harm/---remarks not %ed out. To exit Prolog, type ^D (i.e., Control-D). [2000 update: you can also type "halt.", including the period as usual]. NOTE! In order to enter facts on the screen, you have to enter | ?- consult(user). WITHOUT the single quotes! Then Quintus will respond with only the "|" prompt. Enter lines (e.g. from the text), ending each statement with "." When you are done, hit ^D ONCE to get back to the "| ?-" prompt, and then you can enter queries relating to the lines you just entered. For more information (and less directions) see Phil Ventura's page at http://www.cs.buffalo.edu/~pventura/PROLOG/index.html 2000 update: you can enter [user]. in place of "consult(user)."