A theory of logic program specialization and generalization for dealing with input data properties [chapter]

Alberto Pettorossi, Maurizio Proietti
1996 Lecture Notes in Computer Science  
We address the problem of specializing logic programs w.r.t. the contexts where they are used. We assume that these contexts are speci ed by means of computable properties of the input data. We describe a general method by which, given a program P , we can derive a specialized program P 1 such that P and P 1 are equivalent w.r.t. every input data satisfying a given property. Our method extends the techniques for partial evaluation of logic programs based on Lloyd and Shepherdson's approach,
more » ... e a context can only be speci ed by means of a nite set of bindings for the variables of the input goal. In contrast to most program specialization techniques based on partial evaluation, our method may achieve superlinear speedups, and it does so by using a novel generalization technique.
doi:10.1007/3-540-61580-6_19 fatcat:7miblqmwujcstjhaa46df5lrwq