Skip to main content

Method Slots: Supporting Methods, Events, and Advices by a Single Language Construct

  • Chapter
Transactions on Aspect-Oriented Software Development XI

Part of the book series: Lecture Notes in Computer Science ((TAOSD,volume 8400))

  • 481 Accesses

Abstract

To simplify the constructs that programmers have to learn for using paradigms, we extend methods to a new language construct, a method slot, to support both the event-handler paradigm and the aspect paradigm. A method slot is an object’s property that can keep more than one function closure and be called like a method. We also propose a Java-based language, DominoJ, which replaces methods in Java with method slots, and explains the behavior of method slots and the operators. Then we evaluate the coverage of expressive ability of method slots by comparing DominoJ with other languages in detail. The feasibility of method slots is shown as well by implementing a prototype compiler and running a preliminary microbenchmark for it.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Bergmans, L., Aksit, M.: Composing crosscutting concerns using composition filters. Commun. ACM 44(10), 51–57 (2001)

    Article  Google Scholar 

  2. Chiba, S., Igarashi, A., Zakirov, S.: Mostly modular compilation of crosscutting concerns by contextual predicate dispatch. In: OOPSLA 2010, pp. 539–554. ACM (2010)

    Google Scholar 

  3. Dedecker, J., Van Cutsem, T., Mostinckx, S., D’Hondt, T., De Meuter, W.: Ambient-oriented programming in AmbientTalk. In: Thomas, D. (ed.) ECOOP 2006. LNCS, vol. 4067, pp. 230–254. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  4. Drossopoulou, S., et al.: \(\mathcal{F}\) ickle: Dynamic object re-classification. In: Lindskov Knudsen, J. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 130–149. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  5. Ernst, M., Kaplan, C., Chambers, C.: Predicate dispatching: A unified theory of dispatch. In: Jul, E. (ed.) ECOOP 1998. LNCS, vol. 1445, pp. 186–211. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  6. Eugster, P., Jayaram, K.R.: EventJava: An extension of Java for event correlation. In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 570–594. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  7. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns. Addison-Wesley (1994)

    Google Scholar 

  8. Garlan, D., Jha, S., Notkin, D., Dingel, J.: Reasoning about implicit invocation. In: SIGSOFT 1998/FSE-6, pp. 209–221. ACM (1998)

    Google Scholar 

  9. Gasiunas, V., Satabin, L., Mezini, M., Núñez, A., Noyé, J.: EScala: modular event-driven object interactions in Scala. In: AOSD 2011, pp. 227–240. ACM (2011)

    Google Scholar 

  10. Hannemann, J., Kiczales, G.: Design pattern implementation in Java and AspectJ. In: OOPSLA 2002, pp. 161–173. ACM (2002)

    Google Scholar 

  11. Haupt, M., Schippers, H.: A machine model for aspect-oriented programming. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 501–524. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  12. Havinga, W., Bergmans, L., Aksit, M.: A model for composable composition operators: expressing object and aspect compositions with first-class operators. In: AOSD 2010, pp. 145–156. ACM (2010)

    Google Scholar 

  13. Kamina, T., Aotani, T., Masuhara, H.: EventCJ: a context-oriented programming language with declarative event-based context transition. In: AOSD 2011, pp. 253–264. ACM (2011)

    Google Scholar 

  14. 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)

    Chapter  Google Scholar 

  15. Hansen, K.A., Endoh, Y.: A fine-grained join point model for more reusable aspects. In: Kobayashi, N. (ed.) APLAS 2006. LNCS, vol. 4279, pp. 131–147. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  16. Meyerovich, L.A., Guha, A., Baskin, J., Cooper, G.H., Greenberg, M., Bromfield, A., Krishnamurthi, S.: Flapjax: a programming language for Ajax applications. In: OOPSLA 2009, pp. 1–20. ACM (2009)

    Google Scholar 

  17. Microsoft Corporation. C# language specification

    Google Scholar 

  18. Microsoft Corporation. Messages and message queues

    Google Scholar 

  19. Núñez, A., Noyé, J., Gasiūnas, V.: Declarative definition of contexts with polymorphic events. In: COP 2009, pp. 2:1–2:6. ACM (2009)

    Google Scholar 

  20. Oracle Corporation. OpenJDK: Project Lambda, http://openjdk.java.net/projects/lambda/

  21. Orleans, D.: Incremental programming with extensible decisions. In: AOSD 2002, pp. 56–64. ACM (2002)

    Google Scholar 

  22. Rajan, H., Leavens, G.T.: Ptolemy: A language with quantified, typed events. In: Vitek, J. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 155–179. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  23. Schippers, H., Janssens, D., Haupt, M., Hirschfeld, R.: Delegation-based semantics for modularizing crosscutting concerns. In: OOPSLA 2008, pp. 525–542. ACM (2008)

    Google Scholar 

  24. Smith, R.B., Ungar, D.: Programming as an experience: The inspiration for Self. In: Olthoff, W. (ed.) ECOOP 1995. LNCS, vol. 952, pp. 303–330. Springer, Heidelberg (1995)

    Google Scholar 

  25. Sun Microsystems. Abstract Window Toolkit, http://java.sun.com/products/jdk/awt/

  26. The AspectJ Project, http://www.eclipse.org/aspectj/

  27. The Boost Project. Boost.Signals, http://www.boost.org/libs/signals/

  28. The JastAdd Project. JastAddJ: The JastAdd Extensible Java Compiler, http://jastadd.org/web/jastaddj/

  29. The Qt Project. Signals & Slots, http://qt-project.org/doc/signalsandslots

  30. The SAX project. Simple API for XML, http://www.saxproject.org/

  31. The Self project, http://selflanguage.org/

  32. The X.Org project. Xlib in X window system, http://www.x.org/

  33. Widom, J., Finkelstein, S.J.: Set-oriented production rules in relational database systems. In: SIGMOD 1990, pp. 259–270. ACM Press (1990)

    Google Scholar 

  34. Zhuang, Y., Chiba, S.: Applying DominoJ to GoF Design Patterns. Technical report, Dept. of Math. and Comp., Tokyo Institute of Technology (2011)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Zhuang, Y., Chiba, S. (2014). Method Slots: Supporting Methods, Events, and Advices by a Single Language Construct. In: Chiba, S., Tanter, É., Bodden, E., Maoz, S., Kienzle, J. (eds) Transactions on Aspect-Oriented Software Development XI. Lecture Notes in Computer Science, vol 8400. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-55099-7_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-55099-7_3

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-55098-0

  • Online ISBN: 978-3-642-55099-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics