Offline partial evaluation can be as accurate as online partial evaluation

Niels H. Christensen, Robert Glück. Offline partial evaluation can be as accurate as online partial evaluation. ACM Transactions on Programming Languages and Systems, 26(1):191-220, 2004. [doi]

Abstract

We show that the accuracy of online partial evaluation, or polyvariant specialization based on constant propagation, can be simulated by offline partial evaluation using a maximally polyvariant binding-time analysis. We point out that, while their accuracy is the same, online partial evaluation offers better opportunities for powerful generalization strategies. Our results are presented using a flowchart language with recursive procedures.