Abstract
Clark’s query evaluation procedure for computing negative information in deductive databases using a “negation as failure” inference rule requires a safe computation rule which may only select negative literals if they are ground. This is a very restrictive condition, which weakens the usefulness of negation as failure in a query evaluation procedure. This paper studies the definition and properties of the “not” predicate defined in most Prolog systems which do not enforce the above mentioned condition of a safe computation rule. We show that the negation in clauses and the “not” Predicate of Prolog are not the same. In fact a Prolog program may not be in clause form. An extended query evaluation procedure with an extended safe computation rule is proposed to evaluate queries which involve the “not” predicate. The soundness and completeness of this extended query evaluation procedure with respect to a class of logic programs are proved. The implementation of such an extended query evaluation procedure in a Prolog system can be implemented by a preprocessor for executing range restricted programs and requires no modification to the interpreter/compiler of an existing Prolog system. We compare this proposed extended query evaluation procedure with the extended program proposed by Lloyd and Topor, and the negation constructs in NU-Prolog. The use of the “not” predicate for integrity constraint checking in deductive databases is also presented.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Clark, K. L., “Negation as failure”, inLogic and Databases (H. Gallaire and J. Minker, eds.), Plenum Press, New York, pp. 293–322, 1978.
Clocksin, W. F. and Mellish, C. S.,Programming in Prolog, 2nd ed., Springer-Verlag, 1984.
Lloyd, J. W. and Topor, R. W., “Making Prolog more expressive”,J. Logic Programming, 3, pp. 225–240, 1984.
Lloyd, J. W.,Foundation of Logic Programming, Springer-Verlag, 1984.
Ling, T. W., “Integrity constraint checking in deductive databases using Prolog notpredicate”,Data & Knowledge Enginnering 2, pp. 145–168, 1987.
Kowalski, R., “Logic for data description”, inLogic and Databases (H. Gallaire and J. Minker, eds.), Plenum Press, New York, pp. 77–103, 1978.
Naish, L.,MU-Prolog Reference Manual, Melbourne University, 1983.
Naish, L., “Negation and Quantifiers in NU-Prolog”,The 3rd International Conference on Logic Programming, pp. 624–634, 1986.
Shepherdson, J. C., “Negation as failure: A comparison of Clark’s completed data base and Reiter’s closed world assumption”,J. of Logic Programming, pp. 51–79, 1984.
Reiter, R., “On closed world data bases”, inLogic and Databases (H. Gallaire and J. Minker, eds.), Plenum Press, New York, pp. 55–76, 1978.
Author information
Authors and Affiliations
Additional information
The paper was written when the author was on sabbatical leave at the Department of Computer Science, University of Maryland, College Park, MD 20742.
About this article
Cite this article
Ling, T.W. The Prolog not-predicate and negation as failure rule. New Gener Comput 8, 5–31 (1990). https://doi.org/10.1007/BF03037511
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF03037511