Runtime Repeated Recursion Unfolding in CHR: A Just-In-Time Online Program Optimization Strategy That Can Achieve Super-Linear Speedup
Thom Fruehwirth

TL;DR
This paper presents a just-in-time runtime optimization technique for recursive programs that can achieve super-linear speedups by unfolding recursion at runtime, proven correct and demonstrated with benchmarks.
Contribution
The paper introduces a novel online recursion unfolding method that reduces recursive calls logarithmically, enabling super-linear speedups in recursive program execution.
Findings
Achieves super-linear speedup in recursive program execution.
Implementation in CHR with significant runtime improvements.
Theoretical proof of correctness and complexity analysis.
Abstract
We introduce a just-in-time runtime program transformation strategy based on repeated recursion unfolding. Our online program optimization generates several versions of a recursion differentiated by the minimal number of recursive steps covered. The base case of the recursion is ignored in our technique. Our method is introduced here on the basis of single linear direct recursive rules. When a recursive call is encountered at runtime, first an unfolder creates specializations of the associated recursive rule on-the-fly and then an interpreter applies these rules to the call. Our approach reduces the number of recursive rule applications to its logarithm at the expense of introducing a logarithmic number of generic unfolded rules. We prove correctness of our online optimization technique and determine its time complexity. For recursions which have enough simplifyable unfoldings, a…
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 · Parallel Computing and Optimization Techniques
