{"title":"Discrete polymorphism","authors":"D. Leivant","doi":"10.1145/91556.91675","DOIUrl":null,"url":null,"abstract":"Polymorphic typing comes in two flavors: parametric as in ML and in Girard-Reynolds’s second order X-calculus 2X, and discrete as in Forsyth [Rey88] and Coppo-Dezani’s X-calculus with intersection types, JX. At first blush, intersection types might look as the ultimate form of discrete polymorphism, since all normalizable X-expressions are (suitably) typable. However, the typings obtained in JX for normalizable X-expressions may be highly non-uniform. For instance, if P is a X-expression representing a unary numeric [unction f, then Pii will be typable for every Church numeral ii, but there may be no type T common to all numerals and such that P has a type of the form r + . . . (see Theorem 14 below). Thus, while intersection-types serve well a.s guarantor of functional well-behavior, for each individual input, they are not all-powerful as compile-time checks for the functional well-behavior of procedures as a whole. We consider here a discipline JmX with infinite type int,ersection, for which we outline a mathematical theory. This has several advantages:","PeriodicalId":409945,"journal":{"name":"LISP and Functional Programming","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1990-05-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"27","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"LISP and Functional Programming","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/91556.91675","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 27
Abstract
Polymorphic typing comes in two flavors: parametric as in ML and in Girard-Reynolds’s second order X-calculus 2X, and discrete as in Forsyth [Rey88] and Coppo-Dezani’s X-calculus with intersection types, JX. At first blush, intersection types might look as the ultimate form of discrete polymorphism, since all normalizable X-expressions are (suitably) typable. However, the typings obtained in JX for normalizable X-expressions may be highly non-uniform. For instance, if P is a X-expression representing a unary numeric [unction f, then Pii will be typable for every Church numeral ii, but there may be no type T common to all numerals and such that P has a type of the form r + . . . (see Theorem 14 below). Thus, while intersection-types serve well a.s guarantor of functional well-behavior, for each individual input, they are not all-powerful as compile-time checks for the functional well-behavior of procedures as a whole. We consider here a discipline JmX with infinite type int,ersection, for which we outline a mathematical theory. This has several advantages: