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.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Krzystof, R. Apt and Roland, N. Bol.: Logic programming and negation: A survey, J. Logic Programming 19, 20(1994), 9–71.
Bourely, Ch., Caferra, R. and Peltier, N.: A method for building models automatically. Experiments with an extension of OTTER, in Proc. CADE-12, LNAI 814, Springer, 1994, pp. 72–86.
Bourely, Ch. And Peltier, N.: Disc_atinf: a system for implementing strategies and calculi, in Proc. DISCO’96.Springer, 1996. To appear.
Caferra, R. and Peltier, N.: Extending semantic resolution via automated model building: applications, in Proc. IJCAI’95, Morgan Kaufmann, 1995, pp. 328–334.
Caferra, R. and Peltier, N.: Model building and interactive theory discovery, in Proc. Tableaux’95, LNAI 918, Springer, 1995, pages 154–168.
Caferra, R. and Peltier, N.: Decision procedures using model building techniques, in Proc. Computer Science Logic, CSL’95, LNCS 1092, Springer, 1996, pp. 130–144.
Caferra, R. and Peltier, N.: A significant extension of logic programming by adapting model buildings rules, in Proc. Extensions of Logic Programming 96, LNAI 1050, Springer, March 1996, pp. 51–65.
Caferra, R. and Zabel, N.:. Extending resolution for model construction, in Logics in AI, JELIA’90, LNAI 478, Springer, 1990, pp. 153–169.
Caferra, R. and Zabel, N.: A method for simultaneous search for refutations and models by equational constraint solving, J. Symbolic Computation 13(1992), 613–641.
Caferra, R. and Zabel, N.: Building models by using tableaux extended by equational problems, J. Logic and Computation 3(1993), 3–25.
Clark, K. L.: Negation as failure, in Hervé Gallaire and Jack Minker (eds), Logic and Data Bases, Plenum Press, 1978, pp. 293–322.
Clark, K. L. and Tarnlund, S.-A.: A first order theory of data and programs, in Proc. of IFIP-77, North-Holland, 1977, pp. 939–944.
Comon, H. and Lescanne, P.: Equational problems and disunification, J. Symbolic Computation 7(1989), 371–475.
Cooper, D. C.: Theorem proving in arithmetic without multiplication, in Bernard Meltzer and Donald Michie (eds), Machine Intelligence 7, Ch. 5, Edinburgh University Press, 1972, pp. 91–99.
Davis, M.: A computer program for Presburger arithmetic, in J. Siekmann and G. Wrighston (eds), Automation of Reasoning 1, Springer, 1983, pp. 41–48.
Deville, Y. Lau, K-K.: Logic program synthesis, J. Logic Programming 19(20) (1994), 321–350.
Enderton, H.: A Mathematical Introduction to Logic, Academic Press, 1972.
Fermüller, Ch, and Leitsch, A.: Hyperresolution and automated model building, J. Logic and Computation(1996), to appear.
Fermüller, Ch, Leitsch, A., Tamet, T. and Zamov, N.: Resolution Methods for the Decision Problem, LNAI 679. Springer, 1993.
Flener, P.: Logic Program Synthesis from Incomplete Information, Kluwer Academic Publishers, 1995.
Fujita, M., Slaney, J. and Bennett, F.: Automatic generation of some results in finite algebra, in Proc. IJCAI93, Morgan Kaufmann, 1993.
Gottlob, G. and Leitsch, A.: On the efficiency of subsumption algorithms, J. ACM 32(2) (1985), 280–295.
Hogger, C. J.: Derivation of logic programs, J. ACM 28(1981), 372–422.
Hogger, Ch. J.: Introduction to Logic Programming, Academic Press, 1984.
Huntbach, M. M.: An improved version of Shapiro’s model inference system, in Proc. Third Int. Conf. on Logic Programming, LNCS 225, Springer, 1986, pp. 180–187.
Kawamura, T.: Logic program synthesis from first order logic specification, Theor. Computer Science 122(1994), 69–96.
Kowalski, R.: The relation between logic programming and logic specification, in C. A. R. Hoare and J. C. Shepherdson (eds), Mathematical Logic and Programming Languages, Prentice-Hall, 1985, pp. 11–27.
Kunen, K.: Negation in logic programming, J. Logic Programming 8(1987), 289–308.
Lloyd, J. W.: Foundations of Logic Programming, second edition, Springer, 1987.
Lloyd, J. W.: Declarative error diagnosis, New Generation Computing 5(1987), 133–154.
Loveland, D. W.: Automated Theorem Proving: A Logical Basis, Fundamental Studies in Computer Science, Vol. 6, North Holland, 1978.
Lloyd, J. W. and Topor, R. W.: Making prolog more expressive. J. Logic Programming 1(3) (1984), 225–240.
Lugiez, D.: A deduction procedure for first order programs, in F. Levi and M. Martelli (eds), Proc. Sixth Int. Conf. Logic Programming, The MIT Press, July 1989, pp. 585–599.
Mal’cev, A. I.: The Metamathematics of Algebraic Systems: Collected Papers 1936–1967, chapter Axiomatizable classes of locally free algebra of various type, Benjamin Franklin Wells III (ed.), Ch. 23, North Holland, 1971.
Manthey, R. and Bry, F.: SATCHMO: A theorem prover implemented in Prolog, in Proc. CADE-9, LNCS 310, Springer, 1988, pp. 415–434.
McCune, W. W.: OTTER 2.0 Users Guide, Argonne National Laboratory, 1990.
Peltier, N.: Increasing the capabilities of model building by constraint solving with terms with integer exponents, 1997, preprint.
Pereira, L-M.: Rational debugging in logic programming, in Proc. Third Int. Conf. Logic Programming, LNCS 225, Springer, 1986, pp. 203–210.
Plaisted, D. A.: An efficient bug location algorithm, in Proc. Second Int. Logic Programming Conference, 1984, pp. 151–157.
Plaisted, D. A.: Non-Horn clause logic programming without contrapositives, J. Automated Reasoning 4(3) (1988), 287–325.
Presburger, M.: Über die Vollständigkeit eines gewissen Systems der Arithmetik ganzer Zahlen, in welchen die Addition als einzige Operation hervortritt, in Comptes Rendus du I Congrés de Mathématiciens des Pays Slaves, 1029, pp. 92–101.
Shapiro, E. Y.: Algorithmic Program Debugging, MIT Press, 1983.
Sterling, L. and Shapiro, E.: The Art of Prolog, The MIT Press, 1986.
Sato, T. and Tamaki, H.: First order compiler: A deterministic logic program synthesis algorithm, J. Symbolic Computation 8(1988), 605–627.
Stickel, M. E.: Automated deduction by theory resolution, J. Automated Reasoning 1(4) (1985), 333–355.
Stuckey, P.: Negation and constraint logic programming, Information and Computation 118(1995), 12–33.
Warren, D. S.: Memoing for logic programs, Comm. ACM 35(3) (1992), 93–111.
Winker, S.: Generation and verification of finite models and counter-examples using an automated theorem prover answering two open questions, J. ACM 29(2) (1982), 273–284.
Wos, L., Overbeek, R., Lusk, E. and Boyle, J.: Automated Reasoning: Introduction and Applications, second edition, McGraw-Hill, 1992.
Wos, L.: The kernel strategy and its use for the study of combinatory logic, J. Automated Reasoning 10(1993), 287–343.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Caferra, R., Peltier, N. A New Technique for Verifying and Correcting Logic Programs. Journal of Automated Reasoning 19, 277–318 (1997). https://doi.org/10.1023/A:1005878609884
Issue Date:
DOI: https://doi.org/10.1023/A:1005878609884