Skip to main content

Increasing the Level of Abstraction in Traditional Functional Languages by Using Compile-time Reflection

  • Conference paper
Algebraic Methodology and Software Technology (AMAST’93)

Part of the book series: Workshops in Computing ((WORKSHOPS COMP.))

  • 120 Accesses

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

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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.

    Google Scholar 

  2. J. Cockett and T. Fukushima. About Charity. The University of Calgary, Department of Computer Science, Research Report No. 92/480/18. June 1992.

    Google Scholar 

  3. O. Danvy. Three Steps for the CPS Transformation. Technical report CIS-92-02, Department of Computing and Information Sciences, Kansas State University, February 1992

    Google Scholar 

  4. 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.

    Google Scholar 

  5. 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.

    Google Scholar 

  6. T. Hagino. A Categorical Programming Language. PhD thesis, University of Edinburgh, 1987.

    Google Scholar 

  7. James Hook, Richard Kieburtz, and Tim Sheard. Generating Programs by Reflection. Oregon Graduate Institute Technical Report 92–015.

    Google Scholar 

  8. G. Malcolm. Homomorphisms and Promotability. In Mathematics of Program Construction, pp 335–347. Springer-Verlag, June 1989.

    Google Scholar 

  9. 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.

    Google Scholar 

  10. Eugenio Moggi. Notions of computations and monads. Information and Computation, 93(l):55–92, July 1991.

    Article  MATH  MathSciNet  Google Scholar 

  11. 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

    Google Scholar 

  12. 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.

    Google Scholar 

  13. M. Spivey. A Functional Theory of Exceptions. In Science of Computer Programming, 14:25–42, 1990.

    Article  MATH  Google Scholar 

  14. P. Wadler. Comprehending Monads. In Proc. 1990 ACM Conference on Lisp and Functional Programming, 61–78, 1990.

    Google Scholar 

  15. 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.

    Google Scholar 

  16. 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.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics