
	PI: Portable Interfaces for Prolog applications
	===============================================

1) Intro to PI

PI is an interface between Prolog applications and XWindows 
that aims to be independent from the Prolog engine.
It is divided in two libraries:

	* Edipo - the lower level interface to the Xlib functions, 
		allows you to:
			create and manage windows
			use graphical primitives
			receive events

	* Ytoolkit - the higher level user interface toolkit
		allows you to:
			create and manage graphical objects
			define new classes of objects
			handle user interaction

2) Making PI

In this distribution you will find the following directories

	dir.		contents
	----------------------------------------------------------------
	edipo		interface to Xlib Prolog and C code
	ytoolkit	toolkit Prolog sources
	doc		manual in latexinfo format (you must have latex)
	demo		a few demo that show how this works 

and the files 

	dir.		contents
	----------------------------------------------------------------
	README		this file
	Makefile	PI installation makefile

Edit the file Makefile and set the following variables 

	vars.		values
	----------------------------------------------------------------
	NAME 		to "quintus", "sicstus" or "yap" and 
	COMMAND 	to the command name of that Prolog in your site
	CC		cc or gcc
	INCPATH		where to look for load foreign include files
	OCFLAGS		other CFLAGS and
				-DOLD=1	for SICStus version less than 2.1#6

then execute "make" .

4) Using PI

You should use the initialization file pi_paths.pl that is produced by
"make" every time you want Edipo or the Ytoolkit.

$  sicstus -l ~/pi/pi_paths.pl

$  prolog -l ~/pi/pi_paths.pl

You can also execute "make resources" to concatenate this file to your
prolog standard resource file 

3) Problems with PI

If you have problems please contact zp@ncc.up.pt
