1. Installation
On MacOS - use:
$ brew install swi-prolog
For all other systems see: https://www.swi-prolog.org/Download.html
Alternatively:
$ brew install gnu-prolog
gprolog
?- halt.
2. Prolog CLI
-
start prolog and load code
$ swipl -s hello.pl
3. Quick Start
-
A prolog program file ends with a
.pl
-
Prolog code statements end with
.
a period -
Proglog statements are joined together with
,
a comma
4. Resources
-
Tutorials: https://www.swi-prolog.org/
-
Quick Start: https://www.swi-prolog.org/pldoc/man?section=quickstart
-
Exercism: https://exercism.io/my/tracks/prolog
-
First Look: https://csci305.github.io/lectures/slides/Lecture33.pdf
-
Prolog Tutorial Video: https://www.youtube.com/watch?v=SykxWpFwMGs
5. Generating these Docs
$ asciidoctor -D docs/prolog code/prolog/adoc/*