ACM Home Page
Please provide us with feedback. Feedback
Termination analysis and specialization-point insertion in offline partial evaluation
Full text PdfPdf (1.13 MB)
Source ACM Transactions on Programming Languages and Systems (TOPLAS) archive
Volume 27 ,  Issue 6  (November 2005) table of contents
Pages: 1147 - 1215  
Year of Publication: 2005
ISSN:0164-0925
Authors
Arne John Glenstrup  IT University of Copenhagen, Copenhagen S, Denmark
Neil D. Jones  DIKU, University of Copenhagen, Copenhagen ø, Denmark
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 6,   Downloads (12 Months): 72,   Citation Count: 4
Additional Information:

appendices and supplements   abstract   references   cited by   index terms   review   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1108970.1108973
What is a DOI?

APPENDICES and SUPPLEMENTS
Online appendix to designing mediation for context-aware applications. The appendix supports the information on page 1147.


ABSTRACT

Recent research suggests that the goal of fully automatic and reliable program generation for a broad range of applications is coming nearer to feasibility. However, several interesting and challenging problems remain to be solved before it becomes a reality. Solving them is also necessary, if we hope ever to elevate software engineering from its current state (a highly developed handiwork) into a successful branch of engineering, capable of solving a wide range of new problems by systematic, well-automated and well-founded methods.A key problem in all program generation is termination of the generation process. This article focuses on off-line partial evaluation and describes recent progress towards automatically solving the termination problem, first for individual programs, and then for specializers and “generating extensions,” the program generators that most offline partial evaluators produce.The technique is based on size-change graphs that approximate the changes in parameter sizes at function calls. We formulate a criterion, bounded anchoring, for detecting parameters known to be bounded during specialization: a bounded parameter can act as an anchor for other parameters. Specialization points necessary for termination are computed by adding a parameter that tracks call depth, and then selecting a specialization point in every call loop where it is unanchored. By generalizing all unbounded parameters, we compute a binding-time division which together with the set of specialization points guarantees termination.Contributions of this article include a proof, based on the operational semantics of partial evaluation with memoization, that the analysis guarantees termination; and an in-depth description of safety of the increasing size approximation operator required for termination analysis in partial evaluation.Initial experiments with a prototype shows that the analysis overall yields binding-time divisions that can achieve a high degree of specialization, while still guaranteeing termination.The article ends with a list of challenging problems whose solution would bring the community closer to the goal of broad-spectrum, fully automatic and reliable program generation.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
Abel, A. and Altenkirch, T. 1999. A semantical analysis of structural recursion. In Abstracts of the Fourth International Workshop on Termination WST'99. unpublished (Dagstuhl, Germany), 24--25.
 
2
 
3
 
4
5
 
6
 
7
8
 
9
 
10
 
11
 
12
Bondorf, A. and Jørgensen, J. 1993. Efficient analysis for realistic off-line partial evaluation: Extended version. Tech. Rep. 93/4, DIKU, University of Copenhagen, Copenhagen, Denmark, Mar.
 
13
14
 
15
Cai, J., Facon, P., Henglein, F., Paige, R., and Schonberg, E. 1991. Type analysis and data structure selection. In Constructing Programs from Specifications, B. Möller, Ed. North-Holland, Amsterdam, The Netherlands, 126--164.
 
16
 
17
 
18
 
19
20
21
22
 
23
Coquand, C. 2001. The interactive theorem prover Agda. http://www.cs.chalmers.se/~catarina/agda/.
24
25
 
26
27
 
28
 
29
Das, M. and Reps, T. 1996. BTA termination using CFL-reachability. Tech. Rep. 1329, Computer Science Department, University of Wisconsin-Madison.
 
30
De Schreye, D., Glück, R., Jørgensen, J., Leuschel, M., Martens, B., and Sørensen, M. H. B. 1999. Conjunctive partial deduction: Foundations, control, algorithms, and experiments. J. Logic Prog. 41, 2&3, 231--277.
31
32
33
 
34
 
35
 
36
Gallagher, J. and Bruynooghe, M. 1990. Some low-level source transformations for logic programs. In Proceedings of the 2nd Workshop on Meta-Programming in Logic (Leuven, Belgium, Apr.). M. Bruynooghe, Ed. Department of Computer Science, KU Leuven, Belgium, 229-- 246.
37
38
39
 
40
 
41
 
42
Glenstrup, A. J. 1999. Terminator II: Stopping partial evaluation of fully recursive programs. M.S. thesis, DIKU, University of Copenhagen, DK-2100 Copenhagen ø.
 
43
 
44
Glück, R., Nakashige, R., and Zöchling, R. 1995. Binding-time analysis applied to mathematical algorithms. In System Modelling and Optimization, J. Doležal and J. Fidler, Eds. Chapman & Hall, London, England, 137--146.
 
45
 
46
 
47
Grobauer, B. 2001. Topics in semantics-based program manipulation. Ph.D. thesis, BRICS, Department of Computer Science, University of Aarhus, Aarhus, Denmark. DS-01-6.
 
48
Hatcliff, J., Mogensen, T. Æ., and Thiemann, P., Eds. 1999. Partial Evaluation: Practice and Theory. Proceedings of the 1998 DIKU International Summerschool. Lecture Notes in Computer Science, vol. 1706. Springer-Verlag.
 
49
Holst, C. K. 1988. Poor man's generalization. Tech. Rep., DIKU, University of Copenhagen.
 
50
 
51
Holst, C. K. and Launchbury, J. 1991. Handwriting cogen to avoid problems with static typing. In Draft Proceedings, 4th Annual Glasgow Workshop on Functional Programming. Glasgow University, Skye, Scotland, 210--218.
52
 
53
54
 
55
 
56
 
57
 
58
 
59
 
60
Launchbury, J. 1991. Projection Factorisations in Partial Evaluation. Distinguished Dissertations in Computer Science. Cambridge University Press, Cambridge.
 
61
 
62
 
63
Lee, C. S. 2002b. Program termination analysis and termination of offline partial evaluation. Ph.D. thesis, University of Western Australia. Aug.
64
 
65
 
66
Michael Leuschel , Maurice Bruynooghe, Logic program specialisation through partial deduction: Control issues, Theory and Practice of Logic Programming, v.2 n.4, p.461-515, July 2002
 
67
Lindenstrauss, N. and Sagiv, Y. 1997. Automatic termination analysis of logic programs (with detailed experimental results). Unpublished. (http://www.cs.huji.ac.il/~naomil/.)
 
68
 
69
 
70
 
71
McCarthy, J. 1964. A basis for a mathematical theory of computation. In Computer Programming and Formal Systems, P. Bradford and D. Hirschberg, Eds. North-Holland, Amsterdam, The Netherlands, 33--70.
72
 
73
Mogensen, T. Æ. 1988. Partially static structures in a self-applicable partial evaluator. In Partial Evaluation and Mixed Computation, D. Bjørner, A. Ershov, and N. Jones, Eds. Elsevier Science Publishers, North-Holland, Amsterdam, The Netherlands. 325--347.
 
74
 
75
 
76
 
77
Pareto, L. 2000. Types for crash prevention. Ph.D. dissertation. Chalmers University of Technology and Göteborg University, Göteborg, Sweden.
 
78
Péter, R. 1951. Rekursive Funktionen. Académiai Kiadó, Budapest, Hungary. (Translated and Printed as Recursive Function, Academic Press, New York, 1976).
79
 
80
 
81
Ramsey, F. P. 1930. On a problem of formal logic. In Proceedings of the London Mathematical Society. Vol. 30. Cambridge University Press, Cambridge, U.K. 264--285.
82
 
83
 
84
Sestoft, P. 2001. Bibliography on partial evaluation and mixed computation. Tech. Rep., DIKU, University of Copenhagen, Copenhagen, Denmark.
 
85
Sheard, T. 1999. Using MetaML: A staged programming language. In Proceedings of the 3rd International School in Advanced Functional Programming (Braga, Portugal, Sept. 12--19, 1998), Revised Lectures, S. D. Swierstra, P. R. Henriques, and J. N. Oliveira, Eds. Lecture Notes in Computer Science vol, 1608, Springer-Verlag, New York, 207--239.
 
86
 
87
Sørensen, M. H. and Glück, R. 1995. An algorithm of generalization in positive supercompilation. In Logic Programming: Proceedings of the 1995 International Symposium, J. Lloyd, Ed. MIT Press, Cambridge, MA, 465--479.
 
88
89
 
90
91
 
92
Taha, W., Ed. 2000. Semantics, Applications, and Implementation of Program Generation (Montreal, Ont., Canada). Lecture Notes in Computer Science, vol. 1924. Springer-Verlag, New York.
 
93
 
94
 
95
 
96
97
 
98
99
 
100



REVIEW

"German Vidal : Reviewer"

The main goal of partial evaluation is program specialization. Essentially, given a program and part of its input data, a partial evaluator returns a new, residual program that is specialized for the given data. In the optimal case, all operations  more...

Collaborative Colleagues:
Arne John Glenstrup: colleagues
Neil D. Jones: colleagues