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).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
J.H.Andrews. Logic Programming: Operational Semantics and Proof Theory. PhD thesis, Department of Computer Science, University of Edinburgh, Edinburgh, Scotland, 1991.
K. Benkerimi and J. Lloyd. A Partial Evaluation Procedure for Logic Programs. In North American Conference on Logic Programming, pages 343-358, 1990.
J.S. Conery and D.F. Kibler. AND Parallelism and Nondeterminism in Logic Programs. New Generation Computing, 3(1): 43–70, 1985.
S.K. Debray and P. Mishra. Denotational and Operational Semantics for Prolog. Journal of Logic Programming, 5: 61–91, 1988.
A.P. Ershov. Mixed Computation: Potential Applications and Problems for Study. Theoretical Computer Science 18, 18: 41–67, 1982.
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.
D.A. Fuller and S. Abramsky. Mixed Computation of Prolog Programs. New Generation Computing, 6(2,3): 119–141, 1988.
Y. Futamura. Partial evaluation of computation process — an approach to a compiler-compiler. Systems —Comput. —Controls, 2(5): 45–50, 1971.
L. Hascoet. Partial Evaluation with Inference Rules. New Generation Computing, 6(2,3): 187–209, 1988.
E.C.R. Hehner. Predicative Programming Part I. Communications of the ACM, 27(2): 134–143, February 1984.
E.C.R. Hehner. Predicative Programming Part II. Communications of the ACM, 27(2), February 1984.
G. Lindstrom and P. Panangaden. Stream-based execution of logic programs. In Symposium on Logic Programming, Atlantic City, 1984.
J. W. Lloyd and J. C. Shepherdson. Partial Evaluation in Logic Programming. Technical Report CS-87-09, University of Bristol, December 1987.
R. Milner. Communication and Concurrency. Prentice Hall, 1989.
H. Rogers. Theory of Recursive Functions and Effective Computability. MIT Press, 1988.
B.J. Ross. The Partial Evaluation of Imperative Programs Using Prolog. In M eta-programming in Logic Programming. MIT Press, 1989.
B.J. Ross. An Algebraic Semantics of Prolog Control. PhD thesis, Department of Artificial Intelligence, University of Edinburgh, Edinburgh, Scotland, 1991. (forthcoming).
B.J. Ross. Using Algebraic Semantics for Proving Prolog Termination and Transformation. In Proc. UK ALP 91, Edinburgh, Scotland, 1991. Springer-Verlag, (forthcoming).
P. Sestoft and A.V. Zamulin. Annotated Bibliography on Partial Evaluation and Mixed Computation. New Generation Computing, 6(2,3): 309–354, 1988.
L. Sterling and E. Shapiro. The Art of Prolog. Prentice-Hall, 1986.
H. Tamaki and T. Sato. A Transformation System for Logic Programs which Preserves Equivalence. Technical Report TR-018, ICOT, Tokyo, Japan, August 1983.
R. Venken and B. Demoen. A Partial Evaluation System for Prolog: some Practical Considerations. New Generation Computing, 6(2,3): 279–290, 1988.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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