Logic Programs and Many-Valued Logic

We claim that the well-known equivalence of declarative and procedural interpretations for Horn clauses (predicate logic or Prolog programs) has been unjustifiably used when discussing computation. The reason for this is that the Apt, van Emden and Kowalski theory is based on a 2-valued logic {true, false} whereas computation requires at least a 3-valued logic {true, false, "still computing"}. We introduce such logics and relate the results obtained to the traditional ones. This gives a characterization of under-defined clauses which naturally correspond to looping programs. Moreover, it further supports the view that strong correctness (including termination) should be considered, rather than weak correctness (eg 2-valued logic) together with a separate analysis of termination.

[1]  Jack Minker,et al.  Logic and Data Bases , 1978, Springer US.

[2]  P. H. Lindsay Human Information Processing , 1977 .

[3]  J. A. Robinson,et al.  A Machine-Oriented Logic Based on the Resolution Principle , 1965, JACM.

[4]  Keith L. Clark,et al.  Negation as Failure , 1987, Logic and Data Bases.

[5]  Krzysztof R. Apt,et al.  Contributions to the Theory of Logic Programming , 1982, JACM.

[6]  G.D. Plotkin,et al.  LCF Considered as a Programming Language , 1977, Theor. Comput. Sci..

[7]  Gordon D. Plotkin,et al.  A Powerdomain Construction , 1976, SIAM J. Comput..

[8]  Robert A. Kowalski,et al.  The Semantics of Predicate Logic as a Programming Language , 1976, JACM.

[9]  Neil D. Jones,et al.  Stepwise Development of Operational and Denotational Semantics for Prolog , 1984, International Conference on Spoken Language Processing.