The Synthesis of Logic Programs from Inductive Proofs
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.
KeywordsAlan Argo Alse ECSC
Unable to display preview. Download preview PDF.
- [Bruynooghe et al 89]M. Bruynooghe, D. de Schreye, and B. Krekels. Compiling control. Journal of Logic Programming, 135–162, 1989.Google Scholar
- [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
- [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
- [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
- [Hogger 81]
- [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
- [Lloyd 87]J.W. Lloyd. Foundations of Logic Programs. Symbolic Computation, Springer-Verlag, 1987. Second, extended edition.Google Scholar
- [Manna & Waldinger 87]
- [Martin-Löf 79]