# Predicate synthesis from formal specifications: Using mathematical induction for finding the preconditions of theorems

## Abstract

Predicate synthesis from examples (PreSE) becomes nowadays an acknowledged topic in Machine Learning (ML). Less known in ML (and in Artificial Intelligence as well), however, is predicate synthesis from formal specifications (PreS). The importance of PreS was pointed out by logicians (Skolem, Péter, ...) interested in recursive functions. It became clear that a false first order formula F of the form ∀x A(x) may specify a predicate P such that ∀x {P(x) ⇒ A(x)} is true, i.e., P describes the set S of all x for which A(x) is true. We say that F is a formal specification of P. Until now, automated construction of a definition of P for F has been partially tackled in program synthesis from incomplete specifications. However, as we illustrate in the paper, very often this approach succeeds to find a proper subset S' of S only. Therefore, a new method is necessary for PreS.

In this paper we describe an algorithm and we show that this algorithm together with inductive theorem proving (ITP), i.e., proving theorems using mathematical induction principle can be considered as a tool for PreS, because it provides a (recursive) definition of P. We will present also an application of PreS to simplifying proofs of implications, as well as an application of PreS to discovery of recursive calls which lead to synthesizing efficient programs.

## Keywords

Machine Learning predicate synthesis from examples predicate synthesis from formal specifications inductive theorem proving program synthesis from formal specifications program synthesis from incomplete specifications explanations Constructive Matching*PPRECOMAS*

## Preview

Unable to display preview. Download preview PDF.

## References

- [beth01]E. Beth: Les fondements logiques des mathematiques; Paris-Louvain, 1955.Google Scholar
- [chang-lcc01]C. L. Chang, R.Ch.T. Lcc: Symbolic Logic and Mechanical Theorem Proving; Academic Press, New York, 1973.Google Scholar
- [dershowitz03]N. Dershowitz: Synthesis by Completion; in: A. K. Joshi, (ed): Proceedings of the Ninth International Joint Conference on Artificial Intelligence; August, Los Angeles, 1985, 208–214.Google Scholar
- [franova-kodratoff02]M. Fraňová, Y. Kodratoff: Predicate Synthesis from Formal Specifications or Using Mathematical Induction for finding the preconditions of theorems; Rapport de Recherche No.646, L.R.I., Université de Paris-Sud, Orsay, France, February, 1991.Google Scholar
- [franova-kodratoff04]M. Fraňová, Y. Kodratoff: Practical Problems in the Automatization of Inductive Theorem Proving; Rapport de Recherche No.752, L.R.I., Université de Paris-Sud, Orsay, France, Mai, 1992.Google Scholar
- [franova-kodratoff06]M. Fraňová, Y. Kodratoff: Predicate Synthesis from Formal Specifications; to appear in the proceedings of ECAI'92, 1992.Google Scholar
- [franova02]M. Fraňová:
*CM*— Strategy — Driven Deductions for Automatic Programming; in: T. O'Shea, (ed.): ECAI-84: Advances in Artificial Intelligence; North-Holland, 1984, 573–576.Google Scholar - [franova08]M. Fraňová:
*PRECOMAS*Challenge; Rapport de Recherche No.376, L.R.I., Université de Paris-Sud, Orsay, France, September, 1987.Google Scholar - [franova10]M. Fraňová: CM-strategy: A Methodology for Inductive Theorem Proving or Constructive Well-Generalized Proofs; in: A. K. Joshi, (ed): Proceedings of the Ninth International Joint Conference on Artificial Intelligence; August, Los Angeles, 1985, 1214–1220.Google Scholar
- [franova11]M. Fraňová: An Implementation of Program Synthesis from Formal Specifications; in: Y. Kodratoff, (ed.): Proceedings of the 8th European Conference on Artificial Intelligence; August 1–5, Pitman, London, United Kingdom, 1988, 559–564.Google Scholar
- [franova15]M. Fraňová: Fundamentals for a new methodology for inductive theorem proving:
*CM-construction of atomic formulae*; in: Y. Kodratoff, (ed.): Proceedings of the 8th European Conference on Artificial Intelligence; August 1–5, Pitman, London, United Kingdom, 1988, 137–141.Google Scholar - [franova17]M. Fraňová: Fundamentals of a new methodology for Program Synthesis from Formal Specifications:
*CM*-construction of atomic formulae; Thesis, Université Paris-Sud, November, Orsay, France, 1988.Google Scholar - [franova21]M. Fraňová: A constructive proof for Prime Factorization Theorem: A result of putting it together in
*Constructive Matching*methodology; forthcoming, 1992.Google Scholar - [franova27]M. Fraňová:
*Constructive Matching*-Explanation Based Methodology for Inductive Theorem Proving; in: J. Dassow, J. Kelemen, (ed.): Aspects and Prospects of Theoretical Computer Science; LNCS 464, Springer-Verlag, 1990, 138–147.Google Scholar - [franova28]M. Fraňová: Failure analysis in
*Constructive Matching*methodology; forthcoming, 1993.Google Scholar - [franova30]M. Fraňová:
*Constructive Matching*methodology for Inductive Theorem Proving and Program Synthesis revisited; forthcoming, 1993.Google Scholar - [franova31]M. Fraňová:
*Constructive Matching Methodology*. A Step Toward Creative Automated Inductive Theorem Proving; Rapport de Recherche No. 668, L.R.I., Université de Paris-Sud, Orsay, France, 1991.Google Scholar - [guiho02]G. Guiho, Ch. Grosse: Program synthesis from incomplete specifications; in: W. Bibel, R. Kowalski (ed): Proceedings of the 5-th Conference on Automated Deduction; Lecture Notes in Computer Science 87, Springer-Verlag, Les Arcs, France, 1980, 53–63.Google Scholar
- [kodratoff22]Y. Kodratoff: An Introduction to Machine Learning; Pitman, London, 1988.Google Scholar
- [lebowitz01]M. Lebowitz: Concept learning in a rich input domain: Generalization-based Memory; in: R. Michalski, Jaime G. Carbonell, Tom M. Mitchel (eds): Machine Learning: An Artificial Intelligence Approach II; Morgan Kaufmann, 1986, 193–214.Google Scholar
- [manna-waldinger01]Z. Manna, R. Waldinger: A Deductive Approach to Program Synthesis; ACM Transactions on Programming Languages and Systems, Vol. 2., No.1, January, 1980, 90–121.Google Scholar
- [michalski03]R. Michalski: Inductive Learning as Rule-guidcd Transformation of Symbolic Descriptions: a Theory and Implementation; in: A. Biermann, G. Guiho.Y. Kodratoff (ed): Automatic Program Construction Techniques; Macmillan Publishing Company, London, 1984, 517–522.Google Scholar
- [muggleton01]S. Muggleton, W. Buntine: Machine Invention of First Order Predicates by Inverting Resolution; in Proceedings of the 5th International Conference on Machine Learning, Pitman, 1988, 339–352.Google Scholar
- [rouveirol01]C. Rouveirol: Postponing Choices when Inverting Resolution; in: A. Biermann, G. Guiho.Y. Kodratoff (ed): Automatic Program Construction Techniques; Macmillan Publishing Company, London, 1984, 557–562.Google Scholar
- [rouveirol02]C. Rouveirol, J. F. Puget: A Simple Solution for Inverting Resolution; Proceedings of the 4th European Working session on Learning, Pitman, 1989, 201–211.Google Scholar
- [sammut01]C. Sammut, R. B. Banerji: Learning Concepts by Asking Questions; in: R. Michalski, Jaime G. Carbonell, Tom M. Mitchel (eds): Machine Learning: An Artificial Intelligence Approach II; Morgan Kaufmann, 1986, 167–192.Google Scholar
- [shapiro02]E. Y. Shapiro, E. Y. Shapiro: Algorithmic Programm Debugging; MIT Press, Cambridge, MA, 1983.Google Scholar
- [skolem03]T. Skolem: The foundations of elementary mathematic established by means of the recursive mode of thought, without the use of apparent variables ranging over infinite domains; in: J. van Heijenoort: From Frege to Godel, A source book in mathematical logic, 1879–1931; Harvard University Press, Cambridge, Massachusets, 1967, 302–334.Google Scholar
- [smith07]D. R. Smith: Derived preconditions and their use in program synthesis; in: D. W. Loveland, (ed.): 6th Conference on Automated Deduction; LNCS 138, Springer-Verlag, 1982, 172–193.Google Scholar
- [utgoff01]P. E. Utgoff: Shift of Bias for Inductive Concept Learning; in: R. Michalski, Jaime G. Carbonell, Tom M. Mitchel (eds): Machine Learning: An Artificial Intelligence Approach II; Morgan Kaufmann, 1986, 107–148.Google Scholar
- [vrain01]C. Vrain: OGUST: A system that Learns Using Domain Properties Expressed as Theorems; in: Y. Kodratoff, R. S. Michalski: Machine Learning An Artificial Intelligence Approach, Volume III; Morgan Kaufmann, 1990, 360–382.Google Scholar