计算机科学 > 程序设计语言
[提交于 2026年11月10日]
标题:Context Types: Bunched Modalities for Unifying Safety and Reachability
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Most type systems are designed to verify safety properties: the judgement $e : \tau$ holds if $e$ may evaluate to any value contained in the denotation of $\tau$, but nothing more. More recent type systems have considered the complementary class of reachability properties: in these systems, the typing judgment holds if $e$ must be able to evaluate to every value denoted by $\tau$, and possibly more. This paper introduces a refinement type system for higher-order functional programs where types can capture both safety and reachability properties. Simultaneously supporting both is challenging because each imposes different constraints on how variable bindings in a typing context are interpreted. We address this challenge by treating typing contexts as a kind of resource that mediates which capabilities are available when typing a program. We formalize this notion by developing a resource algebra of contextual capabilities and a bunched modal context logic over this algebra. We then interpret our type system in this logic, establishing soundness with respect to a denotational semantics that unifies safety and reachability guarantees within a single typing judgement.
提交历史
来自:Zhe Zhou[v1] 2026年11月10日 星期二 02:31:13 UTC (208 KB)