Demand-driven indexing of prolog clauses

  • Authors:
  • Vítor Santos Costa;Konstantinos Sagonas;Ricardo Lopes

  • Affiliations:
  • LIACC - DCC/FCUP, University of Porto, Portugal;National Technical University of Athens, Greece;-

  • Venue:
  • ICLP'07 Proceedings of the 23rd international conference on Logic programming
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

As logic programming applications grow in size, Prolog systems need to efficiently access larger and larger data sets and the need for any- and multiargument indexing becomes more and more profound. Static generation of multiargument indexing is one alternative, but applications often rely on features that are inherently dynamic which makes static techniques inapplicable or inaccurate. Another alternative is to employ dynamic schemes for flexible demand-driven indexing of Prolog clauses. We propose such schemes and discuss issues that need to be addressed for their efficient implementation in the context of WAM-based Prolog systems.We have implemented demand-driven indexing in two different Prolog systems and have been able to obtain non-negligible performance speedups: from a few percent up to orders of magnitude. Given these results, we see very little reason for Prolog systems not to incorporate some form of dynamic indexing based on actual demand. In fact, we see demand-driven indexing as only the first step towards effective runtime optimization of Prolog programs.