Home > Archive > Prolog > April 2005 > Interpreter/Compiler texts
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Interpreter/Compiler texts
|
|
| Hrvoje Blazevic 2005-04-21, 8:58 am |
| Are there any text books describing Interpreter/Compiler construction in
Prolog?
-- Hrvoje
| |
| publiustemp-googlegroups@yahoo.com 2005-04-21, 3:58 pm |
| Hrvoje Blazevic wrote:
> Are there any text books describing Interpreter/Compiler construction
in
> Prolog?
That depends. If you really are looking for books describing said
construction "in Prolog", you may wish to check out "The Art of Prolog"
by MIT Press. The last chapter in this book presents a simple compiler
for a Pascal-like language.
If, however, you're looking for books about constructing a Prolog
interpreter/compiler, check out
http://www.vanx.org/archive/wam/wam.html. This has a free book you can
download describing the Warren Abstract Machine, a fairly powerful
Prolog compiler.
Cheers,
Ovid
| |
| Hrvoje Blazevic 2005-04-21, 8:57 pm |
| publiustemp-googlegroups@yahoo.com wrote:
> Hrvoje Blazevic wrote:
>
>
> in
>
>
>
> That depends. If you really are looking for books describing said
> construction "in Prolog", you may wish to check out "The Art of Prolog"
> by MIT Press. The last chapter in this book presents a simple compiler
> for a Pascal-like language.
>
> If, however, you're looking for books about constructing a Prolog
> interpreter/compiler, check out
> http://www.vanx.org/archive/wam/wam.html. This has a free book you can
> download describing the Warren Abstract Machine, a fairly powerful
> Prolog compiler.
>
Thanks, and yes--I was looking for the first.
-- Hrvoje
| |
| C. M. Sperberg-McQueen 2005-04-22, 8:57 pm |
| Hrvoje Blazevic <hrvoje@despammed.com> 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/~sus...s/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
| |
| Hrvoje Blazevic 2005-04-22, 8:57 pm |
| C. M. Sperberg-McQueen wrote:
> Hrvoje Blazevic <hrvoje@despammed.com> writes:
>
>
>
>
> 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/~sus...s/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.
>
Thanks for the pointers.
-- Hrvoje
| |
|
|
|
|
|