PROLOG
To experiment with PROLOG, you can use the XSB-PROLOG logic programming system
available in /usr/local/xsb-prolog/xsb. You might want to make an alias to this
as follows alias xsb "/usr/local/xsb-prolog/xsb -i". An online
manual is available here. The best way to use this system is to insert all your facts into a file
with a suffix (.P) and then load it as described below. Queries can be
conducted once inside the interpreter. For example, if you insert the fact
father(mary,william) into father.P, we have:
UNIX Command prompt >xsb
XSB Version 1.4.0 (94/5/9)
[sequential, single word, optimal mode]
| ?- [father].
[Compiling ./father]
[father compiled, cpu time used: 1.389 seconds]
[father loaded]
yes
| ?- father(william,mary).
no
| ?- father(mary,william).
yes
| ?- father(mary,X).
X = william
yes
| ?- father(X,X).
no
| ?- father(X,Y).
X = mary
Y = william
yes