The Common Prolog system comes with a built-in
read-query-print
loop similar to a Prolog interpreter loop. To run it, make sure the common-prolog package is accessible and type:
(rqp)
. You will be presented with the prompt:
==>
. At this point you may type in goal expressions, for example:
|==> (append ?x ?y (1 2))
|
|?X = NIL
|?Y = (1 2)
Now Common Prolog is waiting for you to indicate whether or not you wish more solutions. If you press
Return
, you will get the message
OK
and return to the top level:
|?X = NIL
|?Y = (1 2)<RETURN>
|
|OK.
|
|==>
KnowledgeWorks and Prolog User Guide (Unix version) - 6 Dec 2011