Speedup of Logic Programs by Binarization and Partial Deduction
Jan Hruza, Petr Stepanek

TL;DR
This paper demonstrates that for B-stratifiable logic programs, binarization combined with partial deduction can produce more efficient binary programs by eliminating continuation variables, and this process can be automated.
Contribution
It introduces the class of B-stratifiable programs and shows that binarization with partial deduction improves their efficiency, providing an automated transformation method.
Findings
Binarization with partial deduction improves program efficiency for B-stratifiable programs.
The transformation eliminates continuation variables, simplifying the program.
The approach can be automated and outperforms some related methods.
Abstract
Binary logic programs can be obtained from ordinary logic programs by a binarizing transformation. In most cases, binary programs obtained this way are less efficient than the original programs. (Demoen, 1992) showed an interesting example of a logic program whose computational behaviour was improved when it was transformed to a binary program and then specialized by partial deduction. The class of B-stratifiable logic programs is defined. It is shown that for every B-stratifiable logic program, binarization and subsequent partial deduction produce a binary program which does not contain variables for continuations introduced by binarization. Such programs usually have a better computational behaviour than the original ones. Both binarization and partial deduction can be easily automated. A comparison with other related approaches to program transformation is given.
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 · Logic, Reasoning, and Knowledge · Formal Methods in Verification
