A unit testing approach for AspectJ programs is proposed to separately test aspect units which have their own states. In the approach, aspects under test are converted to classes before execution of unit testing. In t...A unit testing approach for AspectJ programs is proposed to separately test aspect units which have their own states. In the approach, aspects under test are converted to classes before execution of unit testing. In the conversion process, the context information passed through pointcut is transformed into advices, then the advices are converted to class member methods, and conflicts in the conversion result, if any, are resolved finally. The unit testing process consists of generating test cases, executing test cases and checking results.展开更多
Points-to analysis is a static code analysis tech- nique that establishes the relationships between variables of references and allocated objects. A number of points-to analysis algorithms have been proposed for proce...Points-to analysis is a static code analysis tech- nique that establishes the relationships between variables of references and allocated objects. A number of points-to analysis algorithms have been proposed for procedural and object-oriented languages like C and Java, while few of them can be used for AspectJ as we know so far. One main rea- son is that Aspect/is an aspect-oriented language which im- plements the separation of crosscutting concerns by advices, pointcuts, and inter-type declarations, while a points-to anal- ysis of AspectJ programs may be imprecise because any as- pect woven into the base code may change the points-to rela- tions in the program and thus a conservative analysis has to be taken in order to handle the aspects. In this paper, we pro- pose a context-sensitive points-to analysis technique called AJPoints for AspectJ. Similar to the weaving mechanism for AspectJ, AJPoints obtains the constraints and templates on the points-to relations for the base code and the aspects, re- spectively, but weaves and solves them in an iterative manner in order to cross the boundary between the base code and the aspects. We have implemented AJPoints on abc AspectJ compiler and evaluated it by using twelve AspectJ benchmark programs. The experimental can achieve a high precision pectJ programs. results show that our technique about points-to relations in As-展开更多
文摘A unit testing approach for AspectJ programs is proposed to separately test aspect units which have their own states. In the approach, aspects under test are converted to classes before execution of unit testing. In the conversion process, the context information passed through pointcut is transformed into advices, then the advices are converted to class member methods, and conflicts in the conversion result, if any, are resolved finally. The unit testing process consists of generating test cases, executing test cases and checking results.
文摘Points-to analysis is a static code analysis tech- nique that establishes the relationships between variables of references and allocated objects. A number of points-to analysis algorithms have been proposed for procedural and object-oriented languages like C and Java, while few of them can be used for AspectJ as we know so far. One main rea- son is that Aspect/is an aspect-oriented language which im- plements the separation of crosscutting concerns by advices, pointcuts, and inter-type declarations, while a points-to anal- ysis of AspectJ programs may be imprecise because any as- pect woven into the base code may change the points-to rela- tions in the program and thus a conservative analysis has to be taken in order to handle the aspects. In this paper, we pro- pose a context-sensitive points-to analysis technique called AJPoints for AspectJ. Similar to the weaving mechanism for AspectJ, AJPoints obtains the constraints and templates on the points-to relations for the base code and the aspects, re- spectively, but weaves and solves them in an iterative manner in order to cross the boundary between the base code and the aspects. We have implemented AJPoints on abc AspectJ compiler and evaluated it by using twelve AspectJ benchmark programs. The experimental can achieve a high precision pectJ programs. results show that our technique about points-to relations in As-