- Using the Prolog IDE
Welcome to the ever growing family of PDT users! The chapters below will help you setting up and using the Prolog Development Tool.
If you haven't done it already, you have to set up the PDT first. See Installation for details.
The PDT offers a Prolog perspective, which provides a useful arrangement of all important views offered by the PDT.
To open the Prolog perspective select it in the “Open Perspective” window (see screenshot), which you can get via the menu “Window” → “Open Perspective” → “Other…”.
The Prolog Perspective contains the following views:
This is, how it looks:
After opening the Prolog Perspective, create or select a Prolog process in the Prolog Console View .
The name of the selected or newly created process will appear in the top left corner of the Prolog Console. If the process was newly created, you will see the welcome message displayed below.
Now you can use the Prolog Console to run your Prolog queries. For a test that the installation is working nicely type:
Don't forget the closing period (“.”) and pressing <enter> or <return>. If your console looks like on the screenshot below and the shown version number is 51134 or higher everything is fine:
If you want to create an empty project, select New → Project… → General → Project. Adding a Prolog file can be done by New → File… (with the extension .pl).
Files are always consulted into the “current Prolog process”, that is the Prolog process whose name is displayed in the top left corner of the Prolog Console. If nothing is displayed there, select or create a prolog process first.
To consult a Prolog file either:
In either case, you will see a message about successful consult action (or error messages) in the Prolog Console.
If the consult was sucessfully, the file's icon in the Explorer will turn green. Every folder that contains at least one consulted file is also indicated by a green background.
Consulting the load.pl from the PDT Tutorial Project will automatically consult all the other files.
Now you can start a query:
Now you know the basics about how to use the PDT. You can continue with the Prolog Editor chapter and find out about it's features.