Towards Fully Declarative Program Analysis via Source Code Transformation
Rijnard van Tonder

TL;DR
This paper introduces a fully declarative approach to program analysis by translating source code directly into Datalog facts, simplifying analysis specification and enabling end-to-end declarative workflows across multiple programming languages.
Contribution
It proposes a novel syntax-driven source code transformation method to generate Datalog facts declaratively, advancing towards fully declarative program analysis workflows.
Findings
Feasibility of syntax-driven fact generation for lightweight analyses
Demonstrated analysis of liveness and call graph reachability
Potential extension to semantic information incorporation
Abstract
Advances in logic programming and increasing industrial uptake of Datalog-inspired approaches demonstrate the emerging need to express powerful code analyses more easily. Declarative program analysis frameworks (e.g., using logic programming like Datalog) significantly ease defining analyses compared to imperative implementations. However, the declarative benefits of these frameworks only materialize after parsing and translating source code to generate facts. Fact generation remains a non-declarative precursor to analysis where imperative implementations first parse and interpret program structures (e.g., abstract syntax trees and control-flow graphs). The procedure of fact generation thus remains opaque and difficult for non-experts to understand or modify. We present a new perspective on this analysis workflow by proposing declarative fact generation to ease specification and…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Testing and Debugging Techniques · Logic, programming, and type systems
