ABSTRACT
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 inter-procedural analyses for AspectJ can be designed and built.
- AspectBench Compiler. abc.comlab.ox.ac.uk.Google Scholar
- AspectJ Compiler. www.aspectj.org.Google Scholar
- P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, J. Lhoták, O. Lhoták, O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble. Building the abc AspectJ compiler with Polyglot and Soot. Technical Report abc-2004-4, abc Group, Dec. 2004.Google Scholar
- P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, J. Lhoták, O. Lhoták, O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble. abc: An extensible AspectJ compiler. In AOSD, pages 87--98, 2005. Google ScholarDigital Library
- P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, J. Lhoták, O. Lhoták, O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble. Optimising AspectJ. In PLDI, pages 117--128, 2005. Google ScholarDigital Library
- P. Avgustinov, E. Hajiyev, N. Ongkingco, O. de Moor, D. Sereni, J. Tibble, and M. Verbaere. Semantics of static pointcuts in AspectJ. In POPL, pages 11--23, 2007. Google ScholarDigital Library
- D. Callahan. The program summary graph and flow-sensitive interprocedural data flow analysis. In PLDI, pages 47--56, 1988. Google ScholarDigital Library
- S. Cherem, L. Princehouse, and R. Rugina. Practical memory leak detection using guarded value-flow analysis. In PLDI, pages 480--491, 2007. Google ScholarDigital Library
- M. Das, S. Lerner, and M. Seigle. ESP: Path-sensitive program verification in polynomial time. In PLDI, pages 57--68, 2002. Google ScholarDigital Library
- R. DeLine and M. Fähndrich. Typestates for objects. In ECOOP, LNCS 3086, pages 465--490, 2004.Google Scholar
- N. Dor, S. Adams, M. Das, and Z. Yang. Software validation via scalable path-sensitive value flow analysis. In ISSTA, pages 12--22, 2004. Google ScholarDigital Library
- B. Dufour, C. Goard, L. Hendren, O. de Moor, G. Sittampalam, and C. Verbrugge. Measuring the dynamic behaviour of AspectJ programs. In OOPSLA, pages 150--169, 2004. Google ScholarDigital Library
- S. Fink, E. Yahav, N. Dor, G. Ramalingam, and E. Geay. Effective typestate verification in the presence of aliasing. In ISSTA, pages 133--144, 2006. Google ScholarDigital Library
- D. Grove and C. Chambers. A framework for call graph construction algorithms. TOPLAS, 23(6):685--746, Nov. 2001. Google ScholarDigital Library
- N. Heintze. Set Based Program Analysis. PhD thesis, Carnegie Mellon University, 1992. Google ScholarDigital Library
- S. Horwitz, T. Reps, and D. Binkley. Interprocedural slicing using dependence graphs. TOPLAS, 12(1):26--60, 1990. Google ScholarDigital Library
- T. Ishio, S. Kusumoto, and K. Inoue. Debugging support for aspect-oriented program based on program slicing and call graph. In ICSM, pages 178--187, 2004. Google ScholarDigital Library
- G. Kiczales, E. Hilsdale, J. Hugunin, M. Kersten, J. Palm, and W. Griswold. An overview of AspectJ. In ECOOP, LNCS 2072, pages 327--353, 2001. Google ScholarDigital Library
- L. Larsen and M. J. Harrold. Slicing object-oriented software. In ICSE, pages 495--505, 1996. Google ScholarDigital Library
- R. Manevich, M. Sridharan, S. Adams, M. Das, and Z. Yang. PSE: Explaining program failures via postmortem static analysis. In FSE, pages 63--72, 2004. Google ScholarDigital Library
- T. Marlowe and B. G. Ryder. Properties of data flow frameworks: A unified model. Acta Informatica, 28:121--163, 1990. Google ScholarDigital Library
- T. Reps, M. Sagiv, and S. Horwitz. Interprocedural dataflow analysis via graph reachability. Technical Report DIKU-TR94-14, University of Copenhagen, Apr. 1994.Google Scholar
- M. Rinard, A. Salcianu, and S. Bugrara. A classification system and analysis for aspect-oriented programs. In FSE, pages 147--158, 2004. Google ScholarDigital Library
- A. Rountev and B. H. Connell. Object naming analysis for reverse-engineered sequence diagrams. In ICSE, pages 254--263, 2005. Google ScholarDigital Library
- M. Sagiv, T. Reps, and S. Horwitz. Precise interprocedural dataflow analysis with applications to constant propagation. Theoretical Computer Science, 167(1--2):131--170, 1996. Google ScholarDigital Library
- M. Sharir and A. Pnueli. Two approaches to interprocedural data flow analysis. In S. Muchnick and N. Jones, editors, Program Flow Analysis: Theory and Applications, pages 189--234. Prentice Hall, 1981.Google Scholar
- S. Sinha, M. J. Harrold, and G. Rothermel. System-dependence-graph-based slicing of programs with arbitrary interprocedural control flow. In ICSE, pages 432--441, 1999. Google ScholarDigital Library
- http://www.sable.mcgill.ca/soot.Google Scholar
- F. Tip. A survey of program slicing techniques. Journal of Programming Languages, 3:121--189, 1995.Google Scholar
- F. Tip and J. Palsberg. Scalable propagation-based call graph construction algorithms. In OOPSLA, pages 281--293, 2000. Google ScholarDigital Library
- J. Whaley and M. Rinard. Compositional pointer and escape analysis for Java programs. In OOPSLA, pages 187--206, 1999. Google ScholarDigital Library
- T. Xie and J. Zhao. A framework and tool supports for generating test inputs of AspectJ programs. In AOSD, pages 190--201, 2006. Google ScholarDigital Library
- G. Xu and A. Rountev. Regression test selection for AspectJ software. In ICSE, pages 65--74, 2007. Google ScholarDigital Library
- J. Zhao. Change impact analysis for aspect-oriented software evolution. In International Workshop on Principles of Software Evolution, pages 108--112, 2002. Google ScholarDigital Library
- J. Zhao. Slicing aspect-oriented software. In IEEE International Workshop on Program Comprehension, pages 251--260, 2002. Google ScholarDigital Library
- J. Zhao. Data-flow-based unit testing of aspect-oriented programs. In International Computer Software and Applications Conference, page 188, 2003. Google ScholarDigital Library
- J. Zhao and M. Rinard. System dependence graph construction for aspect-oriented programs. In MIT-LCS-TR-891, 2003.Google Scholar
Index Terms
- AJANA: a general framework for source-code-level interprocedural dataflow analysis of AspectJ software
Recommendations
Interprocedural pointer alias analysis
We present practical approximation methods for computing and representing interprocedural aliases for a program written in a language that includes pointers, reference parameters, and recursion. We present the following contributions: (1) a framework ...
Precise and efficient integration of interprocedural alias information into data-flow analysis
Data-flow analysis is a basis for program optimization and parallelizing transformations. The mechanism of passing reference parameters at call sites generates interprocedural aliases which complicate this analysis. Solutions have been developed for ...
Precise flow-insensitive may-alias analysis is NP-hard
Determining aliases is one of the foundamental static analysis problems, in part because the precision with which this problem is solved can affect the precision of other analyses such as live variables, available expressions, and constant propagation. ...
Comments