Efficient Local Unfolding with Ancestor Stacks
G. Puebla, E. Albert, M. Hermenegildo

TL;DR
This paper introduces an efficient local unfolding rule for logic program partial evaluation that uses ancestor stacks to improve specialization power while reducing overhead, enabling more flexible unfolding strategies.
Contribution
It proposes a stack-based implementation of ancestor-based unfolding rules that maintains the benefits of ancestor sequences with less overhead, allowing non-leftmost unfoldings.
Findings
Stack-based implementation reduces overhead of ancestor tracking.
Allows non-leftmost unfoldings in depth-first strategies.
Maintains specialization power and guarantees termination.
Abstract
The most successful unfolding rules used nowadays in the partial evaluation of logic programs are based on well quasi orders (wqo) applied over (covering) ancestors, i.e., a subsequence of the atoms selected during a derivation. Ancestor (sub)sequences are used to increase the specialization power of unfolding while still guaranteeing termination and also to reduce the number of atoms for which the wqo has to be checked. Unfortunately, maintaining the structure of the ancestor relation during unfolding introduces significant overhead. We propose an efficient, practical local unfolding rule based on the notion of covering ancestors which can be used in combination with a wqo and allows a stack-based implementation without losing any opportunities for specialization. Using our technique, certain non-leftmost unfoldings are allowed as long as local unfolding is performed, i.e., we cover…
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 · Software Testing and Debugging Techniques
