Lightweight Program Specialization via Dynamic Slicing

Claudio Ochoa, Josep Silva, Germán Vidal

Workshop on Curry and Functional Logic Programming (WCFLP 2005), pp. 1-7, ACM Press, 2005.

Program slicing is a well-known technique that extracts from a program those statements which are relevant to a particular criterion. While static slicing does not consider any input data, dynamic slices are computed from a particular program execution. Thus, dynamic slicers are usually easier to design and implement. In this work, we present a program specialization technique for lazy functional logic programming which is based on dynamic slicing. Our method exploits the code size reduction capabilities of slicing in order to produce a version of the original program specialized w.r.t. a given criterion. We also introduce some simple, post-processing transformations that allow us to further simplify the specialized program. The kind of specialization performed by our approach cannot be achieved with other related techniques like partial evaluation.

Available: PDF / BibTeX entry


Germán Vidal