{"title":"离散多态","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":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"1990-05-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"27","resultStr":"{\"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\":null,\"pages\":null},\"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}","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
摘要
多态分两种类型:参数型如ML和Girard-Reynolds二阶X-calculus 2X,离散型如Forsyth [Rey88]和Coppo-Dezani的X-calculus with intersection types, JX。乍一看,交叉类型可能看起来像是离散多态性的最终形式,因为所有可规范化的x表达式都是(适当地)可类型的。但是,在JX中为可规范化的x表达式获得的类型可能高度不一致。例如,如果P是表示一元数值函数f的x表达式,则Pii将可用于所有教会数字ii,但可能没有所有数字共有的类型T,因此P具有形式为r +…(见定理14)。因此,虽然交叉类型作为功能良好行为的保证人很好地服务,但对于每个单独的输入,它们并不是作为整个过程的功能良好行为的编译时检查的全能。我们在这里考虑一个具有无限类型int的学科JmX,我们为它概述了一个数学理论。这有几个好处:
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: