Contract-based impact analysis for weaving classes and aspects

Suguru Shinotsuka, Naoyasu Ubayashi, Hideaki Shinomi, Tetsuo Tamai

Research output: Contribution to journalArticlepeer-review


Aspect-oriented programming (AOP) has the good characteristic called obliviousness that enables a programmer to design a class without considering crosscutting concerns. On the other hand, it is not necessarily easy for the programmer to know the overall behavior of a woven program because weaving modifies the behavior of a method denned in a class. Unexpected errors might be embedded in the woven program. To tackle this problem, we propose WbC (Weaving by Contract), a technique for verifying the correctness of weaving based on contracts. Contracts in WbC consist of pre-conditions, post-conditions, and invariants of weaving. By introducing WbC, we can specify how a program should behave before and after weaving. We also provide a language called COW (COntracl Writing language) for supporting WbC. In COW, a programmer describes contracts by predicate logic that represents the behavior of a program as a property of control and data flow. WbC can restrict weaving to keep the intention of the programmer.

Original languageEnglish
Pages (from-to)133-149
Number of pages17
JournalComputer Software
Issue number2
Publication statusPublished - 2007
Externally publishedYes

All Science Journal Classification (ASJC) codes

  • Software


Dive into the research topics of 'Contract-based impact analysis for weaving classes and aspects'. Together they form a unique fingerprint.

Cite this