Re: Prolog to WAM Register Allocation?

Jens Kilian <>
17 Jan 2006 21:39:30 -0500

          From comp.compilers

Related articles
Prolog to WAM Register Allocation? (Ludwig Wittgenstein) (2006-01-12)
Re: Prolog to WAM Register Allocation? (2006-01-17)
Re: Prolog to WAM Register Allocation? (Jens Kilian) (2006-01-17)
Re: Prolog to WAM Register Allocation? (Ivan A. Kosarev) (2006-01-17)
Re: Prolog to WAM Register Allocation? (russell kym horsell) (2006-01-19)
| List of all articles for this month |

From: Jens Kilian <>
Newsgroups: comp.compilers
Date: 17 Jan 2006 21:39:30 -0500
Organization: 1&1 Internet AG
References: 06-01-040
Keywords: prolog, bibliography
Posted-Date: 17 Jan 2006 21:39:30 EST

"Ludwig Wittgenstein" <> writes:
> I'm currently studying how Prolog compiles its source into Warren
> Abstract Machine code and I was wondering what kind of algorithm does
> Prolog use to assign variables and constants to X and Y registers?

The compiler in Peter van Roy's MS thesis contains a simple register allocator:

P. Van Roy
A Prolog Compiler for the PLM
Master's Report, Technical Report UCB/CSD No.84/203, UC Berkeley.

His PhD thesis describes a completely different approach to compiling Prolog:

Peter Lodewijk Van Roy
Can Logic Programming Execute as Fast as Imperative Programming?
Ph.D. Dissertation, Technical Report UCB/CSD 90/600, Computer Science Division,
UC Berkeley, December 1990.

The following two papers are specifically about register allocation for Prolog:

Debray, S. K.
Register Allocation in a Prolog Machine
In: Proceedings of the International Symposium on Logic Programming,
        The Computer Society Press, 1986, pp.267--275.

G. Janssens, B. Demoen and A.Mariƫn
Improving the register allocation in WAM by reordering unification
In: R. A. Kowalski and K. A. Bowen (eds), Proc. Fifth International Logic
        Programming Conference and Symposium, Seattle, MIT Press, 1988,

Searching for these papers on Citeseer (
will give you tons of references, and maybe links to online versions.

-- As the air to a bird, or the sea to a fish, so is contempt to the contemptible. [Blake]

Post a followup to this message

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