Skip to main content

Binding-Time Analysis for Both Static and Dynamic Expressions

  • Conference paper
  • First Online:
Book cover Static Analysis (SAS 1999)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1694))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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).

    Google Scholar 

  2. 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).

    Article  Google Scholar 

  3. 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).

    Article  MATH  Google Scholar 

  4. 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).

    Article  Google Scholar 

  5. 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 

  6. Danvy, O., and A. Filinski “Abstracting Control,” Proceedings of the 1990 ACM Conference on Lisp and Functional Programming, pp. 151–160 (June 1990).

    Google Scholar 

  7. 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).

    Article  Google Scholar 

  8. 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).

    Google Scholar 

  9. 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 

  10. Futamura, Y. “Partial evaluation of computation process–an approach to a compiler-compiler,” Systems, Computers, Controls, Vol. 2,No. 5, pp. 45–50, (1971).

    Google Scholar 

  11. 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).

    Article  Google Scholar 

  12. 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).

    Google Scholar 

  13. 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).

    Chapter  Google Scholar 

  14. Jones, N. D., C. K. Gomard, and P. Sestoft Partial Evaluation and Automatic Program Generation, New York: Prentice-Hall (1993).

    MATH  Google Scholar 

  15. 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 

  16. 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).

    Google Scholar 

  17. 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).

    Article  Google Scholar 

  18. Tarjan, R. Data Structures and Network Flow Algorithms, Volume CMBS 44 of Regional Conference Series in Applied Mathematics, SIAM (1983).

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics