Abstract
This paper presents a specializer and a binding-time analyzer for a functional language where expressions are allowed to be used as both static and dynamic. With both static and dynamic expressions, we can statically access data structures while residualizing them at the same time. Previously, such data structures were treated as completely dynamic, which prevented us from accessing their components statically. The technique presented in this paper effectively allows us to lift data structures which was prohibited in the conventional partial evaluators. The binding-time analysis is formalized as a type system and the solution is obtained by solving constraints generated by the type system. We prove the correctness of the constraint solving algorithm and show that the algorithm runs efficiently in almost linear time.
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
Asai, K., H. Masuhara, and A. Yonezawa “Partial Evaluation of Call-by-value λ-calculus with Side-effects,” ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM’ 97), pp. 12–21 (June 1997).
Ashley, J. M., and C. Consel “Fixpoint Computation for Polyvariant Static Analyses of Higher-Order Applicative Programs,” ACM Transactions on Programming Languages and Systems, Vol. 16,No. 5, pp. 1431–1448 (September 1994).
Bondorf, A., and O. Danvy “Automatic autoprojection of recursive equations with global variables and abstract data types,” Science of Computer Programming, Vol. 16, pp. 151–195, Elsevier (1991).
Bondorf, A., and J. Jørgensen “Efficient analyses for realistic off-line partial evaluation,” Journal of Functional Programming, Vol. 3,No 3, pp. 315–346, Cambridge University Press (July 1993).
Danvy, O. “Type-Directed Partial Evaluation,” Conference Record of the 23rd Annual ACM Symposium on Principles of Programming Languages, pp. 242–257 (January 1996).
Danvy, O., and A. Filinski “Abstracting Control,” Proceedings of the 1990 ACM Conference on Lisp and Functional Programming, pp. 151–160 (June 1990).
Danvy, O., K. Malmkjær, and J. Palsberg “The essence of eta-expansion in partial evaluation,” Lisp and Symbolic Computation, Vol. 8,No. 3, pp. 209–227, Kluwer Academic Publishers (1995).
Dean, J., C. Chambers, and D. Grove “Identifying Profitable Specialization in Object-Oriented Languages,” ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM’ 94), pp. 85–96 (June 1994).
Fujinami, N. “Determination of Dynamic Method Dispatches Using Run-time Code Generation,” Proceedings of the Second International Workshop on Types in Compilation (TIC 1998), pp. 135–151 (March 1998).
Futamura, Y. “Partial evaluation of computation process–an approach to a compiler-compiler,” Systems, Computers, Controls, Vol. 2,No. 5, pp. 45–50, (1971).
Glück, R., and J. Jørgensen “An Automatic Program Generator for Multi-Level Specialization,” Lisp and Symbolic Computation, Vol. 10,No. 2, pp. 113–158, Kluwer Academic Publishers (July 1997).
Henglein, F. “Efficient Type Inference for Higher-Order Binding-Time Analysis,” In J. Hughes, editor, Functional Programming Languages and Computer Architecture (LNCS 523), pp. 448–472 (August 1991).
Hornof, L., C. Consel, and J. Noyffe “Effective Specialization of Realistic Programs via Use Sensitivity,” In Van Hentenryck P., editor, Static Analysis (LNCS 1302), pp. 63–73 (1997).
Jones, N. D., C. K. Gomard, and P. Sestoft Partial Evaluation and Automatic Program Generation, New York: Prentice-Hall (1993).
Ruf, E. Topics in Online Partial Evaluation, Ph.D. thesis, Stanford University (March 1993). Also published as Stanford Computer Systems Laboratory technical report CSL-TR-93-563.
Sperber, M. “Self-Applicable Online Partial Evaluation,” In O. Danvy, R. Glück, and P. Thiemann editors, Partial Evaluation (LNCS 1110), pp. 465–480 (February 1996).
Sperber, M., and P. Thiemann “Two for the price of one: composing partial evaluation and compilation,” Proceedings of the ACM SIGPLAN’ 97 Conference on Programming Language Design and Implementation (PLDI), SIGPLAN Notices, Vol. 32,No 5, pp. 215–225 (June 1997).
Tarjan, R. Data Structures and Network Flow Algorithms, Volume CMBS 44 of Regional Conference Series in Applied Mathematics, SIAM (1983).
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Asai, K. (1999). Binding-Time Analysis for Both Static and Dynamic Expressions. In: Cortesi, A., Filé, G. (eds) Static Analysis. SAS 1999. Lecture Notes in Computer Science, vol 1694. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48294-6_8
Download citation
DOI: https://doi.org/10.1007/3-540-48294-6_8
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-66459-8
Online ISBN: 978-3-540-48294-9
eBook Packages: Springer Book Archive