Programming in ambience : gearing up for dynamic adaptation to context

In the vision of Ambient Intelligence, people are assisted in their everyday activities through the proactive, opportunistic support of non-intrusive computing devices offering intuitive interaction modalities. The usefulness and quality of delivered services can be improved considerably if the devices are able to adapt their behaviour according to sensed changes in their surrounding environment, both at the physical and logical levels. This interplay between context-awareness and dynamic software adaptability is key to the construction of applications that are smart with respect to user needs. Unfortunately, most current applications do not reach this level of adaptability, due to a lack of appropriate programming technology. Most applications exhibit fixed functionality and seldom do they sense their environment and adapt their services in a context-aware fashion. Many chances of delivering improved services to users and network peers are thus missed. This dissertation presents a programming model to ease the construction of applications that can react to changes in their execution context by adapting their behaviour dynamically. The starting point of our research is the development of novel language abstractions and the adaptation of existing abstractions to render context-aware, self-adaptable applications easier to develop. We demonstrate that a simple yet powerful computation model readily provides the needed support, leading to straightforward application code that is not concerned with context adaptation, behaviour that can be adapted dynamically to different contexts in a non-intrusive fashion, and context-aware applications with software architectures that are not biased towards context adaptation ---rather, they can be designed freely according to their domain. The proposed computation model is realised through the Ambience programming language, and its underlying open implementation, the Ambient Object System. A small-step operational semantics describes it formally. Much in the vein of prototype-based programming, the model has been designed with simplicity and concreteness in mind. It is highly dynamic, featuring dynamic (multiple) dispatch, dynamic inheritance, dynamic typing, and dynamic method scoping. Application logic adaptation is enabled by means of an intuitive, first-class reification of context that is straightforwardly connected to dynamic behaviour selection. We describe needed management techniques for such context, and a few programming guidelines on how to develop context-aware applications using our approach. The approach is validated by showing its application in a number of scenarios inspired on Ambient Intelligence.

[1]  Oscar Nierstrasz,et al.  Composable Encapsulation Policies , 2004, ECOOP.

[2]  Jonathan S. Shapiro,et al.  Paradigm Regained: Abstraction Mechanisms for Access Control , 2003, ASIAN.

[3]  Oscar Nierstrasz,et al.  Traits: Composable Units of Behaviour , 2002, ECOOP.

[4]  Gary T. Leavens,et al.  MultiJava: Design rationale, compiler implementation, and applications , 2006, TOPL.

[5]  Oscar Nierstrasz,et al.  Traits: A mechanism for fine-grained reuse , 2006, TOPL.

[6]  David Robson,et al.  Smalltalk-80: The Language and Its Implementation , 1983 .

[7]  Gary T. Leavens,et al.  MultiJava: modular open classes and symmetric multiple dispatch for Java , 2000, OOPSLA '00.

[8]  Oscar Nierstrasz,et al.  User-changeable visibility: resolving unanticipated name clashes in traits , 2007, OOPSLA.

[9]  M. L. Gassanenko CONTEXT-ORIENTED PROGRAMMING , 1998 .

[10]  Harold Ossher,et al.  Subject-oriented programming: a critique of pure objects , 1993, OOPSLA '93.

[11]  Simon L. Peyton Jones,et al.  Composable memory transactions , 2005, CACM.

[12]  R. Kent Dybvig,et al.  Revised6 Report on the Algorithmic Language Scheme , 2009 .

[13]  Wilf R. LaLonde,et al.  An exemplar based Smalltalk , 1986, OOPLSA '86.

[14]  Theo D'Hondt,et al.  Ambient-oriented programming , 2005, OOPSLA '05.

[15]  Stanley M. Sutton,et al.  Multi-Dimensional Separation of Concerns , 1999 .

[16]  Nathanael Schärli,et al.  Object-oriented encapsulation for dynamically typed languages , 2004, OOPSLA.

[17]  Christophe Dony,et al.  Split objects: a disciplined use of delegation within objects , 1996, OOPSLA '96.

[18]  Randall B. Smith,et al.  Self: The power of simplicity , 1987, OOPSLA 1987.

[19]  Rachid Guerraoui,et al.  Introduction to reliable distributed programming , 2006 .

[20]  Fred Baker,et al.  An outsider's view of MANET , 2002 .

[21]  Gregor Kiczales,et al.  Towards a new model of abstraction for the engineering o f software , 1992 .

[22]  Kristen Nygaard,et al.  SIMULA: an ALGOL-based simulation language , 1966, CACM.

[23]  Gul Agha,et al.  Concurrent programming using actors , 1987 .

[24]  William R. Cook,et al.  Mixin-based inheritance , 1990, OOPSLA/ECOOP '90.

[25]  Robert Hieb,et al.  The Revised Report on the Syntactic Theories of Sequential Control and State , 1992, Theor. Comput. Sci..

[26]  M.N. Sastry,et al.  Structure and interpretation of computer programs , 1986, Proceedings of the IEEE.

[27]  Armando Fox,et al.  Application-service interoperation without standardized service interfaces , 2003, Proceedings of the First IEEE International Conference on Pervasive Computing and Communications, 2003. (PerCom 2003)..

[28]  James H. Aylor,et al.  Computer for the 21st Century , 1999, Computer.

[29]  Tobias Zimmer,et al.  Typical Sensors needed in Ubiquitous and Pervasive Computing , 2004 .

[30]  Gregory D. Abowd,et al.  The context toolkit: aiding the development of context-enabled applications , 1999, CHI '99.

[31]  Craig Chambers,et al.  An efficient implementation of SELF, a dynamically-typed object-oriented language based on prototypes , 1991 .

[32]  Robert Hirschfeld,et al.  Layered design approach for context-aware systems , 2007, VaMoS.

[33]  Carolyn L. Talcott,et al.  A foundation for actor computation , 1997, Journal of Functional Programming.

[34]  Craig Chambers,et al.  Organizing programs without classes , 1991, LISP Symb. Comput..

[35]  Keir Fraser,et al.  Language support for lightweight transactions , 2003, SIGP.

[36]  Mahadev Satyanarayanan,et al.  Pervasive computing: vision and challenges , 2001, IEEE Wirel. Commun..

[37]  Chung-Ta King,et al.  Context discovery in sensor networks , 2005, ITRE 2005. 3rd International Conference on Information Technology: Research and Education, 2005..

[38]  Henry Lieberman,et al.  Using prototypical objects to implement shared behavior in object-oriented systems , 1986, OOPLSA '86.

[39]  John McCarthy,et al.  Recursive functions of symbolic expressions and their computation by machine, Part I , 1960, Commun. ACM.

[40]  Marie-Laure Mugnier,et al.  Proposal for a Monotonic Multiple Inheritance Linearization , 1994, OOPSLA.

[41]  Randall B. Smith,et al.  A Simple and Unifying Approach to Subjective Objects , 1996, Theory Pract. Object Syst..

[42]  Craig Chambers,et al.  Parents are shared parts of objects: Inheritance and encapsulation in SELF , 1991, LISP Symb. Comput..

[43]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[44]  Pascal Costanza,et al.  Dynamically scoped functions as the essence of AOP , 2003, SIGP.

[45]  Virendra J. Marathe,et al.  A Qualitative Survey of Modern Software Transactional Memory Systems , 2004 .

[46]  Antero Taivalsaari,et al.  Prototype-based programming : concepts, languages, and applications , 1999 .

[47]  Alan Snyder,et al.  Encapsulation and inheritance in object-oriented programming languages , 1986, OOPLSA '86.

[48]  Jonathan Aldrich,et al.  Prototypes with Multiple Dispatch: An Expressive and Dynamic Object Model , 2005, ECOOP.

[49]  Dan Grossman,et al.  High-level small-step operational semantics for transactions , 2008, POPL '08.

[50]  Edwin H. Blake,et al.  On Including Part Hierarchies in Object-Oriented Languages with an Implementation in Smalltalk , 1987, ECOOP.

[51]  Brian Cantwell Smith,et al.  Reflection and semantics in LISP , 1984, POPL.

[52]  Guy L. Steele,et al.  Common Lisp the Language , 1984 .

[53]  Pattie Maes,et al.  Concepts and experiments in computational reflection , 1987, OOPSLA '87.

[54]  Jacques Ferber,et al.  Computational reflection in class based object-oriented languages , 1989, OOPSLA '89.

[55]  Simon A. Dobson,et al.  More Principled Design of Pervasive Computing Systems , 2004, EHCI/DS-VIS.

[56]  Günther Blaschek,et al.  Object-oriented programming - with prototypes , 1994 .

[57]  Craig S. Kaplan,et al.  Predicate Dispatching: A Unified Theory of Dispatch , 1998, ECOOP.

[58]  Brian Foote Class Warfare: Classes vs. Prototypes , 1989 .

[59]  Peter Van Roy,et al.  Concepts, Techniques, and Models of Computer Programming , 2004 .

[60]  Stanley M. Sutton,et al.  N degrees of separation: multi-dimensional separation of concerns , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[61]  John Seely Brown,et al.  The Origins of Ubiquitous Computing Research at PARC in the Late 1980s , 1999, IBM Syst. J..

[62]  Mark S. Miller,et al.  Robust composition: towards a unified approach to access control and concurrency control , 2006 .

[63]  Oscar Nierstrasz,et al.  Stateful traits and their formalization , 2008, Comput. Lang. Syst. Struct..

[64]  Tom Van Cutsem,et al.  Ambient References: Object Designation in Mobile Ad Hoc Networks , 2008 .

[65]  Randall B. Smith,et al.  Programming as an Experience: The Inspiration for Self , 1995, ECOOP.

[66]  Theo D'Hondt,et al.  Context-Oriented Domain Analysis , 2007, CONTEXT.

[67]  Trygve Reenskaug,et al.  System Design by Composing Structures of Interacting Objects , 1992, ECOOP.

[68]  David A. Moon,et al.  A monotonic superclass linearization for Dylan , 1996, OOPSLA '96.

[69]  Jadwiga Indulska,et al.  A context-sensitive service discovery protocol for mobile computing environments , 2005, International Conference on Mobile Business (ICMB'05).

[70]  Robert Bruce Findler,et al.  Under Consideration for Publication in J. Functional Programming an Operational Semantics for Scheme , 2022 .

[71]  Joe Armstrong,et al.  A history of Erlang , 2007, HOPL.

[72]  Gordon D. Plotkin,et al.  Call-by-Name, Call-by-Value and the lambda-Calculus , 1975, Theor. Comput. Sci..

[73]  Kim Mens,et al.  Highly dynamic behaviour adaptability through prototypes with subjective multimethods , 2007, DLS '07.

[74]  Matthias Felleisen,et al.  On the Expressive Power of Programming Languages , 1990, European Symposium on Programming.

[75]  하수철,et al.  [서평]「Component Software」 - Beyond Object-Oriented Programming - , 2000 .

[76]  G. Winskel The formal semantics of programming languages , 1993 .

[77]  Norbert A. Streitz,et al.  The Disappearing Computer, Interaction Design, System Infrastructures and Applications for Smart Environments , 2007, The Disappearing Computer.

[78]  Lyn Dupre,et al.  BUGS in Writing: A Guide to Debugging Your Prose , 1995, IEEE Software.

[79]  Alan Borning,et al.  Classes versus Prototypes in Object-Oriented Languages , 1986, FJCC.

[80]  Peter Wegner,et al.  Dimensions of object-based language design , 1987, OOPSLA '87.

[81]  Guanling Chen,et al.  Context-sensitive resource discovery , 2003, Proceedings of the First IEEE International Conference on Pervasive Computing and Communications, 2003. (PerCom 2003)..

[82]  Theo D'Hondt,et al.  Filtered dispatch , 2008, DLS '08.

[83]  Peter Seibel,et al.  Practical Common Lisp , 2005 .

[84]  Gustavo Alonso,et al.  Dynamic weaving for aspect-oriented programming , 2002, AOSD '02.

[85]  Pascal Costanza,et al.  Transmigration of object identity , 2004 .

[86]  Kim Mens,et al.  Context-Oriented Programming with the Ambient Object System , 2008, J. Univers. Comput. Sci..

[87]  Craig Chambers,et al.  Object-Oriented Multi-Methods in Cecil , 1992, ECOOP.

[88]  Craig Chambers,et al.  Efficient multiple and predicated dispatching , 1999, OOPSLA '99.

[89]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[90]  Pascal Costanza,et al.  Dynamic Replacement of Active Objects in the Gilgul Programming Language , 2002, Component Deployment.

[91]  Günter Kniesel Type-Safe Delegation for Run-Time Component Adaptation , 1999, ECOOP.

[92]  Wolfgang De Meuter,et al.  Efficient Layer Activation for Switching Context-Dependent Behavior , 2006, JMLC.

[93]  Ralph E. Johnson,et al.  Efficient Multimethods in a Single Dispatch Language , 2005, ECOOP.

[94]  David A. Moon,et al.  Object-oriented programming with flavors , 1986, OOPLSA '86.

[95]  Daniel G. Bobrow,et al.  Book review: The Art of the MetaObject Protocol By Gregor Kiczales, Jim des Rivieres, Daniel G. and Bobrow(MIT Press, 1991) , 1991, SGAR.

[96]  Matthias Felleisen,et al.  A Visual Environment for Developing Context-Sensitive Term Rewriting Systems , 2004, RTA.

[97]  Robert Hirschfeld,et al.  Language constructs for context-oriented programming: an overview of ContextL , 2005, DLS '05.

[98]  Andry Rakotonirainy,et al.  Context-oriented programming , 2003, MobiDe '03.

[99]  Wolfgang De Meuter,et al.  Fact Spaces: Coordination in the Face of Disconnection , 2007, COORDINATION.

[100]  Christian Queinnec Lisp in small pieces , 1994 .

[101]  Craig Chambers,et al.  The cecil language: specification and rationale , 1993 .

[102]  Antero Taivalsaari,et al.  On the notion of inheritance , 1996, CSUR.

[103]  Gilad Bracha,et al.  Mirrors: design principles for meta-level facilities of object-oriented programming languages , 2004, OOPSLA.