Source-to-source optimizing transformations of Prolog programs based on abstract interpretation
Francois Gobert, Baudouin Le Charlier

TL;DR
This paper introduces an abstract interpretation-based optimizer that automatically transforms Prolog source code to improve efficiency while preserving semantics, considering program annotations and input call contexts.
Contribution
It presents a novel method for safe, automatic source-to-source optimization of Prolog programs using abstract interpretation, accommodating program annotations.
Findings
Effective code transformations depend on program annotations.
The optimizer preserves semantics while enhancing efficiency.
Applicable to any Prolog program with annotations.
Abstract
Making a Prolog program more efficient by transforming its source code, without changing its operational semantics, is not an obvious task. It requires the user to have a clear understanding of how the Prolog compiler works, and in particular, of the effects of impure features like the cut. The way a Prolog code is written - e.g., the order of clauses, the order of literals in a clause, the use of cuts or negations - influences its efficiency. Furthermore, different optimization techniques may be redundant or conflicting when they are applied together, depending on the way a procedure is called - e.g., inserting cuts and enabling indexing. We present an optimiser, based on abstract interpretation, that automatically performs safe code transformations of Prolog procedures in the context of some class of input calls. The method is more effective if procedures are annotated with additional…
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
TopicsLogic, programming, and type systems · Software Testing and Debugging Techniques · Formal Methods in Verification
