Prolog Lab1 Installation
Prolog Lab1 Installation
Department
Artificial Intelligence
Prolog programming
Installation
1
Follow the link for download your version 7.2.2 or 7.1.29 (what i
s available and free)
https://www.swi-prolog.org/download/stable
2
Starting SWI-Prolog on Windows
3
The file extension is associated with the program .exe. Opening
a .pl swipl-win.pl
4
Executing a query
After loading a program, one can ask Prolog queries about the
program. The query below asks Prolog what food ‘sam’ likes.
The system responds with
X = (value) if it can prove the goal for a certain X.
Use the RETURN key if you do not want to see the more
answers.
Prolog completes the output with a full stop (.) if the user uses
the RETURN key or Prolog knows there are no more answers.
5
If Prolog cannot find (more) answers, it exit.