# Extracting Purely Functional Contents from Logical Inductive Types

@inproceedings{Delahaye2007ExtractingPF, title={Extracting Purely Functional Contents from Logical Inductive Types}, author={David Delahaye and Catherine Dubois and Jean-Fr{\'e}d{\'e}ric {\'E}tienne}, booktitle={TPHOLs}, year={2007} }

We propose a method to extract purely functional contents from logical inductive types in the context of the Calculus of Inductive Constructions. This method is based on a mode consistency analysis, which verifies if a computation is possible w.r.t. the selected inputs/outputs, and the code generation itself. We prove that this extraction is sound w.r.t. the Calculus of Inductive Constructions. Finally, we present some optimizations, as well as the implementation designed in the Coq proof…

## 14 Citations

### Producing Certified Functional Code from Inductive Specifications

- Computer ScienceCPP
- 2012

This paper defines for a certain class of inductive specifications a way to extract functions from them and automatically produce the proof of soundness of the extracted function w.r.t. its inductive specification, and uses user-defined modes which label inputs and outputs to extract several computational contents from a single inductive type.

### Modular pre-processing for automated reasoning in dependent type theory

- Computer ScienceArXiv
- 2022

A modular suite of pre-processing transformations is presented, which incrementally bring certain formulas expressed in the Calculus of Inductive Constructions closer to the first-order logic of Satiﬁability Modulo Theory solvers.

### Computing correctly with inductive relations

- Computer SciencePLDI
- 2022

This paper presents a unifying framework for extracting three different kinds of computational content from inductively defined relations: semi-decision procedures, enumerators, and random generators.

### Turning Inductive into Equational Specifications

- Computer ScienceTPHOLs
- 2009

The scope of codegeneration in Isabelle is extended from functional to functional-logic programs while leaving the trusted foundations of code generation itself intact.

### Generating good generators for inductive relations

- Computer ScienceProc. ACM Program. Lang.
- 2018

This work shows how to use ideas from narrowing to compile a large subclass of Coq's inductive relations into efficient generators, avoiding the interpretive overhead of previous implementations.

### A List-machine Benchmark for Mechanized Metatheory: (Extended Abstract)

- Computer ScienceElectron. Notes Theor. Comput. Sci.
- 2007

### Mechanized Semantics for the Clight Subset of the C Language

- Computer ScienceJournal of Automated Reasoning
- 2009

The formal semantics of a large subset of the C language called Clight is presented, which includes pointer arithmetic, struct and union types, C loops and structured switch statements, and is mechanized using the Coq proof assistant.

### A List-Machine Benchmark for Mechanized Metatheory

- Computer ScienceJournal of Automated Reasoning
- 2011

A benchmark to compare theorem-proving systems on their ability to express proofs of compiler correctness, and specific criteria for evaluating the utility of mechanized metatheory systems are proposed.

### Génération de code fonctionnel certifié à partir de spécifications inductives dans l'environnement Focalize

- Computer Science
- 2010

This method consists of a preliminary analysis of mode consistency, which verifies if a computation is possible with respect to the selected inputs/outputs, and the code generation itself.

### Random Testing for Language Design

- Computer Science
- 2018

A domain-specific language, called Luck, is presented, in which generators are conveniently expressed by decorating predicates with lightweight annotations to control both the distribution of generated values and the amount of constraint solving that happens before each variable is instantiated.

## References

SHOWING 1-10 OF 13 REFERENCES

### Executing Higher Order Logic

- Computer ScienceTYPES
- 2000

The design of a prototyping component for the theorem prover Isabelle/HOL is reported on, consisting of datatypes, recursive functions and inductive definitions, which are compiled into a functional program.

### A Compiler for Natural Semantics

- Computer ScienceCC
- 1996

The Relational Meta-Language, RML, is defined as an executable specification language for natural semantics and the compilation strategy used by the rml2c compiler is described, where the CPS is emitted as low-level C code, using an efficient technique for implementing tailcalls.

### A New Extraction for Coq

- Computer ScienceTYPES
- 2002

A new extraction mechanism for the Coq proof assistant that automatic generation of functional code from Coq proofs, in order to produce certified programs is presented.

### Integrating Natural Semantics and Attribute Grammars : the Minotaur System

- Computer Science
- 1993

It is shown how Attribute Grammars techniques can be adequate for evaluation of a quite large subclass of Natural Semantics specifications, including specifications of an arithmetic calculator, a tree transformation, a type-checker for an Algol-like language, and more.

### Constraint-based mode analysis of mercury

- Computer SciencePPDP '02
- 2002

A mode inference system for Mercury is developed based on mapping each predicate to a system of Boolean constraints that describe where its variables can be produced, which allows us to handle programs that are not supported by the existing system.

### Executable structural operational semantics in Maude

- Computer ScienceJ. Log. Algebraic Methods Program.
- 2006

### Curry-Style Types for Nominal Terms

- MathematicsTYPES
- 2006

A rank 1 polymorphic type system for nominal terms, where typing environments type atoms, variables and function symbols, in a convenient Curry-style, so the user has no need to explicitly type abstracted atoms.

### Integrated program debugging, verification, and optimization using abstract interpretation (and the Ciao system preprocessor)

- Computer ScienceSci. Comput. Program.
- 2005

### Input/Output Dependencies of Normal Logic Programs

- Computer Science, EconomicsJ. Log. Comput.
- 1994

These results imply that the three-valued Fitting/Kunen completion is the right declarative semantics for negation as failure for SLDNF-resolution.

### Centaur: the system

- Computer ScienceSDE 3
- 1988

This paper describes the organization of the CENTAUR system and its main components, which are a database component that provides standardized representation and access to formal objects and their persistent storage; a logical engine that is used to execute formal specifications; an object-oriented man-machine interface that gives easy access to the system's functions.