Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/73560.73563acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article
Free access

The essence of ML

Published: 13 January 1988 Publication History

Abstract

Standard ML is a useful programming language with polymorphic expressions and a flexible module facility. One notable feature of the expression language is an algorithm which allows type information to be omitted. We study the implicitly-typed expression language by giving a “syntactically isomorphic” explicitly-typed, polymorphic function calculus. Unlike the Girard-Reynolds polymorphic calculus, for example, the types of our ML calculus may be built-up by induction on type levels (universes). For this reason, the pure ML calculus has straightforward set-theoretic, recursion-theoretic and domain-theoretic semantics, and operational properties such as the termination of all recursion-free programs may be proved relatively simply. The signatures, structures, and functors of the module language are easily incorporated into the typed ML calculus, providing a unified framework for studying the major features of the language (including the novel “sharing constraints” on functor parameters). We show that, in a precise sense, the language becomes inconsistent if restrictions imposed by type levels are relaxed. More specifically, we prove that the important programming features of ML cannot be added to any impredicative language, such as the Girard-Reynolds calculus, without implicitly assuming a type of all types.

References

[1]
R. Amadio, K. Bruce, and G. Longo. The finitary projection model for second order lambda calculus and solutions to higher order domain, equations. In IEEE Symp. Logic in Computer Science, pages }22- 130, 1986.
[2]
H.P. Barendregt. The Lambda Calculus: Its Syntax and Semantics. North Holland, 198,i. (revised edition).
[3]
K. Bruce and A. Meyer. A completeness theorem for second-order polymorphic lambda calculus. In Proc. Int. Syrup. on Semantics of Data Types, Sophia- A ntipolis (France), Springer LNCS 173, pages 131-144., 1984.
[4]
K. B. Bruce, A. R. Meyer, and J. C. Mitchell. The semantics of second-order lambda calculus. Information and Computation, 1988. (to appear).
[5]
Constable et al. Implementing Mathematics with the NuprlProo} Development :~ystem. Volume 37 of Graduate Texts in Mathematics, Prentice-Hall, 1986.
[6]
L. Cardelli. The semantics of multiple inheritance. In G. Kahn, D. Mac- Queen, and G. P lotkin, editors, Semantics of Data Types, pages 51-67, Springer- Verlag, 1984.
[7]
R. Cartwright. Types as intervals. In Proc. 12-th A CM Symp. on Principles of Programming Languages, pages 22-36, January 1985.
[8]
T. Coquand and G. Huet. A theory of constructions. In Proc. Int. Symp. on Semantics of Data Types, Sophia-Antipolis (France), Springer LNCS 173, June 1984. Paper does not appear in proceedings.
[9]
T. Coquand. An analysis of girard's paradox. In Proc. IEEE Symp. on Logic in Computer Science, pages 227-236, June 1986.
[10]
L. Cardelli and P. Wegner. On understanding types, data abstraction, and polymorphism. Computing Surveys, 18(4), December 1986.
[11]
M. Coppo and M. Zacchi. Type inference and logical relations. In Proc. IEEE Syrup. on Logic in Computer Science, pages 218-226, June 1986.
[12]
N.G. De Bruijn. A survey of the project automath. In To H.B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism, pages 579-607, Academic Press, 1980.
[13]
L. Damas and R. Milner. Principal type schemes for functional programs. In 9-th A CM Symposium on Principles of Programming Languages, pages 207-212, 1982.
[14]
P. Freyd and A. Scedrov. Some semantic aspects of polymorphic lambda calculus. In IEEE Syrup. Logic in Computer Science, pages 315-319, June } 987.
[15]
J.-Y. Girard. Une extension de l'interpretation de G6del ~ l'analyse, et son application l'~limination des coupures dans l'analyse et la th@orie des types. In J.E. Fenstad, editor, 2nd Scandinavian Logic Symposium, pages 63-92, North-Holland, 1971.
[16]
J.-Y. Girard. Interpretation fonctionelte et elimination des coupures de l'arithmetique d'ordre superieur. These D'Etat, Universite Paris VII, }972.
[17]
M.J. Gordon, R. Milner, and C.P. Wadsworth. Edinburgh LCF. Volume 78 of Lecture Notes in Computer Science, Springer-Verlag, } 979.
[18]
M.J.C. Gordon. The Denotational Description of Programming Languages. Springer-Verlag, } 979.
[19]
J. Hook and D. Howe. lmpredicative strong existential equivalent to type:type. Technical Report TP~ 86-760, Cornell University 1986.
[20]
R. Harper, D.B. MacQueen, and R. Milnet. Standard ML. Technical Report ECS-LFCS-86-2, Laboratory for the Foundations of Computer Science, Edinburgh University, March }986.
[21]
R. Harper, R. Milner, and M. Tof~e. The Semantics of Standard ML. Technical Report ECS-LFCS-87-36, Laboratory for the Foundations of Computer Science, Edinburgh University, August 1987.
[22]
R. Harper, R. Milner, and M. Tofte. A type discipline for program modules. In TAPSOFT '87, Springer-Verlag, March 1987.
[23]
W. Howard. The formulas-as-types notion of construction. In To H.B. Curry: Essays on Combinatory Logic, Lambda- Calculus and Formalism, pages 479-490, Academic Press, 1980.
[24]
D.J. Howe. The computational behavior of girard's paradox. In IEEE Symp. Logic in Computer Science, pages 205- 214, June 1987.
[25]
D. Leivant. Polymorphic type inference. In Proc. l O-th A CM Symp. on Principles of Programming Languages, pages 88-98, 1983.
[26]
J. Lambek and P.j. Scott. Introduction to Higher-Order Categorical Logic. Cambridge studies in advanced mathematics 7, 1986.
[27]
S. MacLane. Categories for the Working Mathematician. Volume 5 of Graduate Texts in Mathematics, Springer-Verlag, 1971.
[28]
D.B. MacQueen. Modules for standard ml. Polymorphism, 2(2), 1985. 35 pages. An earlier version appeared in Proc. 1984 ACM Symp. on Lisp and Functional Programming.
[29]
D.B. MacQueen. Using dependent types to express modular structure. In Proc. 13-th A CM Syrup. on Principles of Programming Languages, 1986. To appear.
[30]
P. Martin-LSf. An intuitionistic theory of types: predicative part. In H. E. Rose and J. C. Shepherdson, editors, Logic Colloquium, '73, pages 73-118, North-Holland, Amsterdam, 1973.
[31]
P. Martin-LSf. Constructive mathematics and computer programming. In Sixth International Congress for Logic, Methodology, and Philosophy of Science, pages 153-175, North-Holland, Amsterdam, 1982.
[32]
N. McCracken. An Investigation of a Programming Language with a Polymorphic Type Structure. PhD thesis, Syracuse Univ., 1979.
[33]
R. Milner. Fully abstract models of typed lambda calculi. Theoretical Computer Science, 4 (1), 1977.
[34]
R. Milner. A theory of type polymorphism in programming. JCSS, 17, 1978. pages 348-375.
[35]
R. Milner. The standard ml core language. Polymorphism, 2(2), 1985. 28 pages. An earlier version appeared in Proc. 1984 ACM Symp. on Lisp and Functional Programming.
[36]
J.C. Mitchell. Representation independence and data abstraction. In Proc. 13- th A CM Symp. on Principles of Programming Languages, pages 263-276, January 1986.
[37]
J.C. Mitchell. A type-inference approach to reduction properties and semantics of polymo:rphic expressions. In A CM Conference on, LISP and Functional Programming, pages 308-3 9, August 1986.
[38]
J.C. Mitchell. Polymorphic type inference and contaimnent Information and Computation, 1987. To appear.
[39]
J.C. Mitchell and A.R. Meyer. Secondorder logical relations. In Logics of Programs, pages 225-236, Springer-Verlag LNCS 193, June 1985.
[40]
J.C. Mitchell and G.D. Plotkin. Abstract types have existential types. In Proc. 12- th A CM Syrup. on Principles of Programming Languages. pages 37-51, january 1985. Revised and expanded version to appear in ACM TOPLAS.
[41]
D. MacQueen, G P lotkin, and R. Sethi. An ideal model for recursive polymorphic types. Information and Control, 71 (1/2):95-130, 1986.
[42]
A.R. Meyer and M.B. Reinhold. Type is not a type. In Proc. 13-th A CM Symp. on Principles of Programrning Languages, pages 287-295, January 1986.
[43]
K. Mulmuley. A semantic characterization of full abstraction for typed lambda calculus. In Proc. 25-th IEEE Syrup. on Foundations of Computer Science, pages 279-288, 1984.
[44]
G.D. Plotkin. Call-by-name, call-byvalue, and the lambda calculus. Theoretical Computer Science, 1:125-159, } 975.
[45]
G.D. Plotkin. Lcf considered as a programming language. Theoretical Computer oczence, 1"3~ 1977.
[46]
J.C. R:eynolds.Towards a theory of type structure. In Paris Colloq. on Programming, pages 408-425, Springer- Verlag LNCS 19, 1974.
[47]
J.C. Reynolds. The essence of algol. In de Bakker and van Vliet, editors, Algorithmic Languages, pages 345-372, IFIP, North Holland, 1981.
[48]
J.C. Reynolds. Types, abstraction, and parametric polymorphism. In Information Processing '83, pages 513-523, North-Holland, Amsterdam, 1983.
[49]
J.C. Reynolds. Polymorphism is not settheoretic. In Proc. Int. Symp. on Semantics of Data Types, Sophia-A ntipolis (France), Springer LNCS 173, pages 145- 156, Springer-Verlag, 1984.
[50]
D.S. Scott. Relating theories of the lambda calculus. In To H.B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism, pages 403-450, Academic Press, 1980.
[51]
M. Solomon. Type definitions with parameters. In Proc. 5-th A CM Symp. on Principles of Programming Languages, pages 31-38, 1978.
[52]
R. Statman. Logical relations and the typed lambda calculus. Information and Control, 65:85-97, 1985.
[53]
A.S. Troelstra. Mathematical Investigation of Intuitionistic Arithmetic and Analysis. Volume 344 of Lecture Notes in Mathematics, Springer-Vertag, 1973.
[54]
M. Wand. A types-as-sets semantics for milner-style polymorphism. In Proc. 11- th A CM Syrup. on Principles of Programming Languages, pages 158-164, January 1984.

Cited By

View all
  • (2024)The Essence of the Flyweight Design PatternProceedings of the Workshop Dedicated to Jens Palsberg on the Occasion of His 60th Birthday10.1145/3694848.3694855(30-38)Online publication date: 22-Oct-2024
  • (2024)Gradient: Gradual Compartmentalization via Object Capabilities Tracked in TypesProceedings of the ACM on Programming Languages10.1145/36897518:OOPSLA2(1135-1161)Online publication date: 8-Oct-2024
  • (2024)Staged Compilation with Module FunctorsProceedings of the ACM on Programming Languages10.1145/36746498:ICFP(693-727)Online publication date: 15-Aug-2024
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '88: Proceedings of the 15th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
January 1988
329 pages
ISBN:0897912527
DOI:10.1145/73560
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 13 January 1988

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Conference

POPL88
POPL88: POPL'88 Symposium on Principles of Programming
January 10 - 13, 1988
California, San Diego, USA

Acceptance Rates

POPL '88 Paper Acceptance Rate 28 of 177 submissions, 16%;
Overall Acceptance Rate 824 of 4,130 submissions, 20%

Upcoming Conference

POPL '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)85
  • Downloads (Last 6 weeks)12
Reflects downloads up to 14 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2024)The Essence of the Flyweight Design PatternProceedings of the Workshop Dedicated to Jens Palsberg on the Occasion of His 60th Birthday10.1145/3694848.3694855(30-38)Online publication date: 22-Oct-2024
  • (2024)Gradient: Gradual Compartmentalization via Object Capabilities Tracked in TypesProceedings of the ACM on Programming Languages10.1145/36897518:OOPSLA2(1135-1161)Online publication date: 8-Oct-2024
  • (2024)Staged Compilation with Module FunctorsProceedings of the ACM on Programming Languages10.1145/36746498:ICFP(693-727)Online publication date: 15-Aug-2024
  • (2023)MacoCaml: Staging Composable and Compilable MacrosProceedings of the ACM on Programming Languages10.1145/36078517:ICFP(604-648)Online publication date: 31-Aug-2023
  • (2021)Logical Relations as Types: Proof-Relevant Parametricity for Program ModulesJournal of the ACM10.1145/347483468:6(1-47)Online publication date: 5-Oct-2021
  • (2020)The history of Standard MLProceedings of the ACM on Programming Languages10.1145/33863364:HOPL(1-100)Online publication date: 12-Jun-2020
  • (2019)A Refined Interpretation of Intuitionistic Logic by Means of Atomic PolymorphismStudia Logica10.1007/s11225-019-09858-1Online publication date: 27-Mar-2019
  • (2016)Turing's ‘Oracle’: From Absolute to Relative Computability and BackThe Once and Future Turing10.1017/CBO9780511863196.020(300-334)Online publication date: 5-Mar-2016
  • (2016)Oracles, Infinitary Computation, and the Physics of the MindThe Once and Future Turing10.1017/CBO9780511863196.019(297-299)Online publication date: 5-Mar-2016
  • (2014)A simple semantics for Haskell overloadingACM SIGPLAN Notices10.1145/2775050.263336449:12(107-118)Online publication date: 3-Sep-2014
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media