Abstract
We provide a first investigation of the specialisation and transformation of tabled logic programs through unfolding. We show that — surprisingly — unfolding, even determinate, can worsen the termination behaviour in the context of tabling. We therefore establish two criteria which ensure that such mishaps are avoided. We also briefly discuss the influence of some other transformation techniques on the termination and efficiency of tabled logic programs.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
K. Benkerimi and P. M. Hill. Supporting Transformations for the Partial Evaluation of Logic Programs. Journal of Logic and Computation, 3(5):469–486, October 1993.
R. M. Burstall and J. Darlington. A Transformation System for Developing Recursive Programs. Journal of the ACM, 24(1):44–67, January 1977.
W. Chen and D. S. Warren. Tabled Evaluation with Delaying for General Logic Programs. Journal of the ACM, 43(1):20–74, January 1996.
M. Codish, M. Bruynooghe, M. García de la Banda, and M. Hermenegildo. Exploiting Goal Independence in the Analysis of Logic Programs. Journal of Logic Programming, 32(3):247–262, September 1997.
M. Codish, B. Demoen, and K. Sagonas. Semantic-Based Program Analysis for Logic-Based Languages using XSB. K.U. Leuven Technical Report CW 245. December 1996.
S. Decorte, D. De Schreye, M. Leuschel, B. Martens, and K. Sagonas. Termination Analysis for Tabled Logic Programming. In N. Fuchs, editor, Proceedings of LOP-STR’97: Logic Program Synthesis and Transformation, LNCS, Leuven, Belgium, July 1997. Springer-Verlag.
M. Falaschi, G. Levi, C. Palamidessi, and M. Martelli. Declarative Modeling of the Operational Behavior of Logic Languages. Theoretical Comput. Sci., 69(3):289–318, 1989.
J. Gallagher. A System for Specialising Logic Programs. Technical Report TR-91-32, University of Bristol, November 1991.
J. Gallagher. Tutorial on Specialisation of Logic Programs. In ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 88–98, Copenhagen, Denmark, June 1993. ACM Press.
J. Gallagher and M. Bruynooghe. Some Low-Level Source Transformations for Logic Programs. In M. Bruynooghe, editor, Proceedings of the Second Workshop on Meta-programming in Logic, pages 229–244, Leuven, Belgium, April 1990.
R. Glück, J. Jørgensen, B. Martens, and M. H. Sørensen. Controlling Conjunctive Partial Deduction of Definite Logic Programs. In H. Kuchen and S. Swierstra, editors, Proceedings of the International Symposium on Programming Languages, Implementations, Logics and Programs (PLILP’96), number 1140 in LNCS, pages 152–166, Aachen, Germany, September 1996. Springer-Verlag. Extended version as Technical Report CW 226, K.U. Leuven. Accessible via http://www.cs.kuleuven.ac.be/~lpai.
C. K. Holst. Finiteness Analysis. In J. Hughes, editor, Proceedings of the 5th ACM Conference on Functional Programming Languages and Computer Architecture (FPCA), number 523 in LNCS, pages 473–495. Springer-Verlag, August 1991.
M. Leuschel and D. De Schreye. Towards creating specialised integrity checks through partial evaluation of meta-interpreters. In Proceedings of PEPM’95, the ACM Sigplan Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 253–263, La Jolla, California, June 1995. ACM Press.
M. Leuschel, D. De Schreye, and A. de Waal. A conceptual embedding of folding into partial deduction: Towards a maximal integration. In M. Maher, editor, Proceedings of the Joint International Conference and Symposium on Logic Programming JICSLP’96, pages 319–332, Bonn, Germany, September 1996. MIT Press. Extended version as Technical Report CW 225, K.U. Leuven. Accessible via http://www.cs.kuleuven.ac.be/~lpai.
M. Leuschel and B. Martens. Partial deduction of the ground representation and its application to integrity checking. In J. W. Lloyd, editor, Proceedings of ILPS’95, the International Logic Programming Symposium, pages 495–509, Portland, USA, December 1995. MIT Press. Extended version as Technical Report CW 210, K.U. Leuven. Accessible via http://www.cs.kuleuven.ac.be/~lpai.
M. Leuschel and D. Schreye. Logic program specialisation: How to be more specific. In H. Kuchen and S. Swierstra, editors, Proceedings of the International Symposium on Programming Languages, Implementations, Logics and Programs (PLILP’96), number 1140 in LNCS, pages 137–151, Aachen, Germany, September 1996. Springer-Verlag. Extended version as Technical Report CW 232, K.U. Leuven. Accessible via http://www.cs.kuleuven.ac.be/~lpai.
J. W. Lloyd and J. C. Shepherdson. Partial Evaluation in Logic Programming. Journal of Logic Programming, 11(3 & 4):217–242, October/November 1991.
A. Pettorossi and M. Proietti. Transformation of Logic Programs: Foundations and Techniques. Journal of Logic Programming, 19 & 20:261–320, May/July 1994.
S. Prestwich. An Unfold Rule for Full Prolog. In K.-K. Lau and T. Clement, editors, Logic Program Synthesis and Transformation: Proceedings of LOPSTR’92, Workshops in Computing, Manchester, U.K., 1992. Springer-Verlag.
S. Prestwich. The PADDY Partial Deduction System. Technical Report ECRC-92-6, ECRC, Munich, Germany, 1992.
M. Proietti and A. Pettorossi. Semantics Preserving Transformation Rules for Prolog. In Proceedings of the Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 274–284, Yale University, New Haven, Connecticut, U.S.A., June 1991. ACM Press.
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.
K. Sagonas. The SLG-WAM: A Search-Efficient Engine for Well-Founded Evaluation of Normal Logic Programs. PhD thesis, Department of Computer Science, SUNY at Stony Brook, August 1996.
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 Press.
D. Sahlin. Mixtus: An Automatic Partial Evaluator for Full Prolog. New Generation Computing, 12(1):7–51, 1993.
H. Tamaki and T. Sato. Unfold/Fold Transformations of Logic Programs. In S.-Å. Tärnlund, editor, Proceedings of the Second International Conference on Logic Programming, pages 127–138, Uppsala, Sweden, July 1984.
H. Tamaki and T. Sato. OLD Resolution with Tabulation. In E. Shapiro, editor, Proceedings of the Third International Conference on Logic Programming, number 225 in LNCS, pages 84–98, London, July 1986. Springer-Verlag.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1998 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Leuschel, M., Martens, B., Sagonas, K. (1998). Preserving Termination of Tabled Logic Programs While Unfolding (Extended Abstract). In: Fuchs, N.E. (eds) Logic Program Synthesis and Transformation. LOPSTR 1997. Lecture Notes in Computer Science, vol 1463. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-49674-2_10
Download citation
DOI: https://doi.org/10.1007/3-540-49674-2_10
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-65074-4
Online ISBN: 978-3-540-49674-8
eBook Packages: Springer Book Archive