The current implementation of Prolog is an interpreter written in Ocaml and using no libraries or extensions. Therefore, it runs on any computer system that Ocaml 3.06 runs on. If you haven't already, get the Prolog source distribution and install it according to the accompanying instructions.
After starting Prolog, you will see a banner followed by:
AlphaProlog 0.3 ?-The toplevel loop prompt ?- indicates that Prolog is expecting a query. In the toplevel loop, you can't define any new types, predicates, or functions, or add any facts or clauses to the database. Since no external declarations have been loaded, we can only ask queries involving built-in predicates/functions.
Let's start with evaluation (is). Type
?- X is 1 + 2.You should see
Yes. X = 3The interpreter now waits for further input from you. If you type ; in response to this, the interpreter looks for another solution. In this case, there isn't one:
; No.