arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1801.09225cs.LO
收藏

多态语境下的语境模态类型论

Contextual Modal Type Theory with Polymorphic Contexts

Yuito Murase, Yuichi Nishiwaki, Atsushi Igarashi

摘要:

模态类型--从模态逻辑的证明系统中派生出来的类型--已经被研究作为元编程的理论基础,其中程序代码被操纵为第一类值。在模态类型系统中,模态对应于代码类型的类型构造函数,并控制代码值中的自由变量及其类型。Nanevski等人提出了上下文模态类型论,它具有关于自由变量的细粒度信息的模态类型:模态类型由上下文显式索引-代码值中所有自由变量的类型。本文提出了$λ_{\forall[]}$,上下文模态类型论的一个新的扩展与参数多态上下文。这种扩展已经在文献中进行了研究,但与早期的建议不同,$λ_{\forall[]}$更一般,因为可以抽象单个上下文的多个部分。通过$β$ -归约给出了\lamfb的类型系统和操作语义,并证明了它的基本性质,包括主体归约、强规范化和融合性.此外,为了展示多态上下文的表达能力,我们展示了从Davies的$λ_{\bigcirc}$的两级片段到$λ_{\forall[]}$的类型保持嵌入,该片段基于线性时间时态逻辑。

英文摘要:

Modal types -- types that are derived from proof systems of modal logic -- have been studied as theoretical foundations of metaprogramming, where program code is manipulated as first-class values. In modal type systems, modality corresponds to a type constructor for code types and controls free variables and their types in code values. Nanevski et al. have proposed contextual modal type theory, which has modal types with fine-grained information on free variables: modal types are explicitly indexed by contexts -- the types of all free variables in code values. This paper presents $λ_{\forall[]}$, a novel extension of contextual modal type theory with parametric polymorphism over contexts. Such an extension has been studied in the literature but unlike earlier proposals, $λ_{\forall[]}$ is more general in that multiple parts of a single context can be abstracted. We formalize \lamfb with its type system and operational semantics given by $β$-reduction and prove its basic properties including subject reduction, strong normalization, and confluence. Moreover, to demonstrate the expressive power of polymorphic contexts, we show a type-preserving embedding from a two-level fragment of Davies' $λ_{\bigcirc}$, which is based on linear-time temporal logic, to $λ_{\forall[]}$.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑