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...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 rtmtime, consequently, enhancing program flexibility. JADBC framework modularizes the contracts in a clear-cut fashion that is easier to design, implement, and maintain.展开更多
基金the National Natural Science Foundation of China (60773006)the Specialized Research Fund for the Doctoral Program of Higher Education of China (20060486045)
文摘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 rtmtime, consequently, enhancing program flexibility. JADBC framework modularizes the contracts in a clear-cut fashion that is easier to design, implement, and maintain.