Termination prediction for general logic programs

  • Authors:
  • Yi-dong Shen;Danny de Schreye;Dean Voets

  • Affiliations:
  • State key laboratory of computer science, institute of software, chinese academy of sciences, beijing 100190, china (e-mail: ydshen@ios.ac.cn);Department of computer science, celestijnenlaan 200 a, b-3001 heverlee, belgium (e-mail: danny.deschreye@cs.kuleuven.ac.be, dean.voets@cs.kuleuven.ac.be);Department of computer science, celestijnenlaan 200 a, b-3001 heverlee, belgium (e-mail: danny.deschreye@cs.kuleuven.ac.be, dean.voets@cs.kuleuven.ac.be)

  • Venue:
  • Theory and Practice of Logic Programming
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present a heuristic framework for attacking the undecidable termination problem of logic programs, as an alternative to current termination/nontermination proof approaches. We introduce an idea of termination prediction, which predicts termination of a logic program in case that neither a termination nor a non-termination proof is applicable. We establish a necessary and sufficient characterization of infinite (generalized) SLDNF-derivations with arbitrary (concrete or moded) queries, and develop an algorithm that predicts termination of general logic programs with arbitrary nonfloundering queries. We have implemented a termination prediction tool and obtained quite satisfactory experimental results. Except for five programs which break the experiment time limit, our prediction is 100% correct for all 296 benchmark programs of the Termination Competition 2007, of which 18 programs cannot be proved by any of the existing state-of-the-art analyzers like AProVE07, NTI, Polytool, and TALP.