skip to main content
10.1145/1218563.1218582acmotherconferencesArticle/Chapter ViewAbstractPublication PagesmodularityConference Proceedingsconference-collections
Article

SCoPE: an AspectJ compiler for supporting user-defined analysis-based pointcuts

Published: 14 March 2007 Publication History

Abstract

This paper proposes an approach called SCoPE, which supports user-defined analysis-based pointcuts in aspect-oriented programming (AOP) languages. The advantage of our approach is better integration with existing AOP languages than previous approaches. Instead of extending the language, SCoPE allows the programmer to write a pointcut that analyzes a program by using a conditional (if) pointcut with introspective reflection libraries. A compilation scheme automatically eliminates runtime tests for such a pointcut. The approach also makes effects of aspects visible to the analysis, which is essential for determining proper aspect interactions. We implemented a SCoPE compiler for the AspectJ language on top of the AspectBench compiler using a backpatching technique. The implementation efficiently finds analysis-based pointcuts, and generates woven code without runtime tests for those pointcuts. Our benchmark tests with JHotDraw and other programs showed that SCoPE compiles programs with less than 1% compile-time overhead, and generates a program that is as efficient as an equivalent program that uses merely static pointcuts.

References

[1]
Chris Allan, Pavel Avgustinov, Aske Simon Christensen, Laurie Hendren, Sascha Kuzins, Ondrej Lhotak, Oege de Moor, Damien Sereni, Ganesh Sittampalam, and Julian Tibble. Adding trace matching with free variables to AspectJ. In Proceedings of the 20th annual ACM SIGPLAN conference on Object oriented programming systems languages and applications, pages 345--364. ACM Press, 2005.]]
[2]
Lars Ole Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen, 1994.]]
[3]
Pavel Avgustinov, Aske Simon Christensen, Laurie Hendren, Sascha Kuzins, Jennifer Lhotak, Ondrej Lhotak, Oege de Moor, Damien Sereni, Ganesh Sittampalam, and Julian Tibble, abc: An extensible AspectJ compiler. In Proceedings of the 4th International Conference on Aspect-Oriented Software Development, pages 87--98. ACM Press, 2005.]]
[4]
David F. Bacon and Peter F. Sweeney. Fast static analysis of C++ virtual function calls. In Proceedings of the 11th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pages 324--341. ACM Press, 1996.]]
[5]
Marc Berndl, Ondfej Lhotak, Feng Qian, Laurie Hendren, and Navindra Umanee. Points-to analysis using bdds. In Proceedings of the ACM SIGPLAN 2003 Conference on Programming Language Design and Implementation, pages 103--114. ACM Press, 2003.]]
[6]
S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanovic, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo benchmarks: Java benchmarking development and analysis. In Proceedings of the 21st annual ACM SIGPLAN conference on Object-Oriented Programing, Systems, Languages, and Applications. ACM Press, 2006.]]
[7]
Shigeru Chiba. Load-time structural reflection in Java. In Proceedings of the 14th European Conference on Object-Oriented Programming, pages 313--336. Springer, 2000.]]
[8]
Shigeru Chiba and Kiyoshi Nakagawa. Josh: an open AspectJ-like language. In Proceedings of the 3rd international conference on Aspect-oriented software development, pages 102--111. ACM Press, 2004.]]
[9]
Jeffrey Dean, David Grove, and Craig Chambers. Optimization of object-oriented programs using static class hierarchy analysis. In Proceedings of the 9th European Conference on Object-Oriented Programming, pages 77--101. Springer, 1995.]]
[10]
Remi Douence, Pascal Fradet, and Mario Sudholt. Composition, reuse and interaction analysis of stateful aspects. In Proceedings of the 3rd international conference on Aspect-oriented software development, pages 141--150. ACM Press, 2004.]]
[11]
Michael Eichberg, Mira Mezini, and Klaus Ostermann. Pointcuts as functional queries. In Proceedings of the 2nd ASIAN Symposium on Programming Languages and Systems, pages 366--381. Springer, 2004.]]
[12]
Tzilla Elrad, Robert E. Filman, and Atef Bader. Aspect-oriented programming: Introduction. Communications of the ACM, 44(10):29--32, 2001.]]
[13]
Stefan Hanenberg Gunter Kniesel, Tobias Rho. Evolvable pattern implementations need generic aspects. In Proceedings of Workshop on Reflection, AOP and Meta-Data for Software Evolution, 2004.]]
[14]
Kris Gybels and Johan Brichau. Arranging language features for more robust pattern-based crosscuts. In Proceedings of the 2nd international conference on Aspect-oriented software development, pages 60--69. ACM Press, 2003.]]
[15]
Neil D. Jones, Carsten K. Gomard, and Peter Sestoft. Partial evaluation and automatic program generation. Prentice-Hall, Inc., 1993.]]
[16]
Andy Kellens, Kim Mens, Johan Brichau, and Kris Gybels. Managing the evolution of aspect-oriented software with model-based pointcuts. In Proceedings of the 20th European Conference on Object-Oriented Programming, pages 501--525, 2006.]]
[17]
Greger Kiczales. The fun has just begun, 2003. Keynote talk at AOSD'03.]]
[18]
Gregor Kiczales, Erik Hilsdale, Jim Hugunin, Mik Kersten, Jeffrey Palm, and William G. Griswold. An overview of AspectJ. In Proceedings of the 15th European Conference on Object-Oriented Programming, pages 327--353. Springer, 2001.]]
[19]
Gregor Kiczales, John Lamping, Anurag Menhdhekar, Chris Maeda, Cristina Lopes, Jean-Marc Loingtier, and John Irwin. Aspect-oriented programming. In Proceedings of the 11th European Conference on Object-Oriented Programming, pages 220--242. Springer, 1997.]]
[20]
K. Klose and K. Ostermann. Back to the future: Pointcuts as predicates over traces. In Proceedings of Foundations of Aspect-Oriented Languages workshop, 2005.]]
[21]
Ramnivas Laddad. AspectJ in Action: Practical Aspect-Oriented Programming. Manning Publications Co., 2003.]]
[22]
Karl J. Lieberherr and Ian M. Holland. Assuring good style for object-oriented programs. IEEE Software, 6(5):38--48, 1989.]]
[23]
Hidehiko Masuhara and Tomoyuki Aotani. Issues on observing aspect effects from expressive pointcuts. In Proceedings of Workshop on Aspects, Dependencies and Interactions, pages 53--61, 2006.]]
[24]
Hidehiko Masuhara and Kazunori Kawauchi. Dataflow pointcut in aspect-oriented programming. In Proceedings of the 1st Asian Symposium on Programming Languages and Systems, pages 105--121. Springer, 2003.]]
[25]
Sean McDirmid and Wilson C. Hsieh. Splice: Aspects that analyze programs. In Proceedings of the 3rd International Conference on Generative Programming and Component Engineering, pages 19--38. Springer, 2004.]]
[26]
Klaus Ostermann, Mira Mezini, and Christoph Bockisch. Expressive pointcuts for increased modularity. In Proceedings of the 19th European Conference on Object-Oriented Programming, pages 214--240. Springer, 2005.]]
[27]
Renaud Pawlak, Lionel Seinturier, Laurence Duchien, and Gerard Florin. JAC: A flexible solution for aspect-oriented programming in Java. In Proceedings of the 3rd International Conference on Metalevel Architectures and Separation of Crosscutting Concerns, pages 1--24. Springer, 2001.]]
[28]
Andrei Popovici, Thomas Gross, and Gustavo Alonso. Dynamic weaving for aspect-oriented programming. In Proceedings of the 1st international conference on Aspect-oriented software development, pages 141--147. ACM Press, 2002.]]
[29]
Macneil Shonle, Karl Lieberherr, and Ankit Shah. XAspects: an extensible system for domain-specific aspect languages. In Companion of the 18th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pages 28--37. ACM Press, 2003.]]
[30]
Bjarne Steensgaard. Points-to analysis in almost linear time. In Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 32--41. ACM Press, 1996.]]
[31]
David B. Tucker and Shriram Krishnamurthi. Pointcuts and advice in higher-order languages. In Proceedings of the 2nd international conference on Aspect-oriented software development, pages 158--167. ACM Press, 2003.]]
[32]
Raja Vallee-Rai, Laurie Hendren, Vijay Sundaresan, Patrick Lam, Etienne Gagnon, and Phong Co. Soot - a Java optimization framework. In Proceedings of the 1999 conference of the Centre for Advanced Studies on Collaborative research, pages 125--135. IBM Press, 1999.]]
[33]
Robert J. Walker and Gail C. Murphy. Implicit context: easing software evolution and reuse. In Proceedings of the 8th ACM SIGSOFT international symposium on Foundations of software engineering, pages 69--78. ACM Press, 2000.]]
[34]
Geoffrey Washburn and Stephanie Weirich. Good advice for type-directed programming aspect-oriented programming and extensible generic functions. In Proceedings of the 2006 ACM SIGPLAN workshop on Generic programming, pages 33--44. ACM Press, 2006.]]
[35]
Pengcheng Wu and Karl Lieberherr. Shadow programming: Reasoning about programs using lexical join point information. In Proceedings of the 4th International Conference on Generative Programming and Component Engineering, pages 141--156. Springer, 2005.]]

Cited By

View all

Index Terms

  1. SCoPE: an AspectJ compiler for supporting user-defined analysis-based pointcuts

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Other conferences
    AOSD '07: Proceedings of the 6th international conference on Aspect-oriented software development
    March 2007
    246 pages
    ISBN:1595936157
    DOI:10.1145/1218563
    • Conference Chair:
    • Brian Barry
    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

    • Google Inc.
    • IBMR: IBM Research
    • AOSA: Aspect-Oriented Software Association
    • AOSD-Europe: European Network of Excellence on Aspect-Oriented Software Development
    • Eclipse Foundation

    In-Cooperation

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 14 March 2007

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. AOP
    2. analysis-based pointcuts
    3. aspect-oriented programming languages
    4. compiler design
    5. point-cuts

    Qualifiers

    • Article

    Conference

    AOSD07
    Sponsor:
    • IBMR
    • AOSA
    AOSD07: 6th International Conference on Aspect-Oriented Software Development
    March 12 - 16, 2007
    British Columbia, Vancouver, Canada

    Acceptance Rates

    Overall Acceptance Rate 41 of 139 submissions, 29%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)0
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 07 Mar 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2023)Instrumentation for RV: From Basic Monitoring to Advanced Use CasesRuntime Verification10.1007/978-3-031-44267-4_23(403-427)Online publication date: 1-Oct-2023
    • (2017)Resolving Ambiguity in Sentiment ClassificationACM Transactions on Management Information Systems10.1145/30466848:2-3(1-13)Online publication date: 13-Jun-2017
    • (2015)Candidate Sets for Alternative Routes in Road NetworksACM Journal of Experimental Algorithmics10.1145/267439519(1-28)Online publication date: 7-Jan-2015
    • (2015)Engineering Efficient Paging AlgorithmsACM Journal of Experimental Algorithmics10.1145/267012719(1-19)Online publication date: 7-Jan-2015
    • (2015)Generic Instrumentation and Monitoring Description for Software Performance EvaluationProceedings of the 6th ACM/SPEC International Conference on Performance Engineering10.1145/2668930.2695525(203-206)Online publication date: 28-Jan-2015
    • (2015)Detecting broken pointcuts using structural commonality and degree of interestProceedings of the 30th IEEE/ACM International Conference on Automated Software Engineering10.1109/ASE.2015.80(641-646)Online publication date: 9-Nov-2015
    • (2015)Introduction to dynamic program analysis with DiSLScience of Computer Programming10.1016/j.scico.2014.01.00398:P1(100-115)Online publication date: 1-Feb-2015
    • (2014)Improving the Quality of AspectJ ApplicationProceedings of the 2014 14th International Conference on Quality Software10.1109/QSIC.2014.34(27-36)Online publication date: 2-Oct-2014
    • (2013)Hierarchical concern-based pointcutsProceedings of the 8th international workshop on Advanced modularization techniques10.1145/2451469.2451476(19-22)Online publication date: 25-Mar-2013
    • (2013)A design rule language for aspect-oriented programmingJournal of Systems and Software10.1016/j.jss.2013.03.10486:9(2333-2356)Online publication date: 1-Sep-2013
    • 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

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media