-
Notifications
You must be signed in to change notification settings - Fork 5
thezerobit/wamcc
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
WAMCC version 2.2
-----------------
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 (but not all), a
top-level, a Prolog debugger and a WAM debugger, dynamic and compiled
code, modules, global variables...).
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 (many thanks to Bill Hogan).
III- Installation
-----------------
Create a directory
% mkdir wamcc (or anything else)
select it as the current directory
% cd wamcc
get the file wamcc2.2.tar.Z (ftp)
uncompress it
% zcat wamcc2.2.tar.Z | tar xvf -
The installation procedure first installs wamcc locally in the path
give 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 modifiy these vairiables if necessary in the Makefile according to
which can of installation you want (if you only want a local
installation for 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 nherites 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).
wamc 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).
About
WAMCC is a WAM-based Prolog to C compiler.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published