Hostname: page-component-cd9895bd7-fscjk Total loading time: 0 Render date: 2024-12-23T19:28:05.119Z Has data issue: false hasContentIssue false

Tabling with Sound Answer Subsumption

Published online by Cambridge University Press:  14 October 2016

ALEXANDER VANDENBROUCKE
Affiliation:
KU Leuven, Belgium (e-mail: [email protected])
MACIEJ PIRÓG
Affiliation:
KU Leuven, Belgium (e-mail: [email protected])
BENOIT DESOUTER
Affiliation:
Ghent University, Belgium (e-mail: [email protected])
TOM SCHRIJVERS
Affiliation:
KU Leuven, Belgium (e-mail: [email protected])

Abstract

Tabling is a powerful resolution mechanism for logic programs that captures their least fixed point semantics more faithfully than plain Prolog. In many tabling applications, we are not interested in the set of all answers to a goal, but only require an aggregation of those answers. Several works have studied efficient techniques, such as lattice-based answer subsumption and mode-directed tabling, to do so for various forms of aggregation.

While much attention has been paid to expressivity and efficient implementation of the different approaches, soundness has not been considered. This paper shows that the different implementations indeed fail to produce least fixed points for some programs. As a remedy, we provide a formal framework that generalises the existing approaches and we establish a soundness criterion that explains for which programs the approach is sound.

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2016 

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Abramsky, S. and Hankin, C. 1987. Abstract Interpretation of declarative languages. Vol. 1. Ellis Horwood, Chapter An introduction to abstract interpretation, 63–102.Google Scholar
Apt, K. R., Blair, H. A. and Walker, A. 1988. Towards a Theory of Declarative Knowledge. Morgan Kaufmann.CrossRefGoogle Scholar
Backhouse, R. C. 2000. Galois connections and fixed point calculus. In Algebraic and Coalgebraic Methods in the Mathematics of Program Construction, International Summer School and Workshop, Oxford, UK, April 10-14, 2000, Revised Lectures, Backhouse, R. C., Crole, R. L., and Gibbons, J., Eds. LNCS, vol. 2297. Springer, 89148.Google Scholar
Chico de Guzmán, P., Carro, M., Hermenegildo, M. V., Silva, C. and Rocha, R. 2008. An improved continuation call-based implementation of tabling. In Practical Aspects of Declarative Languages, 10th International Symposium. LNCS, vol. 4902. Springer, 197213.CrossRefGoogle Scholar
Cousot, P. and Cousot, R. 1992. Abstract interpretation and application to logic programs. The Journal of Logic Programming 13, 2–3, 103179.CrossRefGoogle Scholar
Guo, H.-F. and Gupta, G. 2004. Simplifying dynamic programming via tabling. In Practical Aspects of Declarative Languages. LNCS, vol. 3057. Springer, 163177.CrossRefGoogle Scholar
Guo, H.-F. and Gupta, G. 2008. Simplifying dynamic programming via mode-directed tabling. Software: Practice and Experience 38, 1, 7594.Google Scholar
Korte, B., Lovász, L. and Schrader, R. 1991. Greedoids, algorithms and combinatorics, vol. 4.Google Scholar
Lloyd, J. W. 1984. Foundations of Logic Programming. Springer-Verlag, New York.CrossRefGoogle Scholar
MacNeille, H. M. 1937. Partially ordered sets. Transactions of the American Mathematical Society, 416–460.Google Scholar
Oxley, J. G. 1992. Matroid theory. Oxford University Press.Google Scholar
Ramakrishna, Y. S., Ramakrishnan, C. R., Ramakrishnan, I. V., Smolka, S. A., Swift, T. and Warren, D. S. 1997. Computer Aided Verification: 9th International Conference, Haifa, Israel, June 22–25, 1997 Proceedings. Springer, 143154.CrossRefGoogle Scholar
Santos, J. and Rocha, R. 2013. On the efficient implementation of mode-directed tabling. In Practical Aspects of Declarative Languages. LNCS, vol. 7752. Springer, 141156.CrossRefGoogle Scholar
Santos Costa, V., Rocha, R. and Damas, L. 2012. The YAP Prolog system. Theory and Practice of Logic Programming 12, 1–2, 534.CrossRefGoogle Scholar
Swift, T. 1999. Tabling for non-monotonic programming. Annals of Mathematics and Artificial Intelligence 25, 3–4, 201240.CrossRefGoogle Scholar
Swift, T. and Warren, D. 2010. Tabling with answer subsumption: Implementation, applications performance. 300–312.Google Scholar
Swift, T. and Warren, D. S. 2012. XSB: Extending Prolog with tabled logic programming. Theory and Practice of Logic Programming 12, 1–2 (Jan.), 157187.CrossRefGoogle Scholar
Van Hentenryck, P., Degimbe, O., Charlier, B. L. and Michel, L. 1993. Abstract interpretation of Prolog based on OLDT resolution. Tech. rep., Providence, RI, USA.Google Scholar
Vandenbroucke, A., Schrijvers, T. and Piessens, F. 2016. Fixing non-determinism. In Proceedings of the 27th symposium on Implementation and Application of Functional Languages 2015.CrossRefGoogle Scholar
Zhou, N.-F. 2012. The language features and architecture of B-Prolog. Theory and Practice of Logic Programming 12, 1–2, 189218.CrossRefGoogle Scholar
Zhou, N. F. and Dovier, A. 2011. A tabled Prolog program for solving sokoban. In 2011 IEEE 23rd International Conference on Tools with Artificial Intelligence. 896–897.CrossRefGoogle Scholar
Zhou, N.-F., Kameya, Y. and Sato, T. 2010. Mode-directed tabling for dynamic programming, machine learning, and constraint solving. In 22nd International Conference on Tools with Artificial Intelligence (ICTAI), 2010. Vol. 2. 213–218.Google Scholar
Supplementary material: PDF

Vandenbroucke supplementary material

Appendix A and B

Download Vandenbroucke supplementary material(PDF)
PDF 169.8 KB