skip to main content
research-article

Extending AspectJ for separating regions

Published:04 October 2009Publication History
Skip Abstract Section

Abstract

Synchronization is a good candidate for an aspect in aspect-oriented programming (AOP) since programmers have to choose the best granularity of synchronization for the underlying hardware to obtain the best execution performance. If synchronization is an aspect, programmers can change the synchronization code independently of the rest of the program when the program runs on different hardware. However, existing AOP languages such as AspectJ have problems. They cannot select an arbitrary code region as a join point. Moreover, they cannot enforce weaving of a synchronization aspect. Since it is an alternative feature in feature modeling, at least one of available synchronization aspects must be woven. Otherwise, the program would be thread-unsafe. Since an aspect in AspectJ is inherently optional, programmers must be responsible for weaving it. To solve these problems, this paper proposes two new constructs for AspectJ, regioncut and assertions for advice. Regioncut selects arbitrary code region as a join point and assertion for advice enforces weaving a mandatory advice. We implemented these constructs by extending the AspectBench compiler. We evaluated the design of our constructs by applying them to two open-source software products, Javassist and Hadoop.

References

  1. {#jassist-28} javassist enhancement failed on deserializing hibernate proxies - jboss.org jira. http://jira.jboss.org/jira/browse/JASSIST-28.Google ScholarGoogle Scholar
  2. 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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. S. Apel and D. Batory. When to use features and aspects?: a case study. In GPCE '06: Proceedings of the 5th international conference on Generative programming and component engineering, pages 59--68, New York, NY, USA, 2006. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, J. Lhotak, O. Lhotak, 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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. D. Batory, J. N. Sarvela, and A. Rauschmayer. Scaling step-wise refinement. In ICSE '03: Proceedings of the 25th International Conference on Software Engineering, pages 187--197, Washington, DC, USA, 2003. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. N. Cacho, F. C. Filho, A. Garcia, and E. Figueiredo. Ejflow: taming exceptional control flows in aspect-oriented programming. In AOSD '08: Proceedings of the 7th international conference on Aspect-oriented software development, pages 72--83, New York, NY, USA, 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. S. Chiba. Load-time structural reflection in java. In ECOOP '00: Proceedings of the 14th European Conference on Object-Oriented Programming, pages 313--336, London, UK, 2000. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. J. Dean and S. Ghemawat. Mapreduce: simplified data processing on large clusters. In OSDI'04: Proceedings of the 6th conference on Symposium on Opearting Systems Design&Implementation, pages 10--10, Berkeley, CA, USA, 2004. USENIX Association. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. T. Ekman and G. Hedin. The jastadd extensible java compiler. In OOPSLA '07: Companion to the 22nd ACM SIGPLAN conference on Object-oriented programming systems and applications companion, pages 884--885, New York, NY, USA, 2007. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. R. E. Filman and D. P. Friedman. Aspect-oriented programming is quantification and obliviousness. In Aspect-Oriented Software Development, pages 21--35. Addison-Wesley, 2005.Google ScholarGoogle Scholar
  11. B. Harbulot and J. R. Gurd. A join point for loops in aspectj. In AOSD '06: Proceedings of the 5th international conference on Aspect-oriented software development, pages 63--74, New York, NY, USA, 2006. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. G. Hedin and E. Magnusson. Jastadd: an aspect-oriented compiler construction system. Sci. Comput. Program., 47(1):37--58, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. K. C. Kang, S. G. Cohen, J. A. Hess,W. E. Novak, and A. S. Peterson. Feature-oriented domain analysis (foda) feasibility study. Technical report, Carnegie-Mellon University Software Engineering Institute, November 1990.Google ScholarGoogle Scholar
  14. K. C. Kang, S. Kim, J. Lee, K. Kim, G. J. Kim, and E. Shin. Form: A feature-oriented reuse method with domain-specific reference architectures. Annals of Software Engineering, 5:143--168, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. G. Kiczales, E. Hilsdale, J. Hugunin, M. Kersten, J. Palm, and W. G. Griswold. An overview of aspectj. In ECOOP '01: Proceedings of the 15th European Conference on Object-Oriented Programming, pages 327--353, London, UK, 2001. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. K. Klose and K. Ostermann. Back to the future: Pointcuts as predicates over traces. In FOAL 2005: Foundations of Aspect-Oriented Languages 2005. ACM, 2005.Google ScholarGoogle Scholar
  17. K. Kourai, H. Hibino, and S. Chiba. Aspect-oriented application-level scheduling for j2ee servers. In AOSD '07: Proceedings of the 6th international conference on Aspect-oriented software development, pages 1--13, New York, NY, USA, 2007. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. H. Masuhara, G. Kiczales, and C. Dutchyn. Compilation semantics of aspect-oriented programs. In FOAL 2002: Foundations Of Aspect-Oriented Languages - Workshop at AOSD 2002 -. ACM, 2002.Google ScholarGoogle Scholar
  19. M. Stoerzer and J. Graf. Using pointcut delta analysis to support evolution of aspect-oriented software. In ICSM'05: Proceedings of the 21st IEEE International Conference on Software Maintenance, pages 653--656, Washington, DC, USA, 2005. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. The Apache Software Foundation. Welcome to apache hadoop! http://hadoop.apache.org/.Google ScholarGoogle Scholar
  21. R. Vallee-Rai, P. Co, E. Gagnon, L. Hendren, P. Lam, and V. Sundaresan. Soot - a java bytecode optimization framework. In CASCON '99: Proceedings of the 1999 conference of the Centre for Advanced Studies on Collaborative research, page 13. IBM Press, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. R. J. Walker and K. Viggers. Implementing protocols via declarative event patterns. In SIGSOFT '04/FSE-12: Proceedings of the 12th ACM SIGSOFT twelfth international symposium on Foundations of software engineering, pages 159--169, New York, NY, USA, 2004. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. C. Xi, B. Harbulot, and J. R. Gurd. A synchronized block join point for aspectj. In FOAL '08: Proceedings of the 7th workshop on Foundations of aspect-oriented languages, pages 39--39, New York, NY, USA, 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. C. Xi, B. Harbulot, and J. R. Gurd. Aspect-oriented support for synchronization in parallel computing. In PLATE '09: Proceedings of the 1st workshop on Linking aspect technology and evolution, pages 1--5, New York, NY, USA, 2009. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. C. Zhang. Flexsync: An aspect-oriented approach to java synchronization. In ICSE '09: Proceedings of the 2009 IEEE 31st International Conference on Software Engineering, pages 375--385, Washington, DC, USA, 2009. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Extending AspectJ for separating regions

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • 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

      Copyright © 2009 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 4 October 2009

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!