Skip to main content
Log in

The Warshall Algorithm and Dickson's Lemma: Two Examples of Realistic Program Extraction

Journal of Automated Reasoning Aims and scope Submit manuscript

Abstract

By means of two well-known examples it is demonstrated that the method of extracting programs from proofs is manageable in practice and may yield efficient programs. The Warshall algorithm computing the transitive closure of a relation is extracted from a constructive proof that repetitions in a path can always be avoided. Second, we extract a program from a classical (i.e., nonconstructive) proof of a special case of Dickson's lemma, by transforming the classical proof into a constructive one. These techniques (as well as the examples) are implemented in the interactive theorem prover MINLOG developed at the University of Munich.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Similar content being viewed by others

References

  • Bates, J. L. and Constable, R. L.: Proofs as programs, ACM Trans. Programming Languages and Systems 7(1) (1985), 113–136.

    Google Scholar 

  • Benl, H., Berger, U., Schwichtenberg, H., Seisenberger, M., and Zuber, W.: Proof theory at work: Program development in the Minlog system, in W. Bibel and P. Schmitt (eds), Automated Deduction-A Basis for Applications, Vol. II: Systems and Implementation Techniques, Appl. Logic Series, Kluwer Academic Publishers, Dordrecht, 1998, pp. 41–71.

    Google Scholar 

  • Benl, H. and Schwichtenberg, H.: Formal correctness proofs of functional programs: Dijkstra's algorithm, a case study, in U. Berger and H. Schwichtenberg (eds), Computational Logic, Computer and Systems Sci. Series F 165, Springer-Verlag, Berlin, 1999, pp. 113–126.

    Google Scholar 

  • Berger, U.: Program extraction from normalization proofs, in M. Bezem and J. Groote (eds), Typed Lambda Calculi and Applications, Lecture Notes in Comput. Sci. 165, Springer-Verlag, Berlin, 1993, pp. 91–106.

    Google Scholar 

  • Berger, U. and Schwichtenberg, H.: Program extraction from classical proofs, in D. Leivant (ed.), Logic and Computational Complexity, International Workshop LCC '94, Indianapolis, IN, USA, October 1994, Lecture Notes in Comput. Sci. 960, Springer-Verlag, Berlin, 1995, pp. 77–97.

    Google Scholar 

  • Broy, M. and Pepper, P.: Program development as a formal activity, IEEE Trans. on Software Eng. 7(1) (1981), 14–22.

    Google Scholar 

  • Coquand, T. and Persson, H.: Gröbner bases in type theory, in T. Altenkirch, W. Naraschewski, and B. Reus (eds), Types for Proofs and Programs, Lecture Notes in Comput. Sci. 1657, Springer-Verlag, Berlin, 1999.

    Google Scholar 

  • Dickson, L.: Finiteness of the odd perfect and primitive abundant numbers with n distinct prime factors, Amer. J. Math. 35 (1913), 413–422.

    Google Scholar 

  • Dragalin, A.: New kinds of realizability, in Abstracts of the 6th International Congress of Logic, Methodology and Philosophy of Sciences, Hannover, Germany, 1979, pp. 20–24.

  • Friedman, H.: Classically and intuitionistically provably recursive functions, in D. Scott and G. Müller (eds), Higher Set Theory, Lecture Notes in Math. 669, Springer-Verlag, Berlin, 1978, pp. 21–28.

    Google Scholar 

  • Kohlenbach, U.: Analysing proofs in analysis, in W. Hodges, M. Hyland, C. Steinhorn, and J. Truss (eds), Logic: From Foundations to Applications. European Logic Colloquium (Keele, 1993), Oxford University Press, 1996, pp. 225–260.

  • Kreisel, G.: Interpretation of analysis by means of constructive functionals of finite types, in A. Heyting (ed.), Constructivity in Mathematics, North-Holland, Amsterdam, 1959, pp. 101–128.

  • Leivant, D.: Syntactic translations and provably recursive functions, J. Symbolic Logic 50(3) (1985), 682–688.

    Google Scholar 

  • Murthy, C.: Extracting constructive content from classical proofs, Technical Report 90–1151, Dept. of Comp. Science, Cornell Univ., Ithaca, New York. PhD thesis, 1990.

    Google Scholar 

  • Nash-Williams, C. S. J. A.: On well-quasi-ordering finite trees, Proc. Cambridge Philos. Soc. 59 (1963), 833–835.

    Google Scholar 

  • Pfenning, F.: Program development through proof transformation, in W. Sieg (ed.), Logic and Computation, Contemp. Math. 106, Amer. Math. Soc., Providence, RI, 1990, pp. 251–262.

    Google Scholar 

  • Tait, W. W.: Intensional interpretations of functionals of finite type I, J. Symbolic Logic 32(2) (1967), 198–212.

    Google Scholar 

  • Troelstra, A. S.: Metamathematical Investigation of Intuitionistic Arithmetic and Analysis, Lecture Notes in Math. 344, Springer-Verlag, Berlin, 1973.

    Google Scholar 

  • Troelstra, A. S. and van Dalen, D.: Constructivism in Mathematics: An Introduction, Stud. Logic Found. Math. 121, 123, North-Holland, Amsterdam, 1988.

  • Veldman, W. and Bezem, M.: Ramsey's theorem and the pigeonhole principle in intuitionistic mathematics, J. London Math. Soc. 47 (1993), 193–211.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Berger, U., Schwichtenberg, H. & Seisenberger, M. The Warshall Algorithm and Dickson's Lemma: Two Examples of Realistic Program Extraction. Journal of Automated Reasoning 26, 205–221 (2001). https://doi.org/10.1023/A:1026748613865

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1023/A:1026748613865

Navigation