Abstract
A partial evaluator, given a program and a known “static” part of its input data, outputs a residual program in which computations depending only on the static data have been precomputed [3]. The ideal is a “black box” which discovers and performs nontrivial static computations whenever possible, and never fails to terminate. Practical partial evaluators fall short of this goal: they sometimes loop (typical of functional programing partial evaluation), or terminate but are excessively conservative (typical in partial deduction 1). This paper presents efficient algorithms (being implemented) for binding-time analysis for off-line specialisers. They ensure that the specialiser performs many nontrivial static computations, and are at the same time guaranteed to terminate.
Preview
Unable to display preview. Download preview PDF.
References
A.V. Aho, J.E. Hopcroft and J.D. Ullman, ‘The design and analysis of computer algorithms’ Addison-Wesley, 1975.
P.H. Andersen and N.C.K. Holst, Private communication.
A.P. Ershov, ‘Mixed computation: potential applications and problems for study.’ Theoretical Computer Science, 18:41–67, 1982.
N.C.K. Holst, ‘Finiteness analysis,’ in J. Hughes (ed.), FPCA, (Lecture Notes in Computer Science, vol. 523), Berlin: Springer-Verlag, 1991.
N.D. Jones, ‘Automatic program specialization: a re-examination from basic principles,’ in D. Bjørner, A.P. Ershov, and N.D. Jones (eds.), Partial Evaluation and Mixed Computation, pp. 225–282, Amsterdam: North-Holland, 1988.
N.D. Jones, Carsten Gomard and Peter Sestoft, ‘Partial evaluation and Automatic program generation,’ Prentice Hall International, June 1993.
N.D. Jones, ‘What not to do when writing an interpreter for specialisation,’ in O. Danvy, R. Glück, and P. Thiemann (eds.), Partial Evaluation. Proceedings, Springer-Verlag, Lecture Notes in Computer Science, to appear, 1996.
G. Kahn, ‘Natural semantics,’ in F.J. Brandenburg et. al. (eds.), STACS 87. (Lecture Notes in Computer Science, vol. 247).
M. Leuschel and B. Martens, ‘Global control for partial deduction through characteristic atoms and global trees,’ in O. Danvy, R. Glück, and P. Thiemann (eds.), Partial Evaluation. Proceedings, Springer-Verlag, Lecture Notes in Computer Science, to appear, 1996.
J.W. Lloyd and J.C. Shepherdson, ‘Partial evaluation in logic programming,’ Journal of Logic Programming, 11:217–242, 1991.
B. Martens and J. Gallagher, ‘Ensuring Global Termination of Partial Deduction While Allowing Flexible Polyvariance,’ in L. Sterling (ed.), ICLP'95, Twelfth International Conference on Logic Programming, pp. 597–611 MIT Press, 1995
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1996 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Glenstrup, A.J., Jones, N.D. (1996). BTA Algorithms to ensure termination of off-line partial evaluation. In: Bjørner, D., Broy, M., Pottosin, I.V. (eds) Perspectives of System Informatics. PSI 1996. Lecture Notes in Computer Science, vol 1181. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-62064-8_23
Download citation
DOI: https://doi.org/10.1007/3-540-62064-8_23
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-62064-8
Online ISBN: 978-3-540-49637-3
eBook Packages: Springer Book Archive