Detecting Change Patterns in Aspect Oriented Software Evolution: Rule-based Repository Analysis

Hanene Cherait, Nora Bounour
2014 International Journal of Software Engineering and Its Applications  
Interesting information and Meta-information about software systems can be extracted by analyzing their evolution histories. This information has been proved useful for understanding software evolution, predicting future changes, and performing an efficient change impact analysis. A rich source code repository is a prerequisite for a high quality evolution analysis. Nonetheless, the evolutionary information contained in current versioning systems for Aspect Oriented (AO) software is incomplete
more » ... nd of low quality, hence limiting the scope of AO software evolution analysis. In spite of AO Programming (AOP) characteristics, none of current versioning tools match the need of controlling and storing the AO software evolution, they do not perform well with obliviousness and quantification found in AO code. In this paper, we suggest a rule-based repository for AO software evolution, and specifically for AspectJ programming language. This repository is dedicated to handle the proper characteristics of AO paradigm. In our proposal changes are formulated as rewriting rules and recorded in the repository when they are applied. Then, this last is analyzed to detect change patterns in AspectJ software evolution. We give here, the details of our rulebased repository, as well as the proposed approach for change pattern detection. We present a tool validation and some experimentation to prove the feasibility and the efficiency of our proposals. Projects Using AOSD highlights notable applications of AOSD, of which the most prominent is the IBM WebSphere Application Server [9] . One of the main challenges of AOP lies in the evolution of the software, so techniques and approaches are essential to analyze the evolution of such systems; in order to study and predict its development. Since, large amount of techniques is presented in the literature, to analyze the evolution of different programming paradigms (e.g., procedural, object oriented etc.,), seldom effort has been made for AO paradigm. AOP [23] is a technique for modularizing crosscutting concerns. AspectJ [32] is a wellestablished AOP language. It is the original and still the best implementation of AOP. AspectJ provides a new kind of modules, called aspects that allow one to modularize the implementation of crosscutting concerns which would otherwise be spread across various modules. This is done in terms of join points, pointcuts, advices, and introductions. They define precisely how behavioral and structural crosscutting has to take place. Join points represent well-defined points in the execution of a program, such as method calls, object field accesses and so on. After we identify join points useful for a crosscutting functionality, we need to select them using the pointcut construct. Pointcut is a construct that picks out a set of join points based on given criteria, such as method names and so on. AspectJ defines several primitive pointcut designators that can identify all types of join points. Advice defines additional code to be executed whenever a join point selected by a particular pointcut is reached. An advice can execute before, after, or around the join point. Finally, introductions are used to crosscut the static type structure of classes. They can be used by an aspect to add new fields, constructors, or methods (even with bodies) into given interfaces or classes. AOP is characterized by obliviousness and quantification. Obliviousness states that one cannot know whether the aspect code will execute by examining the body of the base code [15] i.e., the system code should be unaware to any aspects. Since the quantification is the idea that one can write an aspect that can affect arbitrarily many non-local places in a program [29] . These characteristics make AO software versioning a serious problem, current versioning systems unable to handle the crosscutting nature of AOP. Consequently, their repositories are not a good source of information for an efficient AO software evolution analysis. In this paper, we suggest a rule-based repository for AspectJ software to store the maximal amount of information about its evolution, taking into account the proper characteristics of AOP. In our proposal, we treat change as a first class entity. In contrast to the file-based nature of classic versioning systems, we believe that changebased principle can present the complete view of AO software evolution i.e. "the fundamental unit of software evolution is the source code change, all other information is maintained to help understand, rationalize, and manage source code changes" [ 21] . Practically, we use the program representation presented in our previous work [7], where, the AspectJ program is converted to an attributed colored graph. And, changes are formulated as rewriting rules on the proposed program graph. Every applied rewrite rule is stored directly in our proposed rule-based repository. In this last, every version of the software (graph) is the set of rewrite rule sequences, where, every rewrite rule sequence presents a specific change request. Besides, in order to analyze our proposed repository we suggest a change pattern detection approach to identify change patterns in AspectJ program evolution. So, the rule-based repository is investigated (Mined) to detect rule patterns using the Apriori algorithm [1] . Since these rules are the formulation of source code changes, we believe that our approach allows detecting change patterns in AspectJ source code. These patterns can be used to understand AO software evolution, predict future changes,
doi:10.14257/ijseia.2014.8.1.22 fatcat:4u2hyqvvyvd6laiucyzd5cubpy