Abstract
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
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)
Bruynooghe, M.: A practical framework for the abstract interpretation of logic programs. J. Logic Program. 10(2), 91–124 (1991)
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)
Bruynooghe, M., De Schreye, D., Krekels, B.: Compiling control. J. Logic Program. 6(1), 135–162 (1989)
De Schreye, D., Glück, R., Jørgensen, J., Leuschel, M., Martens, B., Sørensen, M.H.: Conjunctive partial deduction: foundations, control, algorithms, and experiments. J. Logic Program. 41(2), 231–277 (1999)
Gallagher, J.P.: Transforming logic programs by specialising interpreters. In: ECAI, pp. 313–326 (1986)
Hruza, J., Stepanek, P.: Speedup of logic programs by binarization and partial deduction. arXiv preprint arXiv:cs/0312026 (2003)
Leuschel, M.: A framework for the integration of partial evaluation and abstract interpretation of logic programs. ACM Trans. Program. Lang. Syst. (TOPLAS) 26(3), 413–463 (2004)
Lloyd, J.: Foundations of Logic Programming. Springer-Verlag, Berlin (1987)
Lloyd, J.W., Shepherdson, J.C.: Partial evaluation in logic programming. J. Logic Program. 11(3), 217–242 (1991)
Pettorossi, A., Proietti, M.: Transformation of logic programs: foundations and techniques. J. Logic Program. 19, 261–320 (1994)
Pettorossi, A., Proietti, M.: The list introduction strategy for the derivation of logic programs. Formal Aspects Comput. 13(3–5), 233–251 (2002)
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)
Vidal, G.: A hybrid approach to conjunctive partial evaluation of logic programs. In: Alpuente, M. (ed.) LOPSTR 2010. LNCS, vol. 6564, pp. 200–214. Springer, Heidelberg (2011)
Vidal, G.: Annotation of logic programs for independent and-parallelism by partial evaluation. Theor. Pract. Logic Program. 12(4–5), 583–600 (2012)
Wiggins, G.A.: The improvement of prolog program efficiency by compiling control: a proof-theoretic view. Department of Artificial Intelligence, University of Edinburgh (1990)
Acknowledgements
We thank the anonymous reviewers for their very useful suggestions.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this paper
Cite this paper
De Schreye, D., Nys, V., Nicholson, C. (2015). Analysing and Compiling Coroutines with Abstract Conjunctive Partial Deduction. In: Proietti, M., Seki, H. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 2014. Lecture Notes in Computer Science(), vol 8981. Springer, Cham. https://doi.org/10.1007/978-3-319-17822-6_2
Download citation
DOI: https://doi.org/10.1007/978-3-319-17822-6_2
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-17821-9
Online ISBN: 978-3-319-17822-6
eBook Packages: Computer ScienceComputer Science (R0)