Abstract
This paper considers the problem of efficient incremental maintenance of memo tables in a tabled logic programming system. Most existing techniques for this problem consider insertion and deletion of facts as primitive changes, and treat update as deletion of the old version followed by insertion of the new version. They handle insertion and deletion using independent algorithms, consequently performing many redundant computations when processing updates. In this paper, we present a local algorithm for handling updates to facts. The key idea is to interleave the propagation of deletion and insertion operations generated by the updates through a dynamic (and potentially cyclic) dependency graph. The dependency graph used in our algorithm is more general than that used in algorithms previously proposed for incremental evaluation of attribute grammars and functional programs. Nevertheless, our algorithm’s complexity matches that of the most efficient algorithms built for these specialized cases. We demonstrate the effectiveness of our algorithm using data-flow analysis and parsing examples.
This research was supported in part by NSF grants CCR-0205376 and CCR-0311512.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Acar, U.A., Blelloch, G.E., Harper, R.: Adaptive functional programming. In: POPL, pp. 247–259. ACM Press, New York (2002)
Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: principles, techniques, and tools, pp. 585–718. Addison-Wesley, Reading (1986)
Alpern, B., Hoover, R., Rosen, B.K., Sweeney, P.F., Zadeck, F.K.: Incremental evaluation of computational circuits. In: Symposium on Discrete algorithms, pp. 32–42 (1990)
Bol, R., Degerstadt, L.: Tabulated resolution for well-founded semantics. In: ILPS (1993)
Chen, W., Swift, T., Warren, D.S.: Efficient implementation of general logical queries. In: JLP (1995)
Chen, W., Warren, D.S.: Tabled evaluation with delaying for general logic programs. JACM 43(1), 20–74 (1996)
Conway, C.L., Namjoshi, K.S., Dams, D., Edwards, S.A.: Incremental Algorithms for Inter-procedural Analysis of Safety Properties. In: Etessami, K., Rajamani, S.K. (eds.) CAV 2005. LNCS, vol. 3576, pp. 449–461. Springer, Heidelberg (2005)
Dawson, S., Ramakrishnan, C.R., Warren, D.S.: Practical program analysis using general purpose logic programming systems — a case study. In: ACM PLDI, pp. 117–126 (1996)
Demers, A., Reps, T., Teitelbaum, T.: Incremental evaluation for attribute grammars with application to syntax-directed editors. In: POPL, pp. 105–116. ACM Press, New York (1981)
Dietz, P., Sleator, D.: Two algorithms for maintaining order in a list. In: STOC, pp. 365–372. ACM Press, New York (1987)
Gupta, A., Mumick, I.: Maintenance of materialized views: Problems, techniques, and applications. IEEE Data Engineering Bulletin 18(2), 3–18 (1995)
Gupta, A., Mumick, I.S., Subrahmanian, V.S.: Maintaining views incrementally. In: SIGMOD, pp. 157–166 (1993)
Hermenegildo, M., Puebla, G., Marriott, K., Stuckey, P.J.: Incremental analysis of constraint logic programs. ACM Trans. Program. Lang. Syst. 22(2), 187–223 (2000)
Jones, L.G.: Efficient evaluation of circular attribute grammars. ACM Trans. Program. Lang. Syst. 12(3), 429–462 (1990)
Mayol, E., Teniente, E.: A survey of current methods for integrity constraint maintenance and view updating. In: ER Workshops, pp. 62–73 (1999)
Paige, R., Koenig, S.: Finite differencing of computable expressions. TOPLAS 4(3), 402–454 (1982)
Pearce, D.J., Kelly, P.H.J.: Online algorithms for topological order and strongly connected components. Technical report, Imperial College, London (2003)
Pollock, L.L., Soffa, M.L.: An incremental version of iterative data flow analysis. IEEE Trans. Softw. Eng. 15(12), 1537–1549 (1989)
Puebla, G., Hermenegildo, M.V.: Optimized algorithms for incremental analysis of logic programs. In: SAS, pp. 270–284 (1996)
Ramakrishnan, C.R., et al.: XMC: A logic-programming-based verification toolset. In: Emerson, E.A., Sistla, A.P. (eds.) CAV 2000. LNCS, vol. 1855, pp. 576–580. Springer, Heidelberg (2000)
Reps, T.: Optimal-time incremental semantic analysis for syntax-directed editors. In: POPL, pp. 169–176. ACM Press, New York (1982)
Saha, D., Ramakrishnan, C.R.: Incremental evaluation of tabled logic programs. In: Palamidessi, C. (ed.) ICLP 2003. LNCS, vol. 2916, pp. 392–406. Springer, Heidelberg (2003)
Saha, D., Ramakrishnan, C.R.: Incremental and demand-driven points-to analysis using logic programming. In: PPDP. ACM Press, New York (2005)
Saha, D., Ramakrishnan, C.R.: Symbolic Support Graph: A Space Efficient Data Structure for Incremental Tabled Evaluation. In: Gabbrielli, M., Gupta, G. (eds.) ICLP 2005. LNCS, vol. 3668, pp. 235–249. Springer, Heidelberg (2005)
Saha, D., Ramakrishnan, C.R.: Incremental Evaluation of Tabled Prolog: Beyond Pure Logic Programs. In: Van Hentenryck, P. (ed.) PADL 2006. LNCS, vol. 3819, pp. 215–229. Springer, Heidelberg (2005)
Saha, D., Ramakrishnan, C.R.: A local algorithm for incremental evaluation of logic programs. Technical report, Stony Brook University (2006); available at: http://www.lmc.cs.sunysb.edu/~dsaha/local
Seljee, R., de Swart, H.: Three types of redundancy in integrity checking; an optimal solution. Journal of Data and Knowledge Enigineering 30, 135–151 (1999)
Sokolsky, O.V., Smolka, S.A.: Incremental model checking in the modal mu-calculus. In: Dill, D.L. (ed.) CAV 1994. LNCS, vol. 818, pp. 351–363. Springer, Heidelberg (1994)
Tamaki, H., Sato, T.: OLDT resolution with tabulation. In: ICLP, pp. 84–98 (1986)
Walz, J.A., Johnson, G.F.: Incremental evaluation for a general class of circular attribute grammars. In: PLDI, pp. 209–221. ACM Press, New York (1988)
XSB. The XSB logic programming system. available at: http://xsb.sourceforge.net
Yang, G., Kifer, M.: FLORA: Implementing an Efficient DOOD System Using a Tabling Logic Engine. In: Palamidessi, C., Moniz Pereira, L., Lloyd, J.W., Dahl, V., Furbach, U., Kerber, M., Lau, K.-K., Sagiv, Y., Stuckey, P.J. (eds.) CL 2000. LNCS (LNAI), vol. 1861, pp. 1078–1093. Springer, Heidelberg (2000)
Yur, J., Ryder, B.G., Landi, W.: An incremental flow- and context-sensitive pointer aliasing analysis. In: ICSE, pp. 442–451 (1999)
Yur, J., Ryder, B.G., Landi, W., Stocks, P.: Incremental analysis of side effects for C software system. In: ICSE, pp. 422–432 (1997)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Saha, D., Ramakrishnan, C.R. (2006). A Local Algorithm for Incremental Evaluation of Tabled Logic Programs. In: Etalle, S., Truszczyński, M. (eds) Logic Programming. ICLP 2006. Lecture Notes in Computer Science, vol 4079. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11799573_7
Download citation
DOI: https://doi.org/10.1007/11799573_7
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-36635-5
Online ISBN: 978-3-540-36636-2
eBook Packages: Computer ScienceComputer Science (R0)