In this paper we report on how Aspect-Oriented Programming (AOP), using AspectJ, can be employed to automatically and efficiently instrument contracts and invariants in Java, The paper focuses on the templates to instrument preconditions, postconditions, and class invariants, and the necessary instrumentation for compliance-checking to the Liskov Substitution Principle.

dx.doi.org/10.1109/ICSM.2005.55
21st IEEE International Conference on Software Maintenance, ICSM 2005
Department of Systems and Computer Engineering

Briand, L.C. (Lionel C.), Dzidek, W.J., & Labiche, Y. (2005). Instrumenting contracts with aspect-oriented programming to increase observability and support debugging. Presented at the 21st IEEE International Conference on Software Maintenance, ICSM 2005. doi:10.1109/ICSM.2005.55