	XWIP "README" FILE
	==================

	Copyright and License

Copyright (C) 1989 by The Regents of the University of California.

This software work was developed at UCLA with support in part from
DARPA Contract F29601-87-C-0072.

The Regents of the University of California ("University") grants to
the party hereby receiving "XWIP" from an authorized provider
("Recipient") a non-exclusive, royalty-free license to copy, display,
distribute, and produce derivative works of "XWIP", provided that the
above copyright notice appears in all copies made of "XWIP" and both
the copyright notice and this license appear in supporting
documentation, and that the name of University not be used in
advertising or publicity pertaining to "XWIP".  

"XWIP" is provided "as is" without express or implied warranty.
University does not and cannot warrant the performance of "XWIP" or
the results that may be obtained by its use or its fitness for any
specific use by Recipient or any third party. In no event shall
University become liable to Recipient or any other party, for any loss
or damages, consequential or otherwise, including but not limited to
time, money, or goodwill, arising from use or possession, authorized
or not, of "XWIP" by Recipient or any other party.  

"XWIP" was developed at the UCLA Computer Science Department by Ted Kim. 

	Software Description	

X Window Interface for Prolog (XWIP) is a software package for use
with Prolog. It allows Prolog to be used a client program for the X
Window System. The additional functions it provides are similar in
form to the Xlib C language library.  

XWIP is written in Prolog and partly in the C language. XWIP uses a
foreign function interface to allow the Prolog code to call the C
code. The C code in turn calls the Xlib C language library. Typically,
the "saved program" feature is used to build a custom Prolog with XWIP
preloaded.    

To use XWIP, a number of other pieces of software are required.
Obviously, X and Prolog must be available. In addition, a C compiler
and the Xlib library must be available. XWIP seems to work on at least
the SUN-3 running SUNOS 3.5 with X11 R3 and Quintus 2.2 or 
SICStus 0.6. But, of course, there are no warranties as explained in
the copyright and license.

The Prolog parts were written to use Quintus Prolog. In particular,
Quintus dependencies exist in the following areas: Prolog language
syntax and semantics, foreign function interface features and save
program features. Some other implementations of Prolog (eg. SICStus
Prolog) emulate Quintus Prolog closely enough to allow use of XWIP
without modification. It is probably the case, that XWIP could be
adapted to be used with other Prolog implementations.  

There are some C language dependencies also. The code was written for
the version of the C compiler that comes with SUN OS 3.5. The known
dependencies are ANSI requirements, so-called "int" size, pointer
arithmetic peculiarities and peculiarities of C language system
libraries. The code does not currently conform to the draft ANSI C
requirements. To make it so, would not require much work. It is
assumed the "int" size is 32 bits. This is usually a reflection of the
underlying hardware design. For example, C compilers for machines
based on the MC68020 and VAX processors usually have an "int" size of
32 bits. Some machines may not like some of the pointer casting done
in the code. Also structure padding might mean some sizeof arithmetic
would have to be adjusted. As for system libraries, it is possible
that other systems will not have the exact same functions required by
XWIP. It is probably true, though, that any C implementation provided
with a "BSD UNIX" system will work.    

The C dependencies are probably not a real issue. This is because, any
system capable of compiling Xlib is probably also capable of compiling
the C language parts of XWIP. 

	Acknowlegements

XWIP was originally called PX. The name was changed after it was found
to conflict with another system. 

XWIP was written by Ted Kim, a graduate student in the UCLA Computer
Science Department. The author's work was supported in part by DARPA
contract F29601-87-C-0072.  

The author would like to thank Stott Parker, who provided many useful
comments on the design and documentation of XWIP. Steve Berson and
Bill Cheng provided useful comments on the distribution. The author
would also like to thank Vernon Austel, Scott Kalter, Dinh Le and
Michael Coleman. These brave souls helped test XWIP by using it for
their own projects. 


Ted Kim

PS: see the NOTES file for installation instructions

#
# eof
#
