Get 20M+ Full-Text Papers For Less Than $1.50/day. Start a 14-Day Trial for You or Your Team.

Learn More →

1998 symposium on partial evaluation

1998 symposium on partial evaluation 1998 Symposium on Partial Evaluation OLIVIER DANVY BRICS, University of Aarhus ¨ ROBERT GLUCK DIKU, University of Copenhagen and PETER THIEMANN University of Nottingham 1. PARTIAL EVALUATION The partial-evaluation community is concerned with specializing programs. Our thesis is that whereas the most efficient programs are the ones that are specialized to the task at hand, actual programs are overly general, and this generality impedes their efficiency. For a simple example, consider any kind of formatting function. Would anyone bother writing in C the following three lines: fputs(x, fp); fputs( œ is not , fp); fputs(y, fp); instead of writing the following equivalent one line? fprintf(fp, œ%s is not %s , x, y); The problem with this one-liner is that unless the compiler displays some intelligence, the analysis of the control string œ%s is not %s  happens at run time. We can very precisely quantify the intelligence that is required here: the compiler should specialize the library function fprintf with respect to the control string, in effect transforming the one-liner above into the original three lines. Such a specialization is what partial evaluation is all about. Literals offer a rich source of opportunities for program specialization, one that http://www.deepdyve.com/assets/images/DeepDyve-Logo-lg.png ACM Computing Surveys (CSUR) Association for Computing Machinery

Loading next page...
 
/lp/association-for-computing-machinery/1998-symposium-on-partial-evaluation-WIxcRkDhPO

References (73)

Publisher
Association for Computing Machinery
Copyright
Copyright © 1998 by ACM Inc.
ISSN
0360-0300
DOI
10.1145/292469.293684
Publisher site
See Article on Publisher Site

Abstract

1998 Symposium on Partial Evaluation OLIVIER DANVY BRICS, University of Aarhus ¨ ROBERT GLUCK DIKU, University of Copenhagen and PETER THIEMANN University of Nottingham 1. PARTIAL EVALUATION The partial-evaluation community is concerned with specializing programs. Our thesis is that whereas the most efficient programs are the ones that are specialized to the task at hand, actual programs are overly general, and this generality impedes their efficiency. For a simple example, consider any kind of formatting function. Would anyone bother writing in C the following three lines: fputs(x, fp); fputs( œ is not , fp); fputs(y, fp); instead of writing the following equivalent one line? fprintf(fp, œ%s is not %s , x, y); The problem with this one-liner is that unless the compiler displays some intelligence, the analysis of the control string œ%s is not %s  happens at run time. We can very precisely quantify the intelligence that is required here: the compiler should specialize the library function fprintf with respect to the control string, in effect transforming the one-liner above into the original three lines. Such a specialization is what partial evaluation is all about. Literals offer a rich source of opportunities for program specialization, one that

Journal

ACM Computing Surveys (CSUR)Association for Computing Machinery

Published: Sep 1, 1998

There are no references for this article.