Skip to main content

First-Class Contexts in ML

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1538))

Abstract

This paper develops an ML-style programming language with first-class contexts i.e, expressions with holes. A programming language with first-class contexts can provide various advanced features such as macros, distributed programming and linking modules. A possibility of such a programming language was shown by the theory of simply typed context calculus developed by Hashimoto and Ohori. This paper extends the simply typed system of the context calculus to an ML-style polymorphic type system, and gives an operational semantics and a sound and complete type inference algorithm

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

Buying options

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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Martín Abadi, Luca Cardelli, Pierre-Louis Curien, and Jean-Jacques Lèvy. Explicit substitutions. In Conference Record of the Seventeenth Annual ACM Symposium on Principles of Programming Languages, San Francisco, California, pages 31–46. ACM, January 1990. Also Digital Equipment Corporation, Systems Research Center, Research Report 54, February 1990.

    Google Scholar 

  2. Hassan Aït-Kaci and Jacques Garrigue. Label-selective λ-calculus syntax and conuence. In R. K. Shyamasundar, editor, Foundations of Software Technology and Theoretical Computer Science, volume 761 of Lecture Notes in Computer Science, pages 24–40. Springer-Verlag, October 1993.

    Google Scholar 

  3. L. Damas and R. Milner. Principal type-schemes for functional programs. In Proc. ACM Symposium on Principles of Programming Languages, pages 207–212, 1982.

    Google Scholar 

  4. Laurent Dami. A lambda-calculus for dynamic binding. to appear in Theoretical Computer Science, 192(2), February 1998. special issue on Coordination.

    Google Scholar 

  5. R. Davies and F. Pfenning. A modal analysis of staged computation. In Conference Record of Symposium on Principles of Programming Languages, pages 258–270, 1996.

    Google Scholar 

  6. Jacques Garrigue and Didier Rémy. Extending ML with semi-explicit higher order polymorphism. In Proceedings of the International Symposium on Theoretical Aspects of Computer Software, number 1281 in LNCS, pages 20–46, Sendai, Japan, September 1997. Springer-Verlag.

    Chapter  Google Scholar 

  7. R. Harper and B. Pierce. A record calculus based on symmetric concatenation. In Proc. ACM Symposium on Principles of Programming Languages, 1991.

    Google Scholar 

  8. Masatomo Hashimoto and Atsushi Ohori. A typed Context Calculus. Preprint 1098, Research Institute for Mathematical Sciences, Kyoto, Japan, 1996. Also available from http://www.kurims.kyoto-u.ac.jp/~masatomo/.

    Google Scholar 

  9. G. Kahn. Natural semantics. In Proc. Symposium on Theoretical Aspects of Computer Science, pages 22–39. Springer Verlag, 1987.

    Google Scholar 

  10. E. Kohlbecker, D. P. Friedman, M. Felleisen, and B. Duba. Hygienic macro expansion. In Proceedings of the 1986 ACM Conference on Lisp and Functional Programming, pages 151–159, 1986.

    Google Scholar 

  11. Shin-Der Lee and Daniel Friedman. Enriching the Lambda Calculus with Contexts: Towards A Theory of Incremental Program Construction. In Proceedings of International Conference on Functional Programming, ACMSIGPLAN notices, pages 239–250, 1996.

    Google Scholar 

  12. D. Rémy. Typing Record Concatenation for Free. In Proc. ACM Symposium on Principles of Programming Languages, pages 166–176, 1992.

    Google Scholar 

  13. D. Rémy. Type Inference for Records in a Natural Extension of ML. In C.A Gunter and J.C. Mitchell, editors, Theoretical Aspects of Object-Oriented Programming, pages 67–96. MIT Press, 1994.

    Google Scholar 

  14. Didier Rémy. Extending ML type system with a sorted equational theory. Research Report 1766, Institut National de Recherche en Informatique et Automatisme, Rocquencourt, BP 105, 78 153 Le Chesnay Cedex, France, 1992.

    Google Scholar 

  15. Didier Rémy. Syntactic theories and the algebra of record terms. Research Report 1869, Institut National de Recherche en Informatique et Automatisme, Rocquencourt, BP 105, 78 153 Le Chesnay Cedex, France, 1992.

    Google Scholar 

  16. M. Wand. Type inference for records concatenation and simple objects. In Proceedings of 4th IEEE Symposium on Logic in Computer Science, pages 92–97, 1989.

    Google Scholar 

  17. Philip Wickline, Peter Lee, and Frank Pfenning. Run-time code generation and Modal-ML. In Proceedings of the ACM SIGPLAN’98 Conference on Programming Language Design and Implementation (PLDI), pages 224–235, Montreal, Canada, 17–19 June 1998.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1998 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Hashimoto, M. (1998). First-Class Contexts in ML. 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_16

Download citation

  • DOI: https://doi.org/10.1007/3-540-49366-2_16

  • 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

Publish with us

Policies and ethics