Advertisement

Analysing and Compiling Coroutines with Abstract Conjunctive Partial Deduction

  • Danny De Schreye
  • Vincent NysEmail author
  • Colin Nicholson
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8981)

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.

Keywords

Logic Program Abstract Interpretation Symbolic Execution Derivation Tree Query Pattern 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Notes

Acknowledgements

We thank the anonymous reviewers for their very useful suggestions.

References

  1. Annex.: Definitions, concepts and elaboration of an example (2014). https://perswww.kuleuven.be/~u0055408/tag/lopstr14.html
  2. 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
  3. Bruynooghe, M.: A practical framework for the abstract interpretation of logic programs. J. Logic Program. 10(2), 91–124 (1991)CrossRefzbMATHMathSciNetGoogle Scholar
  4. 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
  5. Bruynooghe, M., De Schreye, D., Krekels, B.: Compiling control. J. Logic Program. 6(1), 135–162 (1989)CrossRefzbMATHGoogle Scholar
  6. 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)CrossRefzbMATHGoogle Scholar
  7. Gallagher, J.P.: Transforming logic programs by specialising interpreters. In: ECAI, pp. 313–326 (1986)Google Scholar
  8. Hruza, J., Stepanek, P.: Speedup of logic programs by binarization and partial deduction. arXiv preprint arXiv:cs/0312026 (2003)
  9. 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)CrossRefGoogle Scholar
  10. Lloyd, J.: Foundations of Logic Programming. Springer-Verlag, Berlin (1987)CrossRefzbMATHGoogle Scholar
  11. Lloyd, J.W., Shepherdson, J.C.: Partial evaluation in logic programming. J. Logic Program. 11(3), 217–242 (1991)CrossRefzbMATHMathSciNetGoogle Scholar
  12. Pettorossi, A., Proietti, M.: Transformation of logic programs: foundations and techniques. J. Logic Program. 19, 261–320 (1994)CrossRefMathSciNetGoogle Scholar
  13. Pettorossi, A., Proietti, M.: The list introduction strategy for the derivation of logic programs. Formal Aspects Comput. 13(3–5), 233–251 (2002)CrossRefzbMATHGoogle Scholar
  14. 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
  15. 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) CrossRefGoogle Scholar
  16. Vidal, G.: Annotation of logic programs for independent and-parallelism by partial evaluation. Theor. Pract. Logic Program. 12(4–5), 583–600 (2012)CrossRefzbMATHMathSciNetGoogle Scholar
  17. 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

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Danny De Schreye
    • 1
  • Vincent Nys
    • 1
    Email author
  • Colin Nicholson
    • 1
  1. 1.Department of Computer ScienceKU LeuvenHeverleeBelgium

Personalised recommendations