A New Technique for Verifying and Correcting Logic Programs

  • Authors:
  • Ricardo Caferra;Nicolas Peltier

  • Affiliations:
  • Leibniz Laboratory, Imag, 46, Avenue Félix Viallet 38031 Grenoble Cedex France. e-mail: Ricardo.Caferra@imag.fr, Nicolas.Peltier@imag.fr;Leibniz Laboratory, Imag, 46, Avenue Félix Viallet 38031 Grenoble Cedex France. e-mail: Ricardo.Caferra@imag.fr, Nicolas.Peltier@imag.fr

  • Venue:
  • Journal of Automated Reasoning
  • Year:
  • 1997

Quantified Score

Hi-index 0.00

Visualization

Abstract

A significant extension to a model-building method that we have beendeveloping for several years is presented. A quite complete, albeitreasonably short, description of the previous method is given in order tomake this article self-contained. The extension enables the handling ofPresburger arithmetic and the deducing of inductive consequences from setsof Horn clauses. For a large class of logic programs the extension alsopermits the deduction of negative facts and the detection of nontermination.It is shown how the extended method can be used in verifying and correctingprograms. The proposed method verifies programs w.r.t. formalspecifications, but its fundamentals (i.e., model building) make it usefulfor pointing out errors and for suggesting a way of correcting wrongprograms also w.r.t. informal specifications, such as specifications byexamples or specifications using implicit knowledge (the latter features areespecially useful when dealing with beginners’ programs). Theoreticalproperties of the extended method (e.g., soundness and refutationalcompleteness) are proven. The greater power of the extensions to logicprogramming enabled by our method relative to existing methods and withrespect to other standard features (like negation as failure) is alsoproven. Several nontrivial examples illustrate error detection andcorrection as well as the broadening of inference capabilities that can beobtained in logic programming by using the rules of this method. Thesedetailed examples show evidence of the interest of our approach. Maindirections for future research are given.