Prolog Compiler SWI-Prolog:
SWI-Prolog offers a comprehensive Free Software Prolog environment, licensed under the Lesser GNU Public License. It has both windows and linux versions.
1. Starting swipl interpretor, type swipl in the shell prompt -
$swipl
?-
To get help, type help followed by a '.' in the swipl prolog prompt-
?-help .
It will pop up help window.
loading a prolog program file (e.g. prologprog.pl) -
?- [prologprog] .
or
?- consult(prologprog) .
listing current content of prolog database -
?- listing .
querying -
?- hardware(mouse).
true.
?- hardware(pen).
false.
?- hardware('hard disk').
true.
To exit / halt the swipl
?- halt .

0 comments:
Post a Comment