Abstract
In this paper, we propose a bottom-up partial evaluation of normal programs with a top-down expansion of negated atoms to obtain equivalent logic programs. A program P is transformed to P ω by a bottom-up computation on the positive component of P while the negative counterpart is left untouched. During this process, we collect all substitutions describing a partial answer set to all the positive atoms in the bodies of P. The declarative semantics of P is given by the completion of P ω. The completed predicate definitions in P ω, if they do not contain local variables, can be used as a basis for expanding each negated atom in the bodies of P ω. We show that for a class of programs where every negative subgoal can be expanded, the resultant program P' is a definite logic program with equality and disequality constraints. If the program falls outside this class, the resultant program may be executed using Chan's SLD - CNF resolution.
Our proposed scheme provides a sound and complete query answering system for a class of programs whose positive part has a finite T Pω and whose clauses satisfy the positive grounded property defined herein. With the bottom-up computation, all infinite positive loops are removed. With all the negated atoms expanded or eliminated at partial evaluation time, less work is required during the run-time query answering and problems with floundering are removed.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
K. Apt, H. Blair and A. Walker. Towards a Theory of Declarative Knowledge. In J. Minker, editor, Foundation of Deductive Database and Logic Programming, pages 89–148. Morgan Kaufmann, 1988.
R. Barbuti, P. Mancarella, D. Pedreschi and F. Turini. A Transformational Approach to Negation in Logic Programming. J. Logic Programming, 8, pages 201–228, 1990.
D. Chan. Constructive Negation Based on the Completed Database. In R. D. Kowalski and K. Bowen, editors, Proc Fifth Intl. Conference and Symposium on Logic Programming, pages 111–125. MIT Press, 1988.
D. Chan and M. Wallace. A Treatment of Negation During Partial Evaluation. In H.D. Abramson and M.H. Rogers, editors, Meta-Programming in Logic Programming, pages 299–318, MIT Press, 1989. Proceeding of the Meta88 Workshop, June 1988.
K. Clark. Negation as failure. In H. Gallaire and J. Minker, editors, Logic and Databases, pages 293–322. Plenum Press, 1978.
M. Falaschi, G. Levi, M. Martelli and C. Palamidessi A New Declarative Semantics for Logic Languages. In R. D. Kowalski and K. Bowen, editors, Proc Fifth Intl. Conference and Symposium on Logic Programming, pages 993–1005. MIT Press, 1988.
P. M. Dung and K. Kanchanasut. A Fixpoint Approach to Declarative Semantics of Logic Programs. In E. L. Lusk and R. A. Overbeek, editors, Proc of the North American Conference on Logic Programming, pages 604–625. MIT Press, 1989.
M. Gelfond and V. Lifschitz. The Stable Model Semantics for Logic Programs. In R. Kowalski and K. Bowen, editors, Proceeding of the Fifth International Conference on Logic Programming, pages 1070–1079. Seattle, Washington, 1988.
J. Jaffar and J-L. Lassez. Constraint Logic Programming. In Proceedings Fourteenth ACM Symposium on the Principles of Programming Languages. pages 111–119. Jan 1987.
J. Jaffar and P. Stuckey. Canonical Logic Programs. Journal of Logic Programming 3. pages 142–155. 1986.
J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag, second edition 1987.
J. W. Lloyd and R. W. Topor. Making Prolog More Expressive, Journal of Logic Programming 3, 1984.
L. Naish. Negation and Quatifiers in NU-Prolog. In Proceedings Third International Conference on Logic Programming, pages 73–77. July, 1985.
T. C. Przymusinski. On the declarative semantics of deductive database and logic programming. In J. Minker, editor, Foundation of Deductive Database and Logic Programming, pages 193–216. Morgan Kaufmann, 1988.
T. C. Przymusinski. Non-monotonic formalisms and logic programming. In G. Levi and M. Martelli, editors, Proceeding of the Sixth Logic Programming Symposium, pages 655–674. MIT Press, Mass, 1989.
K. Ross. A Procedural Semantics for Well Founded Negation in Logic Programs. In Proceeding of the Eighth ACM SICACT-SIGMOD-SIGART Symposium on Principles of Database Systems, pages 22–33, 1989.
T. Sato and H. Tamaki. Transformational Logic Program Synthesis. In Proceedings of the International Conference on Fifth Generation Computer Systems, pages 195–201. ICOT. 1984.
Z. Somogyi. A System of Precise Modes for Logic Programs. In J-L Lassez, editor, Proceeding of the Fourth International Conference in Logic Programming, pages 769–785. MIT Press, 1987.
M. van Emden and R. Kowalski. The semantics of logic as a programming language. Journal of the ACM 23: 733–742, 1976.
A. van Gelder, K. Ross and J.S. Schipf. Unfounded sets and well-founded semantics for general logic programs. In Proceedings of the Seventh ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, pages 221–230, 1988.
D.A. Wolfram, M. J. Maher and J-L Lassez. A Unified Treatment of Resolution Strategies for Logic Programs. In S-A Tarnlund, editor, Proceedings of the Second International Conference in Logic Programming, pages 263–273, 1984.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1990 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Kanchanasut, K., Stuckey, P. (1990). Eliminating negation from normal logic programs. In: Kirchner, H., Wechler, W. (eds) Algebraic and Logic Programming. ALP 1990. Lecture Notes in Computer Science, vol 463. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-53162-9_41
Download citation
DOI: https://doi.org/10.1007/3-540-53162-9_41
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-53162-3
Online ISBN: 978-3-540-46738-0
eBook Packages: Springer Book Archive