• 论文 •    

用聚类分析方法挖掘Aspect

何丽莉,白洪涛   

  1. 1.吉林大学 计算机科学与技术学院,吉林  长春  130012;2.深圳电信新技术开发中心,广东  深圳  518048
  • 收稿日期:2004-11-08 修回日期:2005-02-04 出版日期:2006-01-15 发布日期:2006-01-25
  • 基金资助:
    国家自然科学基金资助项目(69903005)。

Research on Aspect mining using clustering analysis

HE Li-li, BAI Hong-tao   

  1. 1.Sch. of Computer S & T, Jilin Univ., Changchun  130012, China;2.New Tech. Research Cent., Shenzhen Telecom, Shenzhen  518048, China
  • Received:2004-11-08 Revised:2005-02-04 Online:2006-01-15 Published:2006-01-25
  • Supported by:
    Project supported by the National Nataral Science Foundation,China(No.69903005).

摘要: 面向方面的编程是解决传统编程技术中横切问题的有效途径之一。为了将传统方法开发的系统转换成面向方面的系统,实现关注分离,提出了一种从遗产系统中发现横切关注点的方法。该方法将聚类分析与程序静态分析方法相结合,基于方法间的直接调用关系,识别面向对象遗产系统中的横切关注点,根据方法调用相似性自动形成候选Aspect集。本方法不受相似行为需要有相同的命名规则的限制,能够避免因横切关注点分离的粒度太细而导致的系统复杂度增加,为Aspect重构提供有用的帮助。

关键词: 切关注点, 聚类分析, Aspect挖掘

Abstract: Crosscutting concern is the inherent limitation for traditional programming, and Aspect-Oriented Programming (AOP) is one of the most effective ways to solve this problem. A novel method to discover crosscutting concerns from source-code for transformation from legacy system to Aspect-oriented system was proposed. Both the clustering analysis technology and static source-code analysis were used in this method to identify crosscutting concerns from object-oriented legacy system. Direct method invocation relationship was used as the characteristics of scattering code. Candidate Aspects set was generated automatically after clustering. The proposed method was not be limited to the same naming rules for similar behavior and the granularity of candidate aspect, which was much larger leading to the complexity of the system, were also avoided. The method was proved to be effective in the following Aspect reconfiguration and program understanding progresses.

Key words: crosscutting concern, clustering analysis, Aspect mining

中图分类号: