TY - GEN
T1 - Seamless Deductive Inference via Macros
AU - Sahebolamri, Arash
AU - Gilray, Thomas
AU - Micinski, Kristopher
N1 - Publisher Copyright:
© 2022 ACM.
PY - 2022/9/19
Y1 - 2022/9/19
N2 - We present an approach to integrating state-of-Art bottom-up logic programming within the Rust ecosystem, demonstrating it with Ascent, an extension of Datalog that performs well against comparable systems. Rust's powerful macro system permits Ascent to be compiled uniformly with the Rust code it's embedded in and to interoperate with arbitrary user-defined components written in Rust, addressing a challenge in real-world use of logic programming languages: The fact that logical programs are parts of bigger software systems and need to interoperate with other components written in imperative programming languages. We leverage Rust's trait system to extend Datalog semantics with non-powerset lattices, much like Flix, and with user-defined data types much like Formulog and Souffle. We use Ascent to re-implement the Rust borrow checker, a static analysis required by the Rust compiler. We evaluate our performance against Datafrog, Flix, and Souffle using the borrow checker and other benchmarks, observing comparable performance to Datafrog and Souffle, and speedups of around two orders of magnitude compared to Flix.
AB - We present an approach to integrating state-of-Art bottom-up logic programming within the Rust ecosystem, demonstrating it with Ascent, an extension of Datalog that performs well against comparable systems. Rust's powerful macro system permits Ascent to be compiled uniformly with the Rust code it's embedded in and to interoperate with arbitrary user-defined components written in Rust, addressing a challenge in real-world use of logic programming languages: The fact that logical programs are parts of bigger software systems and need to interoperate with other components written in imperative programming languages. We leverage Rust's trait system to extend Datalog semantics with non-powerset lattices, much like Flix, and with user-defined data types much like Formulog and Souffle. We use Ascent to re-implement the Rust borrow checker, a static analysis required by the Rust compiler. We evaluate our performance against Datafrog, Flix, and Souffle using the borrow checker and other benchmarks, observing comparable performance to Datafrog and Souffle, and speedups of around two orders of magnitude compared to Flix.
KW - Ascent
KW - Datalog
KW - Logic Programming
KW - Program Analysis
KW - Rust
KW - Static Analysis
UR - http://www.scopus.com/inward/record.url?scp=85127851914&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85127851914&partnerID=8YFLogxK
U2 - 10.1145/3497776.3517779
DO - 10.1145/3497776.3517779
M3 - Conference contribution
AN - SCOPUS:85127851914
T3 - CC 2022 - Proceedings of the 31st ACM SIGPLAN International Conference on Compiler Construction
SP - 77
EP - 88
BT - CC 2022 - Proceedings of the 31st ACM SIGPLAN International Conference on Compiler Construction
A2 - Egger, Bernhard
A2 - Smith, Aaron
PB - Association for Computing Machinery, Inc
T2 - 31st ACM SIGPLAN International Conference on Compiler Construction, CC 2022
Y2 - 2 April 2022 through 3 April 2022
ER -