Understanding Memory Management in Prolog Systems

  • Authors:
  • Luís Fernando Castro;Vítor Santos Costa

  • Affiliations:
  • -;-

  • Venue:
  • Proceedings of the 17th International Conference on Logic Programming
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

Actual performance of Prolog based applications largely depends on how the underlying system implements memory management. Most Prolog systems are based on the WAM, which is built around a set of stacks. TheWAM is highly optimized to recover memory on backtracking and on tail-recursive predicates. Still, deterministic computations can create intermediate structures that can only be freed through garbage collection.There is a significant amount of literature regarding memory management for Prolog. Unfortunately, we found relatively little data on how modern Prolog systems perform memory-wise. Open questions range from whether Prolog systems consume the same amount of space, to how effective garbage collection is in practice, and to whether we should be using sliding or copying based garbage collectors.This work aims at investigating the practicalasp ects of memory management in Prolog systems. We present a methodology to compare the memory performance of such systems, and we use it to compare two different WAM-based systems, namely XSB and Yap. We suggest novel techniques for variable shunting and we propose a scheme that can improve the performance of sliding-based garbage collectors. Last, we evaluate our methodology with larger-scale applications.