Navigation  without Java Scripts

Exploring Visual Prolog

Note: This page assumes that you have already installed Visual Prolog, so all the DOC files and Projects can be found on disk ! If you read this from the WEB, download and Install the Personal Edition to get hold in the actual files.

Learning something new is not a sequential, straight forward process. Visual Prolog is a very large system with many corners, and few people will need to know all of its details. However, learning the basic of the Prolog language, building some Windows applications and trying the demo programs are not at all difficult! On the CD, we have supplied the full documentation for Visual Prolog in MS-Word files and on-line help. However it is not very convenient to read too much documentation on-screen so you might consider buying the printed manual in order to more easily explore Visual Prolog. You should first install Visual Prolog, preferably a default or full installation if you have enough hard disk free space available. If you install everything, you will have all of the files needed for the following exercises.

There are a number of things you should look at to understand the capabilities and the potential of Visual Prolog. In the following, we outline some items, but you are quite free to choose the order in which you try these steps. However, you will probably not get to really know the tool until you have tried to solve a problem of you own with Visual Prolog. Also before exploring the examples and posibilities of Visual Prolog, you should take a quick look at the

1. Study some small Prolog programs

The following is a collection of smaller programs. In order not to complicate things they do not have a GUI (Graphical User Interface), and use only the readln and write predicates to communicate with the user. By looking at the source code and at what the programs does you can get an impression of the capabilities of the Prolog Language. The examples are found in the \EXAMPLES subdirectory.

Before running the examples, you need to know a couple of thing about the Visual Development Environment (VDE). The following examples are supplied as projects with the EasyWin target (Use Project->Load to load the program, and use Project->Run to run it), but you can also open the .PRO source file directly into the Visual Prolog editor and then use the Ctrl+G hotkey to run the program in Goal Mode. Before starting you may wish to see more information about Using the Visual Prolog VDE

Many of the examples mentioned below contain a HTML link to a project (.PRJ) file. If you set up a (Windows) association that connects files having a .PRJ extension to the bin\win\32\vip.exe file you will be able to open these projects by clicking on the link.

FAMILY - Expressing family relations in Prolog.
HANOI - Towers of Hanoi written in Prolog.
ROUTE - a program, that solves "travelling salesman"-problems.
FWGC - The farmer/wolf/cabbage/goat problem.
ZEBRA - The five houses logic puzzle.
NQUEEN - How to place N queens on a chessboard.
SEN_AN - Analyzing the grammar of a sentence.
WORDBREAK - Analyzing where to break words.
HARDWARE - How to simulate logic hardware in Prolog.
GENI - A very first expert system shell.
DIFF - Symbolic differentiation.
GEOBASE - Natural language interface to US geography.

2. Study these examples, now with a Graphical User Interface.

These are found in the VPI\PROGRAMS subdirectory. You must build these applications yourself,
the procedure is: Project->Open and then Project -> Run.

Note to use the following HTML links, you must register bin\win\32\vip.exe as the program that is used to open .PRJ files. Before starting you may wish to see more information about Using the Visual Prolog VDE

DIFF illustrates how to do symbolic differentiation
GEOBASE a small natural language interface to a geography database
HANOI shows the moving of the towers of hanoi
SEN_AN shows how to parse and analyze a sentence and display the structure of the sentence.
REGISTER a little database application.

3. Study our demo applications.

The demo examples are supplied with source code only. You need to build these applications yourself, the procedure is:

      Project->Open and then Project -> Run.

Note to use the following HTML links, you must register bin\win\32\vip.exe as the program for .PRJ files. Using the Visual Prolog VDE

You can activate on-line help for the applications!

esta/esta.PRJ ESTA is an expert system shell. You should try to run it and open the SANOCORD knowledge base which can investigate your overall health.
sockbind/programs/ftpagent/ftpagent.PRJ FTPAGENT can connect to a list of FTP sites to automatically synchronize directories on your hard disk.
sockbind/programs/webagent/webagent.PRJ WEBAGENT can monitor a given WEB site, and download the content to your hard disk if anything changes, also it can, when running on some operating systems, notify you by E-mail.
vpi/programs/label/label.PRJ Label Expert is a little application for creating and printing labels. Try it, it is quite nice!
vpi/programs/logidemo/trans.PRJ Logidemo is an example program for Logistics optimization. The example is about Beer production and distribution, and shows the results on a GIS map. Try it, it is quite good!
odbcbind/example/sqldemo/sqldemo.PRJ A demo of the ODBC bindings and the GRID control. If you have some ODBC sources set up on your computer, you can view and edit your data.
pie/pie.PRJ A Prolog Interpreter implemented in the compiled Prolog language.
vpi/programs/tangram/tangram.PRJ TANGRAM is a fascinating little ancient Chinese puzzle game implemented in Visual Prolog.
The Visual Prolog VDE, Utilities, Debugger and Installation program are also Visual Prolog applications !

4. Take a quick look at the VPI Tools demo applications

These are found in the VPI\TOOLEXAMP subdirectory. You need to build these applications yourself, the procedure is:

   Project->Open and then Project -> Run.

These projects illustrate the use of the portable tools implemented on top of the VPI layer.

5. Learn the Prolog language

Open the Language tutorial under DOC\LANGUAGE.DOC

6. Follow the Guided Tour on how to create a VPI application

For this, you should open the getting started manual under DOC\GETSTART.DOC, and then follow the steps in the Guided Tour.

7. Learn the details of the Visual Prolog Development Environment

For this, you should open the getting started manual under DOC\VDE.DOC, and read about the many facilities in the VDE.

8. Learn the details of the VPI layer

For this, you should open and read the getting started manual underDOC\VPI.DOC, and you should run the examples in the subdirectory VPI\EXAMPLES