Abstract
This paper presents a framework for synthesizing rewrite programs using higher-order and semantic unification.
Many problems in computer science and artificial intelligence can be formalized as problems of higher-order unification. Among such problems is first-order anti-unification. In this paper, we show that first-order anti-unification can be regarded as a second-order matching problem and solved by the algorithm for higher-order unification.
The problem of synthesizing a program from example input-output pairs can be considered as an extension of anti-unification because the problem of instantiating a program schema by examples consists of a pair of anti-unification problems. We show that higher-order unification can also be used to instantiate a recursive program schema and synthesize a rewrite program from examples. For expressing program schemata for rewrite programs, we extend lambda terms by introducing a construct called pseudo-abstraction. In order to synthesize a rewrite program that refers to existing ones as libraries, we merge higher-order unification and semantic unification because existing rewrite programs comprise a term rewriting system.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Biermann, A.: The inference of regular LISP programs from examples,IEEE Transactions on Systems, Man, and Cybernetics, Vol. 8, No. 8 (1978), pp. 585–600.
Breazu-Tannen, V., Gallier, J.: Polymorphic rewriting conserves algebraic strong normalization and confluence,Automata, Languages and Programming (Ausiello, G., Dezani-Ciancaglini, M., Ronchi Della Rocca, S. eds.), LNCS372 (1989), pp. 137–150.
de la Tour, T. B., Caferra, R.: Proof analogy in interactive theorem proving: A method to express and use it via second order pattern matching,Proceedings of the Sixth National Conference on Artificial Intelligence (1987), pp. 95–99.
Elliott, C. M.: Higher-order unification with dependent function types,Rewriting Techniques and Applications (Dershowitz, N. ed.), LNCS355 (1989), pp. 121–136.
Fay, M.: First-order unification in an equational theory,4th Workshop on Automated Deduction, Austin, Texas, 1979, pp. 161–167.
Gallier, J. H., Snyder, W.: A general complete E-unification procedure,Rewriting Techniques and Applications (Lescanne, P. ed.), LNCS256 (1987), pp. 216–227.
Hagiya, M.: Programming by example and proving by example using higher-order unification,to appear in CADE-10.
Hannan, J., Miller, D.: Uses of higher-order unification for implementing program transformers,Proceedings of the Fifth International Conference on Logic Programming and Symposium on Logic Programming, 1988, MIT Press, pp. 942–959.
Huet, G. P.: A unification algorithm for typed λ-calculus,Theoretical Computer Science, Vol. 1 (1975), pp. 27–57.
Huet, G., Lang, B.: Proving and applying program transformations expressed with second-order patterns,Acta Informatica, Vol. 11 (1978), pp. 31–55.
Hullot, J.-M.: Canonical forms and unification,5th Conference on Automated Deduction, LNCS87 (1980), pp. 318–334.
Jouannaud, J.-P., Kodratoff, Y.: Characterization of a class of functions synthesized from examples by a Summers like method using the Boyer-Moore-Wegbreit matching technique,Proceedings of IJCAI 79, 1979, pp. 440–447.
Kodratoff, Y.: A class of functions synthesized from a finite number of examples and a LISP program scheme,International Journal of Computer and Information Science, Vol. 8, No. 7 (1979), pp. 489–521.
Martelli, A., Rossi, G. F., Moiso, C.: Lazy unification algorithms for canonical rewrite systems,Resolution of Equations in Algebraic Structures, Volume 2, Rewriting Techniques (Aït-Kaci, H., Nivat, M. eds.), Academic Press (1989), pp. 245–274.
Muggleton, S., Buntine, W.: Machine invention of first order predicates by inverting resolution,Proceedings of the Fifth International Conference on Machine Learning (1988), pp. 339–352.
Nadathur, G., Miller, D.: An overview of λPROLOG,Proceedings of the Fifth International Conference and Symposium on Logic Programming, 1988, pp. 810–827.
Paulson, L. C.: Natural deduction as higher-order resolution,Journal of Logic Programming, Vol. 3 (1986), pp. 237–258.
Plotkin, G. D.: A note on inductive generalization,Machine Intelligence, Vol. 5 (1969), pp. 153–163.
Reynolds, J. C.: Transformational systems and algebraic structure of atomic formulas,Machine Intelligence, Vol. 5 (1969), pp. 135–151.
Shapiro, E. Y.: Algorithmic program diagnosis,Proceedings of the 9th ACM Symposium on Principles of Programming Languages, 1982, pp. 299–308.
Smith, D. R.: The synthesis of LISP programs from examples: A survey,Automatic Program Construction Techniques (Biermann, A. W., Guiho, G., Kodratoff, Y. eds.), 1984, pp. 307–324.
Snyder, W., Gallier, J.: Higher-order unification revisited: Complete sets of transformations,Journal of Symbolic Computation, Vol. 8, Nos 1&2 (1989), pp. 101–140.
Summers, P.D.: A methodology for LISP program construction from examples,JACM, Vol. 24, No. 1 (1977), pp. 161–175.
Togashi, A., Noguchi, S.:Inductive inference of term rewriting systems realizing algebras, Tohoku University, 1990,also to appear in ALT’90.
Author information
Authors and Affiliations
About this article
Cite this article
Hagiya, M. Synthesis of rewrite programs by higher-order and semantic unification. NGCO 8, 403–420 (1991). https://doi.org/10.1007/BF03037096
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF03037096