## Program Extraction in simply-typed Higher Order Logic (2002)

### Cached

### Download Links

Venue: | Types for Proofs and Programs (TYPES 2002), LNCS 2646 |

Citations: | 9 - 2 self |

### BibTeX

@INPROCEEDINGS{Berghofer02programextraction,

author = {Stefan Berghofer},

title = {Program Extraction in simply-typed Higher Order Logic},

booktitle = {Types for Proofs and Programs (TYPES 2002), LNCS 2646},

year = {2002},

pages = {21--38},

publisher = {Springer}

}

### OpenURL

### Abstract

Based on a representation of primitive proof objects as - terms, which has been built into the theorem prover Isabelle recently, we propose a generic framework for program extraction. We show how this framework can be used to extract functional programs from proofs conducted in a constructive fragment of the object logic Isabelle/HOL. A characteristic feature of our implementation of program extraction is that it produces both a program and a correctness proof. Since the extracted program is available as a function within the logic, its correctness proof can be checked automatically inside Isabelle.

### Citations

745 |
Introduction to Metamathematics
- Kleene
- 1952
(Show Context)
Citation Context ...am and its specication. More precisely, we will specify a predicate realizes which relates terms (so-called realizers) with logical formulae. The notion of realizability wassrst introduced by Kleene [=-=15-=-] 7 to study the semantics of intuitionistic logic. In his original formulation, realizers were Godel numbers, which were somewhat hard to work with. To improve on this, Kreisel introduced so-called m... |

319 | System description: Twelf — a meta-logical framework for deductive systems
- Pfenning, Schürmann
(Show Context)
Citation Context ...he constant Null as its only element. It should be noted that the functions typeof and Type are not actually dened within Isabelle/Pure, since doing so would require a kind of meta-logical framework [=-=2-=-0], but rather serve as syntax to formulate the rewrite rules below. Intuitively, a program extracted from a proof of P =) Q should be some function of type ) . However, not all parts of a formula a... |

97 |
The Coq proof assistant reference manual : Version 6.1
- Barras, Boutin, et al.
- 1997
(Show Context)
Citation Context ...specication contains an algorithm which, by construction, satises this speci- cation. This idea forms the basis for program extraction mechanisms, which can be found in theorem provers such as Coq [3]=-=-=- or Nuprl [11]. To date, program extraction has mainly been restricted to theorem provers based on expressive dependent type theories such as the Calculus of Constructions [12]. A notable exception is... |

76 |
Implementing Mathematics with the Nuprl Development System
- Constable, Allen, et al.
- 1986
(Show Context)
Citation Context ...contains an algorithm which, by construction, satises this speci- cation. This idea forms the basis for program extraction mechanisms, which can be found in theorem provers such as Coq [3] or Nuprl [1=-=1]-=-. To date, program extraction has mainly been restricted to theorem provers based on expressive dependent type theories such as the Calculus of Constructions [12]. A notable exception is the Minlog Sy... |

74 | Type classes and overloading in higher-order logic
- Wenzel
- 1997
(Show Context)
Citation Context ...dding new rules. Rewrite rules are formulated using Isabelle's term calculus introduced in x2.1. In order to explicitly encode type constraints on the level of terms, we use a technique due to Wenzel =-=[-=-22]. We introduce a new polymorphic type itself together with a constant TYPE :: itself. On top of this, we add a type Type together with a coercion function itself ) Type. Then, typeof will be a f... |

73 | Isabelle/Isar — a versatile environment for human-readable formal proof documents
- Wenzel
- 2002
(Show Context)
Citation Context ...e no Suc i -path from j to k either, because this would contradict lemma4 0 . In order to formalize the above proof in Isabelle in a readable way, we make use of the proof language Isar due to Wenzel =-=[23]-=-. theorem warshall : V j k : : (9 p: is-path r p i j k) _ (9 p: is-path r p i j k) proof (induct i) case (0 j k) show ?case | induction basis proof (cases r j k) assume r j k = T hence is-path r (j ; ... |

58 |
Synthesis of ML programs in the system Coq
- Paulin-Mohring, Werner
- 1993
(Show Context)
Citation Context ... [11], which is based on Martin-Lof type theory, and the PX system by Hayashi [14]. The Coq system [3], which is based on the Calculus of Inductive Constructions (CIC), can extract programs to OCaml [=-=19]-=- and Haskell. Paulin-Mohring [18, 17] has given a realizability interpretation for the Calculus of Constructions and proved the correctness of extracted programs with respect to this realizability int... |

57 | Refined program extraction from classical proofs
- Berger, Buchholz, et al.
(Show Context)
Citation Context ... 15 inductive datatypes and predicates. It has recently been extended to produce correctness proofs for extracted programs as well. Moreover, it also supports program extraction from classical proofs =-=[6]. Isa-=-belle has already been used for implementing program extraction calculi in the past, too. Basin and Ayari [2] have shown how to simulate Manna and Waldinger's \Deductive Tableau" in Isabelle/HOL.... |

52 | Executing higher order logic
- Berghofer, Nipkow
- 2002
(Show Context)
Citation Context ...belle. The checking process turns the correctness proof into a genuine theorem, which may be used in other formalizations together with the extracted program. Finally, using Isabelle's code generator =-=[9]-=-, the extracted function can be compiled into an eciently executable ML program. The rest of the paper is structured as follows: In x2, we give an overview of the logical system underlying Isabelle, a... |

49 |
Extraction de programmes dans le Calcul des Constructions
- Paulin-Mohring
- 1989
(Show Context)
Citation Context ...ting the transitive closure of a relation can be derived using program extraction. The formalization is inspired by Berger et al. [7]. It has also been treated in the Coq system [3] by Paulin-Mohring =-=[18]-=-. In the sequel, a relation will be a function mapping two elements of a type to a boolean value. datatype b = T j F types 0 a rel = 0 a ) 0 a ) b To emphasize that the relation has to be decidable, w... |

44 |
Extracting F ! programs from proofs in the Calculus of Constructions
- Paulin-Mohring
- 1989
(Show Context)
Citation Context ...of type theory, and the PX system by Hayashi [14]. The Coq system [3], which is based on the Calculus of Inductive Constructions (CIC), can extract programs to OCaml [19] and Haskell. Paulin-Mohring [=-=18, 17]-=- has given a realizability interpretation for the Calculus of Constructions and proved the correctness of extracted programs with respect to this realizability interpretation. Although it would be pos... |

41 |
Une The'orie Des Constructions
- Coquand
- 1985
(Show Context)
Citation Context ...orem provers such as Coq [3] or Nuprl [11]. To date, program extraction has mainly been restricted to theorem provers based on expressive dependent type theories such as the Calculus of Constructions =-=[12]-=-. A notable exception is the Minlog System by Schwichtenberg [5], which is based on minimal rst order logic. Although Isabelle is based on simply-typed minimal higher order logic, which is purely cons... |

37 | Proof Terms for Simply Typed Higher Order Logic
- Berghofer, Nipkow
- 2000
(Show Context)
Citation Context ...r. The aim of this paper is to demonstrate that Isabelle is indeed quite suitable as a basis for program extraction. It has already been demonstrated that proofs in Isabelle can be encoded as -terms [=-=8]-=-. Based on this encoding, we describe a mechanism that turns an Isabelle proof into a functional program. Since Isabelle is a generic theorem prover, this mechanism will be generic, too. In order to i... |

31 |
Extracting Fω ’s programs from proofs in the Calculus of Constructions
- PAULIN-MOHRING
- 1989
(Show Context)
Citation Context ...Löf type theory, and the PX system by Hayashi [14]. The Coq system [3], which is based on the Calculus of Inductive Constructions (CIC), can extract programs to OCaml [19] and Haskell. Paulin-Mohring=-= [18, 17]-=- has given a realizability interpretation for the Calculus of Constructions and proved the correctness of extracted programs with respect to this realizability interpretation. Although it would be pos... |

27 | Proof theory at work: Program development in the Minlog system
- Benl, Berger, et al.
- 1998
(Show Context)
Citation Context ...action has mainly been restricted to theorem provers based on expressive dependent type theories such as the Calculus of Constructions [12]. A notable exception is the Minlog System by Schwichtenberg =-=[5-=-], which is based on minimal rst order logic. Although Isabelle is based on simply-typed minimal higher order logic, which is purely constructive, little eort has been devoted to the issue of program ... |

24 | The Warshall algorithm and Dickson’s lemma: Two examples of realistic program extraction
- Berger, Schwichtenberg, et al.
(Show Context)
Citation Context ...orithm As a larger example, we show how Warshall's algorithm for computing the transitive closure of a relation can be derived using program extraction. The formalization is inspired by Berger et al. =-=[7]-=-. It has also been treated in the Coq system [3] by Paulin-Mohring [18]. In the sequel, a relation will be a function mapping two elements of a type to a boolean value. datatype b = T j F types 0 a re... |

24 | Deliverables: A categorical approach to program development in type theory
- McKinna, Burstall
- 1993
(Show Context)
Citation Context ...ility. The built-in reduction relation of this calculus re ects the behaviour of the functions corr and extr dened in x3. A similar approach is taken in Burstall and McKinna's theory of deliverables [=-=16-=-]. A deliverable is a pair consisting of a program together with its correctness proof, which is modeled using strong types. Anderson [1] describes the embedding of asrst order logic with program ext... |

20 |
Interactive Program Derivation
- Coen
- 1992
(Show Context)
Citation Context ...elle has already been used for implementing program extraction calculi in the past, too. Basin and Ayari [2] have shown how to simulate Manna and Waldinger's \Deductive Tableau" in Isabelle/HOL. =-=Coen [10] for-=-malized his own \Classical Computational Logic", which is tailored specically towards program extraction, whereas our framework is applicable to common object logics such as HOL. 7 Conclusion We ... |

9 |
PX: A Computational Logic. Foundations of Computing
- SusumuHayashi, Nakano
- 1988
(Show Context)
Citation Context ... q ) is-path r q i j k 6 Related work Thesrst theorem provers to support program extraction were Constable's Nuprl system [11], which is based on Martin-Lof type theory, and the PX system by Hayashi [=-=14]-=-. The Coq system [3], which is based on the Calculus of Inductive Constructions (CIC), can extract programs to OCaml [19] and Haskell. Paulin-Mohring [18, 17] has given a realizability interpretation ... |

5 |
Studies of a Theory of Specifications with built-in Program Extraction
- Severi, Szasz
- 2001
(Show Context)
Citation Context ... in §3, the Coq system has two universes Set and Prop, which are inhabited by computationally interesting and computationally noninteresting types, respectively. Recently, Fernández, Severi and Szas=-=z [13, 21]-=- have proposed an extension of the Calculus of Constructions called the Theory of Specifications, which internalizes program extraction and realizability. The built-in reduction relation of this calcu... |

4 | A higher-order interpretation of deductive tableau
- Ayari, Basin
- 1999
(Show Context)
Citation Context ...programs as well. Moreover, it also supports program extraction from classical proofs [6]. Isabelle has already been used for implementing program extraction calculi in the past, too. Basin and Ayari =-=[2] have sho-=-wn how to simulate Manna and Waldinger's \Deductive Tableau" in Isabelle/HOL. Coen [10] formalized his own \Classical Computational Logic", which is tailored specically towards program extra... |

3 | Program extraction in a logical framework setting
- Anderson
- 1994
(Show Context)
Citation Context ...ch is taken in Burstall and McKinna's theory of deliverables [16]. A deliverable is a pair consisting of a program together with its correctness proof, which is modeled using strong types. Anderson [=-=1]-=- describes the embedding of asrst order logic with program extraction in Elf and proves several meta-theoretic properties of the extraction function, e.g. well-typedness of the extracted program. The ... |

3 | The 5 colour theorem in Isabelle/Isar
- Bauer, Nipkow
- 2002
(Show Context)
Citation Context ...studies. A good candidate seem to be algorithms from graph theory. For example, one could think of extracting a graph colouring algorithm from the proof of the Five Colour Theorem by Bauer and Nipkow =-=[4-=-]. Another important point to study is how our framework can be instantiated to other logics, such as constructive versions of Zermelo-Frankel Set Theory (ZF). For the HOL instantiation described in x... |

1 |
An operational approach to program extraction in the Calculus of Constructions
- Fernandez, Severi
- 2002
(Show Context)
Citation Context ...in x3, the Coq system has two universes Set and Prop, which are inhabited by computationally interesting and computationally noninteresting types, respectively. Recently, Fernandez, Severi and Szasz [=-=13, 21-=-] have proposed an extension of the Calculus of Constructions called the Theory of Specications, which internalizes program extraction and realizability. The built-in reduction relation of this calcul... |

1 |
Studies of a theory of speci with built-in program extraction
- Severi, Szasz
- 2001
(Show Context)
Citation Context ...in x3, the Coq system has two universes Set and Prop, which are inhabited by computationally interesting and computationally noninteresting types, respectively. Recently, Fernandez, Severi and Szasz [=-=13, 21-=-] have proposed an extension of the Calculus of Constructions called the Theory of Specications, which internalizes program extraction and realizability. The built-in reduction relation of this calcul... |