Hostname: page-component-78c5997874-xbtfd Total loading time: 0 Render date: 2024-11-15T02:04:09.602Z Has data issue: false hasContentIssue false

Principal signatures for higher-order program modules

Published online by Cambridge University Press:  07 November 2008

Mads Tofte
Affiliation:
Department of Computer Science, University of Copenhagen, Denmark
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

In this paper we present a language for programming with higher-order modules. The language HML is based on Standard ML in that it provides structures, signatures and functors. In HML, functors can be declared inside structures and specified inside signatures; this is not possible in Standard ML. We present an operational semantics for the static semantics of HML signature expressions, with particular emphasis on the handling of sharing. As a justification for the semantics, we prove a theorem about the existence of principal signatures. This result is closely related to the existence of principal type schemes for functional programming languages with polymorphism.

Type
Research Article
Copyright
Copyright © Cambridge University Press 1994

References

Aït-Kaci, H. (1986) An algebraic semantics approach to the effective resolution of type equations. Theoretical Comput. Sci., 45(3): 293351.CrossRefGoogle Scholar
Aponte, M. V. (1992) Typage d'un système de modules paramétriques avec partage: une application de l'unification dans les théories équationnelles. PhD thesis, INRIA, University of Paris VII, France.Google Scholar
Aponte, M. V. (1993) Extending record typing to type parametric modules with sharing. In: Proc. 20th ACM Symp. on Principles of Program. Lang. (POPL), pp. 465478.CrossRefGoogle Scholar
Damas, L. and Milner, R. (1982) Principal type schemes for functional programs. In: Proc. 9th Ann. ACM Symp. on Principles of Program. Lang. (POPL), pp. 207212.CrossRefGoogle Scholar
Harper, R., Mitchell, J. and Moggi, E. (1990) Higher-order modules and the phase distinction. In: Proc. ACM Symp. on Principles of Program. Lang. (POPL), pp. 341354.CrossRefGoogle Scholar
Harper, R., Milner, R. and Tofte, M. (1987) A type discipline for program modules. In: Proc. Int. Joint Conf. on Theory and Practice of Software Development (TAPSOFT), Lecture Notes in Computer Science 250,Springer, pp. 308319.CrossRefGoogle Scholar
MacQueen, D. B. (1984) Modules for Standard ML. In: Conf. Record ACM Symp. on LISP and Functional Program., pp. 198207.CrossRefGoogle Scholar
Milner, R. (1978) A theory of type polymorphism in programming. J. Computer and System Sci., 17: 348375.CrossRefGoogle Scholar
Milner, R. and Tofte, M. (1991) Commentary on Standard ML, MIT Press.Google Scholar
Milner, R., Tofte, M. and Harper, R. (1990) The Definition of Standard ML, MIT Press.Google Scholar
Rémy, D. (1989) Typechecking records and variants in a natural extension of ML. In: Proc. 16th Ann. ACM Symp. on Principles of Program. Lang.(POPL), pp. 7788.Google Scholar
Tofte, M. (1988) Operational semantics and polymorphic type inference. PhD thesis, Department of Computer Science, Edinburgh University. (Also available as Technical Report CST-52-88.)Google Scholar
Wand, M. (1989) Type inference for record concatenation and multiple inheritance. In: Proc. IEEE 4th Ann. Symp. on Logic in Comput. Sci. (LICS),IEEE Press, pp. 9297.CrossRefGoogle Scholar
Submit a response

Discussions

No Discussions have been published for this article.