Contextual Modal Type Theory with Polymorphic Contexts

被引:1
|
作者
Murase, Yuito [1 ]
Nishiwaki, Yuichi
Igarashi, Atsushi [1 ]
机构
[1] Kyoto Univ, Kyoto, Japan
关键词
Contextual modal types; Fitch-style modal lambda-calculi; Metaprogramming; Polymorphic contexts; SYSTEM;
D O I
10.1007/978-3-031-30044-8_11
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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 lambda(for all(sic)), 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, lambda(for all(sic)) is more general in that it allows multiple occurrence of context variables in a single context. We formalize lambda(for all(sic)) with its type system and operational semantics given by beta-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' lambda((sic)), which is based on linear-time temporal logic, to lambda(for all(sic)).
引用
收藏
页码:281 / 308
页数:28
相关论文
共 50 条