Analysis of methods for extraction of programs from non-constructive proofs

نویسنده

  • Trifon Trifonov
چکیده

Proofs in constructive logic correspond to functional programs in a direct and natural way. Computational content can also be found in proofs which use non-constructive principles, but more advanced techniques are required to interpret such proofs. Various methods have been developed to harvest programs from derivations in classical logic and experiments have yielded surprising and counterintuitive, yet correct and e cient algorithms. Nevertheless, the use of non-constructive arguments generally leads to an indirect backtracking computation, which is slower and more di cult to understand as compared to a program extracted from a constructive proof. Constructive proofs can be transformed into programs in an unambiguous manner by projecting only their computational components. However, for proofs in classical logic there seems to be no canonical de nition of their computational meaning, since every extraction method introduces speci c computational infrastructure to support non-constructive reasoning. Applying several techniques to the same proof can result in di erent correct programs, however the relation between them with respect to e ciency, size and readability has not been thoroughly explored. The rst part of the present work compares two computational interpretations of non-constructive proofs: re ned A-translation [BBS02] and Gödel's functional Dialectica interpretation [Göd58]. An arithmetical system is de ned in which both techniques can be applied to the same proof object. The behaviour of the extraction methods is evaluated in the light of several case studies, and the resulting programs are compared. It is argued that the two interpretations correspond to speci c backtracking schemes and that programs obtained via re ned A-translation tend to be simpler, faster and more readable than programs obtained via Gödel's interpretation. The second part of the thesis introduces three layers of optimisation of Gödel's interpretation to produce faster and more readable programs. First, it is shown that syntactic repetition of subterms can be reduced by using let-constructions instead of meta substitutions. The practical e ects of the modi cation are nearly linear size of extracted terms and improved e ciency, achieved by avoiding repeated evaluations of equal terms. The second improvement is an extension of previous work [Ber05, Her07b], which allows declaring syntactically computational parts of the proof as computationally irrelevant. It is shown that Gödel's interpretation admits a wide variety of such annotations, which can be used to remove redundant parameters, possibly improving the e ciency of the program. An additional feature is the ability to embed Kreisel's modi ed realisability, and thus the re nedA-translation, inside the extended Dialectica interpretation. Finally, a special case of induction is identi ed, for which a more e cient recursive extracted term can be de ned. It is shown the outcome of case distinctions can be memoised by a boolean ag, which can result in exponential improvement of the average time complexity of the extracted program.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Programmation fonctionnelle certifiée : L'extraction de programmes dans l'assistant Coq. (Certified functional programming : Program extraction within Coq proof assistant)

This work concerns the generation of programs which are certified to be correct byconstruction. These programs are obtained by extracting relevant information from construc-tive proofs made with the Coq proof assistant.Such a translation, named “extraction”, of constructive proofs into functional programsis not new, and corresponds to an isomorphism known as Curry-Howard’s. ...

متن کامل

From coinductive proofs to exact real arithmetic: theory and applications

Based on a new coinductive characterization of continuous functions we extract certified programs for exact real number computation from constructive proofs. The extracted programs construct and combine exact real number algorithms with respect to the binary signed digit representation of real numbers. The data type corresponding to the coinductive definition of continuous functions consists of...

متن کامل

A Formal Framework for Synthesis and Verification of Logic Programs

In this paper we will present a formal framework, based on the notion of extraction calculus, which has been successfully applied to define procedures for extracting information from constructive proofs. Here we will apply such a mechanism to give a proof-theoretic account of SLD-derivations. We show how proofs of suitable constructive systems can be used in the context of deductive synthesis o...

متن کامل

Program extraction from coinductive proofs and its application to exact real arithmetic

Program extraction has been initiated in the field of constructive mathematics, and it attracts interest not only from mathematicians but also from computer scientists nowadays. From a mathematical viewpoint its aim is to figure out computational meaning of proofs, while from a computer-scientific viewpoint its aim is the study of a method to obtain correct programs. Therefore, it is natural to...

متن کامل

Quasi-linear Dialectica Extraction

Gödel’s functional interpretation [Göd58] can be used to extract programs from non-constructive proofs. Though correct by construction, the obtained terms can be computationally inefficient. One reason for slow execution is the re-evaluation of equal subterms due to the use of substitution during the extraction process. In the present paper we define a variant of the interpretation, which avoid...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2012