Aspect-oriented software presents new challenges for the designers of static analyses. Our work aims to establish systematic foundations for dataflow analysis of AspectJ software. We propose a control- and data-flow program representation for AspectJ programs, as basis for subsequent interprocedural dataflow analyses. The representation is built at the source code level and captures the semantic intricacies of various pointcut designators, multiple applicable advices per joint point, dynamic advices, and general flow of data to, from, and between advices.
We also propose two dataflow analyses for AspectJ software: (1) a novel object effect analysis based on a flow- and context-sensitive must-alias analysis, and (2) a dependence analysis used for constructing the system dependence graph for slicing, refactoring, change impact analysis, etc. Both analyses are representative of a general category of dataflow analyses referred to as interprocedural distributed environment (IDE) problems. The two analyses are built on top of the proposed representation, and take into account the complex flow of control and data due to aspect-oriented features. We present a study of the proposed techniques on 37 program versions, using our AJANA analysis framework which is based on the abc AspectJ compiler. The results show that the representation can be built efficiently, that it is superior to an approach based on the woven bytecode, and that it enables analyses that are both faster and more precise. These findings strongly indicate that the proposed approach is a promising candidate for a foundation upon which various interprocedural analyses for AspectJ can be designed and built.
This section shows how to use AJANA framework.
Example: if the bytecode of a project dcm is located at directory
,the command line args that you need to give are the follows,
/home/gxu/projects/dcm dcm v1 certrevsim.Simulator 0
, and then invoking method
. The AJIG control flow and data flow representations are described precisely in our ICSE'07 and AOSD'08 papers, respectively.
method build in analysis.aspectj.summary.SummaryAnalysis
for the example of manipulating AJIG.
You can contribute to AJANA by sending bug reports, code patches, and suggestions. Please send your inquiries to xug at cse dot ohio-state dot edu.
We thank all of the developers of the abc AspectJ compiler, without whom the research would not happen.
Last updated: March 8, 2009