Bring Your Own Data Structures to Datalog

Author:

Sahebolamri Arash1ORCID,Barrett Langston2ORCID,Moore Scott2ORCID,Micinski Kristopher1ORCID

Affiliation:

1. Syracuse University, Syracuse, USA

2. Galois, Portland, USA

Abstract

The restricted logic programming language Datalog has become a popular implementation target for deductive-analytic workloads including social-media analytics and program analysis. Modern Datalog engines compile Datalog rules to joins over explicit representations of relations—often B-trees or hash maps. While these modern engines have enabled high scalability in many application domains, they have a crucial weakness: achieving the desired algorithmic complexity may be impossible due to representation-imposed overhead of the engine’s data structures. In this paper, we present the "Bring Your Own Data Structures" (Byods) approach, in the form of a DSL embedded in Rust. Using Byods, an engineer writes logical rules which are implicitly parametric on the concrete data structure representation; our implementation provides an interface to enable "bringing their own" data structures to represent relations, which harmoniously interact with code generated by our compiler (implemented as Rust procedural macros). We formalize the semantics of Byods as an extension of Datalog’s; our formalization captures the key properties demanded of data structures compatible with Byods, including properties required for incrementalized (semi-naïve) evaluation. We detail many applications of the Byods approach, implementing analyses requiring specialized data structures for transitive and equivalence relations to scale, including an optimized version of the Rust borrow checker Polonius; highly-parallel PageRank made possible by lattices; and a large-scale analysis of LLVM utilizing index-sharing to scale. Our results show that Byods offers both improved algorithmic scalability (reduced time and/or space complexity) and runtimes competitive with state-of-the-art parallelizing Datalog solvers.

Funder

NSF

Defense Advanced Research Projects Agency

Publisher

Association for Computing Machinery (ACM)

Subject

Safety, Risk, Reliability and Quality,Software

Reference51 articles.

1. Lars Ole Andersen . 1994. Program analysis and specialization for the C programming language. Ph. D. Dissertation. DIKU , University of Copenhagen. Lars Ole Andersen. 1994. Program analysis and specialization for the C programming language. Ph. D. Dissertation. DIKU, University of Copenhagen.

2. Tony Antoniadis , Konstantinos Triantafyllou , and Yannis Smaragdakis . 2017 . Porting doop to soufflé: a tale of inter-engine portability for datalog-based analyses . In Proceedings of the 6th ACM SIGPLAN International Workshop on State Of the Art in Program Analysis. 25–30 . Tony Antoniadis, Konstantinos Triantafyllou, and Yannis Smaragdakis. 2017. Porting doop to soufflé: a tale of inter-engine portability for datalog-based analyses. In Proceedings of the 6th ACM SIGPLAN International Workshop on State Of the Art in Program Analysis. 25–30.

3. Design and Implementation of the LogicBlox System

4. Seminaïve evaluation for a higher-order functional language

5. Datafun: a functional Datalog

Cited by 3 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Towards Systematic Index Dynamization;Proceedings of the VLDB Endowment;2024-07

2. Flan: An Expressive and Efficient Datalog Compiler for Program Analysis;Proceedings of the ACM on Programming Languages;2024-01-05

3. Embedding a family of logic languages with custom monadic unification in Scala;PROBLEMS IN PROGRAMMING;2024-01

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3