Skip to main content
Log in

Design and implementation of DBC based on dynamic AOP

  • Published:
Wuhan University Journal of Natural Sciences

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Binder R V. Testing Object-Oriented Systems: Models, Patterns, and Tools [M]. Boston: Addison Wesley, 1999.

    Google Scholar 

  2. Meyer B. Object-Oriented Software Construction[M]. 2nd Ed. New York: Prentice-Hall, 1997.

    Google Scholar 

  3. Pawlak R, Seinturier L, Duchien L, et al. JAC, a Flexible Solution for Aspect-Oriented Programming in Java[C]//Reflection 2001 Proceedings. London: Springer Verlag, 2001: 1–24.

    Google Scholar 

  4. Laddad, Ramnivas. I Want My AOP! In JavaWorld[EB/OL]. [2002-01-18]. http://www.javaworld.com/javaworld/jw-01-2002/jw-0118-aspect.html .

  5. Noble, Albert T. Using Aspect Oriented Programming to Implement Design by Contract: A Stack Example[C/OL]//21st Annual Computer Science Conference.[2006-11-20]. http://www.rh.edu/~rhb/ cs_seminar_2005.

  6. Meyer B. Eiffel: The Language [M]. New York: Prentice Hall, 1991.

    Google Scholar 

  7. Skotiniotis T, Lorenz D H. Cona: Aspects for Contracts and Contracts for Aspects [C]// Companion to the 19th annual ACM SIGPLAN Conference on Object-oriented Programming Systems, Languages, and Applications. Vancouver: ACM Press, 2004:196–197.

    Chapter  Google Scholar 

  8. Wampler D. Contract4J for Design by Contract in Java: Design Pattern-Like Protocols and Aspect Interfaces[C/OL] //Proceedings of the 5th International Conference on Aspect-Oriented Software Development. [2006-03-21]. http://www.aosd.net/workshops/acp4is/2006/papers/7.pdf .

  9. Lorenz D H, Skotiniotis T. Extending Design by Contract for Aspect-Oriented Programming[R]. Technical Report NUCCIS-04-14, Boston: College of Computer and Information Science, North Eastern University, 2005.

    Google Scholar 

  10. Ernst E, Lorenz D H. Aspects and Polymorphism in AspectJ[C] // Proceedings of the 2nd International Conference on Aspect-Oriented Software Development. New York: ACM Press, 2003:150–157.

    Chapter  Google Scholar 

  11. JBoss Inc. JBoss AOP Home Page [EB/OL]. [2001-03-08]. http://www.jboss.org/developers/projects/jboss/aop.jsp .

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Shi Ying.

Additional information

Foundation item: Supported by the National Natural Science Foundation of China (60773006) and the Specialized Research Fund for the Doctoral Program of Higher Education of China (20060486045)

Biography: WEN Jing (1982–), female, Ph.D. candidate, research directions: software engineer, aspect-oriented software development.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Wen, J., Ying, S., Li, H. et al. Design and implementation of DBC based on dynamic AOP. Wuhan Univ. J. Nat. Sci. 13, 159–164 (2008). https://doi.org/10.1007/s11859-008-0207-0

Download citation

  • Received:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11859-008-0207-0

Key words

CLC number

Navigation