🤖 AI Summary
Existing bidirectional type-checking approaches for System F with context-free session types require explicit type annotations at polymorphic applications, compromising expressiveness and usability.
Method: We propose the first bidirectional type-checking system supporting fully local type inference for System F extended with context-free session types. Our approach embeds context-free grammars directly into the type system and integrates bidirectional checking, type equivalence checking, and extensions of System F to jointly infer sequence composition, first-class polymorphism, and session structure.
Contributions/Results: (1) The first fully local type inference mechanism within a context-free session typing framework; (2) elimination of all manual annotations at type applications; (3) strict preservation of type safety while significantly improving programmer experience and inference precision. Our system enables concise, annotation-free programming of complex session-typed protocols without sacrificing formal guarantees.
📝 Abstract
We address the problem of local type inference for a language based on System F with context-free session types. We present an algorithm that leverages the bidirectional type checking approach to propagate type information, enabling first class polymorphism while addressing the intricacies brought about by the sequential composition operator and type equivalence. The algorithm improves the language's usability by eliminating the need for type annotations at type application sites.