Abstract
The SLG-WAM implements tabling by freezing the WAM stacks: this technique has a reasonably small execution overhead, but is not easy to implement on top of an existing Prolog system. We propose a new technique for the implementation of tabling: the Copying Approach to Tabling. CAT does not interfere with normal Prolog execution and can be introduced in an existing Prolog system orthogonally. We have implemented CAT starting from XSB by taking out SLG-WAM and adding CAT. We describe the additions needed for adopting CAT in a WAM implementation. We show a case in which CAT performs arbitrarily worse than SLG-WAM, but on the other hand we present empirical evidence that CAT is competitive and often faster than SLG-WAM. We discuss issues related to memory management and the impact of the scheduling.
Preview
Unable to display preview. Download preview PDF.
References
K. A. M. Ali and R. Karlsson. The Muse approach to OR-parallel Prolog. International Journal of Parallel Programming, 19(2):129–162, Apr. 1990.
W. Chen and D. S. Warren. Tabled Evaluation with Delaying for General Logic Programs. Journal of the ACM, 43(1):20–74, Jan. 1996.
M. Codish, B. Demoen, and K. Sagonas. Semantics-Based Program Analysis for Logic-Based Languages using XSB. Springer International Journal of Software Tools for Technology Transfer, Aug./Sept. 1998. To appear.
B. Demoen and K. Sagonas. Memory Management for Prolog with Tabling. Technical Report CW 261, K.U. Leuven, Apr. 1998. Submitted for publication.
J. Freire, T. Swift, and D. S. Warren. Beyond Depth-First Strategies: Improving Tabled Logic Programs through Alternative Scheduling. Journal of Functional and Logic Programming, 1998(3), Apr. 1998.
G. Janssens and K. Sagonas. On the Use of Tabling for Abstract Interpretation: An Experiment with Abstract Equation Systems. In Proceedings of TAPD-98: Tabulation in Parsing and Deduction, pages 118–126, Paris, France, Apr. 1998.
P.-E. Moreau. A choice-point library for backtrack programming. In K. Sagonas, editor, Proceedings of the JICSLP-98 Workshop on Implementation Technologies for Programming Languages based on Logic, Manchester, U.K., June 1998.
I. V. Ramakrishnan, P. Rao, K. Sagonas, T. Swift, and D. S. Warren. Efficient Tabling Mechanisms for Logic Programs. In L. Sterling, editor, Proceedings of the 12th International Conference on Logic Programming, pages 687–711, Tokyo, Japan, June 1995. The MIT Press. Extended version to appear in the JLP.
R. Rocha, F. Silva, and V. S. Costa. On Applying Or-Parellelism to Tabled Evaluations. In Proceedings of the First International Workshop on Tabling in Logic Programming, pages 33–45, Leuven, Belgium, June 1997.
K. Sagonas and T. Swift. An Abstract Machine for Tabled Execution of Fixed-Order Stratified Logic Programs. ACM TOPLAS, 20, 1998. To appear.
K. Sagonas, T. Swift, and D. S. Warren. XSB as an Efficient Deductive Database Engine. In Proceedings of the ACM SIGMOD International Conference on the Management of Data, pages 442–453, Minneapolis, Minnesota, May 1994. ACM.
D. H. D. Warren. The SRI Model for OR-Parallel Execution of Prolog — Abstract Design and Implementation Issues. In Proceedings of the 1987 Symposium on Logic Programming, pages 92–102, San Francisco, California, Sept. 1987. IEEE CS Press.
D. S. Warren. Efficient Prolog memory management for flexible control strategies. In Proceedings of the 1984 Symposium on Logic Programming, pages 198–202, Atlantic City, New Jersey, Feb. 1984. IEEE Computer Science Press.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1998 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Demoen, B., Sagonas, K. (1998). CAT: The Copying Approach to Tabling. In: Palamidessi, C., Glaser, H., Meinke, K. (eds) Principles of Declarative Programming. ALP PLILP 1998 1998. Lecture Notes in Computer Science, vol 1490. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0056605
Download citation
DOI: https://doi.org/10.1007/BFb0056605
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-65012-6
Online ISBN: 978-3-540-49766-0
eBook Packages: Springer Book Archive