高级检索
    吕 嘉, 应 晶, 吴明晖, 蒋 涛. 横切侵入性和横切不变性[J]. 计算机研究与发展, 2008, 45(8): 1408-1416.
    引用本文: 吕 嘉, 应 晶, 吴明晖, 蒋 涛. 横切侵入性和横切不变性[J]. 计算机研究与发展, 2008, 45(8): 1408-1416.
    Lü Jia, Ying Jing, Wu Minghui, Jiang Tao. Crosscutting Invasion and Crosscutting Invariant[J]. Journal of Computer Research and Development, 2008, 45(8): 1408-1416.
    Citation: Lü Jia, Ying Jing, Wu Minghui, Jiang Tao. Crosscutting Invasion and Crosscutting Invariant[J]. Journal of Computer Research and Development, 2008, 45(8): 1408-1416.

    横切侵入性和横切不变性

    Crosscutting Invasion and Crosscutting Invariant

    • 摘要: 由于面向方面语言的不知觉性和多量化特点,模块分析和模块推理比传统方法学更加困难.为了解决面向方面语言的横切安全和横切质量问题,使用前提条件和后验条件约束横切模块和被横切模块,然而在横切过程中寻找前提条件和后验条件的失败原因十分微妙和复杂.为了分析一个横切关注点的行为影响,程序员需要考虑方面本身和这个方面影响的系统其他部分.当几个方面编织在同一个切入点,危险干扰分析变得更加复杂.类似面向对象语言中的行为子类型概念,引入横切不变性概念.为了检查由于破坏横切不变性引起的行为错误和其他4种简单行为错误,基于软件行为契约提出一个横切不变性检测算法.为了形式化这个算法,提出 Crosscutting Contract演算和一组契约求解规则,并通过定义和证明契约完备性来保证契约求解过程的正确性.还使用一个例子说明如何使用这些契约求解规则检测和分析行为错误.

       

      Abstract: Owing to the characteristics of quantification and obliviousness of aspect-oriented language, modular behavioral analysis and modular reasoning are more difficult than that of the traditional paradigms. To deal with crosscutting safety and crosscutting quality in aspect-oriented language, crosscutting modules and affected modules are constrained with pre-conditions and post-conditions, but assigning blame for pre-condition and post-condition failures during the process of crosscutting poses subtle and complex problems. To analyze behavioral effect of a crosscutting concern, the programmer should consider the aspect itself and the part of the system it affects. Furthermore, when several aspects are woven at a same pointcut, the analysis of possible dangerous interferences becomes more complex. Similar to the notion of behavioral subtyping in object-oriented language, a notion of crosscutting invariant is proposed. In order to check the behavioral errors of violating crosscutting invariability and four other simple behavioral errors, an algorithm based on software behavioral contracts is proposed. To formalize this algorithm, crosscutting contract calculus and a set of contract elaboration rules are presented. The contract soundness theorem which ensures the correctness of the contract elaboration process is stated and proved. An example is also represented to show how to use these contract elaboration rules to check and analyze the behavioral errors.

       

    /

    返回文章
    返回