Abstract
Type-directed partial evaluation is a new approach to program specialization for functional programming languages. Its merits with respect to the traditional offline partial evaluation approach have not yet been fully explored. We present a comparison of type-directed partial evaluation with standard offline partial evaluation in both a qualitative and quantitative way. For the latter we use implementations of both approaches in Scheme. Both approaches yield equivalent results in comparable time
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Lars Ole Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen, May 1994. (DIKU report 94/19).
Peter Holst Andersen and Carsten Kehler Holst. Termination analysis for offline partial evaluation of a higher order functional language. In Radhia Cousot, editor, Proc. International Static Analysis Symposium, SAS’96, volume 1145 of Lecture Notes in Computer Science, pages 67–82, Aachen, Germany, September 1996. Springer-Verlag.
Vincent Balat and Olivier Danvy. Strong normalization by type-directed partial evaluation and run-time code generation. In Proceedings of the ACM SIGPLAN Workshop on Types in Compilation (TIC’98), Lecture Notes in Computer Science, Kyoto, Japan, March 1998.
Ulrich Berger and Helmut Schwichtenberg. An inverse of the evaluation functional for typed λ-calculus. In Proc. of the 6th Annual IEEE Symposium on Logic in Computer Science, pages 203–211, Amsterdam, The Netherlands, July 1991. IEEE Computer Society Press.
Lars Birkedal and Morten Welinder. Hand-writing program generator generators. In Manuel V. Hermenegildo and Jaan Penjam, editors, International Symposium on Programming Languages, Implementations, Logics and Programs (PLILP’ 94), volume 844 of Lecture Notes in Computer Science, pages 198–214, Madrid, Spain, September 1994. Springer-Verlag.
Anders Bondorf. Automatic autoprojection of higher order recursive equations. Science of Computer Programming, 17:3–34, 1991.
Anders Bondorf. Improving binding times without explicit CPS-conversion. In Proc. 1992 ACM Conference on Lisp and Functional Programming, pages 1–10, San Francisco, California, USA, June 1992.
Anders Bondorf and Olivier Danvy. Automatic autoprojection of recursive equations with global variables and abstract data types. Science of Computer Programming, 16(2):151–195, 1991.
Anders Bondorf and Jesper Jørgensen. Efficient analyses for realistic off-line partial evaluation. Journal of Functional Programming, 3(3):315–346, July 1993.
Mikhail A. Bulyonkov. Polyvariant mixed computation for analyzer programs. Acta Informatica, 21:473–484, 1984.
Robert Cartwright and Mike Fagan. Soft typing. In Proc. Conference on Programming Language Design and Implementation’ 91, pages 278–292, Toronto, June 1991. ACM.
Charles Consel and Olivier Danvy. Tutorial notes on partial evaluation. In Proc. 20th Annual ACM Symposium on Principles of Programming Languages, pages 493-501, Charleston, South Carolina, January 1993. ACM Press.
Charles Consel and Francois Noël. A general approach for run-time specialization and its application to C. In POPL1996 [39], pages 145–156.
Olivier Danvy. Pragmatics of type-directed partial evaluation. Robert Glück, and Peter Thiemann, editors. Dagstuhl Seminar on Partial Evaluation 1996, volume 1110 of Lecture Notes in Computer Science, Schloß Dagstuhl, Germany, February 1996. Springer-Verlag In Danvy et al. [18], pages 73–94.
Olivier Danvy. Type-directed partial evaluation. In POPL1996 [39], pages 242–257.
Olivier Danvy. Online type-directed partial evaluation. In Proc. Third Fuji International Symposium on Functional and Logic Programming, Kyoto, Japan, April 1998. World Scientific Press, Singapore.
Olivier Danvy. A simple solution to type specialization. Technical Report RS-98-1, BRICS, University of Aarhus, Denmark, January 1998. To appear in ICALP98.
Olivier Danvy, Robert Glück, and Peter Thiemann, editors. Dagstuhl Seminar on Partial Evaluation 1996, volume 1110 of Lecture Notes in Computer Science, Schloß Dagstuhl, Germany, February 1996. Springer-Verlag.
Olivier Danvy, Karoline Malmkjær, and Jens Palsberg. The essence of etaexpansion in partial evaluation. Lisp and Symbolic Computation, 8(3):209–227, July 1995.
Olivier Danvy, Karoline Malmkjær, and Jens Palsberg. Eta-expansion does The Trick. ACM Transactions on Programming Languages and Systems, 18(6):730–751, November 1996.
Olivier Danvy and Rene Vestergaard. Semantics-based compiling: A case study in type-directed partial evaluation. Doaitse Swierstra, editors. International Symposium on Programming Languages, Implementations, Logics and Programs (PLILP’ 96), volume 1140 of Lecture Notes in Computer Science, Aachen, Germany, September 1996. Springer-Verlag In Kuchen and Swierstra [33], pages 182–197.
Robert Glück and Jesper Jørgensen. An automatic program generator for multilevel specialization. Lisp and Symbolic Computation, 10(2):113–158, July 1997.
Robert Glück and Morten Heine Sørensen. A roadmap to metacomputation by supercompilation. Robert Glück, and Peter Thiemann, editors. Dagstuhl Seminar on Partial Evaluation 1996, volume 1110 of Lecture Notes in Computer Science, Schloß Dagstuhl, Germany, February 1996. Springer-Verlag In Danvy et al. [18], pages 137–160.
Carsten K. Gomard and Neil D. Jones. A partial evaluator for the untyped lambda-calculus. Journal of Functional Programming, 1(1):21–70, January 1991.
William L. Harrison and Samuel N. Kamin. Modular compilers based on monad transformers. In IEEE International Conference on Computer Languages, ICCL 1998, Chicago, USA, May 1998. IEEE Computer Society Press.
John Hatcliff and Olivier Danvy. A computational formalization for partial evaluation. Mathematical Structures in Computer Science, 7(5):507–542, 1997.
Fritz Henglein. Efficient type inference for higher-order binding-time analysis. In Hughes [30], pages 448–472.
Fritz Henglein. Dynamic typing: Syntax and proof theory. Science of Computer Programming, 22:197–230, 1994.
Carsten Kehler Holst. Finiteness analysis. In Hughes [30], pages 473–495.
John Hughes, editor. Functional Programming Languages and Computer Architecture, volume 523 of Lecture Notes in Computer Science, Cambridge, MA, 1991. Springer-Verlag.
Neil D. Jones, Carsten K. Gomard, and Peter Sestoft. Partial Evaluation and Automatic Program Generation. Prentice-Hall, 1993.
Neil D. Jones, Peter Sestoft, and Harald Søndergaard. An experiment in partial evaluation: The generation of a compiler generator. In J.-P. Jouannaud, editor, Rewriting Techniques and Applications, pages 124–140, Dijon, France, 1985. Springer-Verlag. LNCS 202.
Herbert Kuchen and Doaitse Swierstra, editors. International Symposium on Programming Languages, Implementations, Logics and Programs (PLILP’ 96), volume 1140 of Lecture Notes in Computer Science, Aachen, Germany, September 1996. Springer-Verlag.
John Launchbury and Carsten Kehler Holst. Handwriting cogen to avoid problems with static typing. In Draft Proceedings, Fourth Annual Gl asgow Workshop on Functional Programming, pages 210–218, Skye, Scotland, 1991. Glasgow University.
Julia L. Lawall and Peter Thiemann. Sound specialization in the presence of computational effects. In Proc. Theoretical Aspects of Computer Software, volume 1281 of Lecture Notes in Computer Science, pages 165–190, Sendai, Japan, September 1997. Springer-Verlag.
John C. Mitchell. Foundations for Programming Languages. MIT Press, 1996.
Flemming Nielson and Hanne Riis Nielson. Two-Level Functional Languages, volume 34 of Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, 1992.
Larry C. Paulson. Compiler generation from denotational semantics. In Bernhard Lorho, editor, Methods and Tools for Compiler Construction, pages 219–250. Cambridge University Press, 1984.
Proc. 23rd Annual ACM Symposium on Principles of Programming Languages, St. Petersburg, Fla., January 1996. ACM Press.
Morten Rhiger. A study in higher-order programming languages. Master’s thesis, University of Aarhus, Aarhus, Denmark, December 1997.
Tim Sheard. A type-directed, on-line, partial evaluator for a polymorphic language. In Charles Consel, editor, Proc. ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation PEPM’ 97, pages 22–35, Amsterdam, The Netherlands, June 1997. ACM Press.
Peter Thiemann. Cogen in six lines. In R. Kent Dybvig, editor, Proc. International Conference on Functional Programming 1996, pages 180–189, Philadelphia, PA, May 1996. ACM Press, New York.
Peter Thiemann. Correctness of a region-based binding-time analysis. In Proc. Mathematical Foundations of Programming Semantics, Thirteenth Annual Conference, volume 6 of Electronic Notes in Theoretical Computer Science, page 26, Pittsburgh, PA, March 1997. Carnegie Mellon University, Elsevier Science BV. URL: http://www.elsevier.nl/locate/entcs/volume6.html.
Peter Thiemann. A unified framework for binding-time analysis. In Michel Bidoit and Max Dauchet, editors, TAPSOFT’ 97: Theory and Practice of Software Development, volume 1214 of Lecture Notes in Computer Science, pages 742–756, Lille, France, April 1997. Springer-Verlag.
Peter Thiemann. Aspects of the pgg system: Specialization for standard scheme. In John Hatcliff, Torben Æ. Mogensen, and Peter Thiemann, editors, Partial Evaluation—Practice and Theory. Proceedings of the 1998 DIKU International Summerschool, Lecture Notes in Computer Science. Springer-Verlag, 1998.
Peter Thiemann. The PGG System-User Manual. University of Nottingham, Nottingham, England, June 1998. Available from ftp://ftp.informatik.uni-tuebingen.de/pub/PU/thiemann/software/pgg/.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1998 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Helsen, S., Thiemann, P. (1998). Two Flavors of Offine Partial Evaluation. In: Hsiang, J., Ohori, A. (eds) Advances in Computing Science ASIAN 98. ASIAN 1998. Lecture Notes in Computer Science, vol 1538. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-49366-2_15
Download citation
DOI: https://doi.org/10.1007/3-540-49366-2_15
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-65388-2
Online ISBN: 978-3-540-49366-2
eBook Packages: Springer Book Archive