{"title":"Type inference by program transformation and partial evaluation","authors":"T.W. Fruwirth","doi":"10.1109/ICCL.1988.13083","DOIUrl":null,"url":null,"abstract":"A simple yet powerful metaprogramming method to derive type information from Prolog programs is proposed. Prolog itself is used to represent the type information, so no special language for types is necessary. Metaprogramming techniques also manipulate the types derived. A kind of program transformation, called type projection, infers type information expressed in Prolog. The inferred type procedures can be used to check the consistency of the program and in some cases, even to generate instances of the type. The author defines a nonredundant standard representation of a type. The standardization algorithm is an adaptation of partial evaluation. He extends type projection by partial evaluation to derive more precise types. For the first time, a part of the type information inherent in negated goals is utilized. Type negation is introduced.<<ETX>>","PeriodicalId":219766,"journal":{"name":"Proceedings. 1988 International Conference on Computer Languages","volume":"13 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1988-10-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"14","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings. 1988 International Conference on Computer Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICCL.1988.13083","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 14
Abstract
A simple yet powerful metaprogramming method to derive type information from Prolog programs is proposed. Prolog itself is used to represent the type information, so no special language for types is necessary. Metaprogramming techniques also manipulate the types derived. A kind of program transformation, called type projection, infers type information expressed in Prolog. The inferred type procedures can be used to check the consistency of the program and in some cases, even to generate instances of the type. The author defines a nonredundant standard representation of a type. The standardization algorithm is an adaptation of partial evaluation. He extends type projection by partial evaluation to derive more precise types. For the first time, a part of the type information inherent in negated goals is utilized. Type negation is introduced.<>