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 条
  • [1] Contextual modal type theory
    Nanevski, Aleksandar
    Pfenning, Frank
    Pientka, Brigitte
    ACM TRANSACTIONS ON COMPUTATIONAL LOGIC, 2008, 9 (03)
  • [2] Denotation of contextual modal type theory (CMTT): Syntax and meta-programming
    Gabbay, Murdoch J.
    Nanevski, Aleksandar
    JOURNAL OF APPLIED LOGIC, 2013, 11 (01) : 1 - 29
  • [3] Fibrational Modal Type Theory
    de Paiva, Valeria
    Ritter, Eike
    ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2016, 323 : 143 - 161
  • [4] Foundations of Mathematics in Polymorphic Type Theory
    M. Randall Holmes
    Topoi, 2001, 20 : 29 - 52
  • [5] Explicit Substitutions for Contextual Type Theory
    Abel, Andreas
    Pientka, Brigitte
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2010, (34): : 5 - 20
  • [6] Graded Modal Dependent Type Theory
    Moon, Benjamin
    Eades, Harley, III
    Orchard, Dominic
    PROGRAMMING LANGUAGES AND SYSTEMS, ESOP 2021, 2021, 12648 : 462 - 490
  • [7] Implementing a Modal Dependent Type Theory
    Gratzer, Daniel
    Sterling, Jonathan
    Birkedal, Lars
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (ICFP):
  • [8] Multi-level Contextual Type Theory
    Boespflug, Mathieu
    Pientka, Brigitte
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2011, (71): : 29 - 43
  • [9] FORMALIZATION OF CONTEXTS IN TYPE THEORY WITH RECORDS AND MODULES
    Domanov, Oleg A.
    VESTNIK TOMSKOGO GOSUDARSTVENNOGO UNIVERSITETA-FILOSOFIYA-SOTSIOLOGIYA-POLITOLOGIYA-TOMSK STATE UNIVERSITY JOURNAL OF PHILOSOPHY SOCIOLOGY AND POLITICAL SCIENCE, 2019, 52 : 23 - 38
  • [10] Soundness and principal contexts for a shallow polymorphic type system based on classical logic
    Summers, Alexander J.
    LOGIC JOURNAL OF THE IGPL, 2011, 19 (06) : 848 - 896