Skip to main content Accessibility help

Evaluation of the Implementation of an Abstract Interpretation Algorithm using Tabled CLP



CiaoPP is an analyzer and optimizer for logic programs, part of the Ciao Prolog system. It includes PLAI, a fixpoint algorithm for the abstract interpretation of logic programs which we adapt to use tabled constraint logic programming. In this adaptation, the tabling engine drives the fixpoint computation, while the constraint solver handles the LUB of the abstract substitutions of different clauses. That simplifies the code and improves performance, since termination, dependencies, and some crucial operations (e.g., branch switching and resumption) are directly handled by the tabling engine. Determining whether the fixpoint has been reached uses semantic equivalence, which can decide that two syntactically different abstract substitutions represent the same element in the abstract domain. Therefore, the tabling analyzer can reuse answers in more cases than an analyzer using syntactical equality. This helps achieve better performance, even taking into account the additional cost associated to these checks. Our implementation is based on the TCLP framework available in Ciao Prolog and is one-third the size of the initial fixpoint implementation in CiaoPP. Its performance has been evaluated by analyzing several programs using different abstract domains.



Hide All

Work partially supported by EIT Digital (, MINECO project TIN2015-67522-C3-1-R (TRACES), and Comunidad de Madrid project S2018/TCS-4339 BLOQUES-CM co-funded by EIE Funds of the European Union.



Hide All
Arias, J. and Carro, M. 2019a. Description, Implementation, and Evaluation of a Generic Design for Tabled CLP. Theory and Practice of Logic Programming 19, 3, 412448.
Arias, J. and Carro, M. 2019b. Incremental evaluation of lattice-based aggregates in logic programming using modular TCLP. In Practical Aspects of Declarative Languages - 21st International Symposium (PADL 2019), Alferes, J. J. and Johansson, M., Eds. Lecture Notes in Computer Science, vol. 11372. Springer, 98114.
Bruynooghe, M. 1991. A Practical Framework for the Abstract Interpretation of Logic Programs. Journal of Logic Programming 10, 91124.
Bueno, F., Lopez-Garcia, P., and Hermenegildo, M. V. 2004. Multivariant Non-Failure Analysis via Standard Abstract Interpretation. In FLOPS’04. Number 2998 in LNCS. Springer-Verlag, 100–116.
Chico de Guzmán, P., Carro, M., Hermenegildo, M. V., and Stuckey, P. 2012. A General Implementation Framework for Tabled CLP. In Int’l. Symposium on Functional and Logic Programming (FLOPS’12). Number 7294 in LNCS. Springer Verlag, 104–119.
Cousot, P. and Cousot, R. 1977. Abstract Interpretation: a Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. In ACM Symposium on Principles of Programming Languages (POPL’77). ACM Press, 238252.
Cui, B. and Warren, D. S. 2000. A system for Tabled Constraint Logic Programming. In Int’l. Conference on Computational Logic. LNCS, vol. 1861. 478–492.
Demoen, B. and Sagonas, K. 1998. CAT: The Copying Approach to Tabling. In Programming Language Implementation and Logic Programming. Lecture Notes in Computer Science, vol. 1490. Springer-Verlag, 2135.
Dietrich, S. W. 1987. Extension Tables: Memo Relations in Logic Programming. In Fourth IEEE Symposium on Logic Programming. 264–272.
Freire, J., Swift, T., and Warren, D. S. 2001. Beyond Depth-First: Improving Tabled Logic Programs through Alternative Scheduling Strategies. In International Symposium on Programming Language Implementation and Logic Programming. Number 1140 in LNCS. Springer-Verlag, 243–258.
Gange, G., Navas, J. A., Schachte, P., Søndergaard, H., and Stuckey, P. J. 2013. Failure Tabled Constraint Logic Programming by Interpolation. TPLP 13, 4-5, 593607.
Guo, H.-F. and Gupta, G. 2008. Simplifying Dynamic Programming via Mode-directed Tabling. Software: Practice and Experience 1 (Jan), 7594.
Hermenegildo, M. V., Bueno, F., Carro, M., Lopez-Garcia, P., Mera, E., Morales, J., and Puebla, G. 2012. An Overview of Ciao and its Design Philosophy. Theory and Practice of Logic Programming 12, 1–2 (January), 219252.
Hermenegildo, M. V., Puebla, G., Bueno, F., and Lopez-Garcia, P. 2005. Integrated Program Debugging, Verification, and Optimization Using Abstract Interpretation (and The Ciao System Preprocessor). Science of Computer Programming 58, 1–2 (October), 115140.
Holzbaur, C. 1992. Metastructures vs. Attributed Variables in the Context of Extensible Unification. In Int’l. Symposium on Programming Language Implementation and Logic Programming. Number 631 in LNCS. Springer Verlag, 260–268.
Jaffar, J. and Maher, M. 1994. Constraint Logic Programming: A Survey. Journal of Logic Programming 19/20, 503–581.
Janssens, G., Bruynooghe, M., and Dumortier, V. 1995. A blueprint for an abstract machine for abstract interpretation of (constraint) logic programs. In ILPS. 336–350.
Janssens, G. and Sagonas, K. 1998. On the Use of Tabling for Abstract Interpretation: An Experiment with Abstract Equation Systems. In Tabulation in Parsing and Deduction.
Kanamori, T. and Kawamura, T. 1993. Abstract Interpretation Based on OLDT Resolution. Journal of Logic Programming 15, 130.
Muthukumar, K. and Hermenegildo, M. 1989. Determination of Variable Dependence Information at Compile-Time Through Abstract Interpretation. In 1989 North American Conference on Logic Programming. MIT Press, 166189.
Muthukumar, K. and Hermenegildo, M. 1990. Deriving A Fixpoint Computation Algorithm for Top-down Abstract Interpretation of Logic Programs. Technical Report ACT-DC-153-90, Microelectronics and Computer Technology Corporation (MCC), Austin, TX 78759. April.
Muthukumar, K. and Hermenegildo, M. 1991. Combined Determination of Sharing and Freeness of Program Variables Through Abstract Interpretation. In International Conference on Logic Programming (ICLP 1991). MIT Press, 4963.
Muthukumar, K. and Hermenegildo, M. 1992. Compile-time Derivation of Variable Dependency Using Abstract Interpretation. JLP 13, 2/3 (July), 315–347.
Nielson, F., Nielson, H. R., and Hankin, C. 2005. Principles of Program Analysis. Springer. Second Ed.
Santos Costa, V., Rocha, R., and Damas, L. 2012. The YAP Prolog system. Theory and Practice of Logic Programming 12, 1-2, 534.
Schrijvers, T., Demoen, B., and Warren, D. S. 2008. TCHR: a Framework for Tabled CLP. Theory and Practice of Logic Programming 4 (Jul), 491526.
Swift, T. and Warren, D. S. 2010. Tabling with answer subsumption: Implementation, applications and performance. In Logics in Artificial Intelligence. Vol. 6341. 300312.
Tamaki, H. and Sato, M. 1986. OLD Resolution with Tabulation. In Third International Conference on Logic Programming. Lecture Notes in Computer Science, Springer-Verlag, London, 8498.
Vaucheret, C. and Bueno, F. 2002. More Precise yet Efficient Type Inference for Logic Programs. In 9th International Static Analysis Symposium (SAS’02). Lecture Notes in Computer Science, vol. 2477. Springer-Verlag, 102116.
Warren, D. S. 1992. Memoing for Logic Programs. Communications of the ACM 35, 3, 93111.
Warren, D. S. 1999. Programming in Tabled Prolog. Unpublished manuscript. Accessed on May 15, 2019.
Warren, R., Hermenegildo, M., and Debray, S. K. 1988. On the Practicality of Global Flow Analysis of Logic Programs. In Fifth International Conference and Symposium on Logic Programming. MIT Press, 684699.
Wielemaker, J., Schrijvers, T., Triska, M., and Lager, T. 2012. SWI-Prolog. Theory and Practice of Logic Programming 12, 1-2, 6796.
Zhou, N.-F., Kameya, Y., and Sato, T. 2010. Mode-Directed Tabling for Dynamic Programming, Machine Learning, and Constraint Solving. In Int’l. Conference on Tools with Artificial Intelligence. Number 2. IEEE, 213–218.


Related content

Powered by UNSILO
Type Description Title
Supplementary materials

Arias and Carro supplementary material

 PDF (207 KB)
207 KB

Evaluation of the Implementation of an Abstract Interpretation Algorithm using Tabled CLP



Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed.