Parametric higher-order abstract syntax for mechanized semantics

被引:26
|
作者
Chlipala, Adam [1 ]
机构
[1] Harvard Univ, Cambridge, MA 02138 USA
关键词
languages; verification; compiler verification; interactive proof assistants; dependent types; type-theoretic semantics;
D O I
10.1145/1411203.1411226
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present parametric higher-order abstract syntax (PHOAS), a new approach to formalizing the syntax of programming languages in computer proof assistants based on type theory. Like higher-order abstract syntax (HOAS), PHOAS uses the meta language's binding constructs to represent the object language's binding constructs. Unlike HOAS, PHOAS types are definable in general-purpose type theories that support traditional functional programming, like Coq's Calculus of Inductive Constructions. We walk through how Coq can be used to develop certified, executable program transformations over several statically-typed functional programming languages formalized with PHOAS; that is, each transformation has a machine-checked proof of type preservation and semantic preservation. Our examples include CPS translation and closure conversion for simply-typed lambda calculus, CPS translation for System F, and translation from a language with ML-style pattern matching to a simpler language with no variable-arity binding constructs. By avoiding the syntactic hassle associated with first-order representation techniques, we achieve a very high degree of proof automation.
引用
收藏
页码:143 / 156
页数:14
相关论文
共 50 条
  • [31] Semantic values in higher-order semantics
    Stephan Krämer
    [J]. Philosophical Studies, 2014, 168 : 709 - 724
  • [32] Game semantics for higher-order concurrency
    Laird, J.
    [J]. FSTTCS 2006: Foundations of Software Technology and Theoretical Computer Science, Proceedings, 2006, 4337 : 417 - 428
  • [33] Semantic values in higher-order semantics
    Kraemer, Stephan
    [J]. PHILOSOPHICAL STUDIES, 2014, 168 (03) : 709 - 724
  • [34] HIGHER-ORDER ABSTRACT CAUCHY PROBLEMS
    SANDEFUR, JT
    [J]. JOURNAL OF MATHEMATICAL ANALYSIS AND APPLICATIONS, 1977, 60 (03) : 728 - 742
  • [35] The Next 700 Challenge Problems for Reasoning with Higher-Order Abstract Syntax RepresentationsPart 2—A Survey
    Amy P. Felty
    Alberto Momigliano
    Brigitte Pientka
    [J]. Journal of Automated Reasoning, 2015, 55 : 307 - 372
  • [36] Machine instruction syntax and semantics in higher order logic
    Michael, NG
    Appel, AW
    [J]. AUTOMATED DEDUCTION - CADE-17, 2000, 1831 : 7 - 24
  • [37] Free Σ-monoids:: A higher-order syntax with metavariables
    Hamana, M
    [J]. PROGRAMMING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2004, 3302 : 348 - 363
  • [38] A denotational semantics of Simulink with higher-order UTP
    Xu, Xiong
    Zhan, Bohua
    Wang, Shuling
    Talpin, Jean-Pierre
    Zhan, Naijun
    [J]. JOURNAL OF LOGICAL AND ALGEBRAIC METHODS IN PROGRAMMING, 2023, 130
  • [39] TOPOS SEMANTICS FOR HIGHER-ORDER MODAL LOGIC
    Awodey, Steve
    Kishida, Kohei
    Kotzsch, Hans-Christoph
    [J]. LOGIQUE ET ANALYSE, 2014, (228) : 591 - 636
  • [40] AN ALGEBRAIC SEMANTICS OF HIGHER-ORDER TYPES WITH SUBTYPES
    QIAN, ZY
    [J]. ACTA INFORMATICA, 1993, 30 (06) : 569 - 607