Derivation of Efficient Logic Programs by Specialization and Reduction of Nondeterminism
Alberto Pettorossi, Maurizio Proietti, Sophie Renault

TL;DR
This paper introduces a new transformation strategy for logic programs that significantly reduces nondeterminism, leading to highly efficient specialized programs, especially for matching and parsing tasks, surpassing previous partial evaluation methods.
Contribution
It extends partial evaluation techniques with new transformation rules and a guiding strategy to derive highly efficient, nondeterminism-reducing logic programs.
Findings
Efficiency improvements can be exponential.
Specialized programs perform computations within single branches.
Automatic derivation of efficient matching and parsing programs.
Abstract
Program specialization is a program transformation methodology which improves program efficiency by exploiting the information about the input data which are available at compile time. We show that current techniques for program specialization based on partial evaluation do not perform well on nondeterministic logic programs. We then consider a set of transformation rules which extend the ones used for partial evaluation, and we propose a strategy for guiding the application of these extended rules so to derive very efficient specialized programs. The efficiency improvements which sometimes are exponential, are due to the reduction of nondeterminism and to the fact that the computations which are performed by the initial programs in different branches of the computation trees, are performed by the specialized programs within single branches. In order to reduce nondeterminism we also…
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 · Formal Methods in Verification · Algorithms and Data Compression
