Local Type Inference for Context-Free Session Types

📅 2025-05-25
🏛️ Electronic Proceedings in Theoretical Computer Science
📈 Citations: 0
Influential: 0
📄 PDF
🤖 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.

Technology Category

Application Category

📝 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.
Problem

Research questions and friction points this paper is trying to address.

Local type inference for context-free session types
Bidirectional type checking for polymorphism support
Reducing type annotations at application sites
Innovation

Methods, ideas, or system contributions that make the work stand out.

Bidirectional type checking for type inference
Handles sequential composition operator intricacies
Eliminates type annotations at application sites
B
Bernardo Almeida
LASIGE, Faculty of Sciences, University of Lisbon, Portugal
Andreia Mordido
Andreia Mordido
LASIGE, Departamento de Informática, Faculdade de Ciências, Universidade de Lisboa
Programming LanguagesType SystemsLogic
V
V. Vasconcelos
LASIGE, Faculty of Sciences, University of Lisbon, Portugal