Modular Inference of Linear Types for Multiplicity-Annotated Arrows
Kazutaka Matsuda

TL;DR
This paper introduces a formal inference system for a linear type system with multiplicity annotations, enabling principal type inference and addressing ambiguity issues in higher-order functions.
Contribution
It formalizes a principal type inference algorithm for a linear type system with multiplicity annotations, based on OutsideIn(X), improving inference reliability.
Findings
The proposed system infers principal types for a rank 1 qualified-typed linear calculus.
Quantifier elimination effectively resolves type ambiguity issues.
The approach demonstrates practical applicability through illustrative examples.
Abstract
Bernardy et al. [2018] proposed a linear type system as a core type system of Linear Haskell. In the system, linearity is represented by annotated arrow types , where denotes the multiplicity of the argument. Thanks to this representation, existing non-linear code typechecks as it is, and newly written linear code can be used with existing non-linear code in many cases. However, little is known about the type inference of . Although the Linear Haskell implementation is equipped with type inference, its algorithm has not been formalized, and the implementation often fails to infer principal types, especially for higher-order functions. In this paper, based on OutsideIn(X) [Vytiniotis et al., 2011], we propose an inference system for a rank 1 qualified-typed variant of , which infers principal types. A technical challenge in…
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.
Taxonomy
TopicsLogic, programming, and type systems · Formal Methods in Verification · Logic, Reasoning, and Knowledge
