Type Inference for Bimorphic Recursion
Makoto Tatsuta (National Institute of Informatics), Ferruccio Damiani, (Universita di Torino)

TL;DR
This paper introduces bimorphic recursion, a restricted form of polymorphic recursion that allows assigning two types to recursive functions, providing flexible yet decidable type inference, with nesting leading to undecidability of typability.
Contribution
It defines bimorphic recursion with principal types and decidable inference, and analyzes its properties and limitations, including nesting effects.
Findings
Bimorphic recursion has principal types.
Type inference for bimorphic recursion is decidable.
Nested bimorphic recursion leads to undecidable typability.
Abstract
This paper proposes bimorphic recursion, which is restricted polymorphic recursion such that every recursive call in the body of a function definition has the same type. Bimorphic recursion allows us to assign two different types to a recursively defined function: one is for its recursive calls and the other is for its calls outside its definition. Bimorphic recursion in this paper can be nested. This paper shows bimorphic recursion has principal types and decidable type inference. Hence bimorphic recursion gives us flexible typing for recursion with decidable type inference. This paper also shows that its typability becomes undecidable because of nesting of recursions when one removes the instantiation property from the bimorphic recursion.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
