Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
184 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
45 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

On the Convergence Rate of Linear Datalogo over Stable Semirings (2311.17664v1)

Published 29 Nov 2023 in cs.DB

Abstract: Datalogo is an extension of Datalog, where instead of a program being a collection of union of conjunctive queries over the standard Boolean semiring, a program may now be a collection of sum-sum-product queries over an arbitrary commutative partially ordered pre-semiring. Datalogo is more powerful than Datalog in that its additional algebraic structure alows for supporting recursion with aggregation. At the same time, Datalogo retains the syntactic and semantic simplicity of Datalog: Datalogo has declarative least fixpoint semantics. The least fixpoint can be found via the na\"ive evaluation algorithm that repeatedly applies the immediate sequence opeator until no further change is possible. It was shown that, when the underlying semiring is $p$-stable, then the naive evaluation of any Datalogo program over the semiring converges in a finite number of steps. However, the upper bounds on the rate of convergence were exponential in the number of ground IDB atoms. This paper establishes polynomial upper bounds on the convergence rate of the na\"ive algorithm on {\bf linear} Datalogo programs, which is quite common in practice. In particular, the main result of this paper is that the convergence rate of linear Datalogo programs under any $p$-stable semiring is $O(pn3)$. Furthermore, we show a matching lower bound by constructing a $p$-stable semiring and a linear Datalogo program that requires $\Omega(pn3)$ iterations for the na\"ive iteration algorithm to converge. Next, we study the convergence rate in terms of the number of elements in the semiring for linear Datalogo programs. When $L$ is the number of elements, the convergence rate is bounded by $O(pn \log L)$. This significantly improves the convergence rate for small $L$. We show a nearly matching lower bound as well.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (28)
  1. Foundations of Databases. Addison-Wesley, 1995. URL: http://webdam.inria.fr/Alice/.
  2. Seminaïve evaluation for a higher-order functional language. Proc. ACM Program. Lang., 4(POPL):22:1–22:28, 2020. doi:10.1145/3371090.
  3. Regular algebra applied to path-finding problems. J. Inst. Math. Appl., 15:161–186, 1975.
  4. Bernard Carré. Graphs and networks. The Clarendon Press, Oxford University Press, New York, 1979. Oxford Applied Mathematics and Computing Science Series.
  5. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Robert M. Graham, Michael A. Harrison, and Ravi Sethi, editors, Conference Record of the Fourth ACM Symposium on Principles of Programming Languages, Los Angeles, California, USA, January 1977, pages 238–252. ACM, 1977. doi:10.1145/512950.512973.
  6. Comparing the Galois connection and widening/narrowing approaches to abstract interpretation. In Programming language implementation and logic programming (Leuven, 1992), volume 631 of Lecture Notes in Comput. Sci., pages 269–295. Springer, Berlin, 1992. URL: https://doi-org.gate.lib.buffalo.edu/10.1007/3-540-55844-6_142, doi:10.1007/3-540-55844-6_142.
  7. Newtonian program analysis. J. ACM, 57(6):33:1–33:47, 2010. doi:10.1145/1857914.1857917.
  8. Robert W. Floyd. Algorithm 97: Shortest path. Commun. ACM, 5(6):345, 1962. doi:10.1145/367766.368168.
  9. M. Gondran. Algèbre linéaire et cheminement dans un graphe. Rev. Française Automat. Informat. Recherche Opérationnelle Sér. Verte, 9(V-1):77–99, 1975.
  10. Graphs, dioids and semirings, volume 41 of Operations Research/Computer Science Interfaces Series. Springer, New York, 2008. New models and algorithms.
  11. Parikh’s theorem in commutative kleene algebra. In 14th Annual IEEE Symposium on Logic in Computer Science, Trento, Italy, July 2-5, 1999, pages 394–401. IEEE Computer Society, 1999. doi:10.1109/LICS.1999.782634.
  12. Global data flow analysis and iterative algorithms. J. ACM, 23(1):158–171, 1976. doi:10.1145/321921.321938.
  13. Convergence of datalog over (pre-) semirings. In Leonid Libkin and Pablo Barceló, editors, PODS ’22: International Conference on Management of Data, Philadelphia, PA, USA, June 12 - 17, 2022, pages 105–117. ACM, 2022. doi:10.1145/3517804.3524140.
  14. S. C. Kleene. Representation of events in nerve nets and finite automata. In Automata studies, Annals of mathematics studies, no. 34, pages 3–41. Princeton University Press, Princeton, N. J., 1956.
  15. Werner Kuich. The Kleene and the Parikh theorem in complete semirings. In Automata, languages and programming (Karlsruhe, 1987), volume 267 of Lecture Notes in Comput. Sci., pages 212–225. Springer, Berlin, 1987. URL: https://doi-org.gate.lib.buffalo.edu/10.1007/3-540-18088-5_17, doi:10.1007/3-540-18088-5_17.
  16. Werner Kuich. Semirings and formal power series: their relevance to formal languages and automata. In Handbook of formal languages, Vol. 1, pages 609–677. Springer, Berlin, 1997.
  17. Daniel J. Lehmann. Algebraic structures for transitive closure. Theor. Comput. Sci., 4(1):59–76, 1977. doi:10.1016/0304-3975(77)90056-1.
  18. Generalized nested dissection. SIAM J. Numer. Anal., 16(2):346–358, 1979. URL: https://doi-org.gate.lib.buffalo.edu/10.1137/0716027, doi:10.1137/0716027.
  19. Applications of a planar separator theorem. SIAM J. Comput., 9(3):615–627, 1980. URL: https://doi-org.gate.lib.buffalo.edu/10.1137/0209046, doi:10.1137/0209046.
  20. Principles of program analysis. Springer-Verlag, Berlin, 1999. URL: https://doi-org.gate.lib.buffalo.edu/10.1007/978-3-662-03811-6, doi:10.1007/978-3-662-03811-6.
  21. Rohit J. Parikh. On context-free languages. J. Assoc. Comput. Mach., 13:570–581, 1966. URL: https://doi-org.gate.lib.buffalo.edu/10.1145/321356.321364, doi:10.1145/321356.321364.
  22. D. L. Pilling. Commutative regular equations and Parikh’s theorem. J. London Math. Soc. (2), 6:663–666, 1973. URL: https://doi-org.gate.lib.buffalo.edu/10.1112/jlms/s2-6.4.663, doi:10.1112/jlms/s2-6.4.663.
  23. Günter Rote. Path problems in graphs. In Computational graph theory, volume 7 of Comput. Suppl., pages 155–189. Springer, Vienna, 1990. URL: https://doi-org.gate.lib.buffalo.edu/10.1007/978-3-7091-9076-0_9, doi:10.1007/978-3-7091-9076-0_9.
  24. Robert E. Tarjan. Graph theory and gaussian elimination, 1976. J.R. Bunch and D.J. Rose, eds.
  25. Robert Endre Tarjan. A unified approach to path problems. J. ACM, 28(3):577–593, 1981. doi:10.1145/322261.322272.
  26. Stephen Warshall. A theorem on boolean matrices. J. ACM, 9(1):11–12, 1962. doi:10.1145/321105.321107.
  27. Robin J. Wilson. Introduction to Graph Theory. Prentice Hall/Pearson, New York, 2010.
  28. U. Zimmermann. Linear and combinatorial optimization in ordered algebraic structures. Ann. Discrete Math., 10:viii+380, 1981.
Citations (2)

Summary

We haven't generated a summary for this paper yet.