Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1509239.1509249acmconferencesArticle/Chapter ViewAbstractPublication PagesmodularityConference Proceedingsconference-collections
research-article

Flexible calling context reification for aspect-oriented programming

Published: 02 March 2009 Publication History

Abstract

Aspect-oriented programming (AOP) eases the development of profilers, debuggers, and reverse engineering tools. Such tools frequently rely on calling context information. However, current AOP technology, such as AspectJ, does not offer dedicated support for accessing complete calling context within aspects. In this paper, we introduce a novel approach to calling context reification that reconciles flexibility, efficiency, accuracy, and portability. It relies on a generic bytecode instrumentation framework ensuring complete bytecode coverage, including the standard Java class library. We compose our program transformations for calling context reification with the AspectJ weaver, providing the aspect developer an efficient mechanism to manipulate a customizable representation of the complete calling context. To highlight the benefits of our approach, we present ReCrash as an aspect using a stack-based calling context representation; ReCrash is an existing tool that generates unit tests to reproduce program failures. In comparison with the original ReCrash tool, our aspect resolves several limitations, is extensible, covers also the standard Java class library, and causes less overhead.

References

[1]
C. Allan, P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, O. Lhoták, 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]
B. Alpern, C. R. Attanasio, J. J. Barton, B. Burke, P. Cheng, J.-D. Choi, A. Cocchi, S. J. Fink, D. Grove, M. Hind, S. F. Hummel, D. Lieber, V. Litvinov, M. F. Mergen, N. Ngo, J. R. Russell, V. Sarkar, M. J. Serrano, J. C. Shepherd, S. E. Smith, V. C. Sreedhar, H. Srinivasan, and J. Whaley. The Jalapeño virtual machine. IBM Systems Journal, 39(1):211--238, 2000.
[3]
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.
[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. Lhoták, O. Lhoták, 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]
P. Avgustinov, A. S. Christensen, L. J. Hendren, S. Kuzins, J. Lhoták, O. Lhoták, O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble. abc: An extensible AspectJ compiler. In AOSD '05: Proceedings of the 4th International Conference on Aspect-Oriented Software Development, pages 87--98, New York, NY, USA, 2005. ACM Press.
[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]
C. Bockisch, M. Arnold, T. Dinkelaker, and M. Mezini. Adapting virtual machine techniques for seamless aspect support. In OOPSLA '06: Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, pages 109--124, New York, NY, USA, 2006. ACM.
[9]
C. Bockisch, S. Kanthak, M. Haupt, M. Arnold, and M. Mezini. Efficient control flow quantification. In OOPSLA'06: Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, pages 125--138, New York, NY, USA, 2006. ACM.
[10]
M. D. Bond and K. S. McKinley. Probabilistic calling context. In OOPSLA '07: Proceedings of the 22nd annual ACM SIGPLAN conference on Object oriented programming, systems and applications, pages 97--112, New York, NY, USA, 2007. ACM.
[11]
J. Dujmovic and C. Herder. Visualization of Java workloads using ternary diagrams. Software Engineering Notes, 29(1):261--265, 2004.
[12]
R. Dyer and H. Rajan. Nu: A dynamic aspect-oriented intermediate language model and virtual machine for flexible runtime adaptation. In AOSD '08: Proceedings of the 7th International Conference on Aspect-oriented Software Development, pages 191--202, New York, NY, USA, 2008. ACM.
[13]
H. H. Feng, O. M. Kolesnikov, P. Fogla, W. Lee, and W. Gong. Anomaly detection using call stack information. In SP '03: Proceedings of the 2003 IEEE Symposium on Security and Privacy, page 62, Washington, DC, USA, 2003. IEEE Computer Society.
[14]
M. Haupt, M. Mezini, C. Bockisch, T. Dinkelaker, M. Eichberg, and M. Krebs. An execution layer for aspect-oriented programming languages. In VEE '05: Proceedings of the 1st ACM/USENIX international conference on Virtual execution environments, pages 142--152, New York, NY, USA, 2005. ACM.
[15]
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.
[16]
R. Hirschfeld. AspectS -- Aspect-Oriented Programming with Squeak. In NODe '02: Revised Papers from the International Conference NetObjectDays on Objects, Components, Architectures, Services, and Applications for a Networked World, pages 216--232, London, UK, 2003. Springer-Verlag.
[17]
JBoss. Open source middleware software. Web pages at http://labs.jboss.com/jbossaop/.
[18]
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.
[19]
G. Kiczales, J. Lamping, A. Menhdhekar, C. Maeda, C. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-Oriented Programming. In M. Ak¸sit 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.
[20]
R. Laddad. AspectJ in Action: Practical Aspect-Oriented Programming. Manning Publications Co., Greenwich, CT, USA, 2003.
[21]
Z. Lin, X. Jiang, D. Xu, and X. Zhang. Automatic Protocol Format Reverse Engineering Through Context-Aware Monitored Execution. In Proceedings of the 15th Annual Network and Distributed System Security Symposium, San Diego, CA, February 2008.
[22]
D. J. Pearce, M. Webster, R. Berry, and P. H. J. Kelly. Profiling with AspectJ. Software: Practice and Experience, 37(7):747--777, June 2007.
[23]
A. Popovici, G. Alonso, and T. Gross. Just-in-time aspects: efficient dynamic weaving for Java. In AOSD '03: Proceedings of the 2nd International Conference on Aspect-Oriented Software Development, pages 100--109, New York, NY, USA, 2003. ACM Press.
[24]
A. Popovici, T. Gross, and G. Alonso. Dynamic weaving for aspect-oriented programming. In AOSD '02: Proceedings of the 1st international conference on Aspect-oriented software development, pages 141--147, New York, NY, USA, 2002. ACM Press.
[25]
J. M. Spivey. Fast, accurate call graph profiling. Softw. Pract. Exper., 34(3):249--264, 2004.
[26]
Sun Microsystems, Inc. JVM Tool Interface (JVMTI) version 1.1. Web pages at http://java.sun.com/javase/6/docs/platform/jvmti/jvmti.html, 2006.
[27]
D. Suvée, W. Vanderperren, and V. Jonckers. JAsCo: an aspect-oriented approach tailored for component based software development. In AOSD '03: Proceedings of the 2nd international conference on Aspect-oriented software development, pages 21--29, New York, NY, USA, 2003. ACM.
[28]
A. Villazón, 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.
[29]
J. Whaley. A portable sampling-based profiler for Java Virtual Machines. In Proceedings of the ACM 2000 Conference on Java Grande, pages 78--87. ACM Press, June 2000.

Cited By

View all

Index Terms

  1. Flexible calling context reification for aspect-oriented programming

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Conferences
      AOSD '09: Proceedings of the 8th ACM international conference on Aspect-oriented software development
      March 2009
      278 pages
      ISBN:9781605584423
      DOI:10.1145/1509239
      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]

      Sponsors

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 02 March 2009

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. aspect weaving
      2. bytecode instrumentation
      3. calling context reification
      4. composition of program transformations
      5. debugging
      6. java virtual machine

      Qualifiers

      • Research-article

      Conference

      AOSD '09

      Acceptance Rates

      Overall Acceptance Rate 41 of 139 submissions, 29%

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

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

      Other Metrics

      Citations

      Cited By

      View all
      • (2016)A new method to encode calling contexts with recursions一种针对递归的调用语境编码技术Science China Information Sciences10.1007/s11432-015-5418-359:5Online publication date: 12-Apr-2016
      • (2014)JBInsTraceScience of Computer Programming10.1016/j.scico.2012.02.00479(116-125)Online publication date: 1-Jan-2014
      • (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)Precise Calling Context EncodingIEEE Transactions on Software Engineering10.1109/TSE.2011.7038:5(1160-1177)Online publication date: 1-Sep-2012
      • (2012)Exploiting Dynamic Information in IDEs Improves Speed and Correctness of Software Maintenance TasksIEEE Transactions on Software Engineering10.1109/TSE.2011.4238:3(579-591)Online publication date: 1-May-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
      • (2012)Challenges for refinement and composition of instrumentationsProceedings of the 11th international conference on Software Composition10.1007/978-3-642-30564-1_6(86-96)Online publication date: 31-May-2012
      • (2011)Safe and atomic run-time code evolution for Java and its application to dynamic AOPACM SIGPLAN Notices10.1145/2076021.204812946:10(825-844)Online publication date: 22-Oct-2011
      • (2011)A tracing technique using dynamic bytecode instrumentation of Java applications and libraries at basic block levelProceedings of the 6th Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems10.1145/2069172.2069178(1-4)Online publication date: 26-Jul-2011
      • (2011)Safe and atomic run-time code evolution for Java and its application to dynamic AOPProceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications10.1145/2048066.2048129(825-844)Online publication date: 22-Oct-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