## Structure of a proof-producing compiler for a subset of higher order logic (2007)

### Cached

### Download Links

- [www.cs.utah.edu]
- [www.cl.cam.ac.uk]
- [www.cs.utah.edu]
- [www.cl.cam.ac.uk]
- [www.cs.utah.edu]
- DBLP

### Other Repositories/Bibliography

Venue: | 16th European Symposium on Programming (ESOP’07 |

Citations: | 10 - 7 self |

### BibTeX

@INPROCEEDINGS{Li07structureof,

author = {Guodong Li and Scott Owens and Konrad Slind},

title = {Structure of a proof-producing compiler for a subset of higher order logic},

booktitle = {16th European Symposium on Programming (ESOP’07},

year = {2007}

}

### OpenURL

### Abstract

Abstract. We give an overview of a proof-producing compiler which translates recursion equations, defined in higher order logic, to assembly language. The compiler is implemented and validated with a mix of translation validation and compiler verification techniques. Both the design of the compiler and its mechanical verification are implemented in the same logic framework.

### Citations

755 |
Isabelle/HOL — A Proof Assistant for Higher-Order Logic, volume 2283 of LNCS
- Nipkow, Paulson, et al.
- 2002
(Show Context)
Citation Context ...logic formulas is the dominant paradigm [12]. In this paper we address another—hitherto unexploited— opportunity for logic compilation; namely, the term language that dwells within higher order logic =-=[16,17]-=-. This language comprises, roughly speaking, ML-style pure terminating functional programs, i.e., those (computable) functions that can be expressed by well-founded recursion in higher order logic [21... |

730 | Separation logic: A logic for shared mutable data objects
- Reynolds
- 2002
(Show Context)
Citation Context ...carrying code and typed assembly language [15]. We are currently investigating links with recent work on Hoare Logics for assembly language, e.g., [5, 13] and also extensions such as Separation Logic =-=[19]-=-. Of course, compiler verification itself is a venerable topic, with far too many publications to survey (see Dave’s bibliography [4]). Restricting to assembler verification, one of the most relevant ... |

605 | From system F to typed assembly language
- Morriset, Walker, et al.
- 1999
(Show Context)
Citation Context ...language are related by the proof. There has recently been a large amount of work on verifying low-level languages, originally prompted by the ideas of proof carrying code and typed assembly language =-=[15]-=-. We are currently investigating links with recent work on Hoare Logics for assembly language, e.g., [5, 13] and also extensions such as Separation Logic [19]. Of course, compiler verification itself ... |

356 |
Programming with Constraints: An Introduction
- Marriott, Stuckey
- 1998
(Show Context)
Citation Context ...it also makes sense to execute logic [1], and thus to compile logic. This is the basis for logic programming, where search for solutions to problems phrased as logic formulas is the dominant paradigm =-=[12]-=-. In this paper we address another—hitherto unexploited— opportunity for logic compilation; namely, the term language that dwells within higher order logic [16,17]. This language comprises, roughly sp... |

231 | Formal certification of a compiler back-end, or: programming a compiler with a proof assistant
- Leroy
- 2006
(Show Context)
Citation Context ...ler for a simple subset of higher order logic terms in the HOL-4 proof system [17]. The compiler is mainly based on translation validation, but compiler verification techniques such as those found in=-=[9, 11,14]-=- are also used. A run of the compiler returns an (automatically proved) theorem expressing the correctness of the compilation run; from this theorem the generated code, for an ARM-like machine, can be... |

149 | Translation validation
- Pnueli, Singerman, et al.
- 1998
(Show Context)
Citation Context ...he correctness of the compiler is proven once and forall: a single object logic theorem establishes that all successful runs of the compiler generate correct code. In contrast, translation validation =-=[18]-=- does a per-run correctness proof. Its main advantage is that only the results of compilation steps need to be verified, which can at times be far simpler than verifying the algorithms performing the ... |

97 | A machine-checked model for a Java-like language, virtual machine and compiler
- Klein, Nipkow
- 2004
(Show Context)
Citation Context ...ler for a simple subset of higher order logic terms in the HOL-4 proof system [17]. The compiler is mainly based on translation validation, but compiler verification techniques such as those found in=-=[9, 11,14]-=- are also used. A run of the compiler returns an (automatically proved) theorem expressing the correctness of the compilation run; from this theorem the generated code, for an ARM-like machine, can be... |

63 |
eXtended Tiny Encryption Algorithm
- Needham, Wheeler
- 1997
(Show Context)
Citation Context ...the results of standard register allocation algorithms to be used, without having to verify their correctness. The following 7example shows the HOL- (left) and an ANF (right) of the TEA block cipher =-=[23]-=- (names of variables spilled begin with m and those in registers begin with r): DELTA = 0x9e3779b9w ShiftXor(x,s, k0, k1) = ((x ≪ 4) + k0) # (x + s) # ((x ≫ 5) + k1) Round ((y,z),(k0, k1, k2, k3), s) ... |

60 | Formal verification of a C compiler front-end
- Leroy, Blazy, et al.
- 2006
(Show Context)
Citation Context ...m high-level language to .NET assembly; Sampaio [20] uses term rewriting to convert source programs to their normal forms representing object code. These latter works are not machine automated. Leroy =-=[2, 11]-=- has verified a compiler from a subset of C, Clight, to PowerPC assembly code in the Coq system. The semantics of Clight is completely deterministic and specified as big-step operational semantics. Se... |

52 | Executing higher order logic
- Berghofer, Nipkow
- 2002
(Show Context)
Citation Context ... of the compiler and its mechanical verification are implemented in the same logic framework. 1 Introduction Most compilers are used to compile programs. However, it also makes sense to execute logic =-=[1]-=-, and thus to compile logic. This is the basis for logic programming, where search for solutions to problems phrased as logic formulas is the dominant paradigm [12]. In this paper we address another—h... |

38 | Toward the Formal Verification of a C0 Compiler: Code Generation and Implementation Correctness
- Leinenbach, Paul, et al.
- 2005
(Show Context)
Citation Context ... code than our assembly, for example it assumes an unbounded number of registers. Compilation from a type-safe subset of C to DLX assembly code has been verified using the Isabelle/HOL theorem prover =-=[10]-=-. A big step semantics and a small step semantics for this language are related by the proof. There has recently been a large amount of work on verifying low-level languages, originally prompted by th... |

33 |
Reasoning about Terminating Functional Programs
- Slind
- 1999
(Show Context)
Citation Context ...17]. This language comprises, roughly speaking, ML-style pure terminating functional programs, i.e., those (computable) functions that can be expressed by well-founded recursion in higher order logic =-=[21]-=-. Features like type inference, polymorphism, and pattern matching make this subset a comfortable setting in which to program. Although this language does not contain all computable functions, it does... |

24 |
An Algebraic Approach to Compiler Design
- Sampaio
- 1997
(Show Context)
Citation Context ...r existing verification techniques for these translations are still valid. Similarly, Watson [22] proposes a refinement calculus for the compilation from high-level language to .NET assembly; Sampaio =-=[20]-=- uses term rewriting to convert source programs to their normal forms representing object code. These latter works are not machine automated. Leroy [2, 11] has verified a compiler from a subset of C, ... |

15 | Formal verification of a memory model for C-like imperative languages
- Blazy, Leroy
- 2005
(Show Context)
Citation Context ...te all stack frames and the areas consumed by pre/post processing. Both the heap and the stacks are simply finite maps, thus we do not formalize and rely on any heap management and stack property. In =-=[3]-=- a block-base memory model between a machine memory and a high-level view is introduced to manage frame stacks. As in our method, separation is enforced between stack blocks belonging to different fun... |

15 |
Piton: A Mechanically Verified Assembly-Level Language. Automated Reasoning Series
- Moore
- 1996
(Show Context)
Citation Context ...ler for a simple subset of higher order logic terms in the HOL-4 proof system [17]. The compiler is mainly based on translation validation, but compiler verification techniques such as those found in=-=[9, 11,14]-=- are also used. A run of the compiler returns an (automatically proved) theorem expressing the correctness of the compilation run; from this theorem the generated code, for an ARM-like machine, can be... |

13 | Verification condition generation via theorem proving
- Matthews, Moore, et al.
- 2006
(Show Context)
Citation Context ...languages, originally prompted by the ideas of proof carrying code and typed assembly language [15]. We are currently investigating links with recent work on Hoare Logics for assembly language, e.g., =-=[5, 13]-=- and also extensions such as Separation Logic [19]. Of course, compiler verification itself is a venerable topic, with far too many publications to survey (see Dave’s bibliography [4]). Restricting to... |

9 |
K.: Automatic formal synthesis of hardware from higher order logic
- Gordon, Iyoda, et al.
- 2006
(Show Context)
Citation Context ...y ⊢ {} ↑ ((r0, r1), f2, (r0, r1)) Axiom1 SC (TR (r0, ne, 0w) body) blk1 ⊢ {} ↑ ((r0, r1),fact acf , r2) sc rule 5 Related Work We have also developed a hardware compiler for a similar source language =-=[7]-=-: it takes in HOL function definitions and emits FPGA-level netlists. Compilation proceeds essentially by refinement steps: control structures in logic are refined by formulas representing unclocked c... |

9 |
Formal compiler construction in a logical framework. Higher-Order and Symbolic Computation
- Hickey, Nogin
(Show Context)
Citation Context ...plementation this task is fulfilled implicitly when we verify the translation from ACF to HSL by comparing the ACF with the synthesized function. This nice trick was first noticed by Hickey and Nogin =-=[8]-=- and is also used by Leroy [11]. It allows the results of standard register allocation algorithms to be used, without having to verify their correctness. The following 7example shows the HOL- (left) ... |

8 | Formal verification of the ARM6 micro-architecture - Fox - 2002 |

2 |
Zhaozhong Ni, Modular verification of assembly code with stack-based control abstractions
- Feng, Shao, et al.
(Show Context)
Citation Context ...languages, originally prompted by the ideas of proof carrying code and typed assembly language [15]. We are currently investigating links with recent work on Hoare Logics for assembly language, e.g., =-=[5, 13]-=- and also extensions such as Separation Logic [19]. Of course, compiler verification itself is a venerable topic, with far too many publications to survey (see Dave’s bibliography [4]). Restricting to... |

1 | editors, Types for Proofs and Programs, International Workshop (TYPES 2000), 2000. 2. Sandrine Blazy, Zaynah Dargaye, and Xavier Leroy, Formal verification of a C compiler front-end - Luo, Pollack - 2006 |

1 |
Compilation by refinement for a practical assembly language
- Watson
- 2003
(Show Context)
Citation Context ...he translation from HOL to HOL- and then ANF, e.g., the closure conversion and CPS conversion rules; yet our existing verification techniques for these translations are still valid. Similarly, Watson =-=[22]-=- proposes a refinement calculus for the compilation from high-level language to .NET assembly; Sampaio [20] uses term rewriting to convert source programs to their normal forms representing object cod... |