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 条
  • [1] Parametric Higher-Order Abstract Syntax for Mechanized Semantics
    Chlipala, Adam
    [J]. ICFP'08: PROCEEDINGS OF THE 2008 SIGPLAN INTERNATIONAL CONFERENCE ON FUNCTIONAL PROGRAMMING, 2008, : 143 - 156
  • [2] HIGHER-ORDER ABSTRACT SYNTAX
    PFENNING, F
    ELLIOTT, C
    [J]. SIGPLAN NOTICES, 1988, 23 (07): : 199 - 208
  • [3] Focusing and higher-order abstract syntax
    Zeilberger, Noam
    [J]. ACM SIGPLAN NOTICES, 2008, 43 (01) : 359 - 369
  • [4] Focusing and Higher-Order Abstract Syntax
    Zeilberger, Noam
    [J]. POPL'08: PROCEEDINGS OF THE 35TH ANNUAL ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES, 2008, : 359 - 369
  • [5] Boxes go bananas: Encoding higher-order abstract syntax with parametric polymorphism
    Washburn, Geoffrey
    Weirich, Stephanie
    [J]. JOURNAL OF FUNCTIONAL PROGRAMMING, 2008, 18 : 87 - 140
  • [6] Boxes go bananas: Encoding higher-order abstract syntax with parametric polymorphism
    Washburn, G
    Weirich, S
    [J]. ACM SIGPLAN NOTICES, 2003, 38 (09) : 249 - 262
  • [7] Primitive recursion for higher-order abstract syntax
    Schürmann, C
    Despeyroux, J
    Pfenning, F
    [J]. THEORETICAL COMPUTER SCIENCE, 2001, 266 (1-2) : 1 - 57
  • [8] Higher-Order Abstract Syntax in Isabelle/HOL
    Howe, Douglas J.
    [J]. INTERACTIVE THEOREM PROVING, PROCEEDINGS, 2010, 6172 : 481 - 484
  • [9] Primitive recursion for higher-order abstract syntax
    Despeyroux, J
    Pfenning, F
    Schurmann, C
    [J]. TYPED LAMBDA CALCULI AND APPLICATIONS, 1997, 1210 : 147 - 163
  • [10] A logic for reasoning with higher-order abstract syntax
    McDowell, R
    Miller, D
    [J]. 12TH ANNUAL IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE, PROCEEDINGS, 1997, : 434 - 445