Abstract
Context-oriented Programming, or COP, provides programmers with dedicated abstractions and mechanisms to concisely represent behavioral variations that depend on execution context. By treating context explicitly, and by directly supporting dynamic composition, COP allows programmers to better express software entities that adapt their behavior late-bound at run-time. Our paper illustrates COP constructs, their application, and their implementation by developing a sample scenario, using ContextS in the Squeak/Smalltalk programming environment.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Apel S.: The Role of Features and Aspects in Software Development. PhD thesis, Otto-von-Guericke University Magdeburg (March 2007)
Batory, D.: Feature-oriented programming and the ahead tool suite. In: Proceedings of the International Conference on Software Engineering 2004 (2004)
Batory, D., Rauschmeyer, A.: Scaling step-wise refinement. IEEE Transactions on Software Engineering (June 2004)
Daniel, G., Bobrow, L.G., De Michiel, R.P., Gabriel, S.E.: Common lisp object system specification: 1. programmer interface concepts. Lisp and Symbolic Computation 1(3-4), 245–298 (1989)
Brant, J., Foote, B., Johnson, R.E., Roberts, D.: Wrappers to the rescue. In: Jul, E. (ed.) ECOOP 1998. LNCS, vol. 1445, pp. 396–417. Springer, Heidelberg (1998)
Costanza, P., Hirschfeld, R.: Language constructs for context-oriented programming — an overview of ContextL. In: Wuyts, R. (ed.) Proceedings of the 2005 Dynamic Languages Symposium, ACM Press, New York (2005)
Costanza, P., Hirschfeld, R.: Reflective layer activation in ContextL. In: Proceedings of the Programming for Separation of Concerns (PSC) of the ACM Symposium on Applied Computing (SAC). LNCS. Springer, Heidelberg (2007)
Costanza, P., Hirschfeld, R., De Meuter, W.: Efficient layer activation for switching context-dependent behavior. In: Lightfoot, D.E., Szyperski, C.A. (eds.) JMLC 2006. LNCS, vol. 4228. Springer, Heidelberg (2006)
Filman, R.E., Elrad, T., Clarke, S., Akşit, M. (eds.): Aspect-Oriented Software Development. Addison-Wesley, Boston (2005)
Filman, R.E., Friedman, D.P.: Aspect-oriented programming is quantification and obliviousness. In Filman et al., [9], pp. 21–35.
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns. Addison-Wesley, Reading (1995)
Goldberg, A., Robson, D.: Smalltalk-80: the language and its implementation. Addison-Wesley Longman Publishing Co., Inc., Boston (1983)
Hirschfeld, R.: AspectS – aspect-oriented programming with Squeak. In: Akşit, M., Mezini, M., Unland, R. (eds.) NODe 2002. LNCS, vol. 2591, pp. 216–232. Springer, Heidelberg (2003)
Hirschfeld, R., Costanza, P., Nierstrasz, O.: Context-oriented programming. Journal of Object Technology (JOT) 7(3), 125–151 (2008)
Ingalls, D., Kaehler, T., Maloney, J., Wallace, S., Kay, A.: Back to the future: the story of squeak, a practical smalltalk written in itself. In: OOPSLA 1997: Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pp. 318–326. ACM Press, New York (1997)
Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C., Loingtier, J.-M., Irwin, J.: Aspect-oriented programming. In: Akşit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)
Nordberg III, M.E.: Aspect-oriented dependency management. In: Filman et al., [9], pp. 557–584
Smith, R.B., Ungar, D.: A simple and unifying approach to subjective objects. TAPOS special issue on Subjectivity in Object-Oriented Systems 2(3), 161–178 (1996)
Teitelman, W.: Pilot: A step towards man-computer symbiosis. Technical report, Massachusetts Institute of Technology, Cambridge, MA, USA (1966)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Hirschfeld, R., Costanza, P., Haupt, M. (2008). An Introduction to Context-Oriented Programming with ContextS. In: Lämmel, R., Visser, J., Saraiva, J. (eds) Generative and Transformational Techniques in Software Engineering II. GTTSE 2007. Lecture Notes in Computer Science, vol 5235. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-88643-3_9
Download citation
DOI: https://doi.org/10.1007/978-3-540-88643-3_9
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-88642-6
Online ISBN: 978-3-540-88643-3
eBook Packages: Computer ScienceComputer Science (R0)