计算机科学与探索 ›› 2011, Vol. 5 ›› Issue (10): 932-941.

• 学术研究 • 上一篇    下一篇

一种AOP方面的代数语义

古思山, 蔡树彬, 李师贤   

  1. 1. 中山大学 信息科学与技术学院, 广州 510275
    2. 深圳大学 计算机与软件学院, 广东 深圳 518060
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2011-10-01 发布日期:2011-10-01

An Algebraic View on the Semantics of Aspects in AOP

GU Sishan, CAI Shubin, LI Shixian   

  1. 1. School of Information Science and Technology, Sun Yat-Sen University, Guangzhou 510275, China
    2. School of Computer Science and Software Engineering, Shenzhen University, Shenzhen, Guangdong 518060, China
  • Received:1900-01-01 Revised:1900-01-01 Online:2011-10-01 Published:2011-10-01

摘要:

面向方面程序设计可以模块化横切关注点, 因此受到工业界及学术界的广泛关注。目前模块化横切关注点几乎成为面向方面程序设计的代名词, 而且有不少人士狭隘地将面向方面程序设计认为是面向对象程序设计的延续、扩展或补充。回顾了面向方面程序设计的定义, 分析了产生这一现象的原因。并且形式化了定义中的量化语句和方面, 给出了它们的语义。探讨了量化语句和方面的一系列性质, 包括量化语句和方面的可满足性, 量化语句的包含、交叉及精化关系, 方面的同态、同构、构成、完全语义保持精化、语义保持精化及等价替换等关系。该研究为面向方面程序设计的理论研究打下了坚实的基础, 也为更好地理解面向方面程序设计提供了有效的帮助。

关键词: 面向方面程序设计(AOP), 方面, 语义, 精化, 同构, 等价替换

Abstract:

Aspect-oriented programming (AOP) gains great attention from both industrial community and academic community with its advantage of modularizing crosscutting concerns. Nowadays modularizing crosscutting con-cerns almost become the nickname of AOP. And many people simply believe that AOP is just an extension or sup-plement to object-oriented programming. This paper reviews the definition of AOP and analyzes the causes of this phenomenon. Moreover, it also formalizes the quantified statement and aspect in the AOP definition and defines their semantics in an algebraic form. Based on the semantics, it provides a series of properties, including satisfiabil-ity of quantified statement and aspect, inclusion, crossing and refinement of quantified statement, homomorphism, isomorphism, semantics preserved refinement, full semantics preserved refinement, equivalence replacement of as-pects, etc. The work constructs a solid foundation for the theoretical research about AOP and is very helpful for understanding the real nature of AOP.

Key words: aspect-oriented programming (AOP), aspect, semantics, refinement, isomorphism, equivalence replacement