Skip to main content

Part of the book series: Workshops in Computing ((WORKSHOPS COMP.))

Abstract

Source-level transformation tools for Prolog often use the unfold rule, for example partial deduction systems and some compilers. Although the unfold rule is very simple for pure Prolog, it has many problems when applied to full Prolog. This paper proposes an approach which removes most of these problems, making the design of transformation tools less complex and error-prone. A way of simplifying program structure is described, so that unfolding strategies can be designed in a much more straightforward way. An unfold rule is then specified for programs which have been simplified. This rule is more powerful than the unfold rule for Prolog. Finally, it is shown how to eliminate a class of redundancies typically found in unfolded simplified programs.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. M.Bugliesi, F.Russo, Partial Evaluation in Prolog: Some Improvements About Cut, Proceedings of the North American Conference on Logic Programming, 1989, pp. 645–660.

    Google Scholar 

  2. S.K.Debray, Towards Banishing the Cut from Prolog, Proceedings of the International Conference on Computer Languages, Miami, October 1986, pp. 2–12.

    Google Scholar 

  3. S.K.Debray, D.S.Warren, Detection and Optimization of Functional Computations in Prolog, Proceedings of the International Conference on Logic Programming, 1986, pp. 490–504.

    Google Scholar 

  4. J.Gallagher, M.Bruynooghe, Some Low-Level Source Transformations for Logic Programs, Proceedings of META y 90 pp. 229–244.

    Google Scholar 

  5. P.M.Hill, J.W.Lloyd. J.C.Shepherdson, Properties of a Pruning Operator, Journal of Logic and Computation 1 (1), 1990, pp. 99–143.

    Article  MathSciNet  MATH  Google Scholar 

  6. A.Lakhotia, L.Sterling, ProMiX: a Prolog Partial Evaluation System, The Practice of Prolog, ed. L.Sterling, MIT Press 1991.

    Google Scholar 

  7. G.Levi, G.Sardu, Partial Evaluation of Metaprograms in a ‘Multiple Worlds“ Logic Language, New Generation Computing 6, 1988, OHSMHA LTD. and Springer-Verlag, pp.227–247.

    Google Scholar 

  8. M.Meier et al, SEPIA — An Extendible Prolog System, Proceedings of the 11th World Computer Congress IFIP’89, San Francisco, August 1989, pp. 1127–1132.

    Google Scholar 

  9. R.O’Keefe, On the Treatment of Cuts in Prolog Source-Level Tools, Proceedings of the Symposium on Logic Programming, IEEE 1985, pp. 68–72.

    Google Scholar 

  10. R.O’Keefe, The Craft of Prolog, MIT Press 1990.

    Google Scholar 

  11. S.Owen, Issues in the Partial Evaluation of Meta-Interpreters, Proceedings of the Workshop on Meta-Programming in Logic Programming, 1988, pp. 241–254.

    Google Scholar 

  12. S.D.Prestwich, The PADDY Partial Deduction System, Technical Report ECRC-92–6.

    Google Scholar 

  13. M.Proietti, A.Pettorossi, Unfolding-Definition-Folding, in this Order, for Avoiding Unnecessary Variables in Logic Programs, Symposium on Program Language Implementation and Logic Programming, 1991, pp. 347–358.

    Google Scholar 

  14. P.L.Van Roy, Can Logic Programming Execute as Fast as Imperative Programming? Report no.UCB/CSD 90/600 Dec.1990, Computer Science Division (EECS), University of California, Berkeley, California 94720.

    Google Scholar 

  15. D.Sahlin, The Mixtus Approach to Automatic Partial Evaluation of Full Prolog, Proceedings of the North American Conference on Logic Programming, 1990, pp.377–398»

    Google Scholar 

  16. H.Sawamura, T.Takeshima, A.Kato, Source-Level Optimization Techniques for Prolog, ICOT Technical Report TR-91, January 1985.

    Google Scholar 

  17. A.Takeuchi, K.Furukawa, Partial Evaluation of Prolog Programs and its Application to Meta Programming, ICOT Technical Report TR-126, July 1985.

    Google Scholar 

  18. A.Taylor, High Performance Prolog Implementation, PhD thesis, Basser Department of Computer Science, University of Sidney, June 1991.

    Google Scholar 

  19. R.Venken, A Prolog Meta-Interpreter for Partial Evaluation and its Application to Source to Source Transformation and Query Optimisation, ECAI’84: Advances in Artificial Intelligence, ed. T.O’Shea, Elsevier Science Publishers B.V. (North-Holland), pp.91–100.

    Google Scholar 

  20. R.Venken, B.Demoen, A Partial Evaluation System for Prolog: some Practical Considerations, New Generation Computing 6 (2,3), 1988, pp. 279–290.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1993 Springer-Verlag London

About this chapter

Cite this chapter

Prestwich, S. (1993). An Unfold Rule for Full Prolog. In: Lau, KK., Clement, T.P. (eds) Logic Program Synthesis and Transformation. Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3560-9_14

Download citation

  • DOI: https://doi.org/10.1007/978-1-4471-3560-9_14

  • Publisher Name: Springer, London

  • Print ISBN: 978-3-540-19806-2

  • Online ISBN: 978-1-4471-3560-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics