Advertisement

Imperative-program transformation by instrumented-interpreter specialization

  • Søren DeboisEmail author
Article

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.

Keywords

Partial evaluation Interpretive approach Program transformation Code duplication Moore automata 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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 CrossRefGoogle Scholar
  2. 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 CrossRefGoogle Scholar
  3. 3.
    Denning, P.J., Dennis, J.B., Qualitz, J.E.: Machines, Languages, and Computation. Prentice-Hall, Englewood Cliffs (1978) zbMATHGoogle Scholar
  4. 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) CrossRefGoogle Scholar
  5. 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. 6.
    Gomard, C.K., Jones, N.D.: Compiler generation by partial evaluation: a case study. Struct. Program. 12, 123–144 (1991) Google Scholar
  7. 7.
    Hopcroft, J.E., Ullman, J.D.: Introduction to Automata Theory, Languages and Computation. Addison-Wesley, Reading (1979) zbMATHGoogle Scholar
  8. 8.
    Jones, N.D.: Transformation by interpreter specialisation. Sci. Comput. Program. 52, 307–339 (2004) zbMATHCrossRefGoogle Scholar
  9. 9.
    Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs (1993) zbMATHGoogle Scholar
  10. 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 CrossRefGoogle Scholar
  11. 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 CrossRefGoogle Scholar
  12. 12.
    Muchnick, S.S.: Advanced Compiler Design & Implementation. Morgan Kaufmann, San Mateo (1997) Google Scholar
  13. 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. 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) CrossRefGoogle Scholar
  15. 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) zbMATHCrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC 2008

Authors and Affiliations

  1. 1.IT University of CopenhagenCopenhagen SDenmark

Personalised recommendations