Transformational methodology for proving termination of logic programs

M. R.K. Krishna Rao, Deepak Kapur, R. K. Shyamasundar*

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

15 Scopus citations

Abstract

A methodology for proving the termination of well-moded logic programs is developed by reducing the termination problem of logic programs to that of term rewriting systems. A transformation procedure is presented to derive a term rewriting system from a given well-moded logic program such that the termination of the derived rewrite system implies the termination of the logic program for all well-moded queries under a class of selection rules. This facilitates applicability of a vast source of termination orderings proposed in the literature on term rewriting, for proving termination of logic programs. The termination of various benchmark programs has been established with this approach. Unlike other mechanizable approaches, the proposed approach does not require any preprocessing and works well, even in the presence of mutual recursion. The transformation has also been implemented as a front end to Rewrite Rule Laboratory (RRL) and has been used in establishing termination of nontrivial Prolog programs such as a prototype compiler for ProCoS, PL0 language.

Original languageEnglish
Pages (from-to)1-41
Number of pages41
JournalJournal of Logic Programming
Volume34
Issue number1
DOIs
StatePublished - Jan 1998

Bibliographical note

Funding Information:
PROOF (By Contradiction). Assume that the selected atom at a resolution step has variables in its input positions. By the above lemma, there are producers that are smaller (under the evaluation order) than the selected atom contradicting the minimality of the selected atom. Therefore, input terms of the selected atom are ground at every resolution step. Hence every SLD-derivation starting with a well-moded query is a data-driven evaluation. \[\] We thank Prof. K. R. Apt and Prof. J. W. Klop of CWI for their helpful comments. Thanks are also due to the anonymous referees, whose comments have greatly improved the presentation. Dr. Kaput was partially supported by National Science Foundation Grant CCR-9303394 and National Science Foundation Indo-US Grant INT-9416687. Dr. Shyamasundar was partially supported by National Science Foundation lndo-US Grant INT-9416687.

ASJC Scopus subject areas

  • Logic

Fingerprint

Dive into the research topics of 'Transformational methodology for proving termination of logic programs'. Together they form a unique fingerprint.

Cite this