Binding-time analysis for both static and dynamic expressions
- 28 Downloads
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, data structures can be statically accessed while they are residualized at the same time. Previously, such data structures were treated as completely dynamic, which prevented their components from being accessed statically. The technique presented in this paper effectively allows data structures to be lifted 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.
KeywordsPartial Evaluation Offline Specialization Binding-Time Analysis Type System Functional Languages
Unable to display preview. Download preview PDF.
- 2).Asai, K., Masuhara, H. and Yonezawa, A., “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.Google Scholar
- 6).Danvy, O., “Type-Directed Partial Evaluation,”Conference Record of the 23rd Annual ACM Symposium on Principles of Programming Languages, pp. 242–257, January 1996.Google Scholar
- 7).Danvy, O. and Filinski, A., “Abstracting Control,” inProc. of the 1990 ACM Conference on Lisp and Functional Programming, pp. 151–160, June 1990.Google Scholar
- 9).Dean, J., Chambers, C. and Grove, D., “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.Google Scholar
- 10).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.Google Scholar
- 11).Futamura, Y., “Partial Evaluation of Computation Process — an Approach to a Compiler-compiler,”Systems, Computers, Controls, 2, 5, pp. 45–50, 1971, reprinted asHigher-Order and Symbolic Computation, 12, 4, pp. 381–391, Kluwer Academic Publishers, December 1999.Google Scholar
- 13).Hatcliff, J., “An Introduction to Online and Offline Partial Evaluation Using a Simple Flowchart Language,” inPartial Evaluation, Practice and Theory (LNCS 1706) (J. Hatcliff, T. Æ. Mogensen, and P. Thiemann eds.), pp. 20–82, 1999.Google Scholar
- 17).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.Google Scholar
- 20).Tarjan, R.,Data Structures and Network Flow Algorithms, VolumeCMBS 44 ofRegional Conference Series in Applied Mathematics, SIAM, 1983.Google Scholar