Analysing and Compiling Coroutines with Abstract Conjunctive Partial Deduction
We provide an approach to formally analyze the computational behavior of coroutines in Logic Programs and to compile these computations into new programs, not requiring any support for coroutines. The problem was already studied near to 30 years ago, in an analysis and transformation technique called Compiling Control. However, this technique had a strong ad hoc flavor: the completeness of the analysis was not well understood and its symbolic evaluation was also very ad hoc. We show how Abstract Conjunctive Partial Deduction, introduced by Leuschel in 2004, provides an appropriate setting to redefine Compiling Control. Leuschel’s framework is more general than the original formulation, it is provably correct, and it can easily be applied for simple examples. We also show that the Abstract Conjunctive Partial Deduction framework needs some further extension to be able to deal with more complex examples.
KeywordsLogic Program Abstract Interpretation Symbolic Execution Derivation Tree Query Pattern
We thank the anonymous reviewers for their very useful suggestions.
- Annex.: Definitions, concepts and elaboration of an example (2014). https://perswww.kuleuven.be/~u0055408/tag/lopstr14.html
- Boulanger, D., Bruynooghe, M., De Schreye, D.: Compiling control revisited: a new approach based upon abstract interpretation for constraint logic programs. In: LPE, pp. 39–51 (1993)Google Scholar
- Bruynooghe, M., De Schreye, D., Krekels, B.: Compiling control. In: Proceedings of the 1986 Symposium on Logic Programming. IEEE Society Press, Salt Lake City (1986)Google Scholar
- Gallagher, J.P.: Transforming logic programs by specialising interpreters. In: ECAI, pp. 313–326 (1986)Google Scholar
- Hruza, J., Stepanek, P.: Speedup of logic programs by binarization and partial deduction. arXiv preprint arXiv:cs/0312026 (2003)
- Puebla, G., de la Banda, M.J.G., Marriott, K., Stuckey, P.J.: Optimization of logic programs with dynamic scheduling.In: ICLP, vol. 97, pp. 93–107 (1997)Google Scholar
- Wiggins, G.A.: The improvement of prolog program efficiency by compiling control: a proof-theoretic view. Department of Artificial Intelligence, University of Edinburgh (1990)Google Scholar