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 条
  • [1] POLYMORPHIC RECURSION AND SEMIUNIFICATION
    LEISS, H
    LECTURE NOTES IN COMPUTER SCIENCE, 1990, 440 : 211 - 224
  • [2] Visual Examples of Recursion
    Stephenson, Ben
    ITICSE 2009: PROCEEDING OF THE 2009 ACM SIGSE ANNUAL CONFERENCE ON INNOVATION AND TECHNOLOGY IN COMPUTER SCIENCE EDUCATION, 2009, : 400 - 400
  • [3] Simple semantics for polymorphic recursion
    Harrison, WL
    PROGRAMMING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2005, 3780 : 37 - 51
  • [4] TYPE INFERENCE WITH POLYMORPHIC RECURSION
    HENGLEIN, F
    ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1993, 15 (02): : 253 - 289
  • [5] RECURSION AND PROGRAMMING PRINCIPLES
    BERNSTEIN, S
    MICROCOMPUTING, 1982, 6 (04): : 28 - 28
  • [6] TYPE RECONSTRUCTION IN THE PRESENCE OF POLYMORPHIC RECURSION
    KFOURY, AJ
    TIURYN, J
    URZYCZYN, P
    ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1993, 15 (02): : 290 - 311
  • [7] LEARNING INTERATION AND RECURSION FROM EXAMPLES
    WIEDENBECK, S
    INTERNATIONAL JOURNAL OF MAN-MACHINE STUDIES, 1989, 30 (01): : 1 - 22
  • [8] RECURSION AND PROGRAMMING PRINCIPALS - REPLY
    WASSERMAN, K
    MICROCOMPUTING, 1982, 6 (04): : 28 - 29
  • [9] Recursion and iteration in computer programming
    Loeper, H
    ElGabali, M
    Neubert, P
    KUWAIT JOURNAL OF SCIENCE & ENGINEERING, 1996, 23 (02): : 153 - 180
  • [10] Recursion schemes for dynamic programming
    Kabanov, Jevgeni
    Vene, Varmo
    MATHEMATICS OF PROGRAM CONSTRUCTION, 2006, 4014 : 235 - 252