Abstract
Abstraction is the key to reuse in software technology. Traditional functional languages support greater levels of abstraction than imperative languages, yet cannot express certain new kinds of abstraction recently identified. In this paper we report on a simple technique we call Compile-time Reflection and show how this technique can be added to traditional functional languages by the addition of an explicit user programmable phase distinction in their compilation. This distinction implements the 2-level λ-Calculus of Nielson and Nielson[11], and supports the algebraic approach to programming exemplified in the Squigol school of programming, all in a traditional functional language.
Tim Sheard is supported in part by a grant from OACIS and Tektronix
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
J. Cockett and D. Spencer. Strong Categorical Datatypes I. In R. Seely, editor, International Meeting on Category Theory 1991,Canadian Mathematical Society Proceedings, Vol. 13, pp 141–169. AMS, Montreal, 1992.
J. Cockett and T. Fukushima. About Charity. The University of Calgary, Department of Computer Science, Research Report No. 92/480/18. June 1992.
O. Danvy. Three Steps for the CPS Transformation. Technical report CIS-92-02, Department of Computing and Information Sciences, Kansas State University, February 1992
L. Fegaras. A Transformational Approach to Database System Implementation.PhD thesis, Department of Computer Science, University of Massachusetts, Amherst, February 1993. Also appeared as CMPSCI Technical Report 92–68.
L. Fegaras, T. Sheard, and D. Stemple. Uniform Traversal Combinators: Definition, Use and Properties. In Proceedings of the 11th International Conference on Automated Deduction (CADE-11), Saratoga Springs, New York, pp 148–162. Springer-Verlag, June 1992.
T. Hagino. A Categorical Programming Language. PhD thesis, University of Edinburgh, 1987.
James Hook, Richard Kieburtz, and Tim Sheard. Generating Programs by Reflection. Oregon Graduate Institute Technical Report 92–015.
G. Malcolm. Homomorphisms and Promotability. In Mathematics of Program Construction, pp 335–347. Springer-Verlag, June 1989.
E. Meijer, M. Fokkinga, and R. Paterson. Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire. In Proceedings of the 5th ACM Conference on Functional Programming Languages and Computer Architecture, Cambridge, Massachusetts, pp 124–144, August 1991.
Eugenio Moggi. Notions of computations and monads. Information and Computation, 93(l):55–92, July 1991.
F. Nielson. aand H.R. Nielson. Two-Level Functional Languages. Cambridge Tracts in Theoretical Computer Science 34. 1992 Cambridge University Press, Cambride CB2 1RP, UK
T. Sheard. and L. Fegaras. A Fold for All Seasons. In Conference on Functional Programming Languages and Computer Architecture,Copenhagen, pp 233–242, June 1993.
M. Spivey. A Functional Theory of Exceptions. In Science of Computer Programming, 14:25–42, 1990.
P. Wadler. Comprehending Monads. In Proc. 1990 ACM Conference on Lisp and Functional Programming, 61–78, 1990.
Philip Wadler. The essence of functional programming. In Conference Record of the Nineteenth Annual ACM Symposium on Principles of Programming Languages. ACM Press, January 1992.
G. C. Wraith. A note on categorical datatypes. In D. H. Pitt, D. E. Ry-deheard, P. Dybjer, A. M. Pitts, and A. Poigné, editors, Category Theory and Computer Science, volume 389 of Lecture Notes in Computer Science, pages 118, 127. Springer-Verlag, 1989.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1994 British Computer Society
About this paper
Cite this paper
Sheard, T. (1994). Increasing the Level of Abstraction in Traditional Functional Languages by Using Compile-time Reflection. In: Nivat, M., Rattray, C., Rus, T., Scollo, G. (eds) Algebraic Methodology and Software Technology (AMAST’93). Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3227-1_13
Download citation
DOI: https://doi.org/10.1007/978-1-4471-3227-1_13
Publisher Name: Springer, London
Print ISBN: 978-3-540-19852-9
Online ISBN: 978-1-4471-3227-1
eBook Packages: Springer Book Archive