                            WAMCC version 2.23
                            ------------------



Main changes wrt 2.22
---------------------

Fix some bugs under Linux


Main changes wrt 2.2
--------------------

Bugs on memory management under Linux fixed
Other minor bugs have been fixed
Port to NeXT stations
Port for DecAlpha




I- Introduction
---------------

wamcc is a Prolog Compiler which translates Prolog to C via the WAM.
wamcc has a syntax conform to the proposed ISO standard.
wamcc offers the most usual built-in predicates, a top-level, a Prolog
debugger and a WAM debugger, dynamic and compiled code, modules, 
global variables, global arrays...). 
wamcc is designed to be easily extended (e.g. clp(FD) is a constraint
logic language over Finite Domains designed on wamcc). 
From an efficiency point of view, wamcc is between SICStus "emulated"
and SICStus "native code" on Sparc machines (1.5 times faster than SICStus
emulated, 1.5 times slower than SICStus "native code").



II- Requirements
----------------

wamcc reguires the GNU C compiler (gcc) version 2.4.5 or higher and is
available for:

   - Sun Sparc under SunOS (4.3.1)
   - dec ultrix
   - sony mips (R3000) 
   - PC i386/i486 under linux (a.out and ELF)
     (many thanks to Bill Hogan and Hans Lub)
   - NeXT stations (processor m68k or hppa)
   - Dec Alpha under OSF/1 v2.0 (requires gcc 2.5.8 or higher) 
     (many thanks to Jarle Hulaas)



III- Installation
-----------------

Create a directory

   % mkdir wamcc (or anything else)

select it as the current directory

   % cd wamcc

uncompress the distribution

   % zcat wamcc2.23.tar.Z | tar xvf -

(  % gzcat wamcc2.23.tar.gz | tar xvf - if compressed with gzip)


The installation procedure first installs wamcc locally in the path
given by ROOTPATH in Makefile (default: $(HOME)/wamcc), after it copies
the appropriate files in 3 directories given by 

   INCPATH: includes  for compilations  (default: $(ROOTPATH)/include)
   LIBPATH: libraries for compilations  (default: $(ROOTPATH)/lib) 
   BINPATH: executables (compiler...)   (default: $(ROOTPATH)/bin) 

Only these 3 directories are necessary after the installation.

So modify these variables if necessary in the Makefile according to
which kind of installation you want (if you only want a local
installation do not modify anything).

   ex: ROOTPATH=/usr/local/lib/wamcc

or

   ex: ROOTPATH=$(HOME)/prolog
       INCPATH=/usr/local/lib/include
       LIBPATH=/usr/local/lib
       INCPATH=/usr/local/bin



then install the compiler

   % make


add to your PATH environment variable (usually in ~/.login) the
directory corresponding to BINPATH if necessary (see Makefile)

   ex: setenv PATH "$PATH":/usr/local/lib/wamcc/bin


Note: the file src/Makefile inherites INCPATH and LIBPATH from the
      "root" Makefile. So if you run directly this Makefile do not
      forget to pass with the command line the appropriate paths
      (e.g. make INCPATH=...  LIBPATH=...). You can also modify in
      src/Makefile the default definitions of INCPATH and LIBPATH
      to be the same as in Makefile (the root Makefile).



Problems:

If the installation fails (e.g. with old versions of gcc) you can try
to clean the current installation (make clean) and to reinstall it
after modifying CFLAGS in the src/Makefile as follows:

   CFLAGS = -O2 -DNO_REGS


If you have a problem with a library when compiling a Prolog file
(message like "libwamcc.a: warning: table of contents for archive is
 out of date; rerun ranlib(1)")

use % ranlib LIBPATH/libwamcc.a
and % ranlib LIBPATH/libwamcc_pp.a

(where LIBPATH is defined in the Makefile)



IV- Documentation
-----------------

The directory doc contains a user's manual (LaTeX file).

wamcc tries tries to be conform to the (future) ISO standard Prolog.
The draft ISO standard for Prolog is available by anonymous ftp from
ai.uga.edu:/pub/prolog.standard/ [128.192.12.9]. An unofficial summary
of the draft ISO Prolog standard is available from the same location
as isoprolog.tex or isoprolog.ps.Z.



V- Examples:
------------

If you have get the file prg.tar.Z you can expand it as follows:

   % cd wamcc
   % zcat prg.tar.Z | tar xvf -

This creates a directory Examples which containts some examples of
wamcc programs. 
To execute the programme xxx.pl use:

   % cd Examples
   % make -f xxx.mk
   % xxx

you can also interpret it under the top level (but it is longer):

   % wamcc
   ...
   | ?- [xxx].
   ...


If you have a stack overflow message, consult the documentation.




VI- Bugs
--------

Please report (detailled) bugs to diaz@margaux.inria.fr



VII- Ports
----------

wamcc can be easily ported on other machines. If you want to do this
do not hesitate to contact me (diaz@margaux.inria.fr).





