Abstract
In programming languages that support goal-directed evaluation to make use of alternative results, an expression can produce a value, suspend, and later be resumed to produce another value. This causes control backtracking to earlier points in a computation and complicates the maintenance of intermediate values. This paper presents a space-efficient algorithm computing the lifetimes of intermediate values that is used by an optimizing compiler for the Icon programming language. The algorithm is applicable to other programming languages that employ goal-directed evaluation.
- 1 AHO, A. V., SETHI, R., AND ULLMAN, J. D. Compilers" Principles, Techniques, and Tools. Addison-Wesley, Reading, Mass., 1985. Google Scholar
- 2 CHASE, D. R., WEGMAN, M., AND ZADECK, F. K. Analysis of pointers and structures. In Proceedings of the 1990 Conference on Programming Language Design and Implementation, SIGPLAN Not. 25, 6 (June 1990), 296-310. Google Scholar
- 3 CHRISTOPHER, T.W. Efficient evaluation of expressions in Icon. Unpublished draft, Illinois Institute of Technology, May 1985.Google Scholar
- 4 CLOCKSIN, W. F., AND MELLISH, C.S. Programming in Prolog. Springer-Verlag, New York, 1981. Google Scholar
- 5 GRISWOLD, R. E., AND GRISWOLD, M.T. The Icon Programming Language. 2rid ed. Prentice- Hall, Englewood Cliffs, N.J., 1990. Google Scholar
- 6 GRISWOLD, R. E., AND GRISWOLD, M. T. The Implementation of the Icon Programming Language. Princeton University Press, Princeton, N.J., 1986. Google Scholar
- 7 MARTINEK, J., AND NILSEN, K. Code generation for the temporary-variable Icon virtual machine, Tech. Rep. 89-9, Dept. of Computer Science, Iowa State Univ., Dec. 1989.Google Scholar
- 8 MUCHNICK, S. S., AND JONES, N. D. Program Flow Analysis: Theory and Applications, Prentice-Hall, Englewood Cliffs, N.J., 1981. Google Scholar
- 9 O'BAGY, J. The implementation of generators and goal-directed evaluation in icon. Ph.D. dissertation, Dept. of Computer Science, Univ. of Arizona, Aug. 1988. Google Scholar
- 10 ROSEN, B.K. High-level data flow analysis. Commun. ACM 20, 10 (1977), 712-724. Google Scholar
- 11 STERLING, L., AND SHAPIRO, E. The Art of Prolog. MIT Press, Cambridge, Mass., 1986.Google Scholar
- 12 WALKER, K. The implementation of an optimizing compiler for Icon. Ph.D. dissertation, Dept. of Computer Science, Univ. of Arizona, July 1991. Google Scholar
- 13 WALKER, K., AND GRISWOLD, R. E. Type inference in the Icon programming language. In preparation.Google Scholar
Index Terms
The maintenance of intermediate values in goal-directed evaluation
Recommendations
A unifying approach to goal-directed evaluation
AbstractGoal-directed evaluation, as embodied in Icon and Snobol, is built on the notions of backtracking and of generating successive results, and therefore it has always been something of a challenge to specify and implement. In this article, we address ...
The direct execution of intermediate languages on an Eclipse computer
The use of intermediate languages as a convenient means of developing portable high-level language compilers, appears to be growing. With this approach, the compiler for language A (which may be written in language A) compiles the source code into an ...
A unifying approach to goal-directed evaluation
SAIG'01: Proceedings of the 2nd international conference on Semantics, applications, and implementation of program generationGoal-directed evaluation, as embodied in Icon and Snobol, is built on the notions of backtracking and of generating successive results, and therefore it has always been something of a challenge to specify and implement. In this article, we address this ...






Comments