{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,11,12]],"date-time":"2025-11-12T21:10:41Z","timestamp":1762981841104,"version":"3.44.0"},"reference-count":52,"publisher":"Association for Computing Machinery (ACM)","issue":"2","license":[{"start":{"date-parts":[[2024,5,10]],"date-time":"2024-05-10T00:00:00Z","timestamp":1715299200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/501100006374","name":"NSF","doi-asserted-by":"publisher","award":["IIS-2008107,IIS-2147061,IIS-1910014"],"award-info":[{"award-number":["IIS-2008107,IIS-2147061,IIS-1910014"]}],"id":[{"id":"10.13039\/501100006374","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Proc. ACM Manag. Data"],"published-print":{"date-parts":[[2024,5,10]]},"abstract":"<jats:p>Datalog is a powerful yet elegant language that allows expressing recursive computation. Although Datalog evaluation has been extensively studied in the literature, so far, only loose upper bounds are known on how fast a Datalog program can be evaluated. In this work, we ask the following question: given a Datalog program over a naturally-ordered semiring \u03c3, what is the tightest possible runtime? To this end, our main contribution is a general two-phase framework for analyzing the data complexity of Datalog over \u03c3: first ground the program into an equivalent system of polynomial equations (i.e. grounding) and then find the least fixpoint of the grounding over \u03c3. We present algorithms that use structure-aware query evaluation techniques to obtain the smallest possible groundings. Next, efficient algorithms for fixpoint evaluation are introduced over two classes of semirings: (1) finite-rank semirings and (2) absorptive semirings of total order. Combining both phases, we obtain state-of-the-art and new algorithmic results. Finally, we complement our results with a matching fine-grained lower bound.<\/jats:p>","DOI":"10.1145\/3651591","type":"journal-article","created":{"date-parts":[[2024,5,14]],"date-time":"2024-05-14T08:32:13Z","timestamp":1715675533000},"page":"1-26","source":"Crossref","is-referenced-by-count":5,"title":["Evaluating Datalog over Semirings: A Grounding-based Approach"],"prefix":"10.1145","volume":"2","author":[{"ORCID":"https:\/\/orcid.org\/0009-0009-7636-0831","authenticated-orcid":false,"given":"Hangdong","family":"Zhao","sequence":"first","affiliation":[{"name":"University of Wisconsin-Madison, Madison, WI, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-2342-4060","authenticated-orcid":false,"given":"Shaleen","family":"Deep","sequence":"additional","affiliation":[{"name":"Microsoft, Madison, WI, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-6309-1702","authenticated-orcid":false,"given":"Paraschos","family":"Koutris","sequence":"additional","affiliation":[{"name":"University of Wisconsin-Madison, Madison, WI, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0009-0002-8300-7891","authenticated-orcid":false,"given":"Sudeepa","family":"Roy","sequence":"additional","affiliation":[{"name":"Duke University, Raleigh, NC, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0009-0008-6847-7274","authenticated-orcid":false,"given":"Val","family":"Tannen","sequence":"additional","affiliation":[{"name":"University of Pennsylvania, State College, PA, USA"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2024,5,14]]},"reference":[{"volume-title":"Foundations of databases","author":"Abiteboul Serge","key":"e_1_2_1_1_1","unstructured":"Serge Abiteboul, Richard Hull, and Victor Vianu. 1995. Foundations of databases. Vol. 8. Addison-Wesley Reading."},{"key":"e_1_2_1_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/2902251.2902280"},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/153724.153752"},{"key":"e_1_2_1_4_1","unstructured":"Lars Ole Andersen. 1994. Program analysis and specialization for the C programming language. Ph. D. Dissertation. Citeseer."},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/6012.15399"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.1145\/2463664.2465216"},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.dam.2020.05.034"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.1145\/3450263"},{"key":"e_1_2_1_9_1","volume-title":"Schmid","author":"Casel Katrin","year":"2021","unstructured":"Katrin Casel and Markus L. Schmid. 2021. Fine-Grained Complexity of Regular Path Queries. In ICDT (LIPIcs, Vol. 186). Schloss Dagstuhl - Leibniz-Zentrum f\u00fc r Informatik, 19:1--19:20."},{"volume-title":"Introduction to algorithms","author":"Cormen Thomas H","key":"e_1_2_1_10_1","unstructured":"Thomas H Cormen, Charles E Leiserson, Ronald L Rivest, and Clifford Stein. 2022. Introduction to algorithms. MIT press."},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/303976.303991"},{"volume-title":"Formal Models and Semantics","author":"Courcelle Bruno","key":"e_1_2_1_12_1","unstructured":"Bruno Courcelle. 1990. Graph rewriting: An algebraic and logic approach. In Formal Models and Semantics. Elsevier, 193--242."},{"volume-title":"Introduction to lattices and order","author":"Davey Brian A","key":"e_1_2_1_13_1","unstructured":"Brian A Davey and Hilary A Priestley. 2002. Introduction to lattices and order. Cambridge university press."},{"key":"e_1_2_1_14_1","volume-title":"ICDT","volume":"3","author":"Deutch Daniel","year":"2014","unstructured":"Daniel Deutch, Tova Milo, Sudeepa Roy, and Val Tannen. 2014. Circuits for Datalog Provenance.. In ICDT, Vol. 3. Citeseer, 2014."},{"key":"e_1_2_1_15_1","doi-asserted-by":"crossref","unstructured":"Edsger W Dijkstra. 2022. A note on two problems in connexion with graphs. In Edsger Wybe Dijkstra: His Life Work and Legacy. 287--290.","DOI":"10.1145\/3544585.3544600"},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/1857914.1857917"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1145\/367766.368168"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/602220.602222"},{"key":"e_1_2_1_19_1","doi-asserted-by":"crossref","unstructured":"J. Nathan Foster Todd J. Green and Val Tannen. 2008. Annotated XML: Queries and Provenance. In PODS. ACM 271--280.","DOI":"10.1145\/1376916.1376954"},{"key":"e_1_2_1_20_1","volume-title":"Computers and intractability: A guide to the theory of np-completeness, freeman. Fundamental","author":"Garey Michael R","year":"1997","unstructured":"Michael R Garey. 1997. Computers and intractability: A guide to the theory of np-completeness, freeman. Fundamental (1997)."},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/504077.504079"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/962446.962450"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1561\/1900000017"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/1265530.1265535"},{"key":"e_1_2_1_25_1","volume-title":"On the Convergence Rate of Linear Datalogo over Stable Semirings. arXiv preprint arXiv:2311.17664","author":"Im Sungjin","year":"2023","unstructured":"Sungjin Im, Benjamin Moseley, Hung Ngo, and Kirk Pruhs. 2023. On the Convergence Rate of Linear Datalogo over Stable Semirings. arXiv preprint arXiv:2311.17664 (2023)."},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1007\/s00224-017-9811-8"},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1007\/s00224-014-9574-4"},{"key":"e_1_2_1_28_1","doi-asserted-by":"crossref","unstructured":"Mahmoud Abo Khamis Hung Q. Ngo Reinhard Pichler Dan Suciu and Yisu Remy Wang. 2022. Convergence of Datalog over (Pre-) Semirings. In PODS. ACM 105--117.","DOI":"10.1145\/3517804.3524140"},{"key":"e_1_2_1_29_1","doi-asserted-by":"crossref","unstructured":"Mahmoud Abo Khamis Hung Q. Ngo and Dan Suciu. 2017. What Do Shannon-type Inequalities Submodular Width and Disjunctive Datalog Have to Do with One Another?. In PODS. ACM 429--444.","DOI":"10.1145\/3034786.3056105"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1016\/0020-0190(77)90002-3"},{"key":"e_1_2_1_31_1","doi-asserted-by":"publisher","DOI":"10.1145\/3385412.3386021"},{"key":"e_1_2_1_32_1","doi-asserted-by":"publisher","DOI":"10.1145\/3434340"},{"key":"e_1_2_1_33_1","volume-title":"Virginia Vassilevska Williams, and R. Ryan Williams","author":"Lincoln Andrea","year":"2018","unstructured":"Andrea Lincoln, Virginia Vassilevska Williams, and R. Ryan Williams. 2018. Tight Hardness for Shortest Cycles and Paths in Sparse Graphs. In SODA. SIAM, 1236--1252."},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/3517804.3524166"},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.4086\/toc.2010.v006a005"},{"key":"e_1_2_1_36_1","doi-asserted-by":"publisher","DOI":"10.1145\/3434315"},{"key":"e_1_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.1145\/3180143"},{"key":"e_1_2_1_38_1","unstructured":"Hung Q Ngo Christopher R\u00e9 and Atri Rudra. 2014. Skew Strikes Back: New Developments in the Theory of Join Algorithms. SIGMOD Rec. (2014)."},{"key":"e_1_2_1_39_1","volume-title":"A Practical Dynamic Programming Approach to Datalog Provenance Computation. CoRR","author":"Ramusat Yann","year":"2021","unstructured":"Yann Ramusat, Silviu Maniu, and Pierre Senellart. 2021a. A Practical Dynamic Programming Approach to Datalog Provenance Computation. CoRR , Vol. abs\/2112.01132 (2021)."},{"key":"e_1_2_1_40_1","unstructured":"Yann Ramusat Silviu Maniu and Pierre Senellart. 2021b. Provenance-Based Algorithms for Rich Queries over Graph Databases. In EDBT. OpenProceedings.org 73--84."},{"key":"e_1_2_1_41_1","doi-asserted-by":"publisher","DOI":"10.1016\/S0950-5849(98)00093-7"},{"key":"e_1_2_1_42_1","doi-asserted-by":"crossref","unstructured":"Bernhard Scholz Herbert Jordan Pavle Subotic and Till Westmann. 2016. On fast large-scale program analysis in Datalog. In CC. ACM 196--206.","DOI":"10.1145\/2892208.2892226"},{"key":"e_1_2_1_43_1","doi-asserted-by":"publisher","DOI":"10.14778\/2556549.2556572"},{"key":"e_1_2_1_44_1","doi-asserted-by":"publisher","DOI":"10.1561\/2500000014"},{"key":"e_1_2_1_45_1","doi-asserted-by":"publisher","DOI":"10.1007\/BF01762108"},{"key":"e_1_2_1_46_1","unstructured":"Leslie Valiant. 1974. General context-free recognition in less than cubic time. (1974)."},{"key":"e_1_2_1_47_1","volume-title":"Proceedings of the fourteenth annual ACM symposium on Theory of computing. 137--146","author":"Vardi Moshe Y","year":"1982","unstructured":"Moshe Y Vardi. 1982. The complexity of relational query languages. In Proceedings of the fourteenth annual ACM symposium on Theory of computing. 137--146."},{"key":"e_1_2_1_48_1","doi-asserted-by":"publisher","DOI":"10.1145\/3448016.3452808"},{"key":"e_1_2_1_49_1","doi-asserted-by":"publisher","DOI":"10.1145\/321105.321107"},{"volume-title":"Graph-Theoretic Methods in Database Theory","author":"Yannakakis Mihalis","key":"e_1_2_1_50_1","unstructured":"Mihalis Yannakakis. 1990. Graph-Theoretic Methods in Database Theory. In PODS. ACM Press, 230--242."},{"key":"e_1_2_1_51_1","volume-title":"Proceedings. Computer Software and The IEEE Computer Society's Third International Applications Conference","author":"Yu Clement Tak","year":"1979","unstructured":"Clement Tak Yu and Meral Z Ozsoyoglu. 1979. An algorithm for tree-query membership of a distributed query. In COMPSAC 79. Proceedings. Computer Software and The IEEE Computer Society's Third International Applications Conference, 1979. IEEE, 306--312."},{"key":"e_1_2_1_52_1","volume-title":"Evaluating Datalog over Semirings: A Grounding-based Approach. arXiv preprint arXiv:2403.12436","author":"Zhao Hangdong","year":"2024","unstructured":"Hangdong Zhao, Shaleen Deep, Paraschos Koutris, Sudeepa Roy, and Val Tannen. 2024. Evaluating Datalog over Semirings: A Grounding-based Approach. arXiv preprint arXiv:2403.12436 (2024)."}],"container-title":["Proceedings of the ACM on Management of Data"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3651591","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3651591","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,8,22]],"date-time":"2025-08-22T21:40:51Z","timestamp":1755898851000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3651591"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,5,10]]},"references-count":52,"journal-issue":{"issue":"2","published-print":{"date-parts":[[2024,5,10]]}},"alternative-id":["10.1145\/3651591"],"URL":"https:\/\/doi.org\/10.1145\/3651591","relation":{},"ISSN":["2836-6573"],"issn-type":[{"type":"electronic","value":"2836-6573"}],"subject":[],"published":{"date-parts":[[2024,5,10]]}}}