Hacker's Introduction to Partial Evaluation
started 8/15/2002; 3:16:59 AM - last post 8/19/2002; 12:12:03 AM
|
|
jon fernquest - Hacker's Introduction to Partial Evaluation
8/15/2002; 3:16:59 AM (reads: 2344, responses: 2)
|
|
Hacker's Introduction to Partial Evaluation |
A partial evaluator automatically specializes a program given
some of its data. We show how it arises naturally out of
hand-coding specialized program generators, yielding a
simple online partial evaluation library.
...It's usually seen as a high-tech tool needing
sophisticated theory to build and sometimes even to
use; this tutorial article tries to turn it into a meat-and-potatoes technique.
A rewrite interpreter for simplifying algebraic expressions
from Norvig's
Paradigms of Artificial Intelligence
is translated into Scheme and transformed into a compiler
using partial evaluation.
(Note: the author Darius Bacon
also has a calculator programmable with rewrite rules (req) on his
homepage
that you can use with the
Q Equational Programming Language).
Posted to functional by jon fernquest on 8/15/02; 3:24:31 AM
|
|
|
|
Darius Bacon - Re: Hacker's Introduction to Partial Evaluation
8/15/2002; 10:24:15 AM (reads: 642, responses: 1)
|
|
Hey... it's flattering to see this, but I should've put a big DRAFT notice at the top. :) I'll post here after I have a chance to finish revising it -- suggestions for improving it would be much appreciated.
|
|
Ehud Lamm - Re: Hacker's Introduction to Partial Evaluation
8/19/2002; 12:12:03 AM (reads: 584, responses: 0)
|
|
One thing I would suggest is to add a short explanation about code vs. data. A newbie looking at the first example of emit-power is likely to think that the effort was a waste of time because all you end up with is a "string"
|
|
|
|