Efficient reordering of C-PROLOG

  • Authors:
  • Jian Wang;Jungsoon Yoo;Tom Cheatham

  • Affiliations:
  • Department of Computer Science, Middle Tennessee State University;Department of Computer Science, Middle Tennessee State University;Department of Computer Science, Middle Tennessee State University

  • Venue:
  • CSC '93 Proceedings of the 1993 ACM conference on Computer science
  • Year:
  • 1993

Quantified Score

Hi-index 0.00

Visualization

Abstract

PROLOG uses a depth-first search of an AND/OR graph to satisfy queries against its database. It searches sequentially through the clauses of a predicate whose head matches the query, trying to satisfy the goals in the clause body in a sequential left-to-right order. The ordering of clauses and goals is a major factor in the efficiency of a PROLOG program. We have developed a profiler for C-PROLOG that collects statistics including the failure rate of clauses and goals in a C-PROLOG program. These statistics are used by any of several reordering predicates capable of local or global reordering. The intent is to construct a reordered PROLOG program that outputs an equivalent set of answers, and is more efficient. Test results are promising.