The Synthesis of Logic Programs from Inductive Proofs

  • Alan Bundy
  • Alan Smaill
  • Geraint Wiggins
Part of the ESPRIT Basic Research Series book series (ESPRIT BASIC)

Abstract

We describe a technique for synthesising logic (Prolog) programs from non-executable specifications. This technique is adapted from one for synthesising functional programs as total functions. Logic programs, on the other hand, define predicates. They can be run in different input modes, they sometimes produce multiple outputs and sometimes none. They may not terminate. The key idea of the adaptation is that a predicate is a total function in the all-ground mode, i.e. when all its arguments are inputs (pred(+,...,+) in Prolog notation). The program is synthesised as a function in this mode and then run in other modes. To make the technique work it is necessary to synthesise pure logic programs, without the closed world assumption, and then compile these into Prolog programs. The technique has been tested on the OYSTER (functional) program development system.

Keywords

Alan Argo Alse ECSC 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [Bruynooghe et al 89]
    M. Bruynooghe, D. de Schreye, and B. Krekels. Compiling control. Journal of Logic Programming, 135–162, 1989.Google Scholar
  2. [Bundy 88a]
    A. Bundy. A broader interpretation of logic in logic programming. In Proceedings of the Fifth International Logic Programming Conference/ Fifth Symposium on Logic Programming, pages 1624–1648, MIT Press, 1988. Also available from Edinburgh as Research Paper No. 388.Google Scholar
  3. [Bundy 88b]
    A. Bundy. Proposal for a Recursive Techniques Editor for Prolog. Research Paper 394, Dept. of Artificial Intelligence, Edinburgh, 1988. Submitted to the special issue of Instructional Science on Learning Prolog: Tools and Related Issues.Google Scholar
  4. [Constable et al 86]
    R.L. Constable, S.F. Allen, H.M. Bromley, et al. Implementing Mathematics with the Nuprl Proof Development System. Prentice Hall, 1986.Google Scholar
  5. [Hogger 81]
    C.J. Hogger. Derivation of logic programs. JACM, 28(2):372–392, April 1981.MathSciNetMATHCrossRefGoogle Scholar
  6. [Horn 88]
    C. Horn. The Nurprl Proof Development System. Working paper 214, Dept. of Artificial Intelligence, Edinburgh, 1988. The Edinburgh version of Nurprl has been renamed Oyster.Google Scholar
  7. [Lloyd 87]
    J.W. Lloyd. Foundations of Logic Programs. Symbolic Computation, Springer-Verlag, 1987. Second, extended edition.Google Scholar
  8. [Manna & Waldinger 87]
    Z. Manna and R. Waldinger. The origin of a binary-search paradigm. Science of Computer Programming, 9:37–83, 1987.MathSciNetMATHCrossRefGoogle Scholar
  9. [Martin-Löf 79]
    Per Martin-Löf. Constructive mathematics and computer programming. In 6th International Congress for Logic, Methodology and Philosophy of Science, pages 153–175, Hanover, August 1979. Published by North Holland, Amsterdam. 1982.CrossRefGoogle Scholar

Copyright information

© ECSC — EEC — EAEC, Brussels — Luxembourg 1990

Authors and Affiliations

  • Alan Bundy
  • Alan Smaill
  • Geraint Wiggins

There are no affiliations available

Personalised recommendations