## Rank-2 Intersection and Polymorphic Recursion (2005)

### Cached

### Download Links

- [www.macs.hw.ac.uk]
- [www.di.unito.it]
- [www.di.unito.it]
- DBLP

### Other Repositories/Bibliography

Venue: | In TLCA’05, volume 2841 of LNCS |

Citations: | 3 - 0 self |

### BibTeX

@INPROCEEDINGS{Damiani05rank-2intersection,

author = {Ferruccio Damiani},

title = {Rank-2 Intersection and Polymorphic Recursion},

booktitle = {In TLCA’05, volume 2841 of LNCS},

year = {2005},

pages = {146--161},

publisher = {Springer}

}

### OpenURL

### Abstract

Let # be a rank-2 intersection type system. We say that a term is #-simple (or just simple when the system # is clear from the context) if system # can prove that it has a simple type. In this paper we propose new typing rules and algorithms that are able to type recursive definitions that are not simple. At the best of our knowledge, previous algorithms for typing recursive definitions in the presence of rank-2 intersection types allow only simple recursive definitions to be typed. The proposed rules are also able to type interesting examples of polymorphic recursion (i.e., recursive definitions rec {x = e} where di#erent occurrences of x in e are used with di#erent types). Moreover, the underlying techniques do not depend on particulars of rank-2 intersection, so they can be applied to other type systems.

### Citations

378 |
Towards a theory of type structure
- Reynolds
- 1974
(Show Context)
Citation Context ...ow different types to be assigned to different occurrences of a formal parameter in the body of a function. To overcome these limitations, various extensions of the ML system based on universal types =-=[7,19]-=-, intersection types [3,1], recursive types, and combinations of them, have been proposed in the literature. The system of rank-2 intersection types [16,20,23,13,6] is particularly interesting since i... |

299 | Interprétation fonctionelle et élimination des coupures de l’arithmétique d’ordre supérieur - Girard - 1972 |

221 |
A filter lambda model and the completeness of type assignment
- Barendregt, K
(Show Context)
Citation Context ...signed to different occurrences of a formal parameter in the body of a function. To overcome these limitations, various extensions of the ML system based on universal types [7,19], intersection types =-=[3,1]-=-, recursive types, and combinations of them, have been proposed in the literature. The system of rank-2 intersection types [16,20,23,13,6] is particularly interesting since it is able to type all ML p... |

212 | Abstract interpretation
- Cousot
- 1996
(Show Context)
Citation Context ...ncludes, on the one side, designing more expressive decidable extensions of systems ⊢ Pk+J 2 (we are investigating the possibility of integrating techniques from the theory of abstract interpretation =-=[4]-=-). On the other, verifying the applicability of the technique to other type systems, like the system with rank-2 universal and intersection types proposed in [21], System P [14], and System E [2]. Ack... |

141 | Type inference with polymorphic recursion
- Henglein
- 1993
(Show Context)
Citation Context ...careful to avoid such a pathological situation. Inferring types for polymorphic recursion (i.e., recursive definitions rec {x = e} where different occurrences of x in e are used with different types) =-=[17,18,10,15]-=- is a recurring topic on the mailing list of popular typed programming languages (see, e.g., [9] for a discussion of several examples). The rules proposed in this paper are able to type interesting ex... |

98 |
Polymorphic type schemes and recursive definitions
- Mycroft
- 1984
(Show Context)
Citation Context ...careful to avoid such a pathological situation. Inferring types for polymorphic recursion (i.e., recursive definitions rec {x = e} where different occurrences of x in e are used with different types) =-=[17,18,10,15]-=- is a recurring topic on the mailing list of popular typed programming languages (see, e.g., [9] for a discussion of several examples). The rules proposed in this paper are able to type interesting ex... |

96 | What are principal typings and what are they good for
- Jim
- 1996
(Show Context)
Citation Context ... ⊢ rec {f =e} : 〈{y : α2}; ((α1 →int→β1)∧(α2 →bool→β2)) → α1 list → (β1×β2) list〉. System ⊢ P 2 has more expressive power than the system ⊢2+(Rec)+(RecVac) of Section 5 (and therefore of system P R 2 =-=[13,12]-=-) and of the Milner-Mycroft system [18] (see also [17]), in the sense that the set of typable terms increases, and types express better the behaviour of terms. In particular, the following theorems ho... |

87 |
Polymorphic type inference
- Leivant
- 1983
(Show Context)
Citation Context ...ns of the ML system based on universal types [7,19], intersection types [3,1], recursive types, and combinations of them, have been proposed in the literature. The system of rank-2 intersection types =-=[16,20,23,13,6]-=- is particularly interesting since it is able to type all ML programs, has the principal pair property (a.k.a. principal typing property [13,22]), decidable type inference, and the complexity of type ... |

87 | The essence of principal typings
- Wells
- 2002
(Show Context)
Citation Context ...rature. The system of rank-2 intersection types [16,20,23,13,6] is particularly interesting since it is able to type all ML programs, has the principal pair property (a.k.a. principal typing property =-=[13,22]-=-), decidable type inference, and the complexity of type inference is of the same order as in ML. Intersection types are obtained from simple types [11] by adding the intersection type constructor ∧. A... |

55 |
Type reconstruction in the presence of polymorphic recursion
- Kfoury, Tiuryn, et al.
- 1993
(Show Context)
Citation Context ...careful to avoid such a pathological situation. Inferring types for polymorphic recursion (i.e., recursive definitions rec {x = e} where different occurrences of x in e are used with different types) =-=[17,18,10,15]-=- is a recurring topic on the mailing list of popular typed programming languages (see, e.g., [9] for a discussion of several examples). The rules proposed in this paper are able to type interesting ex... |

47 | Intersection Type Disciplines in Lambda Calculus and Applicative Term Rewriting Systems
- Bakel
- 1993
(Show Context)
Citation Context ...ns of the ML system based on universal types [7,19], intersection types [3,1], recursive types, and combinations of them, have been proposed in the literature. The system of rank-2 intersection types =-=[16,20,23,13,6]-=- is particularly interesting since it is able to type all ML programs, has the principal pair property (a.k.a. principal typing property [13,22]), decidable type inference, and the complexity of type ... |

26 | Rank 2 type systems and recursive definitions
- Jim
- 1993
(Show Context)
Citation Context ...cts like local definitions, conditional expressions, and recursive definitions without losing the extra information provided by rank-2 intersection is more difficult than one might expect (see, e.g., =-=[12,13,21,6]-=-). Definition 1 (⊢-simple terms). Let ⊢ be a rank-2 intersection type system. We say that a term is ⊢-simple (or just simple when the system ⊢ is clear from the context) if system ⊢ can prove that it ... |

25 | System E: Expansion variables for flexible typing with linear and non-linear types and intersection types
- Carlier, Polakow, et al.
- 2004
(Show Context)
Citation Context ...tion [4]). On the other, verifying the applicability of the technique to other type systems, like the system with rank-2 universal and intersection types proposed in [21], System P [14], and System E =-=[2]-=-. Acknowledgments. I thank Viviana Bono, Sebastien Carlier, Mario Coppo, Joe Hallet, Assaf Kfoury, Emiliano Leporati, Peter Møller Neergaard, and Joe Wells for discussions on the subject of this paper... |

15 |
An extension of the basic functionality theory for the lambda-calculus
- Coppo, Dezani-Ciancaglini
- 1980
(Show Context)
Citation Context ...signed to different occurrences of a formal parameter in the body of a function. To overcome these limitations, various extensions of the ML system based on universal types [7,19], intersection types =-=[3,1]-=-, recursive types, and combinations of them, have been proposed in the literature. The system of rank-2 intersection types [16,20,23,13,6] is particularly interesting since it is able to type all ML p... |

14 |
Basic Simple Type Theory. Number 42
- Hindley
- 1997
(Show Context)
Citation Context ...ir property (a.k.a. principal typing property [13,22]), decidable type inference, and the complexity of type inference is of the same order as in ML. Intersection types are obtained from simple types =-=[11]-=- by adding the intersection type constructor ∧. A term has type u1 ∧ u2 (u1 intersection u2) if it has both type u1 and type u2. For example, the identity function λx.x has both type int → int and boo... |

11 | Rank 2 intersection types for local definitions and conditional expressions
- Damiani
(Show Context)
Citation Context ...ns of the ML system based on universal types [7,19], intersection types [3,1], recursive types, and combinations of them, have been proposed in the literature. The system of rank-2 intersection types =-=[16,20,23,13,6]-=- is particularly interesting since it is able to type all ML programs, has the principal pair property (a.k.a. principal typing property [13,22]), decidable type inference, and the complexity of type ... |

11 |
A polar type system
- Jim
- 2000
(Show Context)
Citation Context ...abstract interpretation [4]). On the other, verifying the applicability of the technique to other type systems, like the system with rank-2 universal and intersection types proposed in [21], System P =-=[14]-=-, and System E [2]. Acknowledgments. I thank Viviana Bono, Sebastien Carlier, Mario Coppo, Joe Hallet, Assaf Kfoury, Emiliano Leporati, Peter Møller Neergaard, and Joe Wells for discussions on the sub... |

9 |
Principal type-schemas for functional programs
- Damas, Milner
- 1982
(Show Context)
Citation Context ... the underlying techniques do not depend on particulars of rank-2 intersection, so they can be applied to other type systems. 1 Introduction The Hindley-Milner type system (a.k.a. the ML type system) =-=[5]-=-, which is the core of the type systems of modern functional programming languages (like SML, OCaml, and Haskell), has several limitations that prevent safe programs from being typed. In particular, i... |

7 |
Incremental Polymorphic Type Checking in B
- Meertens
- 1983
(Show Context)
Citation Context |

6 | Programming examples needing polymorphic recursion
- Hallett, Kfoury
- 2004
(Show Context)
Citation Context ... definitions rec {x = e} where different occurrences of x in e are used with different types) [17,18,10,15] is a recurring topic on the mailing list of popular typed programming languages (see, e.g., =-=[9]-=- for a discussion of several examples). The rules proposed in this paper are able to type interesting examples of polymorphic recursion. So, besides providing a solution to the problem of finding deci... |

6 |
Embedding a second-order type system into an intersection type system
- Yokouchi
- 1995
(Show Context)
Citation Context |

2 | Properties of a type abstract interpreter
- Gori, Levi
- 2003
(Show Context)
Citation Context ...power between the let-free fragments of the ML sys⊢ Pk+ML 0 tem and of the Milner-Mycroft system — we believe that the systems ⊢ Pk+ML 0 correspond to the family of abstract interpreters described in =-=[8]-=-. Further work includes, on the one side, designing more expressive decidable extensions of systems ⊢ Pk+J 2 (we are investigating the possibility of integrating techniques from the theory of abstract... |

2 | Rank 2 types for term graph rewriting
- Bakel
(Show Context)
Citation Context ...cts like local definitions, conditional expressions, and recursive definitions without losing the extra information provided by rank-2 intersection is more difficult than one might expect (see, e.g., =-=[12,13,21,6]-=-). Definition 1 (⊢-simple terms). Let ⊢ be a rank-2 intersection type system. We say that a term is ⊢-simple (or just simple when the system ⊢ is clear from the context) if system ⊢ can prove that it ... |