{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T01:22:46Z","timestamp":1760059366607,"version":"build-2065373602"},"reference-count":78,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA2","content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2025,10,9]]},"abstract":"<jats:p>We present a comprehensive overview of the Datalog facilities in the Flix programming language. We show how programmers can write functions implemented as Datalog programs and we demonstrate how to build modular and reusable families of Datalog programs using first-class Datalog program values, rho abstraction, parametric polymorphism, and type classes. We describe several features that improve the ergonomics, flexibility, and expressive power of Datalog programming in Flix, including the inject and query program constructs, head and guard expressions, functional predicates, lattice semantics, and more.<\/jats:p>\n          <jats:p>We illustrate Datalog programming in Flix with several applications, including implementations of Ullman's algorithm to stratify Datalog programs, the Ford-Fulkerson algorithm for maximum flow, and the IFDS and IDE algorithms for context-sensitive program analysis. The implementations of IFDS and IDE fulfill a long-term goal: to have fully modular, polymorphic, typed, and declarative formulations of these algorithms that can be instantiated with any abstract domain.<\/jats:p>","DOI":"10.1145\/3763126","type":"journal-article","created":{"date-parts":[[2025,10,9]],"date-time":"2025-10-09T08:49:50Z","timestamp":1759999790000},"page":"2115-2143","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":0,"title":["Flix: A Design for Language-Integrated Datalog"],"prefix":"10.1145","volume":"9","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-7510-8724","authenticated-orcid":false,"given":"Magnus","family":"Madsen","sequence":"first","affiliation":[{"name":"Aarhus University, Aarhus, Denmark"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-9066-1889","authenticated-orcid":false,"given":"Ond\u0159ej","family":"Lhot\u00e1k","sequence":"additional","affiliation":[{"name":"University of Waterloo, Waterloo, Canada"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2025,10,9]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.1145\/3632928"},{"key":"e_1_2_1_2_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-24206-9_16"},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","DOI":"10.1016\/0743-1066(94)90024-8"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-031-16767-6_5"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/2723372.2742796"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.1145\/3371090"},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/2951913.2951948"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-25543-5_14"},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/6012.15399"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1145\/3428209"},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/1640089.1640108"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/2043174.2043195"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.14778\/2350229.2350250"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.1109\/69.43410"},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/2391229.2391230"},{"volume-title":"Introduction to algorithms","author":"Cormen Thomas H","key":"e_1_2_1_16_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_17_1","volume-title":"Datalog Reloaded: First International Workshop, Datalog 2010","author":"Moor Oege De","year":"2012","unstructured":"Oege De Moor, Georg Gottlob, Tim Furche, and Andrew Sellers. 2012. Datalog Reloaded: First International Workshop, Datalog 2010, Oxford, UK, March 16-19, 2010. Revised Selected Papers. 6702, Springer. isbn:9783642242069"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","unstructured":"Daniel Deutch Tova Milo Sudeepa Roy and Val Tannen. 2014. Circuits for Datalog Provenance. https:\/\/doi.org\/10.5441\/002\/ICDT.2014.22 10.5441\/002\/ICDT.2014.22","DOI":"10.5441\/002\/ICDT.2014.22"},{"key":"e_1_2_1_19_1","doi-asserted-by":"publisher","DOI":"10.1145\/2814270.2814307"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1109\/icse.2019.00120"},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/3416262"},{"key":"e_1_2_1_22_1","volume-title":"Datalog and logic databases","author":"Greco Sergio","year":"1854","unstructured":"Sergio Greco and Cristian Molinaro. 2016. Datalog and logic databases. Springer Nature. isbn:9783031018541"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1145\/1265530.1265535"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/2588555.2594530"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","unstructured":"Xiaowen Hu David Zhao Herbert Jordan and Bernhard Scholz. 2021. Artifact for Paper: An Efficient Interpreter for Datalog by De-specializing Relations. https:\/\/doi.org\/10.1145\/3410297 10.1145\/3410297","DOI":"10.1145\/3410297"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1145\/1989323.1989456"},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/3303084.3309490"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/3293883.3295719"},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/3293883.3295719"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-32925-8_12"},{"key":"e_1_2_1_31_1","unstructured":"Daan Leijen. 2004. First-class labels for extensible rows."},{"key":"e_1_2_1_32_1","doi-asserted-by":"publisher","DOI":"10.1145\/1149114.1149117"},{"key":"e_1_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/1592761.1592785"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/3607846"},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.1145\/3213846.3213847"},{"key":"e_1_2_1_36_1","doi-asserted-by":"publisher","DOI":"10.1145\/3428193"},{"key":"e_1_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.5281\/zenodo.15743443"},{"key":"e_1_2_1_38_1","volume-title":"Jonathan Lindegaard Starup, and Ond\u0159ej Lhot\u00e1k","author":"Madsen Magnus","year":"2022","unstructured":"Magnus Madsen, Jonathan Lindegaard Starup, and Ond\u0159ej Lhot\u00e1k. 2022. Flix: A meta programming language for datalog. In Datalog 2.0 2022: 4th International Workshop on the Resurgence of Datalog in Academia and Industry."},{"key":"e_1_2_1_39_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPICS.ECOOP.2023.17"},{"key":"e_1_2_1_40_1","doi-asserted-by":"publisher","DOI":"10.1145\/3428222"},{"key":"e_1_2_1_41_1","doi-asserted-by":"publisher","DOI":"10.1145\/3485487"},{"key":"e_1_2_1_42_1","doi-asserted-by":"publisher","DOI":"10.1145\/3622816"},{"key":"e_1_2_1_43_1","doi-asserted-by":"publisher","DOI":"10.1145\/2908080.2908096"},{"key":"e_1_2_1_44_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-08909-6_10"},{"key":"e_1_2_1_45_1","unstructured":"Frank McSherry. 2018. Rust-Lang\/datafrog: A Lightweight Datalog engine in Rust. https:\/\/github.com\/rust-lang\/datafrog [Accessed 23-06-2025]"},{"key":"e_1_2_1_46_1","doi-asserted-by":"publisher","DOI":"10.1145\/1142473.1142552"},{"key":"e_1_2_1_47_1","unstructured":"Jack Minker. 1988. Foundations of deductive databases and logic programming. Morgan Kaufmann. isbn:9780934613408"},{"key":"e_1_2_1_48_1","doi-asserted-by":"publisher","DOI":"10.1145\/3290325"},{"key":"e_1_2_1_49_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-11970-5_8"},{"volume-title":"Improving the Datalog Engine of Flix. Master\u2019s thesis","author":"Nielsen Casper Dalgaard","key":"e_1_2_1_50_1","unstructured":"Casper Dalgaard Nielsen and Adam Yasser Tallouzi. 2025. Improving the Datalog Engine of Flix. Master\u2019s thesis. Aarhus University. Master\u2019s Thesis"},{"key":"e_1_2_1_51_1","doi-asserted-by":"publisher","unstructured":"Andr\u00e9 Pacak and Sebastian Erdweg. 2022. Functional Programming with Datalog. https:\/\/doi.org\/10.4230\/LIPICS.ECOOP.2022.7 10.4230\/LIPICS.ECOOP.2022.7","DOI":"10.4230\/LIPICS.ECOOP.2022.7"},{"key":"e_1_2_1_52_1","doi-asserted-by":"publisher","DOI":"10.1145\/3622824"},{"key":"e_1_2_1_53_1","doi-asserted-by":"publisher","DOI":"10.1145\/3564719.3568686"},{"key":"e_1_2_1_54_1","doi-asserted-by":"publisher","DOI":"10.1145\/3609027.3609406"},{"key":"e_1_2_1_55_1","doi-asserted-by":"publisher","DOI":"10.1145\/199448.199462"},{"key":"e_1_2_1_56_1","unstructured":"Leonid Ryzhyk and Mihai Budiu. 2019. Differential Datalog. Datalog 2 (2019)."},{"key":"e_1_2_1_57_1","doi-asserted-by":"publisher","DOI":"10.1016\/0304-3975(96)00072-2"},{"key":"e_1_2_1_58_1","doi-asserted-by":"publisher","DOI":"10.1145\/3622840"},{"key":"e_1_2_1_59_1","doi-asserted-by":"publisher","DOI":"10.1145\/3497776.3517779"},{"key":"e_1_2_1_60_1","doi-asserted-by":"publisher","DOI":"10.1145\/2892208.2892226"},{"key":"e_1_2_1_61_1","doi-asserted-by":"publisher","DOI":"10.1145\/582095.582099"},{"key":"e_1_2_1_62_1","doi-asserted-by":"publisher","DOI":"10.1109\/embc.2018.8512571"},{"key":"e_1_2_1_63_1","doi-asserted-by":"publisher","DOI":"10.1109\/icde.2013.6544832"},{"key":"e_1_2_1_64_1","doi-asserted-by":"publisher","DOI":"10.1145\/2882903.2915229"},{"key":"e_1_2_1_65_1","doi-asserted-by":"publisher","DOI":"10.1109\/ia356718.2022.00012"},{"key":"e_1_2_1_66_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-24206-9_14"},{"key":"e_1_2_1_67_1","doi-asserted-by":"publisher","DOI":"10.1145\/1926385.1926390"},{"key":"e_1_2_1_68_1","doi-asserted-by":"publisher","unstructured":"Jonathan Lindegaard Starup Magnus Madsen and Ond\u0159ej Lhot\u00e1k. 2023. Breaking the Negative Cycle: Exploring the Design Space of Stratification for First-Class Datalog Constraints. https:\/\/doi.org\/10.4230\/LIPICS.ECOOP.2023.31 10.4230\/LIPICS.ECOOP.2023.31","DOI":"10.4230\/LIPICS.ECOOP.2023.31"},{"key":"e_1_2_1_69_1","doi-asserted-by":"publisher","DOI":"10.14778\/3282495.3282500"},{"key":"e_1_2_1_70_1","doi-asserted-by":"publisher","DOI":"10.48550\/ARXIV.2311.02206"},{"key":"e_1_2_1_71_1","doi-asserted-by":"publisher","DOI":"10.1145\/3276509"},{"key":"e_1_2_1_72_1","doi-asserted-by":"publisher","DOI":"10.1145\/3453483.3454026"},{"key":"e_1_2_1_73_1","doi-asserted-by":"publisher","DOI":"10.1145\/2970276.2970298"},{"volume-title":"Principles of database and knowledge-base systems","author":"Ullman Jeffrey D.","key":"e_1_2_1_74_1","unstructured":"Jeffrey D. Ullman. 1988. Principles of database and knowledge-base systems. Computer Science Press."},{"key":"e_1_2_1_75_1","volume-title":"Proc. International Conference on Database Theory.","author":"Veldhuizen Todd L","year":"2014","unstructured":"Todd L Veldhuizen. 2014. Leapfrog triejoin: A simple, worst-case optimal join algorithm. In Proc. International Conference on Database Theory."},{"key":"e_1_2_1_76_1","doi-asserted-by":"publisher","DOI":"10.1145\/996841.996859"},{"key":"e_1_2_1_77_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-57530-8_13"},{"key":"e_1_2_1_78_1","doi-asserted-by":"publisher","DOI":"10.1145\/3379446"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3763126","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,9]],"date-time":"2025-10-09T17:49:02Z","timestamp":1760032142000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3763126"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,10,9]]},"references-count":78,"journal-issue":{"issue":"OOPSLA2","published-print":{"date-parts":[[2025,10,9]]}},"alternative-id":["10.1145\/3763126"],"URL":"https:\/\/doi.org\/10.1145\/3763126","relation":{},"ISSN":["2475-1421"],"issn-type":[{"type":"electronic","value":"2475-1421"}],"subject":[],"published":{"date-parts":[[2025,10,9]]},"assertion":[{"value":"2025-03-19","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-08-12","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-10-09","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}