Abstract
A family of methods for composing logic programs from simpler components is presented. Specifically, simple pairs of programs operating on lists, trees and other recursive structures are composed to generate a single program with composite functionality. The methods are based onclausal join, a specific sequence of unfold/fold transformations for deriving a new clause from a given pair of clauses and a join specification.Procedural join composes a new procedure from two given procedures by applyingclausal join to all pairs of their clauses.1-1 Join composes a new procedure from closely related procedures by applyingclausal join to corresponding pairs only.Meta join is a modification of1-1 join for composing meta-interpreters. The transformations are straightforward to implement in Prolog, as is demonstrated in the paper.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Bloch, C., “Source-to-Source Transformations of Logic Programs,”MS Thesis, Department of Applied Mathematics, Weizmann Institute of Science, Rehovot, Israel, November, 1984.
Burstall, R. M. and Darlington, J., “A Transformation System for Developing Recursive Programs,”JACM, Vol. 24, No. 1 pp. 44–67, January, 1977.
Clark, K. L. and Sickel, S., “Predicate logic: a calculus for deriving programs,”Proc. IJCAI 77, Boston, 1977.
Ershov, A. P. and Jones N. D., “Two characterizations of Partial and Mixed Computation,”Literature circulated for Workshop on Partial and Mixed Computation, Oct., 1986.
Sterling, L., “Expert System=Knowledge+Meta-Interpreters,”Tech. Report, CS84-17, Werzmann Institute of Science, Renovot, Israel, 1984.
Sterling, L. and Beer, R. D., “Incremental Flavor-Mixing of Meta-interpreters for Expert System Construction,”Proceedings Third Logic Programming Symposium, pp. 20–27, Salt Lake City, 1986.
Sterling, L. and Lakhotia, A., “Composing Prolog Meta-interpreters,”CES-87-12, Case Western Reserve University, 1987.
Sterling, L. and Shapiro, E.,The Art of Prolog, MIT Press, 1986.
Tamaki, H. and Sato, T., “Unfold/fold Transformations of Logic Programs,”Proc. of Second ICLP, pp. 127–138, 1984.
Ullman, J. D.,Database Systems, Computer Science Press, 1982.
Author information
Authors and Affiliations
About this article
Cite this article
Lakhotia, A., Sterling, L. Composing recursive logic programs withClausal join . New Gener Comput 6, 211–225 (1988). https://doi.org/10.1007/BF03037138
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF03037138