skip to main content
10.1145/1146841.1146842acmotherconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article

Language constructs for context-oriented programming: an overview of ContextL

Published:18 October 2005Publication History

ABSTRACT

ContextL is an extension to the Common Lisp Object System that allows for Context-oriented Programming. It provides means to associate partial class and method definitions with layers and to activate and deactivate such layers in the control flow of a running program. When a layer is activated, the partial definitions become part of the program until this layer is deactivated. This has the effect that the behavior of a program can be modified according to the context of its use without the need to mention such context dependencies in the affected base program. We illustrate these ideas by providing different UI views on the same object while, at the same time, keeping the conceptual simplicity of object-oriented programming that objects know by themselves how to behave, in our case how to display themselves. These seemingly contradictory goals can be achieved by separating class definitions into distinct layers instead of factoring out the display code into different classes.

References

  1. Daniel Bobrow and Ira Goldstein. Representing Design Alternatives. Proceedings of the Conference on Artificial Intelligence and the Simulation of Behavior. Amsterdam, July 1980.]]Google ScholarGoogle Scholar
  2. Daniel Bobrow, Linda DeMichiel, Richard Gabriel, Sonya Keene, Gregor Kiczales, David Moon. Common Lisp Object System Specification. Lisp and Symbolic Computation 1, 3-4 (January 1989), 245--394.]]Google ScholarGoogle Scholar
  3. Christoph Bockisch, Michael Haupt, Mira Mezini, Klaus Ostermann. Virtual Machine Support for Dynamic Join Points. AOSD 2004, Proceedings, ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Martin Büchi and Wolfgang Weck. Generic Wrappers. ECOOP 2000, Proceedings, Springer LNCS.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Howard Cannon. Flavors -- A Non-Hierarchical Approach to Object-oriented Programming. Unpublished draft, 1979, 1992, 2003.]]Google ScholarGoogle Scholar
  6. Pascal Costanza, Günter Kniesel, Armin Cremers. Lava -- Spracherweiterungen für Delegation in Java. JIT '99 -- Java-Informations-Tage 1999. Springer, Informatik Aktuell, 1999.]]Google ScholarGoogle ScholarCross RefCross Ref
  7. Pascal Costanza. Dynamically Scoped Functions as the Essence of AOP. ECOOP 2003 Workshop on Object-oriented Language Engineering for the Post-Java Era, Darmstadt, Germany, July 22, 2003. ACM Sigplan Notices 38, 8 (August 2003).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Pascal Costanza. A Short Overview of AspectL. European Interactive Workshop on Aspects in Software (EIWAS'04), Berlin, Germany, September 23-24.]]Google ScholarGoogle Scholar
  9. Pascal Costanza. How to Make Lisp More Special. International Lisp Conference 2005, Stanford. Proceedings.]]Google ScholarGoogle Scholar
  10. Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides. Design Patterns. Addison-Wesley, 1995.]]Google ScholarGoogle Scholar
  11. Michael Gassanenko. Context-oriented Programming: Evolution of Vocabularies. Proceedings of the euroFORTH'93 Conference. Marianske Lazne, Czech Republic.]]Google ScholarGoogle Scholar
  12. Michael Gassenenko. Context-oriented Programming. euroFORTH'98, Schloss Dagstuhl, Germany.]]Google ScholarGoogle Scholar
  13. David Gelernter, Suresh Jagannathan, Thomas London. Environments as First Class Objects. POPL '87, Proceedings.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. William Harrison and Harold Ossher. Subject-oriented Programming -- A Critique of Pure Objects. OOPSLA '93, Proceedings, ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Robert Hirschfeld. AspectS -- Aspect-oriented Programming with Squeak. In M. Aksit, M. Mezini, R. Unland (eds.). Objects, Components, Architectures, Services, and Applications for a Networked World. Springer LNCS 2003, 2003.]]Google ScholarGoogle Scholar
  16. Robert Hirschfeld and Pascal Costanza. Extending Advice Activation in AspectS, European Interactive Workshop on Aspects in Software (EIWAS 2005), Brussels, Belgium, September 2005.]]Google ScholarGoogle Scholar
  17. Robert Hirschfeld, Katsuya Kawamura, Hendrik Berndt. Dynamic Service Adaptation for Runtime System Extensions. Wireless On-Demand Network Systems, First IFIP TC6 Working Conference, WONS 2004, Proceedings, Springer LNCS 2928.]]Google ScholarGoogle Scholar
  18. Roger Keays and Andry Rakotonirainy. Context-oriented Programming. International Workshop on Data Engineering for Wireless and Mobile Access, San Diego, USA, 2003. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Gregor Kiczales, Jim des Rivières, Daniel G. Bobrow. The Art of the Metaobject Protocol. MIT Press, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Gregor Kiczales. Towards a New Model of Abstraction in Software Engineering. Proceedings of the International Workshop on Reflection and Meta-Level Architectures, 1992.]]Google ScholarGoogle Scholar
  21. Günter Kniesel. Type-Safe Delegation for Run-Time Component Adaptation. ECOOP '99, Proceedings, Springer LNCS 1628.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Glenn Krasner and Stephen Pope. A Cookbook for using the Model-View-Controller User Interface Paradigm in Smalltalk-80. Journal of Object-oriented Programming 1, 3 (August/September 1988).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Henry Lieberman. Using Prototypical Objects to Implement Shared Behavior in Object-oriented Systems. OOPSLA '86, Proceedings.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Hidehiko Masuhara and Gregor Kiczales. Modeling Crosscutting in Aspect-oriented Mechanisms. ECOOP 2003, Proceedings, Springer LNCS.]]Google ScholarGoogle Scholar
  25. Klaus Ostermann. Dynamically Composable Collaborations with Delegation Layers. ECOOP 2002, Proceedings, Springer LNCS.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Lee Salzman and Jonathan Aldrich. Prototypes with Multiple Dispatch: An Expressive and Dynamic Object Model. ECOOP 2005, Proceedings, LNCS.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Randall Smith and David Ungar. A Simple and Unifying Approach to Subjective Objects. Theory and Practice of Object Systems, 2, 3 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Randall Smith, John Maloney, David Ungar. The Self-4.0 User Interface: Manifesting a System-wide Vision of Concreteness, Uniformity, and Flexibility. OOPSLA '95 Conference Proceedings, Austin, Texas, October 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. David Ungar and Randall Smith. Self: The Power of Simplicity. OOPSLA '87, Proceedings.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Daniel Weinreb and David Moon. Flavors: Message Passing in the Lisp Machine. AI Memo 602, Massachusetts Institute of Technology, 1980.]]Google ScholarGoogle Scholar

Index Terms

  1. Language constructs for context-oriented programming: an overview of ContextL

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Other conferences
        DLS '05: Proceedings of the 2005 symposium on Dynamic languages
        October 2005
        67 pages
        ISBN:9781450378161
        DOI:10.1145/1146841
        • Program Chair:
        • Roel Wuyts

        Copyright © 2005 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 18 October 2005

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • Article

        Acceptance Rates

        Overall Acceptance Rate32of77submissions,42%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader