Maintenance Support for Aspect-Oriented Programs - Semantic Scholar

6 downloads 10173 Views 32KB Size Report
though the importance of program comprehension and soft- ware maintenance is ... business logic of the software, and aspect code, which con- centrates on ...
Maintenance Support for Aspect-Oriented Programs: Opportunities and Challenges Jianjun Zhao School of Software Shanghai Jiao Tong University 800 Dongchuan Road, Shanghai 200240, China [email protected]

1

Introduction

Aspect-oriented programming (AOP) [1, 4, 5, 10] has been proposed as a technique for improving the separation of concerns in software design and implementation. AOP provides explicit mechanisms for capturing the structure of crosscutting aspects of the computation such as exception handling, synchronization, performance optimizations, and resource sharing. Because these aspects crosscut the dominant problem decomposition, they are usually difficult to express cleanly using standard languages and structuring techniques. AOP can eliminate the code tangling often associated with the use of such standard languages and techniques, making the program easier to develop, maintain, and evolve. The field of AOP has, so far, focused primarily on problem analysis, language design, and implementation. Even though the importance of program comprehension and software maintenance is known, it has received little attention in the AO paradigm. AOP languages present unique opportunities and challenges for program comprehension and software maintenance community. An AO program is typically composed by two parts: base code, which concentrates on the main business logic of the software, and aspect code, which concentrates on universal requirements that crosscut the base code. When compiling the program, the aspect code will be woven into the base code in the phase of weaving [3]. Because of weaving mechanism, AOP languages are different largely from procedural or object-oriented languages. In order to support program comprehension and software maintenance tasks, new analysis and testing techniques are strongly needed for AO software. We believe that many program comprehension and software maintenance techniques which have been well developed for procedural and object-oriented programming languages are applicable, with more or less modification, to AOP languages. For example, many program comprehension and software maintenance techniques for procedural or object-oriented programming languages rely on control flow and data flow information, which is typically gathered

by the control flow and data flow analysis and represented by a call graph, a control-flow graph (CFG), or a program dependence graph (PDG).

2

Open Research Issues

To support the comprehension and maintenance of AO software, several open research issues should be addressed, which include: • How do we develop some program representations for modeling the control and data flows in AO programs? • How do we develop some static and dynamic analysis techniques to support analyzing the behavior of an AO program? • How do we develop testing techniques, especially regression testing techniques for AO programs? • How do we develop some debugging tools for AO programs? • How do we have some metrics for measuring the maintainability of AO systems?

3

Work in Progress

Encouragingly, work is emerging in examining different approaches to the open research issues mentioned in Section 2. Recently, several researchers consider the control and data flow analysis for AO programs. Sereni and de Moor [7] propose a simple call graph for AO programs without considering more detailed control flow analysis. Rinard et al. [6] propose a control flow graph in the classification system for AO programs. Other approaches, which provide partial solutions for analyzing control flows in AO programs, have been proposed by Zhao [16], Xu and Rountev [11], and Bernardi and Lucca [2]. Moreover, Zhao and Rinard [15,17] define the system dependence graphs for AO programs for slicing, and Xu and Rountev [12] extend this

work by handling more complex situations such as multiple advices with a join point and dynamic advices in AO programs. Change impact analysis is a useful technique for software maintenance. Zhao [14] presents an approach to supporting change impact analysis of AO programs based on program slicing. Stoerzer and Graf [9] focus on the semantic modification of base code and introduce a delta analysis to deal with the fragile pointcut problem, based on a comparison of the sets of matched join points for two program versions. Shinomi and Tamai [8] discuss the impact analysis of aspect weaving and its propagation through the base program and aspects. They focus on the change impact caused by the weaving aspect. Recently, Zhang et al. [13] present the atomic changes for aspect-related constructs to capture program semantic changes in the source code level. Their change impact model can be used to determine the affected program parts, affected tests and their responsible changes effectively. Regression testing is another useful technique for software maintenance. Regression testing of AO programs has been studied by Xu and Rountev [11] and Zhao et al. [18].

4

Conclusion

We discussed some open research issues that should be addressed in the comprehension and maintenance of AO software, and gave a brief overview of the work in progress in this area. Some research results are quite encouraging, but many work still needs to be done to support the maintenance of AO software.

Acknowledgements This work was supported in part by National High Technology Development Program of China (Grant No. 2006AA01Z158), National Natural Science Foundation of China (NSFC) (Grant No. 60673120), and Shanghai Pujiang Program (Grant No. 07pj14058). We would like to thank members of Software Theory and Practice (STAP) Group at Shanghai Jiao Tong University for their discussions on this topic.

Biography Jianjun Zhao is a professor at Shanghai Jiao Tong University since 2005. He was a co-organizer of several workshops including Asian Workshop on Aspect-Oriented Software Development (2005-2008). He was also served on program committees of International Conference on Aspect-Oriented Software Development (2003-2005). His research interests include software engineering and program analysis, with emphases on the application of program analysis techniques to problems in program comprehension, software maintenance, software testing, debugging, and aspectoriented software development. He received a B.E. in Computer Science from Tsinghua University in 1987, and a Ph.D. in Computer Science from Kyushu University in 1997. Prior to joining Shanghai Jiao Tong University, he was employed as an Associate Professor in Computer Science at Fukuoka Institute of Technology.

References [1] L. Bergmans and M. Aksits. Composing crosscutting concerns using composition filters. Commun. ACM, 44(10):51– 57, 2001. [2] M. L. Bernardi and G. A. D. Lucca. An interprocedural aspect control flow graph to support the maintenance of aspect oriented systems. In Proc. of ICSM ’07, pages 435–444, 2007. [3] E. Hilsdale and J. Hugunin. Advice weaving in AspectJ. In Proc. of AOSD ’06, pages 26–35, 2006. [4] G. Kiczales, J. Lamping, A. Menhdhekar, C. Maeda, C. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-oriented programming. In Proc. of ECOOP ’97, pages 220–242, 1997. [5] K. Lieberherr, D. Orleans, and J. Ovlinger. Aspect-oriented programming with adaptive methods. Commun. ACM, 44(10):39–41, 2001. [6] M. Rinard, A. Salcianu, and S. Bugrara. A classification system and analysis for aspect-oriented programs. ACM SIGSOFT Software Engineering Notes, 29(6):147–158, 2004. [7] D. Sereni and O. de Moor. Static analysis of aspects. In Proc. of AOSD ’05, pages 30–39, 2005. [8] H. Shinomi and T. Tamai. Impact analysis of weaving in aspect-oriented programming. In Proc. 21st IEEE International Conference on Software Maintenance (ICSM’05), pages 657–660, 2005. [9] M. Stoerzer and J. Graf. Using pointcut delta analysis to support evolution of aspect-oriented software. In Proc. 21st IEEE International Conference on Software Maintenance, pages 653–656, Washington, DC, USA, 2005. IEEE Computer Society. [10] P. Tarr, H. Ossher, W. Harrison, and J. Stanley M. Sutton. N degrees of separation: multi-dimensional separation of concerns. In Proc. 21st International Conference on Software Engineering, pages 107–119, 1999. [11] G. Xu and A. Rountev. Regression test selection for AspectJ software. In Proc. of ICSE ’07, pages 65–74, 2007. [12] G. Xu and A. Rountev. AJANA: A general framework for source-code-level interprocedural dataflow analysis of AspectJ software. In Proc. International Conference on AspectOriented Software Development (AOSD’08), pages 36–47, Brussels, Belgium, 2008. [13] S. Zhang, Z. Gu, Y. Lin, and J. Zhao. Change impact analysis of AspectJ programs. In Proc. 24st IEEE International Conference on Software Maintenance, Beijing, China, 2008. IEEE Computer Society. [14] J. Zhao. Change impact analysis for aspect-oriented software evolution. In Proc. 5th International Workshop on Principles of Software Evolution, pages 108–112, May 2002. [15] J. Zhao. Slicing aspect-oriented software. In Proc. 10th IEEE International Workshop on Program Comprehension (IWPC’2002), pages 251–260, 2002. [16] J. Zhao. Control-flow analysis and representation for aspectoriented programs. In Proc. of the Sixth International Conference on Quality Software, pages 38–48, 2004. [17] J. Zhao and M. Rinard. System dependence graph construction for aspect-oriented programs. Technical Report Technical Report MIT-LCS-TR-891, Laboratory for Computer Science, MIT, March 2003. [18] J. Zhao, T. Xie, and N. Li. Towards regression test selection for AspectJ programs. In Proc. of the 2nd Workshop on Testing Aspect-Oriented Programs.

Suggest Documents