skip to main content
10.1145/1960275.1960303acmconferencesArticle/Chapter ViewAbstractPublication PagesmodularityConference Proceedingsconference-collections
research-article

EScala: modular event-driven object interactions in scala

Published:21 March 2011Publication History

ABSTRACT

Event-driven programming style in OO languages based on imperatively triggered events does not support separate and more declarative event definitions by composition or transformation of other events. AO language mechanisms for defining events as declarative queries over implicitly available low-level events seem good candidates to approach these problems. However, being designed for modularizing mostly globally scoped, crosscutting concerns, AO mechanisms deliberately break with the OO design and modular reasoning style and are thus inappropriate for addressing modularity concerns related to event-based interactions in OO designs.

The contribution of this paper is a language design that combines imperatively triggered events with AO-like mechanisms that are specifically designed to address modularity issues in event-driven object-oriented designs. In particular, they seamlessly integrate with OO-style encapsulation, late binding, and modular reasoning. We present an efficient and type-safe implementation of the proposed design as an extension to Scala.

References

  1. J. Aldrich. Open modules: Modular reasoning about advice. In ECOOP '05, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. C. Allan, P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, O. Lhoták, O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble. Adding trace matching with free variables to AspectJ. In OOPSLA '05, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. I. Aracic, V. Gasiunas, M. Mezini, and K. Ostermann. An overview of CaesarJ. In Transactions on Aspect-Oriented Software Development I, volume 3880 of LNCS. Springer-Verlag, Feb. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. N. Benton, L. Cardelli, and C. Fournet. Modern concurrency abstractions for C#. ACM TOPLAS, 26(5), 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. C. Bockisch. An Efficient and Flexible Implementation of Aspect-Oriented Languages. PhD thesis, TU Darmstadt, Feb. 2009.Google ScholarGoogle Scholar
  6. C. Bockisch, M. Arnold, T. Dinkelaker, and M. Mezini. Adapting virtual machine techniques for seamless aspect support. In OOPSLA'06, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. C. Bockisch, M. Haupt, M. Mezini, and K. Ostermann. Virtual machine support for dynamic join points. In AOSD '04, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. J. Brichau, A. Kellens, K. Gybels, K. Mens, R. Hirschfeld, and T. D'Hondt. Application-specific models and pointcuts using a logic metalanguage. Computer Languages, Systems and Structures, 34(2-3), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. G. H. Cooper and S. Krishnamurthi. Embedding dynamic dataflow in a call-by-value language. In ESOP '06, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. R. Douence, P. Fradet, and M. Südholt. Composition, reuse and interaction analysis of stateful aspects. In AOSD '04, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. C. M. Elliott. Push-pull functional reactive programming. In Haskell '09, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. C. M. Elliott and P. Hudak. Functional reactive animation. In ICFP'97, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. P. T. Eugster. Type-based publish/subscribe: Concepts and experiences. ACM TOPLAS, 29(1), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. P. T. Eugster and K. Jayaram. EventJava: An extension of Java for event correlation. In ECOOP '09, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns. Addison-Wesley, 1995.Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. D. Garlan and D. Notkin. Formalizing design spaces: Implicit invocation mechanisms. In VDM '91: Formal Software Development Methods, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. V. Gasiunas, L. Satabin, M. Mezini, J. Noyé, and A. Núñez. Declarative events for object-oriented programming. Technical Report 7313, INRIA, May 2010.Google ScholarGoogle Scholar
  18. D. Gay, P. Levis, R. von Behren, M. Welsh, E. Brewer, and D. Culler. The nesC language: A holistic approach to networked embedded systems. In PLDI '03, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. Haahr, R. Meier, P. Nixon, V. Cahill, and E. Jul. Filtering and scalability in the eco distributed event model. In PDSE '00, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. P. Haller and M. Odersky. Scala actors: Unifying thread-based and event-based programming. Theor. Comput. Sci., 410(2--3), 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. P. Haller and T. Van Cutsem. Implementing joins using extensible pattern matching. In COORDINATION '08, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. J. Hannemann and G. Kiczales. Design pattern implementation in Java and AspectJ. In OOPSLA '02, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. R. Hirschfeld. AspectS - Aspect-oriented programming with Squeak. In NODe '02: Revised Papers from the International Conference NetObjectDays on Objects, Components, Architectures, Services, and Applications for a Networked World, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. IEEE Standard for the Functional Verification Language e. IEEE Computer Society, Aug. 2008. IEEE Std 1647#8482;-2008.Google ScholarGoogle Scholar
  25. K. Jayaram and P. T. Eugster. Scalable efficient composite event detection. In COORDINATION '10, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. H. Masuhara, Y. Endoh, and A. Yonezawa. A fine-grained join point model for more reusable aspects. In APLAS '06, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. L. A. Meyerovich, A. Guha, J. Baskin, G. H. Cooper, M. Greenberg, A. Bromfield, and S. Krishnamurthi. Flapjax: a programming language for Ajax applications. In OOPSLA '09, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. M. Mezini and K. Ostermann. Conquering aspects with Caesar. In AOSD '03, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Microsoft Corporation. C# language specification. version 3.0. http://msdn.microsoft.com/en-us/vcsharp/aa336809.aspx, 2007.Google ScholarGoogle Scholar
  30. H. Nilsson, A. Courtney, and J. Peterson. Functional reactive programming, continued. In Haskell '02, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. A. Núñez and J. Noyé. An event-based coordination model for context-aware applications. In COORDINATION '08, 2008.Google ScholarGoogle Scholar
  32. M. Odersky. The Scala language specification. version 2.7. http://www.scala-lang.org/docu/files/ScalaReference.pdf, 2009.Google ScholarGoogle Scholar
  33. M. Odersky, L. Spoon, and B. Venners. Programming in Scala. Artima, 2008.Google ScholarGoogle Scholar
  34. B. Oki, M. Pfluegl, A. Siegel, and D. Skeen. The information bus: an architecture for extensible distributed systems. In SOSP '93, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. N. Ongkingco, P. Avgustinov, J. Tibble, L. Hendren, O. de Moor, and G. Sittampalam. Adding open modules to AspectJ. In AOSD '06, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. K. Ostermann, M. Mezini, and C. Bockisch. Expressive pointcuts for increased modularity. In ECOOP '05, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. H. Rajan and G. T. Leavens. Ptolemy: A language with quantified, typed events. In ECOOP '08, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. H. Rajan and K. J. Sullivan. Classpects: Unifying aspect- and object-oriented language design. In ICSE '05, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. H. Rajan and K. J. Sullivan. Unifying aspect- and object-oriented design. ACM TOSEM, 19(1), Aug. 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. F. Steimann, T. Pawlitzki, S. Apel, and C. Kästner. Types and modularity for implicit invocation with implicit announcement. ACM TOSEM, 20(1), 2010. To appear. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. M. Stoerzer and J. Graf. Using pointcut delta analysis to support evolution of aspect-oriented software. In ICSM' 05, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Sun Microsystems. Javabeans(tm) specification. version 1.01. http://java.sun.com/javase/technologies/desktop/javabeans/docs/spec.html, 1997.Google ScholarGoogle Scholar
  43. E. Tanter. Expressive scoping of dynamically-deployed aspects. In AOSD '08, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. M. Vax. Conservative aspect-orientated programming with the e language. In AOSD '07, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. EScala: modular event-driven object interactions in scala

      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 Conferences
        AOSD '11: Proceedings of the tenth international conference on Aspect-oriented software development
        March 2011
        326 pages
        ISBN:9781450306058
        DOI:10.1145/1960275
        • General Chair:
        • Paulo Borba,
        • Program Chair:
        • Shigeru Chiba

        Copyright © 2011 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: 21 March 2011

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate41of139submissions,29%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader