A Simple First Example
Open Visual Prolog
At top of page, select Project Open. Go to directory containing Visual Prolog Examples, open PIE directory, select PIE application. The following screen will appear.
At top of page, select Build, then Execute. When asked if want to register program, select Continue Evaluation. Click that you understand the program cannot be distributed commercially. You will then see the following screen.
At top of page, select File, New. On the screen provided, type the following
father("Bill", "John").
father("Pam", "Bill").
grandFather(Person, GrandFather):-
father(Father, GrandFather), father(Person, Father).
At top of page, select Engine, Reconsult
At top of page, select File, Consult. Highlight the file you are working on (FILE0 in this case) and click Open - as shown below.
In the Dialog box (open the Dialog box by selecting Window, Dialog type the following
father("Sue", "John").
Press Return
In the Dialog box type the following
father(X,Y).
Press return
Output for each query is presented below.