Abstract
To achieve the termination of offline partial evaluation, it is necessary to ensure that static variables assume boundedly many values during specialization. Various works have addressed the analysis of variable boundedness, also called finiteness analysis, in the context of specializing first-order functional programs. The underlying reasoning is always: Unbounded sequences of increases in a static variable must be impossible, if they would give rise to unbounded sequences of size-decreases for some bounded-variable values.
Static analysis is used to collect a set of bipartite graphs that describe the parameter dependencies and data size changes in possible state transitions of the specializer (operating on the program). We capture the reasoning above as a condition on the graphs. This condition is decid-able, but complete for pspace. We therefore derive a polynomial-time approximation, by considering realistic parameter size-change behaviour.
This research is supported by DAEDALUS, the RTD project IST-1999-20527 of the IST Programme within the European Union’s Fifth Framework Programme.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Peter Holst Andersen and Carsten Kehler Holst. Termination analysis for offline partial evaluation of a higher-order functional language. In Static Analysis, Proceedings of the Third International Symposium, SAS’ 96, Aachen, Germany, Sep 24–26, 1996, volume 1145 of Lecture Notes in Computer Science, pages 67–82. Springer, 1996.
Thomas H. Cormen, Charles E. Leiserson, and Ronald L. Rivest. Introduction to Algorithms. MIT Press, 1990.
Arne J. Glenstrup. Terminator II: Stopping partial evaluation of fully recursive programs. Master’s thesis, DIKU, University of Copenhagen, Denmark, 1999.
Arne J. Glenstrup and Neil D. Jones. BTA algorithms to ensure termination of off-line partial evaluation. In Perspectives of System Informatics, Proceedings of the Second International Andrei Ershov Memorial Conference, Russia, Jun 25–28, 1996, volume 1181 of Lecture Notes in Computer Science, pages 273–284. Springer, 1996.
Robert Glück. Towards multiple self-application. In Proceedings of the Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 309–320. ACM, 1991.
Matthew Hennessy. The Semantics of Programming Languages. Wiley, 1990.
Carsten Kehler Holst. Finiteness analysis. In John Hughes, editor, Functional Programming Languages and Computer Architecture, Cambridge, Massachusetts, Aug 1991, volume 523 of Lecture Notes in Computer Science, pages 473–495. Springer, 1991.
Neil Jones and Arne Glenstrup. Program generation, termination, and binding-time analysis. In Principles, Logics, and Implementations of High-Level Programming Languages, PLI 2002 (invited paper). Springer, 2002.
Neil D. Jones, Carsten K. Gomard, and Peter Sestoft. Partial Evaluation and Automatic Program Generation. Prentice Hall, 1993.
Chin Soon Lee. Partial evaluation of the euclidean algorithm, revisited. Higher-Order and Symbolic Computation, 12(2):203–212, Sep 1999.
Chin Soon Lee. Program Termination Analysis, and Termination of Offline Partial Evaluation. PhD thesis, UWA, University of Western Australia, Australia, 2001.
Chin Soon Lee. Finiteness analysis in polynomial time (with proofs). To be available as a technical report at DIKU, Copenhagen University, Denmark., 2002.
Chin Soon Lee. Program termination analysis in polynomial time. In Proceedings of Generative Programming and Component Engineering, GPCE’ 02. Springer, 2002.
Chin Soon Lee, Neil D. Jones, and Amir Ben-Amram. The size-change principle for program termination. In Proceedings of the ACM Symposium on Principles of Programming Languages, Jan 2001. ACM, 2001.
Wim Vanhoof and Maurice Bruynooghe. Binding-time annotations without binding-time analysis. In Logic for Programming, Artificial Intelligence, and Reasoning (LPAR), 8th International Conference, Havana, Cuba, Dec 3–7, 2001, volume 2250 of Lecture Notes in Computer Science, pages 707–722, 2001.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2002 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Lee, C.S. (2002). Finiteness Analysis in Polynomial Time. In: Hermenegildo, M.V., Puebla, G. (eds) Static Analysis. SAS 2002. Lecture Notes in Computer Science, vol 2477. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45789-5_34
Download citation
DOI: https://doi.org/10.1007/3-540-45789-5_34
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-44235-6
Online ISBN: 978-3-540-45789-3
eBook Packages: Springer Book Archive