
Warren's Abstract Machine: A Tutorial Reconstruction (1991) [pdf] - kbp
http://wambook.sourceforge.net/wambook.pdf
======
greenyoda
For those who are unfamiliar (as I was):

"The WAM is an abstract machine consisting of a memory architecture and
instruction set tailored to Prolog. It can be realised efficiently on a wide
range of hardware, and serves as a target for portable Prolog compilers."

(From the book's foreword.)

------
awirth
A few years back I was working on a WAM to LLVM compiler as a way to learn
LLVM. Never fully finished my implementation, but this book really was an
amazing reference. I particularly enjoyed the way the "tutorial style" that
built up starting from a very simple language and explaining the design
choices being made while extending the language to eventually become Prolog.

I don't know where the code is now, maybe I should make a point of digging it
up and fixing it up to work with a recent versions of LLVM.

------
2sk21
I spent a lot of the early 80s writing Prolog, first on DEC-10 Prolog and then
on Quintus Prolog. Too bad this great document was not available back then!

------
nudpiedo
is the WAM the best virtual machine for prolog or are there out better and
newer approaches?

~~~
fernly
Also from the prologue,

"Although the WAM is a distillation of a long line of experience in Prolog
implementation, it is by no means the only possible point to consider in the
design space. For example, whereas the WAM adopts “structure copying” to
represent Prolog terms, the “structure sharing” representation used in the
Marseille and DEC-10 implementations still has much to recommend it."

