Abstract
Design by ContractTMis commonly cited as an example of the “crosscutting” concerns that aspect-oriented programming can address. We test this conjecture by attempting to implement contracts through aspects and assessing the outcome. The results of this experiment cast doubt on the validity of the conjecture, showing that aspects appear unable to capture contracts in a way that retains the benefits of the Design by Contract methodology.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C., Loingtier, J.M., Irwin, J.: Aspect-oriented programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)
Lieberherr, K.J., Lorenz, D.H., Mezini, M.: Building modular object-oriented systems with reusable collaborations (tutorial session). In: ICSE, p. 821. ACM Press, New York (2000)
Lopes, C.V., Kiczales, G.: Improving design and source code modularity using AspectJ (tutorial session). In: ICSE, IEEE-CS: Computer Society and SIGSOFT: ACM Special Interest Group on Software Engineering and Irish Comp Soc: Irish Computer Society, p. 825. ACM Press, New York (2000)
Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: Getting started with AspectJ. Commun. ACM 44, 59–65 (2001)
TheServerSide.COM: Interview with Gregor Kiczales, topic: Aspect-oriented programming (AOP) (2003), http://www.theserverside.com/talks/videos/GregorKiczalesText/interview.tss
Lopes, C.V., Lippert, M., Hilsdale, E.A.: Design by contract with aspect-oriented programming. U.S. Patent No. 6, 442, 750 (2002)
Diotalevi, F.: Contract enforcement with AOP (2004), http://www-128.ibm.com/developerworks/library/j-ceaop/
Skotiniotis, T., Lorenz, D.H.: Cona: aspects for contracts and contracts for aspects. In: OOPSLA Companion, pp. 196–197. ACM Press, New York (2004)
Meyer, B.: Object-Oriented Software Construction, 2nd edn. Prentice Hall Professional Technical Reference (1997)
Meyer, B.: Eiffel: The Language. Prentice Hall Professional Technical Reference (1991)
Kiczales, G.: AspectJ: Aspect-oriented programming in Java. In: Aksit, M., Mezini, M., Unland, R. (eds.) NODe 2002. LNCS, vol. 2591, pp. 1–1. Springer, Heidelberg (2003)
Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An overview of AspectJ. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 327–353. Springer, Heidelberg (2001)
Lopes, C.V., Kiczales, G.: Recent developments in aspect. In: Demeyer, S., Bosch, J. (eds.) ECOOP 1998 Workshops. LNCS, vol. 1543, pp. 398–401. Springer, Heidelberg (1998)
Parnas, D.L.: On the criteria to be used in decomposing systems into modules. Commun. ACM 15, 1053–1058 (1972)
Hannemann, J., Chitchyan, R., Rashid, A.: Analysis of aspect-oriented software. In: Buschmann, F., Buchmann, A., Cilia, M.A. (eds.) ECCV-WS 2003. LNCS, vol. 3013, pp. 154–164. Springer, Heidelberg (2004)
Bergmans, L.: Towards detection of semantic conflicts between crosscutting concerns. In: Hannemann, J., Chitchyan, R., Rashid, A. (eds.) Workshop on Analysis of Aspect-Oriented Software, ECOOP 2003 (2003)
Kiczales, G., Mezini, M.: Aspect-oriented programming and modular reasoning. In: ICSE, pp. 49–58. ACM Press, New York (2005)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Balzer, S., Eugster, P.T., Meyer, B. (2006). Can Aspects Implement Contracts?. In: Guelfi, N., Savidis, A. (eds) Rapid Integration of Software Engineering Techniques. RISE 2005. Lecture Notes in Computer Science, vol 3943. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11751113_11
Download citation
DOI: https://doi.org/10.1007/11751113_11
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-34063-8
Online ISBN: 978-3-540-34064-5
eBook Packages: Computer ScienceComputer Science (R0)