Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Proving Correctness of a Compiler Using Step-indexed Logical Relations

Published: 11 July 2016 Publication History
  • Get Citation Alerts
  • Abstract

    In this paper we prove the correctness of a compiler for a call-by-name language using step-indexed logical relations and biorthogonality. The source language is an extension of the simply typed lambda-calculus with recursion, and the target language is an extension of the Krivine abstract machine. We formalized the proof in the Coq proof assistant.

    References

    [1]
    A. Ahmed, Step-Indexed Syntactic Logical Relations for Recursive and Quantified Types, in: Proceedings of the 15th European Conference on Programming Languages and Systems, ESOP'06, 2006, pp. 69-83.
    [2]
    A.W. Appel, S. Blazy, Separation Logic for Small-step Cminor. arXiv:0707.4389
    [3]
    A.W. Appel, D. McAllester, An Indexed Model of Recursive Types for Foundational Proof-carrying Code, ACM Transactions on Programing Languages and Systems, 23 (2001) 657-683.
    [4]
    N. Benton, C.-K. Hur, Biorthogonality, Step-indexing and Compiler Correctness, SIGPLAN Not., 44 (2009) 97-108.
    [5]
    N. Benton, C.-K. Hur, Realizability and Compositional Compiler Correctness for a Polymorphic Language, Microsoft Research, 2010.
    [6]
    N. Benton, A. Kennedy, C. Varming, Formalizing Domains, Ultrametric Spaces and Semantics of Programming Languages, 2010, unpublished.
    [7]
    G. Birkhoff, Lattice Theory, American Mathematical Society Colloquium Publications, 25 (1940).
    [8]
    A. Chlipala, A Certified Type-preserving Compiler from Lambda Calculus to Assembly Language, SIGPLAN Not., 42 (2007) 54-65.
    [9]
    A. Chlipala, A Verified Compiler for an Impure Functional Language, in: POPL, 2010, pp. 93-106.
    [10]
    S. Diehl, P. Sestoft, Abstract Machines for Programming Language Implementation, Future Generation Computer Systems, 16 (2000) 739-751.
    [11]
    D. Dreyer, G. Neis, L. Birkedal, The Impact of Higher-order State and Control Effects on Local Relational Reasoning, SIGPLAN Not., 45 (2010) 143-156.
    [12]
    G. Jaber, N. Tabareau, The Journey of Biorthogonal Logical Relations to the Realm of Assembly Code, in: Workshop LOLA 2011, Syntax and Semantics of Low Level Languages, 2011, pp. 1-15.
    [13]
    S.L.P. Jones, Implementing Lazy Functional Languages on Stock Hardware: The Spineless Tagless G-machine, Journal of Functional Programming, 2 (1992) 202.
    [14]
    J.-L. Krivine, Classical Logic, Storage Operators and Second-order Lambda-calculus, Annals of Pure and Applied Logic, 68 (1994) 53-78.
    [15]
    J.-L. Krivine, A Call-by-name Lambda-calculus Machine, Higher Order Symbolic Computation, 20 (2007) 199-207.
    [16]
    P.J. Landin, The Mechanical Evaluation of Expressions, The Computer Journal, 6 (1964) 308-320.
    [17]
    X. Leroy, Formal Verification of a Realistic Compiler, Communications of the ACM, 52 (2009) 107-115.
    [18]
    X. Leroy, Mechanized Semantics - with Applications to Program Proof and Compiler Verification, in: Logics and Languages for Reliability and Security, IOS Press, 2010.
    [19]
    X. Leroy, H. Grall, Coinductive Big-step Operational Semantics, Information and Computation, 207 (2009) 284-304.
    [20]
    J. McCarthy, J. Painter, Correctness of a Compiler for Arithmetic Expressions, Mathematical Aspects of Computer Science 1, 19 (1967) 33-41.
    [21]
    F.L. Morris, Advice on Structuring Compilers and Proving them Correct, in: POPL, 1973, pp. 144-152.
    [22]
    O. Ore, Galois Connexions, Transactions of the American Mathematical Society, 55 (1944) 493-513.
    [23]
    A.M. Pitts, I.D.B. Stark, Operational Reasoning for Functions with Local State, in: Higher Order Operational Techniques in Semantics, Cambridge University Press, New York, NY, USA, 1998, pp. 227-274.
    [24]
    J.C. Reynolds, The Coherence of Languages with Intersection Types, in: Proceedings of the International Conference on Theoretical Aspects of Computer Software, TACS '91, 1991, pp. 675-700.
    [25]
    L. Rodríguez, D. Fridlender, M. Pagano,. http://cs.famaf.unc.edu.ar/~leorodriguez/compilercorrectness/
    [26]
    L. Rodríguez, D. Fridlender, M. Pagano, A Certified Extension of the Krivine Machine for a Call-by-Name Higher-Order Imperative Language, in: Leibniz International Proceedings in Informatics (LIPIcs), vol. 26, 2014, pp. 230-250.
    [27]
    P. Selinger, From Continuation Passing Style to Krivine's Abstract Machine, 2003, Manuscript, available in Peter Selinger's web site.
    [28]
    P. Sestoft, Deriving a Lazy Abstract Machine, Journal of Functional Programing, 7 (1997) 231-264.

    Cited By

    View all
    • (2021)Compositional optimizations for CertiCoqProceedings of the ACM on Programming Languages10.1145/34735915:ICFP(1-30)Online publication date: 19-Aug-2021
    • (2017)Biorthogonality for a Lazy languageProceedings of the 29th Symposium on the Implementation and Application of Functional Programming Languages10.1145/3205368.3205374(1-9)Online publication date: 30-Aug-2017
    • (2017)The importance of being ExtrinsicProceedings of the 21st Brazilian Symposium on Programming Languages10.1145/3125374.3125378(1-8)Online publication date: 21-Sep-2017

    Index Terms

    1. Proving Correctness of a Compiler Using Step-indexed Logical Relations
        Index terms have been assigned to the content through auto-classification.

        Recommendations

        Comments

        Information & Contributors

        Information

        Published In

        cover image Electronic Notes in Theoretical Computer Science (ENTCS)
        Electronic Notes in Theoretical Computer Science (ENTCS)  Volume 323, Issue C
        July 2016
        245 pages

        Publisher

        Elsevier Science Publishers B. V.

        Netherlands

        Publication History

        Published: 11 July 2016

        Author Tags

        1. Compiler verification
        2. biorthogonality
        3. proof assistants
        4. step-indexed logical relations

        Qualifiers

        • Research-article

        Contributors

        Other Metrics

        Bibliometrics & Citations

        Bibliometrics

        Article Metrics

        • Downloads (Last 12 months)0
        • Downloads (Last 6 weeks)0

        Other Metrics

        Citations

        Cited By

        View all
        • (2021)Compositional optimizations for CertiCoqProceedings of the ACM on Programming Languages10.1145/34735915:ICFP(1-30)Online publication date: 19-Aug-2021
        • (2017)Biorthogonality for a Lazy languageProceedings of the 29th Symposium on the Implementation and Application of Functional Programming Languages10.1145/3205368.3205374(1-9)Online publication date: 30-Aug-2017
        • (2017)The importance of being ExtrinsicProceedings of the 21st Brazilian Symposium on Programming Languages10.1145/3125374.3125378(1-8)Online publication date: 21-Sep-2017

        View Options

        View options

        Get Access

        Login options

        Media

        Figures

        Other

        Tables

        Share

        Share

        Share this Publication link

        Share on social media