Skip to main content

Turbo DiSL: Partial Evaluation for High-Level Bytecode Instrumentation

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7304))

Abstract

Bytecode instrumentation is a key technique for the implementation of dynamic program analysis tools such as profilers and debuggers. Traditionally, bytecode instrumentation has been supported by low-level bytecode engineering libraries that are difficult to use. Recently, the domain-specific aspect language DiSL has been proposed to provide high-level abstractions for the rapid development of efficient bytecode instrumentations. While DiSL supports user-defined expressions that are evaluated at weave-time, the DiSL programming model requires these expressions to be implemented in separate classes, thus increasing code size and impairing code readability and maintenance. In addition, the DiSL weaver may produce a significant amount of dead code, which may impair some optimizations performed by the runtime. In this paper we introduce Turbo, a novel partial evaluator for DiSL, which processes the generated instrumentation code, performs constant propagation, conditional reduction, and pattern-based code simplification, and executes pure methods at weave-time. With Turbo, it is often unnecessary to wrap expressions for evaluation at weave-time in separate classes, thus simplifying the programming model. We present Turbo’s partial evaluation algorithm and illustrate its benefits with several case studies. We evaluate the impact of Turbo on weave-time performance and on runtime performance of the instrumented application.

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

Buying options

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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Albert, E., Gómez-Zamalloa, M., Hubert, L., Puebla, G.: Verification of Java Bytecode Using Analysis and Transformation of Logic Programs. In: Hanus, M. (ed.) PADL 2007. LNCS, vol. 4354, pp. 124–139. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  2. Andersen, H.M., Schultz, U.P.: Declarative specialization for object-oriented-program specialization. In: Proceedings of the Symposium on Partial Evaluation and Program Manipulation, pp. 27–38 (2004)

    Google Scholar 

  3. Bockisch, C., Sewe, A., Mezini, M., Akşit, M.: An Overview of ALIA4J: An Execution Model for Advanced-Dispatching Languages. In: Bishop, J., Vallecillo, A. (eds.) TOOLS 2011. LNCS, vol. 6705, pp. 131–146. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  4. Bockisch, C., Sewe, A., Zandberg, M.: ALIA4J’s [(just-in-time) compile-time] MOP for advanced dispatching. In: Proceedings of the 5th Workshop on Virtual Machines and Intermediate Languages, pp. 309–316 (2011)

    Google Scholar 

  5. Hermenegildo, M.V., Puebla, G., Bueno, F., López-García, P.: Integrated program debugging, verification, and optimization using abstract interpretation (and the Ciao system preprocessor). Science of Computer Programming 58(1-2), 115–140 (2005)

    Article  MathSciNet  MATH  Google Scholar 

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

    Google Scholar 

  7. Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An Overview of AspectJ. In: Lee, S.H. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 327–353. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  8. Marek, L., Villazón, A., Zheng, Y., Ansaloni, D., Binder, W., Qi, Z.: DiSL: a domain-specific language for bytecode instrumentation. In: Proceedings of Modularity: aosd, vol. 12, pp. 239–250 (2012)

    Google Scholar 

  9. Masuhara, H., Kiczales, G., Dutchyn, C.: A Compilation and Optimization Model for Aspect-Oriented Programs. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 46–60. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  10. Pawlak, R., Noguera, C., Petitprez, N.: Spoon: Program Analysis and Transformation in Java. Rapport, INRIA (2007), http://hal.inria.fr/inria-00071366/en/

  11. Schultz, U.P., Lawall, J.L., Consel, C.: Automatic Program Specialization for Java. Transactions on Programming Languages and Systems 25(4), 452–499 (2003)

    Article  Google Scholar 

  12. Shali, A., Cook, W.R.: Hybrid partial evaluation. In: Proceedings of the 26th Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp. 375–390 (2011)

    Google Scholar 

  13. Tanter, E., Moret, P., Binder, W., Ansaloni, D.: Composition of dynamic analysis aspects. In: Proceedings of the 9th International Conference on Generative Programming and Component Engineering, pp. 113–122 (2010)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Zheng, Y. et al. (2012). Turbo DiSL: Partial Evaluation for High-Level Bytecode Instrumentation. In: Furia, C.A., Nanz, S. (eds) Objects, Models, Components, Patterns. TOOLS 2012. Lecture Notes in Computer Science, vol 7304. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-30561-0_24

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-30561-0_24

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-30560-3

  • Online ISBN: 978-3-642-30561-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics