Advertisement

First-Class Contexts in ML

  • Masatomo Hashimoto
Conference paper
Part of the Lecture Notes in Computer Science book series (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

Keywords

Operational Semantic Type Scheme Type Inference Context Type Type Soundness 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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. 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. 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. 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. 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. 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.CrossRefGoogle Scholar
  7. 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. 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. 9.
    G. Kahn. Natural semantics. In Proc. Symposium on Theoretical Aspects of Computer Science, pages 22–39. Springer Verlag, 1987.Google Scholar
  10. 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. 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. 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. 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. 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. 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. 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. 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

Copyright information

© Springer-Verlag Berlin Heidelberg 1998

Authors and Affiliations

  • Masatomo Hashimoto
    • 1
  1. 1.Research Institute for Mathematical SciencesKyoto UniversityKyotoJapan

Personalised recommendations