{"title":"贪心双向多态","authors":"Jana Dunfield","doi":"10.1145/1596627.1596631","DOIUrl":null,"url":null,"abstract":"Bidirectional typechecking has become popular in advanced type systems because it works in many situations where inference is undecidable. In this paper, I show how to cleanly handle parametric polymorphism in a bidirectional setting. The key contribution is a bidirectional type system for a subset of ML that supports first-class (higher-rank and even impredicative) polymorphism, and is complete for predicative polymorphism (including ML-style polymorphism and higher-rank polymorphism). The system's power comes from bidirectionality combined with a \"greedy\" method of finding polymorphic instances inspired by Cardelli's early work on System F:. This work demonstrates that bidirectionality is a good foundation for traditionally vexing features like first-class polymorphism.","PeriodicalId":218033,"journal":{"name":"Proceedings of the 2009 ACM SIGPLAN workshop on ML","volume":"72 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2009-08-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"14","resultStr":"{\"title\":\"Greedy bidirectional polymorphism\",\"authors\":\"Jana Dunfield\",\"doi\":\"10.1145/1596627.1596631\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Bidirectional typechecking has become popular in advanced type systems because it works in many situations where inference is undecidable. In this paper, I show how to cleanly handle parametric polymorphism in a bidirectional setting. The key contribution is a bidirectional type system for a subset of ML that supports first-class (higher-rank and even impredicative) polymorphism, and is complete for predicative polymorphism (including ML-style polymorphism and higher-rank polymorphism). The system's power comes from bidirectionality combined with a \\\"greedy\\\" method of finding polymorphic instances inspired by Cardelli's early work on System F:. This work demonstrates that bidirectionality is a good foundation for traditionally vexing features like first-class polymorphism.\",\"PeriodicalId\":218033,\"journal\":{\"name\":\"Proceedings of the 2009 ACM SIGPLAN workshop on ML\",\"volume\":\"72 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2009-08-30\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"14\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 2009 ACM SIGPLAN workshop on ML\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/1596627.1596631\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 2009 ACM SIGPLAN workshop on ML","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1596627.1596631","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Bidirectional typechecking has become popular in advanced type systems because it works in many situations where inference is undecidable. In this paper, I show how to cleanly handle parametric polymorphism in a bidirectional setting. The key contribution is a bidirectional type system for a subset of ML that supports first-class (higher-rank and even impredicative) polymorphism, and is complete for predicative polymorphism (including ML-style polymorphism and higher-rank polymorphism). The system's power comes from bidirectionality combined with a "greedy" method of finding polymorphic instances inspired by Cardelli's early work on System F:. This work demonstrates that bidirectionality is a good foundation for traditionally vexing features like first-class polymorphism.