{"title":"无类型函数程序的部分类型推断","authors":"C. K. Gomard","doi":"10.1145/91556.91672","DOIUrl":null,"url":null,"abstract":"This extended abstract describes a way of inferring as much type information as possible about programs written in an untyped programming language. We present an algorithm that underlines the untypable parts of a program and assigns types to the rest. The algorithm is derived in a very simple manner from the well-known algorithm W of Damas & Milner [Damas and Milner 1982].\nOur algorithm provides us with an easy solution to the problem of doing binding time analysis of the untyped higher order lambda calculus, and thereby of the wide range of programming languages based upon the lambda calculus. The techniques can also be used to eliminate superfluous runtime type checking in untyped functional languages, to produce better error messages from type analyzers for strongly typed languages, and to analyze feasibility of arity raising.","PeriodicalId":409945,"journal":{"name":"LISP and Functional Programming","volume":"15 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1990-05-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"69","resultStr":"{\"title\":\"Partial type inference for untyped functional programs\",\"authors\":\"C. K. Gomard\",\"doi\":\"10.1145/91556.91672\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"This extended abstract describes a way of inferring as much type information as possible about programs written in an untyped programming language. We present an algorithm that underlines the untypable parts of a program and assigns types to the rest. The algorithm is derived in a very simple manner from the well-known algorithm W of Damas & Milner [Damas and Milner 1982].\\nOur algorithm provides us with an easy solution to the problem of doing binding time analysis of the untyped higher order lambda calculus, and thereby of the wide range of programming languages based upon the lambda calculus. The techniques can also be used to eliminate superfluous runtime type checking in untyped functional languages, to produce better error messages from type analyzers for strongly typed languages, and to analyze feasibility of arity raising.\",\"PeriodicalId\":409945,\"journal\":{\"name\":\"LISP and Functional Programming\",\"volume\":\"15 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1990-05-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"69\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"LISP and Functional Programming\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/91556.91672\",\"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.91672","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Partial type inference for untyped functional programs
This extended abstract describes a way of inferring as much type information as possible about programs written in an untyped programming language. We present an algorithm that underlines the untypable parts of a program and assigns types to the rest. The algorithm is derived in a very simple manner from the well-known algorithm W of Damas & Milner [Damas and Milner 1982].
Our algorithm provides us with an easy solution to the problem of doing binding time analysis of the untyped higher order lambda calculus, and thereby of the wide range of programming languages based upon the lambda calculus. The techniques can also be used to eliminate superfluous runtime type checking in untyped functional languages, to produce better error messages from type analyzers for strongly typed languages, and to analyze feasibility of arity raising.