CSE 130: How to run Prolog in the Lab machines
Here is a sample session. You need to type "cs130f" before you can run prolog ("swipl").
$ cs130f
[you@ieng6...]:~:$ swipl
Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 6.2.6)
... copyright text and prolog info ...
?-
At the prolog prompt:
- Enter [foo]. to "load" the file foo.pl
. This has the same effect as typing out the file at the prompt,
but its usually more convenient to type and edit the file with Vim/Emacs
and load it in like this.
- Press "Ctrl-D" to exit Prolog.
-
You can directly send the file foo.pl
into Prolog and start a prompt by typing:
$ swipl -s foo.pl
- For more information, see this page