Design and implementation of DBC based on dynamic AOP

Traditional approach of design by contract, due to mixing the contract code with application code, is difficult for the extensibility and reusability of software system. This paper presents a framework named JADBC for design by contract based on Aspect-Oriented Programming (AOP) to resolve these problems. By providing a new modularized element, aspect, the framework successfully separates the contracts in design by contract, from functional codes. The implementation of this framework is based on dynamic AOP which can have the contract changed at runtime, consequently, enhancing program flexibility. JADBC framework modularizes the contracts in a clear-cut fashion that is easier to design, implement, and maintain.