
1) Intro

EDIPO is an interface between Prolog applications and XWindows 
that aims to be independent from the Prolog engine.

It is taken that the Prolog engine has a foreign code interface 
(if possible a standard one - Quintus/SICStus like) and a module system. 
If this is not the case and the Prolog engine has NO:

	module system 		you can always remove the module 
				declaration from the file edipo.pl
				(but the Ytoolkit will not run).

	"standard" C interface	you can modify the file qy.pl 

	C interface		forget it


2) Making EDIPO

To make EDIPO for one of the following Prolog engines (Yap, SICStus,
Quintus) you should only have to 
execute make in the Edipo dir, setting the variable PROLOG to the 
appropriated engine name maybe CFLAGS (ex. make PROLOG=sicstus).
and or edit the Makefile.

	variable	to specify		ex.
	-------------------------------------------------
	CFLAGS		- Engine Type		CFLAGS=-DQUINTUS=1
			- include files		...-I/usr/local/lib/Emulator/
	PROLOG		- Prolog Program	PROLOG=yap


3) Porting Edipo to a new Prolog 

  In this case you should also edit the file   src/callx.h
  and create a conditional compilation section for the name you have defined
  in the CFLAGS (ex. for Quintus the name is QUINTUS as we defined
  CFLAGS=-DQUINTUS=1).

  In this section you should:

	* include the file with the definition needed by the C code interface.
	  (Don't put complete pathnames, specify the dir using -I in CFLAGS)
	  ( ex. CFLAGS= -DQUINTUS -I/usr/local/lib/quintus )

	* define the following macros:

		- AtomFromString(A)	returns an atom giving string
		- StringFromAtom(A)	returns a string giving an atom

		*NOTE* 	atom cannot be larger than unsigned long int
			string is char*

	* redefine the predicate engine/1 in edipo to recognize the new engine 

4) If the engine has a different foreign code interface

	* edit the file src/callx.pl which has the declarations of the
	  external C functions and 

	* if the type convertions between C and Prolog must be handled
	  by the C functions you can adapt the file qy.pl that makes
	  the convertions for the YAP prolog compiler.


