Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

HotWave: creating adaptive tools with dynamic aspect-oriented programming in Java

Published: 04 October 2009 Publication History

Abstract

Developing tools for profiling, debugging, testing, and reverse engineering is error-prone, time-consuming, and therefore costly when using low-level techniques, such as bytecode instrumentation. As a solution to these problems, we promote tool development in Java using high-level aspect-oriented programming (AOP). We demonstrate that the use of aspects yields compact tools that are easy to develop and extend. As enabling technology, we rely on HotWave, a new tool for dynamic and comprehensive aspect weaving. HotWave reconciles compatibility with existing virtual machine and AOP technologies. It provides support for runtime adaptation of aspects and reweaving of previously loaded code, as well as the ability to weave aspects into all methods executing in a Java Virtual Machine, including methods in the standard Java class library. HotWave also features a new mechanism for efficiently passing data between advices that are woven into the same method. We demonstrate the benefits of HotWave's distinguishing features with two case studies in the area of profiling.

References

[1]
C. Allan, P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, O. Lhotak, O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble. Adding trace matching with free variables to AspectJ. In OOPSLA '05: Proceedings of the 20th annual ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, pages 345--364, New York, NY, USA, 2005. ACM.
[2]
G. Ammons, T. Ball, and J. R. Larus. Exploiting hardware performance counters with flow and context sensitive profiling. In PLDI '97: Proceedings of the ACM SIGPLAN 1997 conference on Programming language design and implementation, pages 85--96. ACM Press, 1997.
[3]
T. Aotani and H. Masuhara. SCoPE: an AspectJ compiler for supporting user-defined analysis-based pointcuts. In AOSD '07: Proceedings of the 6th international conference on Aspect-oriented software development, pages 161--172, New York, NY, USA, 2007. ACM.
[4]
S. Artzi, S. Kim, and M. D. Ernst. ReCrash: Making Software Failures Reproducible by Preserving Object States. In J. Vitek, editor, ECOOP '08: Proceedings of the 22th European Conference on Object-Oriented Programming, volume 5142 of Lecture Notes in Computer Science, pages 542--565, Paphos, Cyprus, 2008. Springer-Verlag.
[5]
P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, J. Lhotak, O. Lhotak, O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble. Optimising AspectJ. In PLDI '05: Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation, pages 117--128, New York, NY, USA, 2005. ACM.
[6]
W. Binder and J. Hulaas. Flexible and efficient measurement of dynamic bytecode metrics. In Fifth International Conference on Generative Programming and Component Engineering (GPCE-2006), pages 171--180, Portland, Oregon, USA, Oct. 2006. ACM.
[7]
W. Binder, J. Hulaas, and P. Moret. Advanced Java Bytecode Instrumentation. In PPPJ'07: Proceedings of the 5th International Symposium on Principles and Practice of Programming in Java, pages 135--144, New York, NY, USA, 2007. ACM Press.
[8]
W. Binder, J. Hulaas, P.Moret, and A. Villazon. Platform-independent profiling in a virtual execution environment. Software: Practice and Experience, 39(1):47--79, 2009. http://dx.doi.org/10.1002/ spe.890.
[9]
W. Binder, A. Villazon, M. Schoeberl, and P. Moret. Cache-aware cross-profiling for Java processors. In International Conference on Compilers, Architecture, and Synthesis for Embedded Systems (CASES-2008), pages 127--136, Atlanta, Georgia, USA, Oct. 2008. ACM.
[10]
C. Bockisch, M. Haupt, M. Mezini, and K. Ostermann. Virtual machine support for dynamic join points. In AOSD, pages 83--92, 2004.
[11]
B. Dufour, L. Hendren, and C. Verbrugge. *J: A tool for dynamic analysis of Java programs. In OOPSLA '03: Companion of the 18th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 306--307, New York, NY, USA, 2003. ACM Press.
[12]
E. Hilsdale and J. Hugunin. Advice weaving in AspectJ. In AOSD'04: Proceedings of the 3rd International Conference on Aspect-Oriented Software Development, pages 26--35, New York, NY, USA, 2004. ACM.
[13]
JBoss. Javassist Project. Web pages at http://jboss.com/javassist.
[14]
JBoss. Open source middleware software. Web pages at http://labs.jboss.com/jbossaop/.
[15]
M. Jovic and M. Hauswirth. Measuring the performance of interactive applications with listener latency profiling. In PPPJ '08: Proceedings of the 6th international symposium on Principles and practice of programming in Java, pages 137--146, New York, NY, USA, 2008. ACM.
[16]
G. Kiczales, E. Hilsdale, J. Hugunin, M. Kersten, J. Palm, and W. G. Griswold. An overview of AspectJ. In J. L. Knudsen, editor, Proceedings of the 15th European Conference on Object-Oriented Programming (ECOOP-2001), volume 2072 of Lecture Notes in Computer Science, pages 327--353, 2001.
[17]
G. Kiczales, J. Lamping, A. Menhdhekar, C. Maeda, C. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-Oriented Programming. In M. Aksit and S. Matsuoka, editors, Proceedings of European Conference on Object-Oriented Programming, volume 1241, pages 220--242. Springer-Verlag, Berlin, Heidelberg, and New York, 1997.
[18]
K. Klose, K. Ostermann, and M. Leuschel. Partial evaluation of pointcuts. In PADL, pages 320--334, 2007.
[19]
P. Moret, W. Binder, D. Ansaloni, and A. Villazon. Visualizing Calling Context Profiles with Ring Charts. In VISSOFT 2009: 5th IEEE International Workshop on Visualizing Software for Understanding and Analysis, Edmonton, Alberta, Canada, Sep. 2009.
[20]
P. Moret, W. Binder, and A. Villazon. CCCP: Complete calling context profiling in virtual execution environments. In PEPM '09: Proceedings of the 2009 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, pages 151--160, Savannah, GA, USA, 2009. ACM.
[21]
NetBeans. The NetBeans Profiler Project. Web pages at http://profiler.netbeans.org/.
[22]
A. Nicoara, G. Alonso, and T. Roscoe. Controlled, Systematic, and Efficient Code Replacement for Running Java Programs. In Eurosys '08: Proceedings of the 3rd ACMSIGOPS/EuroSys European Conference on Computer Systems 2008, pages 233--246, New York, NY, USA, 2008. ACM.
[23]
ObjectWeb. ASM. Web pages at http://asm.objectweb.org/.
[24]
D. Rothlisberger, M. Harry, A. Villazon, D. Ansaloni, W. Binder, O. Nierstrasz, and P. Moret. Augmenting Static Source Views in IDEs with Dynamic Metrics. In ICSM '09: Proceedings of the 2009 IEEE International Conference on Software Maintenance, Edmonton, Alberta, Canada, 2009.
[25]
D. Rothlisberger, M. Harry, A. Villazon, D. Ansaloni, W. Binder, O. Nierstrasz, and P. Moret. Senseo: Enriching Eclipse's Static Source View with Dynamic Metrics. In ICSM '09: Proceedings of the 2009 IEEE International Conference on Software Maintenance, Edmonton, Alberta, Canada, 2009.
[26]
Y. Sato, S. Chiba, and M. Tatsubori. A selective, just-in-time aspect weaver. In GPCE '03: Proceedings of the 2nd international conference on Generative programming and component engineering, pages 189--208, New York, NY, USA, 2003. Springer-Verlag New York, Inc.
[27]
E. Tanter, M. Segura-Devillechaise, J. Noye, and J. Piquer. Altering Java semantics via bytecode manipulation. In Proceedings of the ACM SIGPLAN/SIGSOFT Conference on Generative Programming and Component Engineering (GPCE 2002), USA, volume 2487 of LNCS, pages 283--298, Oct. 2002.
[28]
The Apache Jakarta Project. The Byte Code Engineering Library (BCEL). Web pages at http://jakarta.apache.org/bcel/.
[29]
E. Tilevich and Y. Smaragdakis. J-Orchestra: Automatic Java Application Partitioning. In ECOOP '02: Proceedings of the 16th European Conference on Object-Oriented Programming, pages 178--204, London, UK, 2002. Springer-Verlag.
[30]
W. Vanderperren, D. Suvee, B. Verheecke, M. A. Cibran, and V. Jonckers. Adaptive Programming in JAsCo. In AOSD '05: Proceedings of the 4th international conference on Aspect-oriented software development, pages 75--86, New York, NY, USA, 2005. ACM.
[31]
A. Vasseur. Dynamic AOP and RuntimeWeaving for Java - How does AspectWerkz address it? In Dynamic Aspects Workshop (DAW04), Lancaster, England, Mar. 2004.
[32]
A. Villazon, W. Binder, and P. Moret. Aspect Weaving in Standard Java Class Libraries. In PPPJ '08: Proceedings of the 6th International Symposium on Principles and Practice of Programming in Java, pages 159--167, New York, NY, USA, Sept. 2008. ACM.
[33]
A. Villazon, W. Binder, and P. Moret. Flexible Calling Context Reification for Aspect-Oriented Programming. In AOSD '09: Proceedings of the 8th International Conference on Aspect-oriented Software Development, pages 63--74, Charlottesville, Virginia, USA, Mar. 2009. ACM.
[34]
R. J.Walker. Implementing protocols via declarative event patterns. In ACM Sigsoft International Symposium on Foundations of Software Engineering (FSE-12, pages 159--169. ACM Press, 2004.

Cited By

View all
  • (2016)A dynamic instance binding mechanism supporting run-time variability of role-based software systemsCompanion Proceedings of the 15th International Conference on Modularity10.1145/2892664.2892687(137-142)Online publication date: 14-Mar-2016
  • (2015)Flexible and Extensible Runtime Verification for Java (Extended Version)International Journal of Software Engineering and Knowledge Engineering10.1142/S021819401540034325:09n10(1595-1609)Online publication date: Nov-2015
  • (2016)A dynamic instance binding mechanism supporting run-time variability of role-based software systemsCompanion Proceedings of the 15th International Conference on Modularity10.1145/2892664.2892687(137-142)Online publication date: 14-Mar-2016
  • Show More Cited By

Index Terms

  1. HotWave: creating adaptive tools with dynamic aspect-oriented programming in Java

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 45, Issue 2
    GPCE '09
    February 2010
    182 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1837852
    Issue’s Table of Contents
    • cover image ACM Conferences
      GPCE '09: Proceedings of the eighth international conference on Generative programming and component engineering
      October 2009
      194 pages
      ISBN:9781605584942
      DOI:10.1145/1621607
      • General Chair:
      • Jeremy Siek,
      • Program Chair:
      • Bernd Fischer
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 04 October 2009
    Published in SIGPLAN Volume 45, Issue 2

    Check for updates

    Author Tags

    1. AspectJ
    2. bytecode instrumentation
    3. code hotswapping
    4. dynamic aspect-oriented programming
    5. java virtual machine
    6. profiling
    7. runtime weaving

    Qualifiers

    • Research-article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)1
    • Downloads (Last 6 weeks)1
    Reflects downloads up to 23 Dec 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2016)A dynamic instance binding mechanism supporting run-time variability of role-based software systemsCompanion Proceedings of the 15th International Conference on Modularity10.1145/2892664.2892687(137-142)Online publication date: 14-Mar-2016
    • (2015)Flexible and Extensible Runtime Verification for Java (Extended Version)International Journal of Software Engineering and Knowledge Engineering10.1142/S021819401540034325:09n10(1595-1609)Online publication date: Nov-2015
    • (2016)A dynamic instance binding mechanism supporting run-time variability of role-based software systemsCompanion Proceedings of the 15th International Conference on Modularity10.1145/2892664.2892687(137-142)Online publication date: 14-Mar-2016
    • (2013)A hybrid approach for resource-based comparison of adaptable Java applicationsScience of Computer Programming10.1016/j.scico.2012.01.00578:8(987-1009)Online publication date: 1-Aug-2013
    • (2013)Unrestricted and safe dynamic code evolution for JavaScience of Computer Programming10.1016/j.scico.2011.06.00578:5(481-498)Online publication date: 1-May-2013
    • (2012)Dynamic aspect-oriented programming in javaTransactions on Aspect-Oriented Software Development IX10.5555/2434958.2434962(92-122)Online publication date: 1-Jan-2012
    • (2012)Towards an SPL-based monitoring middleware strategy for cloud computing applicationsProceedings of the 10th International Workshop on Middleware for Grids, Clouds and e-Science10.1145/2405136.2405145(1-6)Online publication date: 3-Dec-2012
    • (2012)Dynamic Aspect-Oriented Programming in Java: The HotWave ExperienceTransactions on Aspect-Oriented Software Development IX10.1007/978-3-642-35551-6_3(92-122)Online publication date: 2012
    • (2011)Self-refining aspects for dynamic program analysisProceedings of the tenth international conference on Aspect-oriented software development companion10.1145/1960314.1960342(75-76)Online publication date: 21-Mar-2011
    • (2011)Flexible feature binding in software product linesAutomated Software Engineering10.1007/s10515-011-0080-518:2(163-197)Online publication date: 1-Jun-2011
    • Show More Cited By

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media