Hostname: page-component-6d856f89d9-4thr5 Total loading time: 0 Render date: 2024-07-16T05:18:10.072Z Has data issue: false hasContentIssue false

Truth versus information in logic programming

Published online by Cambridge University Press:  03 June 2013

LEE NAISH
Affiliation:
Department of Computing and Information Systems, The University of Melbourne, Victoria 3010, Australia (e-mail: [email protected], [email protected])
HARALD SØNDERGAARD
Affiliation:
Department of Computing and Information Systems, The University of Melbourne, Victoria 3010, Australia (e-mail: [email protected], [email protected])

Abstract

The semantics of logic programs was originally described in terms of two-valued logic. Soon, however, it was realised that three-valued logic had some natural advantages, as it provides distinct values not only for truth and falsehood but also for “undefined”. The three-valued semantics proposed by Fitting (Fitting, M. 1985. A Kripke–Kleene semantics for logic programs. Journal of Logic Programming 2, 4, 295–312) and Kunen (Kunen, K. 1987. Negation in logic programming. Journal of Logic Programming 4, 4, 289–308) are closely related to what is computed by a logic program, the third truth value being associated with non-termination. A different three-valued semantics, proposed by Naish, shared much with those of Fitting and Kunen but incorporated allowances for programmer intent, the third truth value being associated with underspecification. Naish used an (apparently) novel “arrow” operator to relate the intended meaning of left and right sides of predicate definitions. In this paper we suggest that the additional truth values of Fitting/Kunen and Naish are best viewed as duals. We use Belnap's four-valued logic (Belnap, N. D. 1977. A useful four-valued logic. In Modern Uses of Multiple-Valued Logic, J. M. Dunn and G. Epstein, Eds. D. Reidel, Dordrecht, Netherlands, 8–37), also used elsewhere by Fitting, to unify the two three-valued approaches. The truth values are arranged in a bilattice, which supports the classical ordering on truth values as well as the “information ordering”. We note that the “arrow” operator of Naish (and our four-valued extension) is essentially the information ordering, whereas the classical arrow denotes the truth ordering. This allows us to shed new light on many aspects of logic programming, including program analysis, type and mode systems, declarative debugging and the relationships between specifications and programs, and successive execution states of a program.

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2013 

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Aiken, A. and Lakshman, T. K. 1994. Directional type checking of logic programs. In Static Analysis, Le Charlier, B., Ed. Lecture Notes in Computer Science, Vol. 864. Springer, New York, 4360.Google Scholar
Apt, K. R. and Bol, R. N. 1994. Logic programming and negation: A survey. Journal of Logic Programming 19–20, 971.Google Scholar
Arieli, O. 2002. Paraconsistent declarative semantics for extended logic programs. Annals of Mathematics and Artificial Intelligence 36, 381417.Google Scholar
Arieli, O. and Avron, A. 1996. Reasoning with logical bilattices. Journal of Logic, Language and Information 5, 2563.Google Scholar
Arieli, O. and Avron, A. 1998. The logical role of the four-valued bilattice. In Proceedings of the 13th Annual IEEE Symposium on Logic in Computer Science, IEEE, New York, 118126.Google Scholar
Avron, A. and Konikowska, B. 2009. Proof systems for reasoning about computation errors. Studia Logica 91, 2, 273293.Google Scholar
Babbage, C. 1864. Passages from the Life of a Philosopher. Longman, London.Google Scholar
Barbuti, R., De Francesco, N., Mancarella, P. and Santone, A. 1998. Towards a logical semantics for pure Prolog. Science of Computer Programming 32, 145176.Google Scholar
Barringer, H., Cheng, J. H. and Jones, C. B. 1984. A logic covering undefinedness in program proofs. Acta Informatica 21, 251269.Google Scholar
Belnap, N. D. 1977. A useful four-valued logic. In Modern Uses of Multiple-Valued Logic, Dunn, J. M. and Epstein, G., Eds. D. Reidel, Dordrecht, Netherlands, 837.Google Scholar
Blair, H. 1982. The recursion-theoretic complexity of the semantics of predicate logic as a programming language. Information and Control 54, 2547.Google Scholar
Bossi, A., Gabbrielli, M., Levi, G. and Martelli, M. 1994. The s-semantics approach: Theory and applications. Journal of Logic Programming 19–20, 149197.Google Scholar
Boye, J. and Małuszynski, J. 1995. Two aspects of directional types. In Proceedings of the 12th International Conference on Logic Programming, Sterling, L., Ed. MIT Press, Cambridge, MA, 747761.Google Scholar
Chechik, M., Devereux, B., Easterbrook, S. and Gurfinkel, A. 2003. Multi-valued symbolic model-checking. ACM Transactions on Software Engineering and Methodology 12, 4, 371408.Google Scholar
Clark, K. L. 1978. Negation as failure. In Logic and Data Bases, Gallaire, H. and Minker, J., Eds. Plenum Press, New York, 293322.Google Scholar
Clark, K. and Sickel, S. 1977. Predicate logic: A calculus for the formal derivation of programs. In Proceedings of the Fifth International Joint Conference on Artificial Intelligence, MIT, Cambridge, MA, 419420.Google Scholar
Codish, M. and Søndergaard, H. 2002. Meta-circular abstract interpretation in Prolog. In The Essence of Computation: Complexity, Analysis, Transformation, Mogensen, T., Schmidt, D. and Sudborough, I. H., Eds. Lecture Notes in Computer Science, Vol. 2566. Springer, New York, 109134.Google Scholar
Dams, D., Gerth, R. and Grumberg, O. 1997. Abstract interpretation of reactive systems. ACM Transactions on Programming Languages and Systems 19, 2, 253291.Google Scholar
Denecker, M., Bruynooghe, M. and Marek, V. 2001. Logic programming revisited: Logic programs as inductive definitions. ACM Transactions on Computational Logic 2, 4, 623654.Google Scholar
Falaschi, M., Levi, G., Gabbrielli, M. and Palamidessi, C. 1988. A new declarative semantics for logic languages. In Proceedings of the Fifth International Conference and Symposium on Logic Programming, Kowalski, R. and Bowen, K., Eds. MIT Press, Cambridge, MA, 9931005.Google Scholar
Fitting, M. 1985. A Kripke–Kleene semantics for logic programs. Journal of Logic Programming 2, 4, 295312.Google Scholar
Fitting, M. 1988. Logic programming on a topological bilattice. Fundamenta Informaticae 11, 209218.Google Scholar
Fitting, M. 1989. Negation as refutation. In Proceedings of the Fourth Annual IEEE Symposium on Logic in Computer Science, IEEE, New York, 6370.Google Scholar
Fitting, M. 1991a. Bilattices and the semantics of logic programming. Journal of Logic Programming 11, 2, 91116.Google Scholar
Fitting, M. 1991b. Kleene's logic, generalized. Journal of Logic and Computation 1, 6, 797810.Google Scholar
Fitting, M. 1993. The family of stable models. Journal of Logic Programming 17, 197225.Google Scholar
Fitting, M. 2002. Fixpoint semantics for logic programming a survey. Theoretical Computer Science 278, 2551.Google Scholar
Fitting, M. 2006. Bilattices are nice things. In Self-Reference, Bolander, T., Hendricks, V. and Pedersen, S. A., Eds. CSLI, Stanford, CA, 5377.Google Scholar
Ginsberg, M. 1988. Multivalued logics: A uniform approach to reasoning in artificial intelligence. Computational Intelligence 4, 3, 265316.Google Scholar
Gödel, K. 1931. Über formal unentscheidbare Sätze der Principa Mathematica und verwandter Systeme I. Monatschefte für Mathematic und Physik 38, 173198. English translation in The Undecidable, M. Davis, Ed. Raven Press Books, Hewlett, NY, 1965.Google Scholar
Gries, D. and Schneider, F. B. 1995. Avoiding the undefined by underspecification. In Computer Science Today: Recent Trends and Developments, Leeuwen, J. van, Ed. Lecture Notes in Computer Science, Vol. 1000. Springer, New York, 366373.Google Scholar
Hogger, C. 1981. Derivation of logic programs. Journal of the ACM 28, 2, 372392.Google Scholar
Jones, C. B. and Middelburg, C. A. 1994. A typed logic of partial functions reconstructed classically. Acta Informatica 31, 399430.Google Scholar
Kleene, S. C. 1938. On notation for ordinal numbers. The Journal of Symbolic Logic 3, 150155.Google Scholar
Kowalski, R. A. 1980. Logic for Problem Solving. North Holland, New York, NY.Google Scholar
Kowalski, R. A. 1985. The relation between logic programming and logic specification. In Mathematical Logic and Programming Languages, Hoare, C. and Shepherdson, J., Eds. Prentice-Hall, Upper Saddle River, NJ, 1127.Google Scholar
Kunen, K. 1987. Negation in logic programming. Journal of Logic Programming 4, 4, 289308.Google Scholar
Lloyd, J. W. 1984. Foundations of Logic Programming. Springer, New York, NY.Google Scholar
Loyer, Y., Spyratos, N. and Stamate, D. 2004. Hypothesis-based semantics of logic programs in multivalued logics. ACM Transactions on Computational Logic 5, 3, 508527.Google Scholar
Marriott, K. and Søndergaard, H. 1992. Bottom-up dataflow analysis of normal logic programs. Journal of Logic Programming 13, 2–3, 181204.Google Scholar
McCarthy, J. 1963. A basis for a mathematical theory of computation. In Computer Programming and Formal Systems, Bradford, P. and Hirschberg, D., Eds. North-Holland, Amsterdam, Netherlands, 3370.Google Scholar
Morris, J. M. and Bunkenburg, A. 1998. Partiality and nondeterminacy in program proofs. Formal Aspects of Computing 10, 7696.Google Scholar
Mycroft, A. 1984. Logic programs and many-valued logic. In Symposium on Theoretical Aspects of Computer Science, Fontet, M. and Mehlhorn, K., Eds. Lecture Notes in Computer Science, Vol. 166. Springer, New York, NY, 274286.Google Scholar
Naish, L. 1996. A declarative view of modes. In Proceedings of the 1996 Joint International Conference and Symposium on Logic Programming, Maher, M., Ed. MIT Press, Cambridge, MA, 185199.Google Scholar
Naish, L. 2000. A three-valued declarative debugging scheme. Australian Computer Science Communications 22, 1 (Jan.), 166173.Google Scholar
Naish, L. 2006. A three-valued semantics for logic programmers. Theory and Practice of Logic Programming 6, 5, 509538.Google Scholar
Naish, L., Søndergaard, H. and Horsfall, B. 2012. Logic programming: From underspecification to undefinedness. In Proceedings of the 44th Symposium on Theory of Computing Conference 2012, (STOC 2012) Mestre, J., Ed. Conferences in Research and Practice in Information Technology, Vol. 128. ACM, New York City, NY, 4958.Google Scholar
Nishimura, S. 2010. Refining exceptions in four-valued logic. In Logic-Based Program Synthesis and Transformation, De Schreye, D., Ed. Lecture Notes in Computer Science, Vol. 6037. Springer, New York, NY, 113127.Google Scholar
Palmer, D. F. 1997. A Parallel Implementation of the Andorra Kernel Language. PhD thesis, The University of Melbourne, Australia.Google Scholar
Pereira, L. M. 1986. Rational debugging in logic programming. In Proceedings of the Third International Conference on Logic Programming, Shapiro, E., Ed. Lecture Notes in Computer Science, Vol. 225. Springer, New York, NY, 203210.Google Scholar
Sato, T. and Tamaki, H. 1984. Transformational logic program synthesis. In Proceedings of the 1984 International Conference on Fifth Generation Computer Systems, Tokyo, Japan. North-Holland, Amsterdam, Netherlands, 195201.Google Scholar
Shapiro, E. Y. 1983. Algorithmic Program Debugging. MIT Press, Cambridge MA.Google Scholar
Somogyi, Z., Henderson, F. J. and Conway, T. 1995. Mercury: An efficient purely declarative logic programming language. In Proceedings of the Australian Computer Science Conference, Glenelg, Australia, 499512.Google Scholar
Tarski, A. 1955. A lattice-theoretical theorem and its applications. Pacific Journal of Mathematics 5, 285309.Google Scholar
van Emden, M. and Kowalski, R. 1976. The semantics of logic as a programming language. Journal of the ACM 23, 733742.Google Scholar
Van Gelder, A., Ross, K. A. and Schlipf, J. S. 1991. The well-founded semantics for general logic programs. Journal of the ACM 38, 3, 620650.Google Scholar