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
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
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.
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.
L. Damas and R. Milner. Principal type-schemes for functional programs. In Proc. ACM Symposium on Principles of Programming Languages, pages 207–212, 1982.
Laurent Dami. A lambda-calculus for dynamic binding. to appear in Theoretical Computer Science, 192(2), February 1998. special issue on Coordination.
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.
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.
R. Harper and B. Pierce. A record calculus based on symmetric concatenation. In Proc. ACM Symposium on Principles of Programming Languages, 1991.
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/.
G. Kahn. Natural semantics. In Proc. Symposium on Theoretical Aspects of Computer Science, pages 22–39. Springer Verlag, 1987.
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.
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.
D. Rémy. Typing Record Concatenation for Free. In Proc. ACM Symposium on Principles of Programming Languages, pages 166–176, 1992.
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.
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.
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.
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.
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.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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