Programming Examples Needing Polymorphic Recursion

被引:2
|
作者
Hallett, J. J. [1 ]
Kfoury, A. J. [1 ]
机构
[1] Boston Univ, Dept Comp Sci, Boston, MA 02215 USA
关键词
polymorphic recursion; intersection types; finitary polymorphism; examples;
D O I
10.1016/j.entcs.2005.06.014
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Inferring types for polymorphic recursive function definitions (abbreviated to polymorphic recursion) is a recurring topic on the mailing lists of popular typed programming languages. This is despite the fact that type inference for polymorphic recursion using for all-types has been proved undecidable. This report presents several programming examples involving polymorphic recursion and determines their typability under various type systems, including the Hindley-Milner system, an intersection-type system, and extensions of these two. The goal of this report is to show that many of these examples are typable using a system of intersection types as an alternative form of polymorphism. By accomplishing this, we hope to lay the foundation for future research into a decidable intersection-type inference algorithm. We do not provide a comprehensive survey of type systems appropriate for polymorphic recursion, with or without type annotations inserted in the source language. Rather, we focus on examples for which types may be inferred without type annotations, with an emphasis on systems of intersectiontypes.
引用
收藏
页码:57 / 102
页数:46
相关论文
共 50 条
  • [21] On typability for rank-2 intersection types with polymorphic recursion
    Terauchi, Tachio
    Aiken, Alex
    21ST ANNUAL IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE, PROCEEDINGS, 2006, : 111 - +
  • [22] Programming and Reasoning with Guarded Recursion for Coinductive Types
    Clouston, Ranald
    Bizjak, Ales
    Grathwohl, Hans Bugge
    Birkedal, Lars
    FOUNDATIONS OF SOFTWARE SCIENCE AND COMPUTATION STRUCTURES (FOSSACS 2015), 2015, 9034 : 407 - 421
  • [23] Recursion in tree-based genetic programming
    Agapitos, Alexandros
    O'Neill, Michael
    Kattan, Ahmed
    Lucas, Simon M.
    GENETIC PROGRAMMING AND EVOLVABLE MACHINES, 2017, 18 (02) : 149 - 183
  • [24] CORRECT AND OPTIMAL IMPLEMENTATIONS OF RECURSION IN A SIMPLE PROGRAMMING LANGUAGE
    VUILLEMIN, J
    JOURNAL OF COMPUTER AND SYSTEM SCIENCES, 1974, 9 (03) : 332 - 354
  • [25] APPROXIMATION OF STOCHASTIC-PROGRAMMING PROBLEM WITH COMPLETE RECURSION
    LEPP, RE
    DOKLADY AKADEMII NAUK SSSR, 1989, 305 (06): : 1307 - 1310
  • [26] Diamonds are not forever: Liveness in reactive programming with guarded recursion
    Bahr, Patrick
    Graulund, Christian Uldal
    Møgelberg, Rasmus Ejlers
    Proceedings of the ACM on Programming Languages, 2021, 5 (POPL)
  • [27] Socratic-dialectic learning system of recursion programming
    Chang, KE
    Lin, PC
    Sung, YT
    Chen, SW
    JOURNAL OF EDUCATIONAL COMPUTING RESEARCH, 2000, 23 (02) : 133 - 150
  • [28] Game Semantics for a Polymorphic Programming Language
    Laird, J.
    25TH ANNUAL IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE (LICS 2010), 2010, : 41 - 49
  • [29] EFFECTS OF EXAMPLES AND THEIR EXPLANATIONS IN A LESSON ON RECURSION - A PRODUCTION SYSTEM-ANALYSIS
    PIROLLI, P
    COGNITION AND INSTRUCTION, 1991, 8 (03) : 207 - 259
  • [30] A Polymorphic Type System in Logic Programming
    Li Huiqi
    Zhao Zhizhuo
    2008 3rd International Conference on Intelligent System and Knowledge Engineering, Vols 1 and 2, 2008, : 125 - 130