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.
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
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.
S.K.Debray, Towards Banishing the Cut from Prolog, Proceedings of the International Conference on Computer Languages, Miami, October 1986, pp. 2–12.
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.
J.Gallagher, M.Bruynooghe, Some Low-Level Source Transformations for Logic Programs, Proceedings of META y 90 pp. 229–244.
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.
A.Lakhotia, L.Sterling, ProMiX: a Prolog Partial Evaluation System, The Practice of Prolog, ed. L.Sterling, MIT Press 1991.
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.
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.
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.
R.O’Keefe, The Craft of Prolog, MIT Press 1990.
S.Owen, Issues in the Partial Evaluation of Meta-Interpreters, Proceedings of the Workshop on Meta-Programming in Logic Programming, 1988, pp. 241–254.
S.D.Prestwich, The PADDY Partial Deduction System, Technical Report ECRC-92–6.
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.
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.
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»
H.Sawamura, T.Takeshima, A.Kato, Source-Level Optimization Techniques for Prolog, ICOT Technical Report TR-91, January 1985.
A.Takeuchi, K.Furukawa, Partial Evaluation of Prolog Programs and its Application to Meta Programming, ICOT Technical Report TR-126, July 1985.
A.Taylor, High Performance Prolog Implementation, PhD thesis, Basser Department of Computer Science, University of Sidney, June 1991.
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.
R.Venken, B.Demoen, A Partial Evaluation System for Prolog: some Practical Considerations, New Generation Computing 6 (2,3), 1988, pp. 279–290.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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