Skip to main content
Log in

Imperative-program transformation by instrumented-interpreter specialization

  • Published:
Higher-Order and Symbolic Computation

Abstract

We describe how to implement strength reduction, loop-invariant code motion and loop quasi-invariant code motion by specializing instrumented interpreters. To curb code duplication intrinsic to such specialization, we introduce a new program transformation, rewinding, which uses Moore-automata minimization to remove duplicated code.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Benton, N.: Simple relational correctness proofs for static analyses and program transformations. In: POPL ’04: Proceedings of the 31st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 14–25. ACM Press, New York (2004). DOI http://doi.acm.org/10.1145/964001.964003

    Chapter  Google Scholar 

  2. Debois, S.: Imperative program optimization by partial evaluation. In: PEPM ’04: Proceedings of the 2004 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pp. 113–122. ACM Press, New York (2004). DOI http://doi.acm.org/10.1145/1014007.1014019

    Chapter  Google Scholar 

  3. Denning, P.J., Dennis, J.B., Qualitz, J.E.: Machines, Languages, and Computation. Prentice-Hall, Englewood Cliffs (1978)

    MATH  Google Scholar 

  4. Glück, R., Jørgensen, J.: Generating optimizing specializers. In: Proceedings of the 1994 IEEE International Conference on Computer Languages, pp. 183–194. IEEE Computer Society Press, New York (1994)

    Chapter  Google Scholar 

  5. Glück, R., Jørgensen, J.: Generating transformers for deforestation and supercompilation. In: SAS ’94: Proceedings of the 1st International Static Analysis Symposium. Lecture Notes in Computer Science, vol. 864, pp. 432–448. Springer, New York (1994)

    Google Scholar 

  6. Gomard, C.K., Jones, N.D.: Compiler generation by partial evaluation: a case study. Struct. Program. 12, 123–144 (1991)

    Google Scholar 

  7. Hopcroft, J.E., Ullman, J.D.: Introduction to Automata Theory, Languages and Computation. Addison-Wesley, Reading (1979)

    MATH  Google Scholar 

  8. Jones, N.D.: Transformation by interpreter specialisation. Sci. Comput. Program. 52, 307–339 (2004)

    Article  MATH  Google Scholar 

  9. Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs (1993)

    MATH  Google Scholar 

  10. Lacey, D., Jones, N.D., Wyk, E.V., Frederiksen, C.C.: Proving correctness of compiler optimizations by temporal logic. In: POPL ’02: Proceedings of the 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 283–294. ACM Press, New York (2002). DOI http://doi.acm.org/10.1145/503272.503299

    Chapter  Google Scholar 

  11. Lerner, S., Millstein, T., Chambers, C.: Automatically proving the correctness of compiler optimizations. In: PLDI ’03: Proceedings of the ACM SIGPLAN 2003 Conference on Programming Language Design and Implementation, pp. 220–231. ACM Press, New York (2003). DOI http://doi.acm.org/10.1145/781131.781156

    Chapter  Google Scholar 

  12. Muchnick, S.S.: Advanced Compiler Design & Implementation. Morgan Kaufmann, San Mateo (1997)

    Google Scholar 

  13. Song, L., Futamura, Y., Glück, R., Hu, Z.: Loop quasi-invariance code motion. IEICE Trans. Inf. Syst. E83-D(10), 1841–1850 (2000)

    Google Scholar 

  14. Sperber, M., Thiemann, P.: Realistic compilation by partial evaluation. In: PLDI ’96: Proceedings of the ACM SIGPLAN 1996 Conference on Programming Language Design and Implementation, pp. 206–214. ACM Press, New York (1996)

    Chapter  Google Scholar 

  15. Thibault, S., Consel, C., Lawall, J.L., Marlet, R., Muller, G.: Static and dynamic program compilation by interpreter specialization. Higher-Order Symb. Comput. 13(3), 161–178 (2000)

    Article  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Søren Debois.

Additional information

This paper is a revised and extended version of the conference paper [2].

Rights and permissions

Reprints and permissions

About this article

Cite this article

Debois, S. Imperative-program transformation by instrumented-interpreter specialization. Higher-Order Symb Comput 21, 37–58 (2008). https://doi.org/10.1007/s10990-008-9027-3

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10990-008-9027-3

Keywords

Navigation