Abstract
We show how application of commutative-like laws can improve binding time properties. The quality of residual programs obtained by partial evaluation depends crucially on the binding time properties of the source program. Likewise does the sharing obtained by full laziness depend on the binding time properties of the program. This paper suggest that the commutative-like laws, derivable from the types of polymorphic functions using the “free theorems” approach, gives rise to a large set of non-trivial binding time improving transformations. The paper runs through a number of examples and shows how these laws can be applied in a rather systematic way to achieve binding time improvements. Ultimately it is our hope to automate the derivation and application of these binding time improving transformations.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Charles Consel and Olivier Danvy. Partial evaluation of pattern matching in strings. Information Processing Letters, 30 (2): 79–86, January 1959.
R. John M. Hughes. The Design and Implementation of Programming Languages. PhD thesis, Oxford, 1984.
Neil D. Jones, Carsten K. Cornard, Anders Bondorf, Olivier Danvier, and Tor-ben Æ. Mogensen. A self-applicable partial evaluator for the lambda-calculus. In 1990 Interational Conference on Computer Languages. IEEE computer Society, 1990.
Neil D. Jones, Peter A. Sestoft, and Harald SOndergaard. Mix: A self-applicable partial evaluator for experiments in compiler generation. Lisp and Symbolic Computation, 2 (1): 9–50, 1989.
Torben Æ. Mogensen. Partially static structures in a self-applicable partial evaluator. In A.P. Ershov D. Bjprner and N.D. Jones, editors, Partial Evaluation and Mixed Computation, pages 325–347. North-Holland, 1988.
Torben Æ. Mogensen. Separating binding times in language specifications. In Functional Programming Languages and Computer Architecture, 1989.
Hanne Riis Nielson and Flemming Nielson. Eureka definitions for free! or disagreement points for fold/unfold transformations. In Neil D. Jones, editor, ESOP ‘80 3rd European Symposium on Programming, volume 432 of Lecture Notes in Computer Science, pages 291–305, Copenhagen, Denmark, May 1990. Springer-Verlag.
John C. Reynolds. Types, abstraction, and parametric polymorphism. In R. E. A. Mason, editor, Information Processing 83, pages 513–523, Amsterdam, 1983. North-Holland.
S.A. Romanenko. A compiler generator produced by a self-applicable specializer can have a surprisingly natural and understandable structure. In A.P. Ershov D. Bj9rner and N.D. Jones, editors, Partial Evaluation and Mixed Computation, pages 445–463. North-Holland, 1988.
Philip Wadler. Theorems for free! In Functional Programming Languages and Computer Architectures,pages 347–359, London, September 1989. ACM.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1991 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Holst, C.K., Hughes, J. (1991). Towards Binding-Time Improvement for Free. In: Jones, S.L.P., Hutton, G., Holst, C.K. (eds) Functional Programming, Glasgow 1990. Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3810-5_8
Download citation
DOI: https://doi.org/10.1007/978-1-4471-3810-5_8
Publisher Name: Springer, London
Print ISBN: 978-3-540-19667-9
Online ISBN: 978-1-4471-3810-5
eBook Packages: Springer Book Archive