🤖 AI Summary
This work addresses the limitation of Two-Level Linear Dependent Type Theory (TLL) in specifying communication data properties in session-based concurrent programs. We propose TLLC—the first type system unifying dependent types with session types. TLLC introduces *dependent session types* to enable precise, value-dependent specifications of message payloads; reconstructs session types using intuitionistic semantics to enhance formal generality; and develops a unified term-process calculus with a *relational verification mechanism* that formally links concurrent programs to their idealized sequential counterparts. A prototype compiler based on TLLC generates verified-safe concurrent C code. Empirical evaluation across canonical scenarios—including concurrent queues and MapReduce—demonstrates TLLC’s effectiveness and practicality. Our core contribution is the first deep integration of dependent typing into the session type framework, establishing a novel paradigm for fine-grained, property-driven verification of concurrent programs.
📝 Abstract
We present TLLC which extends the Two-Level Linear dependent type theory (TLL) with session-based concurrency. Equipped with Martin-Löf style dependency, the session types of TLLC allow protocols to specify properties of communicated messages. When used in conjunction with the dependent type machinery already present in TLL, dependent session types facilitate a form of relational verification by relating concurrent programs with their idealized sequential counterparts. Correctness properties proven for sequential programs can be easily lifted to their corresponding concurrent implementations. TLLC makes session types a powerful tool for intrinsically verifying the correctness of data structures such as queues and concurrent algorithms such as map-reduce. To extend TLL with session types, we develop a novel formulation of intuitionistic session type which we believe to be widely applicable for integrating session types into other type systems beyond the context of TLLC. We study the meta-theory of our language, proving its soundness as both a term calculus and a process calculus. To demonstrate the practicality of TLLC, we have implemented a prototype compiler that translates TLLC programs into concurrent C code, which has been extensively evaluated.