Skip to main content

Improving Efficiency of Prolog Programs by Fully Automated Unfold/Fold Transformation

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 4827))

Abstract

This paper is a contribution to improving computational efficiency of definite Prolog programs using Unfold/Fold (U/F) strategy with homeomorphic embedding as a control heuristic. Unfold/Fold strategy is an alternative to so called conjunctive partial deduction (CPD). The ECCE system is one of the best system for program transformations based on CPD. In this paper is presented a new fully automated system of program transformations based on U/F strategy. The experimental results, namely CPU times, the number of inferences, and the size of the transformed programs are included. These results are compared to the ECCE system and indicate that in many cases both systems have produced programs with similar or complementary efficiency.

Moreover, a new method based on a simple combination of both systems is presented. This combination represents, to our best knowledge, the most effective transformation program for definite logic programs. In most cases, the combination significantly exceeds both the Unfold/Fold algorithm presented here and the results of the ECCE system. The experimental results with a complete comparison among these algorithms are included.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Apt, K.R.: From Logic Programming to Prolog. Prentice-Hall, Englewood Cliffs (1996)

    Google Scholar 

  2. Dershowitz, N.: Termination in rewriting. Journal of Symbolic Computation 3, 69–116 (1987)

    Article  MATH  MathSciNet  Google Scholar 

  3. 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. The Journal of Logic Programming 41, 231–277 (1999)

    Article  MATH  Google Scholar 

  4. Kruskal, J.B.: Well-quasi-ordering, the Tree Theorem, and Varsonyi’s conjecture. Trans.Amer. Math. Society 95, 210–225 (1960)

    Article  MATH  MathSciNet  Google Scholar 

  5. Leuschel, M.: Improving Homeomorphic Embeddings for On line Termination. In: Flener, P. (ed.) LOPSTR 1998. LNCS, vol. 1559, pp. 199–218. Springer, Heidelberg (1999)

    Google Scholar 

  6. Leuschel, M.: Ecce partial deduction system, http://www.ecs.soton.ac.uk/~mal/systems/ecce.html

  7. Nash-Williams, C.: On well quasi ordering finite trees. Proc. Camb. Phil. Society 59, 833–835 (1963)

    Article  MATH  MathSciNet  Google Scholar 

  8. Proietti, M., Pettorossi, A.: Unfolding-definition-folding, in this order, for avoiding unnecessary variables in logic programs. Theoretical Computer Science 142, 89–124 (1995)

    Article  MATH  MathSciNet  Google Scholar 

  9. Tamaki, H., Sato, T.: Unfold/Fold Transformation of Logic Programs. In: Tärnlund, S. (ed.) ICLP 1984, pp. 127–138, Uppsala University, Sweeden (1984)

    Google Scholar 

  10. Turchin, V.F.: Program transformation with metasystems transitions. Journal of Functional Programming 3(3), 283–313 (1993)

    Google Scholar 

  11. Vyskočil, J., Štěpánek, P., Halama, M.: Speedup by Fully Automated Unfold/Fold Transformation. Technical Report TR No 2006 /1 Department of KTIML MFF, Charles University in Prague (2006)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Alexander Gelbukh Ángel Fernando Kuri Morales

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Vyskočil, J., Štěpánek, P. (2007). Improving Efficiency of Prolog Programs by Fully Automated Unfold/Fold Transformation. In: Gelbukh, A., Kuri Morales, Á.F. (eds) MICAI 2007: Advances in Artificial Intelligence. MICAI 2007. Lecture Notes in Computer Science(), vol 4827. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-76631-5_29

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-76631-5_29

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-76630-8

  • Online ISBN: 978-3-540-76631-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics