skip to main content
research-article

A theory of aspects as latent topics

Published:19 October 2008Publication History
Skip Abstract Section

Abstract

After more than 10 years, Aspect-Oriented Programming (AOP) is still a controversial idea. While the concept of aspects appeals to everyone's intuitions, concrete AOP solutions often fail to convince researchers and practitioners alike. This discrepancy results in part from a lack of an adequate theory of aspects, which in turn leads to the development of AOP solutions that are useful in limited situations.

We propose a new theory of aspects that can be summarized as follows: concerns are latent topics that can be automatically extracted using statistical topic modeling techniques adapted to software. Software scattering and tangling can be measured precisely by the entropies of the underlying topic-over-files and files-over-topics distributions. Aspects are latent topics with high scattering entropy.

The theory is validated empirically on both the large scale, with a study of 4,632 Java projects, and the small scale, with a study of 5 individual projects. From these analyses, we identify two dozen topics that emerge as general-purpose aspects across multiple projects, as well as project-specific topics/concerns. The approach is also shown to produce results that are compatible with previous methods for identifying aspects, and also extends them.

Our work provides not only a concrete approach for identifying aspects at several scales in an unsupervised manner but, more importantly, a formulation of AOP grounded in information theory. The understanding of aspects under this new perspective makes additional progress toward the design of models and tools that facilitate software development.

References

  1. David Andrzejewski, Anne Mulhern, Ben Liblit, and Xiaojin Zhu. Statistical debugging using latent topic models. In Stan Matwin and Dunja Mladenic, editors, 18th European Conference on Machine Learning, Warsaw, Poland, September 17--21 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Sushil Bajracharya, Trung Ngo, Erik Linstead, Yimeng Dou, Paul Rigor, Pierre Baldi, and Cristina Lopes. Sourcerer: a search engine for open source code supporting structure--based search. In OOPSLA '06: Companion to the 21st ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 681--682, New York, NY, USA, 2006. ACM Press. ISBN 1-59593-491-X. http://doi.acm.org/10.1145/1176617.1176671. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Sushil Bajracharya, Trung Ngo, Erik Linstead, Yimeng Dou, Paul Rigor, Pierre Baldi, and Cristina Lopes. A study of ranking schemes in Internet-scale code search. Technical report, UCI Institute for Software Research, 2007.Google ScholarGoogle Scholar
  4. Elisa L. A. Baniassad, Paul C. Clements, Joao Araújo, Ana Moreira, Awais Rashid, and Bedir Tekinerdogan. Discovering early aspects. phIEEE Software, 23 (1): 61--70, 2006. URL http://doi.ieeecomputersociety.org/10.1109/MS.2006.8. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Ted J. Biggerstaff. Design recovery for maintenance and reuse. IEEE Computer, 22 (7): 36--49, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Ted J. Biggerstaff, Bharat G. Mitbander, and Dallas Webster. The concept assignment problem in program understanding. In ICSE '93: Proceedings of the 15th International Conference on Software Engineering, pages 482--498, Los Alamitos, CA, USA, 1993. IEEE Computer Society Press. ISBN 0-89791-588-7. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. David M. Blei, Andrew Y. Ng, and Michael I. Jordan. Latent dirichlet allocation. Journal of Machine Learning Research, 3: 993--1022, January 2003. URL http://jmlr.csail.mit.edu/papers/v3/blei03a.html. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Silvia Breu. Extending dynamic aspect mining with static information. In SCAM '05: Proceedings of the Fifth IEEE International Workshop on Source Code Analysis and Manipulation (SCAM'05), pages 57--65, Washington, DC, USA, 2005. IEEE Computer Society. ISBN 0-7695-2292-0. http://dx.doi.org/10.1109/SCAM.2005.9. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Silvia Breu and Thomas Zimmermann. Mining aspects from version history. In ASE '06: Proceedings of the 21st IEEE International Conference on Automated Software Engineering (ASE'06), pages 221--230, Washington, DC, USA, 2006. IEEE Computer Society. ISBN 0--7695--2579--2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. Bruntink, A. van Deursen, R. van Engelen, T. Tourwe. On the use of clone detection for identifying crosscutting concern code. IEEE Trans. Softw. Eng., 31 (10): 804--818, 2005. ISSN 0098-5589. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Nelio Cacho, Claudio Sant'Anna, Eduardo Figueiredo, Alessandro Garcia, Thais Batista, and Carlos Lucena. Composing design patterns: a scalability study of aspect-oriented programming. In AOSD '06: Proceedings of the 5th International Conference on Aspect-Oriented Software Development, pages 109--121, New York, NY, USA, 2006. ACM Press. ISBN 1-59593-300-X. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Gerardo Canfora and Luigi Cerulo. How crosscutting concerns evolve in jhotdraw. In STEP '05: Proceedings of the 13th IEEE International Workshop on Software Technology and Engineering Practice, pages 65--73, Washington, DC, USA, 2005. IEEE Computer Society. ISBN 0-7695-2639-X. http://dx.doi.org/10.1109/STEP.2005.13. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Gerardo Canfora, Luigi Cerulo, and Massimiliano Di Penta. On the use of line co-change for identifying crosscutting concern code. In ICSM '06: Proceedings of the 22nd IEEE International Conference on Software Maintenance, pages 213--222, Washington, DC, USA, 2006. IEEE Computer Society. ISBN 0-7695-2354-4. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. M. Ceccato, M. Marin, K. Mens, L. Moonen, P. Tonella, and T. Tourwe. A qualitative comparison of three aspect mining techniques. In IWPC '05: Proceedings of the 13th International Workshop on Program Comprehension, pages 13--22, Washington, DC, USA, 2005. IEEE Computer Society. ISBN 0-7695-2254-8. http://dx.doi.org/10.1109/WPC.2005.2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Siobhàn Clarke and Elisa Baniassad. Aspect-Oriented Analysis and Design. Addison-Wesley Professional, 2005. ISBN 0321246748. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Grigoreta Sofia Cojocar and Gabriela Şerban. On some criteria for comparing aspect mining techniques. In LATE '07: Proceedings of the 3rd Workshop on Linking Aspect Technology and Evolution, page 7, New York, NY, USA, 2007. ACM. ISBN 1-59593-655-4. http://doi.acm.org/10.1145/1275672.1275679. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Chuan Duan and Jane Cleland-Huang. A clustering technique for early detection of dominant and recessive cross-cutting concerns. In EARLYASPECTS '07: Proceedings of the Early Aspects at ICSE, page 1, Washington, DC, USA, 2007. IEEE Computer Society. ISBN 0-7695-2957-7. http://dx.doi.org/10.1109/EARLYASPECTS.2007.1. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Marc Eaddy, Alfred Aho, and Gail C. Murphy. Identifying, assigning, and quantifying crosscutting concerns. In ACoM '07: Proceedings of the First International Workshop on Assessment of Contemporary Modularization Techniques, page 2, Washington, DC, USA, 2007. IEEE Computer Society. ISBN 0-7695-2967-4. http://dx.doi.org/10.1109/ACOM.2007.4. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Marc Eaddy, Thomas Zimmermann, Kaitlin D. Sherwood, Vibhav Garg, Gail C. Murphy, Nachiappan Nagappan, and Alfred Aho. Do crosscutting concerns cause defects. IEEE Transactions on Software Engineering 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Fernando Castor Filho, Nelio Cacho, Eduardo Figueiredo, Raquel Maranhao, Alessandro Garcia, and Cecilia Mary F. Rubira. Exceptions and aspects: the devil is in the details. In SIGSOFT '06/FSE-14: Proceedings of the 14th ACM SIGSOFT International Symposium on Foundations of Software Engineering, pages 152--162, New York, NY, USA, 2006. ACM Press. ISBN 1-59593-468-5. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. B. Ganter and R. Wille. Formal Concept Analysis: Mathematical Foundations. Springer-Verlag, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Alessandro Garcia, Cláudio Sant'Anna, Eduardo Figueiredo, Uirá Kulesza, Carlos Lucena, and Arndt von Staa. Modularizing design patterns with aspects: a quantitative study. In AOSD '05: Proceedings of the 4th International Conference on Aspect-Oriented Software Development, pages 3--14, New York, NY, USA, 2005. ACM Press. ISBN 1-59593-042-6. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. William G. Griswold, Jimmy J. Yuan, and Yoshikiyo Kato. Exploiting the map metaphor in a tool for software evolution. In ICSE '01: Proceedings of the 23rd International Conference on Software Engineering, pages 265--274, Washington, DC, USA, 2001. IEEE Computer Society. ISBN 0-7695-1050-7. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. J. Hannemann and G. Kiczales. Overcoming the prevalent decomposition of legacy code. In Workshop Advanced Separation of Concerns, ICSE'01, 2001.Google ScholarGoogle Scholar
  25. Jan Hannemann and Gregor Kiczales. Design pattern implementation in java and aspectj. In OOPSLA '02: Proceedings of the 17th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 161--173, New York, NY, USA, 2002. ACM Press. ISBN 1-58113-471-1. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Shinji Kawaguchi, Pankaj K. Garg, Makoto Matsushita, and Katsuro Inoue. Mudablue: An automatic categorization system for open source repositories. In APSEC '04: Proceedings of the 11th Asia-Pacific Software Engineering Conference (APSEC'04), pages 184--193, Washington, DC, USA, 2004. IEEE Computer Society. ISBN 0-7695-2245-9. http://dx.doi.org/10.1109/APSEC.2004.69. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Andy Kellens, Kim Mens, and Paolo Tonella. A survey of automated code-level aspect mining techniques. In Transactions on Aspect-Oriented Software Development IV. Springer Berlin / Heidelberg, 2007. 10.1007/978-3-540-77042-8_6. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Gregor Kiczales, John Lamping, Anurag Mendhekar, Chris Maeda, Cristina Lopes, Jean-Marc Loingtier, and John Irwin. Aspect-oriented programming. In Mehmet Akcsit and Satoshi Matsuoka, editors, phEuropean Conference on Object-Oriented Programming, volume 1241 of phLNCS, pages 220--242. Springer Verlag, 1997.Google ScholarGoogle Scholar
  29. Gregor Kiczales, Erik Hilsdale, Jim Hugunin, Mik Kersten, Jeffrey Palm, and William 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. ISBN 3-540-42206-4. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Jorg Kienzle and Rachid Guerraoui. AOP: Does it make sense? the case of concurrency and failures. In ECOOP '02: Proceedings of the 16th European Conference on Object-Oriented Programming, pages 37--61, London, UK, 2002. Springer-Verlag. ISBN 3-540-43759-2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Lo Kwun Kit, Chan Kwun Man, and Elisa Baniassad. Isolating and relating concerns in requirements using latent semantic analysis. SIGPLAN Not., 41 (10): 383--396, 2006. ISSN 0362-1340. http://doi.acm.org/10.1145/1167515.1167506. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Adrian Kuhn, Stephane Ducasse, and Tudor Girba. Semantic clustering: Identifying topics in source code. phInformation and Software Technology, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Uira Kulesza, Claudio Sant'Anna, Alessandro Garcia, Roberta Coelho, Arndt von Staa, and Carlos Lucena. Quantifying the effects of aspect-oriented programming: A maintenance study. In ICSM '06: Proceedings of the 22nd IEEE International Conference on Software Maintenance, pages 223--233, Washington, DC, USA, 2006. IEEE Computer Society. ISBN 0-7695-2354-4. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Erik Linstead, Paul Rigor, Sushil Bajracharya, Cristina Lopes, and Pierre Baldi. Mining eclipse developer contributions via author-topic models. MSR 2007: Proceedings of the Fourth International Workshop on Mining Software Repositories, 0: 30, 2007. http://doi.ieeecomputersociety.org/10.1109/MSR.2007.20. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Erik Linstead, Paul Rigor, Sushil Bajracharya, Cristina Lopes, and Pierre Baldi. Mining internet-scale software repositories. NIPS 2007: Advances in Neural Information Processing Systems 20, 0, 2008.Google ScholarGoogle Scholar
  36. Martin Lippert and Cristina Videira Lopes. A study on exception detection and handling using aspect-oriented programming. In International Conference Software Engineering. ACM Press, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Cristina Videira Lopes. AOP: A historical perspective (what's in a name?). In Robert Filman, Tzilla Elrad, Siobhan Clarke, and Mehmet Aksit, editors, Aspect-Oriented Software Development, chapter 5, pages 97--122. Addison Wesley, 2004.Google ScholarGoogle Scholar
  38. Cristina Videira Lopes and Sushil Krishna Bajracharya. Assessing aspect modularizations using design structure matrix and net option value. Transactions on Aspect-Oriented Software Development, 1: 1--35, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Andrian Marcus, Andrey Sergeyev, Vaclav Rajlich, and Jonathan Maletic. An information retrieval approach to concept location in source code. In Proceedings of the 11th Working Conference on Reverse Engineering (WCRE 2004), pages 214--223, November 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Marius Marin, Arie van Deursen, and Leon Moonen. Identifying aspects using fan--in analysis. In WCRE '04: Proceedings of the 11th Working Conference on Reverse Engineering (WCRE'04), pages 132--141, Washington, DC, USA, 2004. IEEE Computer Society. ISBN 0-7695-2243-2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Shawn Minto and Gail C. Murphy. Recommending emergent teams. In MSR '07: Proceedings of the Fourth International Workshop on Mining Software Repositories, page 5, Washington, DC, USA, 2007. IEEE Computer Society. ISBN 0-7695-2950-X. http://dx.doi.org/10.1109/MSR.2007.27. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Gail Murphy, Robert Walker, and Elisa Baniassad. Evaluating emerging software development technologies: Lessons learned from assessing aspect-oriented programming. IEEE Transactions on Software Engineering, 25 (4): 435--455, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Martin P. Robillard and Gail C. Murphy. Representing concerns in source code. ACM Trans. Softw. Eng. Methodol., 16 (1): 3, 2007. ISSN 1049-331X. http://doi.acm.org/10.1145/1189748.1189751. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. M.R. Robillard and G.C. Murphy. Concern graphs: finding and describing concerns using structural program dependencies. In ICSE 2002. Proceedings of the 24th International Conference on Software Engineering, pages 406--416, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. David Shepherd, Jeffrey Palm, Lori Pollock, and Mark Chu-Carroll. Timna: a framework for automatically combining aspect mining analyses. In ASE '05: Proceedings of the 20th IEEE/ACM International Conference on Automated Software Engineering, pages 184--193, New York, NY, USA, 2005. ACM Press. ISBN 1-59593-993-4. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. David Shepherd, Lori Pollock, and Tom Tourwé. Using language clues to discover crosscutting concerns. In MACS '05: Proceedings of the 2005 Workshop on Modeling and Analysis of Concerns in Software, pages 1--6, New York, NY, USA, 2005. ACM Press. ISBN 1-59593-119-8. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Paolo Tonella and Mariano Ceccato. Aspect mining through the formal concept analysis of execution traces. In WCRE '04: Proceedings of the 11th Working Conference on Reverse Engineering (WCRE'04), pages 112--121, Washington, DC, USA, 2004. IEEE Computer Society. ISBN 0-7695-2243-2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Claire Tristram. Untangling code. MIT Technology Review: Ten Emerging technologies that will change the world, February 2001.Google ScholarGoogle Scholar
  49. S. Ugurel, R. Krovetz, and C. L. Giles. What's the code?: automatic classification of source code archives. In KDD '02: Proceedings of the Eighth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 632--638, New York, NY, USA, 2002. ACM Press. ISBN 1-58113-567-X. http://doi.acm.org/10.1145/775047.775141. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. Robert Walker, Elisa Baniassad, and Gail Murphy. An initial assessment of aspect-oriented programming. In International Conference Software Engineering. IEEE Computer Society Press, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. Carl Zetie. Aspect-oriented programming considered harmful. Forrester Research, April 2005.Google ScholarGoogle Scholar
  52. Charles Zhang and Hans-Arno Jacobsen. Efficiently mining crosscutting concerns through random walks. In Aspect-Oriented Software Development (AOSD'07), March 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A theory of aspects as latent topics

    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 43, Issue 10
      September 2008
      613 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/1449955
      Issue’s Table of Contents
      • cover image ACM Conferences
        OOPSLA '08: Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications
        October 2008
        654 pages
        ISBN:9781605582153
        DOI:10.1145/1449764

      Copyright © 2008 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 19 October 2008

      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!