Re: Compiling Prolog-like languages

"Bart Demoen" <>
4 Jul 2002 23:01:35 -0400

          From comp.compilers

Related articles
Compiling Prolog-like languages (Sarah Thompson) (2002-07-02)
Re: Compiling Prolog-like languages (Bart Demoen) (2002-07-04)
Re: Compiling Prolog-like languages (Torben Ęgidius Mogensen) (2002-07-04)
Re: Compiling Prolog-like languages (Neelakantan Krishnaswami) (2002-07-04)
Re: Compiling Prolog-like languages (Hans Aberg) (2002-07-04)
Re: Compiling Prolog-like languages (Peter Ilberg) (2002-07-04)
Re: Compiling Prolog-like languages (Roberto Waltman) (2002-07-04)
Re: Compiling Prolog-like languages (Thomas Lindgren) (2002-07-15)
[7 later articles]
| List of all articles for this month |

From: "Bart Demoen" <>
Newsgroups: comp.lang.prolog,comp.compilers
Date: 4 Jul 2002 23:01:35 -0400
Organization: kul
References: 02-07-004
Keywords: prolog, bibliography
Posted-Date: 04 Jul 2002 23:01:35 EDT

Sarah Thompson wrote:

> 1. Can someone point toward a good tutorial on implementing
> Prolog-like programming languages?

@techreport{ AitK90,
AUTHOR = "H. Ait-Kaci",
TITLE = "The {WAM}: a (Real) Tutorial",
INSTITUTION = "DEC Paris Research Report",
NUMBER = "5",
YEAR = "1990 See also: {\sf\verb|~|hak/documents/wam.html}"}

The link is indeed dead because Hassan moved - I think to ILOG. I
have the tutorial, but it says it can be reproduced without permission
by Hassan. I can send you course notes on the WAM I am currently
writing for a summerschool if you want.

> 2. Much of the literature mentions the Warren Abstract Machine. Is
> this regarded as the best way to go, or are there
> simpler/faster/better/newer alternatives worthy of consideration?

WAM is considered by many the best basis. Systems like SICStus, Yap,
XSB, GNU-Prolog are based on it., but they give it their own touch in
the aspects not specified by the original WAM. There are variants
like the VAM (Vienna Abstract Machine) which is a bit more
complicated, and BinProlog (which is a bit less complicated). Even the
abstract machine model of the Melbourne implementation of Mercury is
not far removed from the WAM.

> 3. I currently use C++ as a target language, although this is intended
> to be an interim step toward a lower level code generator. Is this
> likely to be good/bad/indifferent as regards implementing a WAM or
> something similar to it?

Rather indifferent. I would personally go for an emulator and only in
a later stage switch to something lower level - if you really need
it. Have a look at GNU-Prolog and its predecessor wamcc.

> I should probably mention that I really do want to write my own
> implementation.

Of course ! Why let other people have all the fun :-)


Bart Demoen

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.