摘要
面向方面编程AOP(Aspect Oriented Programming)为开发者提供了一种机制来描述横切关注点。它能够自动地将横切关注点织入到面向对象的软件系统中,从而实现了横切关注点的模块化。然而AOP这种对横切关注点封装、织入的独特性为分析程序结构带来了困难,对传统的程序分析技术提出了新课题。通过分析AOP程序的特殊性,提出了基于AspectJ构造AOP程序控制流图的方法。该方案可以为AOP程序的理解、验证、测试以及重构提供控制流分析平台。
AOP (Aspect Oriented Programming)provides programmers a mechanism to encapsulate crosscutting concerns, which can be woven into Object-Oriented system automatically. This brand new programming methodology improves modularity of OO programs a lot, but the unique separation of aspect codes also introduces difficulties in analyzing AO programs, for technologies now available can not be applied to AOP programs directly. In this paper a new way to construct CFG (Control Flow Graph) for AO programs based on AspectJ is introduced. By extending the traditional CFG with AO elements, new CFG can create a clear picture for both OOP and AOP programs. It can also provide a uniform analysis platform in the realms of program understanding, code validation, testing and refactoring.
出处
《计算机应用与软件》
CSCD
北大核心
2008年第5期137-139,共3页
Computer Applications and Software