Personal and Ubiquitous Computing

, Volume 15, Issue 4, pp 341–351 | Cite as

Ambient contracts: verifying and enforcing ambient object compositions à la carte

  • Christophe ScholliersEmail author
  • Dries Harnie
  • Éric Tanter
  • Wolfgang De Meuter
  • Theo D’Hondt
Original Article


Current programming languages do not offer adequate abstractions to discover and compose heterogenous objects over unreliable networks. This forces programmers to discover objects one by one, compose them manually, and keep track of their individual connectivity state at all times. In this paper we propose Ambient Contracts, a novel programming abstraction to deal with the difficulties of composing objects connected over unreliable networks. Ambient Contracts provide declarative heterogenous group discovery and composition while dealing with the unreliability of the network. An ambient contract allows runtime verification and enforcement of the messages sent between the participants in the contract. The use of our abstraction significantly reduces the code base and allows programmers to focus on the core functionality of their application. Our claims are reinforced by comparing the implementation of an example scenario in our contracts with a Java implementation using M2MI.


Contracts Programming languages Concurrency 



Christophe Scholliers is funded by a doctoral scholarship of the IWT-Flanders. Dries Harnie is funded by the Prospective Research for Brussels (PRFB) program of IWOIB-IRSIB. É. Tanter is partially funded by FONDECYT Project 1110051.


  1. 1.
    Chen H, Finin T, Joshi A (2004) Semantic web in the context broker architecture. In: Proceedings of percom 2004, pp 277–286Google Scholar
  2. 2.
    Costanza P, Hirschfeld R (2005) Language constructs for context-oriented programming: an overview of contextl. In: DLS ’05. ACM, New York, pp 1–10Google Scholar
  3. 3.
    Van Cutsem T, Dedecker J, Mostinckx S, Gonzalez E, D’Hondt T, De Meuter W (2006) Ambient references: addressing objects in mobile networks. In: OOPSLA ’06. ACM Press, New York, pp 986–997Google Scholar
  4. 4.
    Dedecker J, Van Cutsem T, Mostinckx S, D’Hondt T, De Meuter W (2005) Ambient-oriented programming. In: OOPSLA ’05. ACM Press, New YorkGoogle Scholar
  5. 5.
    Findler RB, Felleisen M (2002) Contracts for higher-order functions. SIGPLAN Not 37:48–59Google Scholar
  6. 6.
    Fuentes L, Gámez N (2009) Modeling the context-awareness service in an aspect-oriented middleware for ami. 3rd Symposium of Ubiquitous computing and ambient intelligence 2008, pp 159–167Google Scholar
  7. 7.
    Gu T, Pung HK, Zhang DQ (2004) A middleware for building context-aware mobile services. In: Proceedings of IEEE Vehicular Technology Conference (VTC)Google Scholar
  8. 8.
    Helm R, Holland IM, Gangopadhyay D (1990) Contracts: specifying behavioral compositions in object-oriented systems. ACM SIGPLAN Notices 25(10):169–180CrossRefGoogle Scholar
  9. 9.
    Kaminsky A, Bischof HP (2002) Many-to-many invocation: a new object oriented paradigm for ad hoc collaborative systems. In: OOPSLA 2002. CiteseerGoogle Scholar
  10. 10.
    Tanter E, Gybels K, Denker M, Bergel A (2006) Context-aware aspects. In: Proceedings of the 5th international symposium on software composition (SC 2006) LNCS 4089. Springer, New York, pp 227–249Google Scholar
  11. 11.
    Urbieta A, Barrutieta G, Parra J, Uribarren A (2008) A survey of dynamic service composition approaches for ambient systems. In: SOMITAS ’08. ICST, Brussels, Belgium, Belgium, pp 1–8Google Scholar
  12. 12.
    Van Cutsem T, Mostinckx S, Boix EG, Dedecker J, De Meuter W (2007) Ambienttalk: object-oriented event-driven programming in mobile ad hoc networks. In: SCCC. IEEE Computer Society, pp 3–12Google Scholar

Copyright information

© Springer-Verlag London Limited 2011

Authors and Affiliations

  • Christophe Scholliers
    • 1
    Email author
  • Dries Harnie
    • 1
  • Éric Tanter
    • 2
  • Wolfgang De Meuter
    • 1
  • Theo D’Hondt
    • 1
  1. 1.Software Languages Lab, DINF, Vrije Unversiteit BrusselBrusselBelgium
  2. 2.PLEIAD Laboratory Computer Science Dept (DCC)University of ChileSantiagoChile

Personalised recommendations