Re: Interpreter/Compiler texts



Hrvoje Blazevic <hrvoje@xxxxxxxxxxxxx> writes:

> Are there any text books describing Interpreter/Compiler
> construction in Prolog?

Textbooks, I don't know of. But Susan Stepney,
High-integrity compilation (Hemel Hempstead: Prentice-Hall,
1993), shows the implementation, in Prolog, of a compiler
intended to be provably correct against a semantics
specified in Z. Available now from her Web site at
http://www-users.cs.york.ac.uk/~susan/bib/ss/hic/index.htm

Since Stepney passes in silence over things like parsing the
source, you'll also want to read the relevant chapters
(e.g. 8 on grammar rules, 10 on writing tokenizers, and 7 on
interpreters) in Richard O'Keefe, The Craft of Prolog
(Cambridge, Mass.: MIT Press, 1990), and ditto in Leon
Sterling and Ehud Shapiro, The Art of Prolog: Advanced
Programming Techniques (Cambridge, Mass.: MIT Press, 1986)
(e.g. chapters 17 Interpreters, 18 Program Transformation,
19 Logic Grammars, 24 A Compiler).

There's also a section (9.2) on compiler construction in
Harvey Abramson and Veronica Dahl, Logic Grammars, Symbolic
Computation AI Series (New York: Springer, 1989), but
personally I found it kind of thin.

Also worth reading: Jacques Cohen and Timothy J. Hickey,
"Parsing and Compiling Using Prolog," ACM Transactions on
Programming Languages and Systems 9.2 (April 1987): 125-163.
I believe I got this from the ACM Digital Library.

It would be nice to think there should be something out
there on this topic more recent than 1993. Surely some of
the assembled wise ones will have pointers? In the
meantime, perhaps these will give you something to start
with.

I hope this helps.

-C. M. Sperberg-McQueen
World Wide Web Consortium
.



Relevant Pages

  • Re: Interpreter/Compiler texts
    ... But Susan Stepney, ... 1993), shows the implementation, in Prolog, of a compiler ... 19 Logic Grammars, 24 A Compiler). ... There's also a section on compiler construction in ...
    (comp.lang.prolog)
  • Re: [OT] header file question
    ... > can't be done in a compiler. ... I have experience of writing interpreters ... generate cross reference listings, storage maps, and optimizations that ...
    (comp.lang.c)
  • Re: Interpreter/Compiler texts
    ... , shows the implementation, in Prolog, of a compiler intended to be provably correct against a semantics specified in Z. Available now from her Web site at ... 19 Logic Grammars, 24 A Compiler). ... There's also a section on compiler construction in ... Harvey Abramson and Veronica Dahl, Logic Grammars, Symbolic ...
    (comp.lang.prolog)
  • Re: Prolog compiler correctness
    ... which in turn has an assembler that executes the ... WAM code. ... I'm only concerned about Prolog correctness, ... And for people who worked on popular open source Prolog compiler ...
    (comp.lang.prolog)
  • Re: How can I do this without cuts?
    ... > an apology, ... this ended as we both agreed that compiler ... for Prolog at least reached a plateau in the early 90s and that the ... generate Java code, or at least a class hierarchy. ...
    (comp.lang.prolog)