Abstract
More specific versions of definite logic programs are introduced. These are versions of a program in which each clause is further instantiated or removed and which have an equivalent set of successful derivations to those of the original program, but a possibly increased set of finitely failed goals. They are better than the original program because failure in a non-successful derivation may be detected more quickly. Furthermore, information about allowed variable bindings which is hidden in the original program may be made explicit in a more specific version of it. This allows better static analysis of the program's properties and may reveal errors in the original program. A program may have several more specific versions but there is always a most specific version which is unique up to variable renaming. Methods to calculate more specific versions are given and it is characterized when they give the most specific version.
Similar content being viewed by others
References
K. Clark, Negation as failure, in:Logic and Databases, H. Gallaire and J. Minker (eds.) (Plenum Press, New York, 1978) pp. 293–322.
N. Dershowitz, and Y. Lee, Deductive debugging,Proc. 4th IEEE Symp. on Logic Programming (IEEE Comp. Soc. Press, 1987) pp. 298–306.
Y. Futamura, Partial Evaluation of Computation Process — An approach to a compiler-compiler, Systems, Computers, Controls 2, no. 5 (1971).
T. Kanamori and K. Horiuchi, Type inference in Prolog and its application,Proc. IJCAI 85 (1985) 704–707.
H.J. Komorowski, Partial evaluation as a means for inferencing data structures in an applicative language: A theory and implementation in the case of Prolog,Proc. 9th ACM Symp. on Principles of Programming Languages (1982) pp. 255–267.
J.-L. Lassez, M.J. Maher, and K. Marriott, Unification revisited,Foundations of deductive databases and logic programming, J. Minker (ed.) (Morgan Kauffman, 1988).
J.W. Lloyd,Foundations of Logic Programming (Springer-Verlag, 1984).
K. Marriott, L. Naish, and J.-L. Lassez, Most specific logic programs,Proc. 5th Int. Conf. and Symp. on Logic Programming (MIT Press, 1988) pp. 909–923.
K. Marriott and H. Søndergaard, Bottom-up abstract interpretation of logic programs,Proc. 5th Int. Conf. and Symp. on Logic Programming (MIT Press, 1988) pp. 733–748.
C.S. Mellish, The automatic generation of mode declarations for Prolog programs, DAI Research Paper no. 163, Dept. of Artificial Intelligence, University of Edinburgh (1981).
L. Naish, The MU-Prolog 3.2 reference manual, Tech. Rpt. 85/11, Computer Science Dept., University of Melbourne (1985).
L. Naish, Automating control for logic programs, J. Logic Programming 2, no. 3 (1985) 167–183.
L. Naish, Specification=program+types,Proc. 7th Conf. on Foundations of Software Technology and Theoretical Computer Science, LNCS 287 (Springer, 1987).
L. Naish, Parallelizing NU-Prolog,Proc. 5th Int. Conf. and Symp. on Logic Programming (MIT Press, 1988) pp. 1546–1564.
R. Reiter, On closed world databases, in:Logic and Databases, H. Gallaire and J. Minker (eds.) (Plenum Press, New York, 1978) pp. 55–76.
J.C. Reynolds, Transformational systems and the algebraic structure of atomic formulas, Machine Intelligence 5 (1970) 135–152.
T. Sato and H. Tamaki, Enumeration of success patterns in logic programs, Theoretical Comp. Sci. 34 (1984) 227–240.
E.Y. Shapiro,Algorithmic Program Debugging (MIT Press, 1983).
D.E. Smith, M.R. Genesereth, and M.L. Ginsberg, Controlling recursive inference, Artificial Intelligence 30 (1986) 343–389.
A. Takeuchi and K. Furukawa, Partial evaluation of Prolog programs and its application to meta programming,IFIP '86 (North-Holland, 1986) pp. 279–282.
D.H.D. Warren, An abstract Prolog instruction set, Technical Note 309, SRI International, Menlo Park (1983).
D.A. Wolfram, M.J. Maher, and J.-L. Lassez, A unified treatment of resolution strategies for logic programming,Proc. 2nd Int. Conf. on Logic Programming, Uppsala, Sweden (1984) pp. 263–276.
R. Venken, A Prolog meta-interpreter for partial evaluation and its application to source-to-source transformation and query optimisation,Proc. of ECAI (1984).
J. Zobel, Derivation of polymorphic types for Prolog programs,Proc. 4th Int. Conf. on Logic Programming (MIT Press, 1987) pp. 817–838.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Marriott, K., Naish, L. & Lassez, J.L. Most specific logic programs. Ann Math Artif Intell 1, 303–338 (1990). https://doi.org/10.1007/BF01531082
Published:
Issue Date:
DOI: https://doi.org/10.1007/BF01531082