Skip to main content

Semantics—based Partial Evaluation of Prolog Programs

  • Conference paper
Logic Program Synthesis and Transformation

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

  • 34 Accesses

Abstract

A semantic characterisation of the partial evaluation of Prolog programs is presented. An algebraic semantics for Prolog which models Prolog’s depth-first left-to-right control scheme is first outlined. This semantics is written in Milner’s Calculus of Communicating Systems (CCS) [14]. This CCS semantics can be used to analyse how logic program control affects partial evaluation transformations of Prolog programs. Partial evaluation of a source program is accomplished by applying transforms onto a program’s semantic representation. Correctness and completeness are preserved when such transformations respect the source program’s semantic integrity. Because the semantic bisimilarities of Prolog control preserve behavioural equivalence, the semantic modelling of the basic control component of the partial evaluation process is possible. Conversely, the CCS semantics can determine whether particular partial evaluation transformations violate program completeness.

Current address: Computer Science Department, University of Victoria, Victoria, British Columbia, Canada V8W 3P6 (email bjr@csr.uvic.ca).

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. J.H.Andrews. Logic Programming: Operational Semantics and Proof Theory. PhD thesis, Department of Computer Science, University of Edinburgh, Edinburgh, Scotland, 1991.

    Google Scholar 

  2. K. Benkerimi and J. Lloyd. A Partial Evaluation Procedure for Logic Programs. In North American Conference on Logic Programming, pages 343-358, 1990.

    Google Scholar 

  3. J.S. Conery and D.F. Kibler. AND Parallelism and Nondeterminism in Logic Programs. New Generation Computing, 3(1): 43–70, 1985.

    Article  MATH  Google Scholar 

  4. S.K. Debray and P. Mishra. Denotational and Operational Semantics for Prolog. Journal of Logic Programming, 5: 61–91, 1988.

    Article  MathSciNet  MATH  Google Scholar 

  5. A.P. Ershov. Mixed Computation: Potential Applications and Problems for Study. Theoretical Computer Science 18, 18: 41–67, 1982.

    Article  MathSciNet  MATH  Google Scholar 

  6. H. Fujita and K. Furukawa. A Self-Applicable Partial ? valuator and Its Use in Incremental Compilation. New Generation Computing, 6(2,3): 91–118, 1988.

    Article  MATH  Google Scholar 

  7. D.A. Fuller and S. Abramsky. Mixed Computation of Prolog Programs. New Generation Computing, 6(2,3): 119–141, 1988.

    Article  MATH  Google Scholar 

  8. Y. Futamura. Partial evaluation of computation process — an approach to a compiler-compiler. Systems —Comput. —Controls, 2(5): 45–50, 1971.

    Google Scholar 

  9. L. Hascoet. Partial Evaluation with Inference Rules. New Generation Computing, 6(2,3): 187–209, 1988.

    Article  MATH  Google Scholar 

  10. E.C.R. Hehner. Predicative Programming Part I. Communications of the ACM, 27(2): 134–143, February 1984.

    Article  MathSciNet  MATH  Google Scholar 

  11. E.C.R. Hehner. Predicative Programming Part II. Communications of the ACM, 27(2), February 1984.

    Google Scholar 

  12. G. Lindstrom and P. Panangaden. Stream-based execution of logic programs. In Symposium on Logic Programming, Atlantic City, 1984.

    Google Scholar 

  13. J. W. Lloyd and J. C. Shepherdson. Partial Evaluation in Logic Programming. Technical Report CS-87-09, University of Bristol, December 1987.

    Google Scholar 

  14. R. Milner. Communication and Concurrency. Prentice Hall, 1989.

    Google Scholar 

  15. H. Rogers. Theory of Recursive Functions and Effective Computability. MIT Press, 1988.

    Google Scholar 

  16. B.J. Ross. The Partial Evaluation of Imperative Programs Using Prolog. In M eta-programming in Logic Programming. MIT Press, 1989.

    Google Scholar 

  17. B.J. Ross. An Algebraic Semantics of Prolog Control. PhD thesis, Department of Artificial Intelligence, University of Edinburgh, Edinburgh, Scotland, 1991. (forthcoming).

    Google Scholar 

  18. B.J. Ross. Using Algebraic Semantics for Proving Prolog Termination and Transformation. In Proc. UK ALP 91, Edinburgh, Scotland, 1991. Springer-Verlag, (forthcoming).

    Google Scholar 

  19. P. Sestoft and A.V. Zamulin. Annotated Bibliography on Partial Evaluation and Mixed Computation. New Generation Computing, 6(2,3): 309–354, 1988.

    MATH  Google Scholar 

  20. L. Sterling and E. Shapiro. The Art of Prolog. Prentice-Hall, 1986.

    Google Scholar 

  21. H. Tamaki and T. Sato. A Transformation System for Logic Programs which Preserves Equivalence. Technical Report TR-018, ICOT, Tokyo, Japan, August 1983.

    Google Scholar 

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

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1992 Springer-Verlag London

About this paper

Cite this paper

Ross, B.J. (1992). Semantics—based Partial Evaluation of Prolog Programs. In: Clement, T.P., Lau, KK. (eds) Logic Program Synthesis and Transformation. Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3494-7_16

Download citation

  • DOI: https://doi.org/10.1007/978-1-4471-3494-7_16

  • Publisher Name: Springer, London

  • Print ISBN: 978-3-540-19742-3

  • Online ISBN: 978-1-4471-3494-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics