Swapping Evaluation: A Memory-Scalable Solution for Answer-On-Demand Tabling
Pablo Chico de Guzman, Manuel Carro, David S. Warren

TL;DR
This paper introduces swapping evaluation, a new memory-efficient scheduling strategy for tabled evaluation in logic programming, which reduces memory usage significantly while maintaining execution speed.
Contribution
It proposes swapping evaluation, a novel scheduling approach that minimizes memory consumption in answer-on-demand tabling without sacrificing performance.
Findings
Swapping evaluation drastically reduces memory usage compared to batched evaluation.
Experimental results show swapping evaluation maintains comparable execution speed.
Implementation in XSB demonstrates practical feasibility of the approach.
Abstract
One of the differences among the various approaches to suspension-based tabled evaluation is the scheduling strategy. The two most popular strategies are local and batched evaluation. The former collects all the solutions to a tabled predicate before making any one of them available outside the tabled computation. The latter returns answers one by one before computing them all, which in principle is better if only one answer (or a subset of the answers) is desired. Batched evaluation is closer to SLD evaluation in that it computes solutions lazily as they are demanded, but it may need arbitrarily more memory than local evaluation, which is able to reclaim memory sooner. Some programs which in practice can be executed under the local strategy quickly run out of memory under batched evaluation. This has led to the general adoption of local evaluation at the expense of the more…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsParallel Computing and Optimization Techniques · Logic, programming, and type systems · Peer-to-Peer Network Technologies
