Proof-Producing Synthesis of ML from Higher-Order Logic

被引:14
|
作者
Myreen, Magnus O. [1 ]
Owens, Scott [1 ]
机构
[1] Univ Cambridge, Comp Lab, Cambridge CB2 1TN, England
基金
英国工程与自然科学研究理事会;
关键词
Program Synthesis; Verification; CHARACTERISTIC FORMULAS; VERIFICATION; COMPILATION; LANGUAGE; COMPILER;
D O I
10.1145/2398856.2364545
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
The higher-order logic found in proof assistants such as Coq and various HOL systems provides a convenient setting for the development and verification of pure functional programs. However, to efficiently run these programs, they must be converted (or "extracted") to functional programs in a programming language such as ML or Haskell. With current techniques, this step, which must be trusted, relates similar looking objects that have very different semantic definitions, such as the set-theoretic model of a logic and the operational semantics of a programming language. In this paper, we show how to increase the trustworthiness of this step with an automated technique. Given a functional program expressed in higher-order logic, our technique provides the corresponding program for a functional language defined with an operational semantics, and it provides a mechanically checked theorem relating the two. This theorem can then be used to transfer verified properties of the logical function to the program. We have implemented our technique in the HOL4 theorem prover, translating functions to a core subset of Standard ML, and have applied it to examples including functional data structures, a parser generator, cryptographic algorithms, and a garbage collector.
引用
收藏
页码:115 / 126
页数:12
相关论文
共 50 条
  • [1] Proof-producing translation of higher-order logic into pure and stateful ML
    Myreen, Magnus O.
    Owens, Scott
    [J]. JOURNAL OF FUNCTIONAL PROGRAMMING, 2014, 24 (2-3) : 284 - 315
  • [2] Structure of a proof-producing compiler for a subset of higher order logic
    Li, Guodong
    Owens, Scott
    Slind, Konrad
    [J]. PROGRAMMING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2007, 4421 : 205 - +
  • [3] A verified proof checker for higher-order logic
    Abrahamsson, Oskar
    [J]. JOURNAL OF LOGICAL AND ALGEBRAIC METHODS IN PROGRAMMING, 2020, 112
  • [4] Proof-Producing Synthesis of CakeML from Monadic HOL Functions
    Abrahamsson, Oskar
    Ho, Son
    Kanabar, Hrutvik
    Kumar, Ramana
    Myreen, Magnus O.
    Norrish, Michael
    Tan, Yong Kiam
    [J]. JOURNAL OF AUTOMATED REASONING, 2020, 64 (07) : 1287 - 1306
  • [5] Proof-Producing Synthesis of CakeML from Monadic HOL Functions
    Oskar Abrahamsson
    Son Ho
    Hrutvik Kanabar
    Ramana Kumar
    Magnus O. Myreen
    Michael Norrish
    Yong Kiam Tan
    [J]. Journal of Automated Reasoning, 2020, 64 : 1287 - 1306
  • [6] Effect Polymorphism in Higher-Order Logic (Proof Pearl)
    Lochbihler, Andreas
    [J]. INTERACTIVE THEOREM PROVING (ITP 2017), 2017, 10499 : 389 - 409
  • [7] Effect Polymorphism in Higher-Order Logic (Proof Pearl)
    Andreas Lochbihler
    [J]. Journal of Automated Reasoning, 2019, 63 : 439 - 462
  • [8] Effect Polymorphism in Higher-Order Logic (Proof Pearl)
    Lochbihler, Andreas
    [J]. JOURNAL OF AUTOMATED REASONING, 2019, 63 (02) : 439 - 462
  • [9] Proof-theoretic and higher-order extensions of logic programming
    Momigliano A.
    Ornaghi M.
    [J]. Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 2010, 6125 : 254 - 270
  • [10] Logic program synthesis in a higher-order setting
    Lacey, D
    Richardson, J
    Smaill, A
    [J]. COMPUTATIONAL LOGIC - CL 2000, 2000, 1861 : 87 - 100