Foundations of logic programming; (2nd extended ed.)
Foundations of logic programming; (2nd extended ed.)
Partial evaluation and automatic program generation
Partial evaluation and automatic program generation
Tutorial on specialisation of logic programs
PEPM '93 Proceedings of the 1993 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
Cost analysis of logic programs
ACM Transactions on Programming Languages and Systems (TOPLAS)
Resource-bounded partial evaluation
PEPM '97 Proceedings of the 1997 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
Self-tuning resource aware specialisation for prolog
PPDP '05 Proceedings of the 7th ACM SIGPLAN international conference on Principles and practice of declarative programming
Poly-controlled partial evaluation
Proceedings of the 8th ACM SIGPLAN international conference on Principles and practice of declarative programming
Logic program specialisation through partial deduction: Control issues
Theory and Practice of Logic Programming
Poly-controlled partial evaluation in practice
Proceedings of the 2007 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
Non-leftmost unfolding in partial evaluation of logic programs with impure predicates
LOPSTR'05 Proceedings of the 15th international conference on Logic Based Program Synthesis and Transformation
Efficient local unfolding with ancestor stacks for full prolog
LOPSTR'04 Proceedings of the 14th international conference on Logic Based Program Synthesis and Transformation
Hi-index | 0.00 |
We present Oracle-Based Partial Evaluation (OBPE), a novel approach to on-line Partial Evaluation (PE) which decides the control strategy to use for each call pattern by using an oracle function which compares the results of specializing such call pattern w.r.t. a set of strategies. Our proposal is motivated by Poly-Controlled Partial Evaluation (PCPE), which allows using different control strategies for different call patterns. Given a set CS of control strategies, the best PCPE specialized programs outperform the specialized programs obtained by traditional PE for any of the control strategies in CS, especially when resource-aware specialization is performed. Unfortunately, computing all PCPE specialized programs and then choosing a posteriori the best one is too costly in practice. In contrast, in OBPE a single specialized program is computed. We have developed an empirical oracle whose parameters are approximated from a set of training data, by using constraint logic programming. Our experimental results show that the additional cost of OBPE when compared with traditional PE is a constant factor and that, at least in our experiments, OBPE obtains significantly better specializations. We argue that our proposal is relevant in practice and introduces clear improvements over standard PE. Our work is developed in the context of logic programs, though the ideas are in principle of interest to the PE of any programming language.