Non-termination analysis and cost-based query optimization of logic programs

  • Authors:
  • Senlin Liang

  • Affiliations:
  • Department of Computer Science, Stony Brook University, Stony Brook, NY

  • Venue:
  • RR'12 Proceedings of the 6th international conference on Web Reasoning and Rule Systems
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

There have been many studies in termination analysis of logic programming but little has been done on analyzing non-termination of logic programs, which is even more important in our opinion. Non-termination analysis examines program execution history when non-termination is suspected and informs the programmer of non-termination causes and possible ways to fix them. In the first part of this thesis, we study the problem of non-termination in tabled logic engines with subgoal abstraction, such as XSB, and propose a suite of algorithms, called non-Termination analyzer, $\texttt{Terminyzer}$, for automatic detection and explanation of non-termination. The second part of this thesis focuses on cost-based query optimization. Database query optimizers rely on data statistics in selecting query execution plans and rule-based systems can greatly benefit from such optimizations as well. To this end, one first needs to collect data statistics for base and propagate them to derived predicates. However, there are two difficulties: dependencies among arguments and recursion. To address these problems, we implement a Cost-based query optimizer, $\texttt{Costimizer}$, which consists of a cost estimator and an optimizing unit. The optimizing unit performs a greedy search optimization based on predicate statistics computed by the cost estimator. We validate the effectiveness of $\texttt{Costimizer}$ on both size estimation and query optimization through experimental studies.