Propagation of Behavioral Variations with Delegation Proxies

  • Camille Teruel
  • Erwann Wernli
  • Stéphane Ducasse
  • Oscar Nierstrasz
Chapter
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8989)

Abstract

Scoping behavioral variations to dynamic extents is useful to support non-functional concerns that otherwise result in cross-cutting code. Unfortunately, such forms of scoping are difficult to obtain with traditional reflection or aspects. We propose delegation proxies, a dynamic proxy model that supports behavioral intercession through the interception of various interpretation operations. Delegation proxies permit different behavioral variations to be easily composed together. We show how delegation proxies enable behavioral variations that can propagate to dynamic extents. We demonstrate our approach with examples of behavioral variations scoped to dynamic extents that help simplify code related to safety, reliability, and monitoring.

Keywords

Reflection Proxy Delegation Propagation Dynamic extent 

Notes

Acknowledgments

We thank Jorge Ressia, Mircea Lungu, Niko Schwarz and Jan Kurš for support and feedback about ideas in the paper. We gratefully acknowledge the financial support of the Swiss National Science Foundation for the project “Agile Software Assessment” (SNSF project Np. 200020-144126/1, Jan 1, 2013 - Dec. 30, 2015) and of the French General Directorate for Armament (DGA).

References

  1. [ADD+10]
    Arnaud, J.-B., Denker, M., Ducasse, S., Pollet, D., Bergel, A., Suen, M.: Read-only execution for dynamic languages. In: Vitek, J. (ed.) TOOLS 2010. LNCS, vol. 6141, pp. 117–136. Springer, Heidelberg (2010) CrossRefGoogle Scholar
  2. [AGMO06]
    Aracic, I., Gasiunas, V., Mezini, M., Ostermann, K.: An overview of CaesarJ. In: Rashid, A., Akşit, M. (eds.) Transactions on Aspect-Oriented Software Development I. LNCS, vol. 3880, pp. 135–173. Springer, Heidelberg (2006) CrossRefGoogle Scholar
  3. [ALS08]
    Apel, S., Leich, T., Saake, G.: Aspectual feature modules. IEEE Trans. Software Eng. 34(2), 162–180 (2008)CrossRefGoogle Scholar
  4. [Arn13]
    Arnaud, J.-B.: Towards First Class References as a Security Infrastructure in Dynamically-Typed Languages. Ph.D. thesis, Université de Lille (2013)Google Scholar
  5. [AWB+94]
    Aksit, M., Wakita, K., Bosch, J., Bergmans, L., Yonezawa, A.: Abstracting object interactions using composition filter. In: Guerraoui, R., Nierstrasz, O., Riveill, M. (eds.) Object-Based Distributed Programming. LNCS, vol. 791, pp. 152–184. Springer, Heidelberg (1994) CrossRefGoogle Scholar
  6. [BCD13]
    Bettini, L., Capecchi, S., Damiani, F.: On flexible dynamic trait replacement for Java-like languages. Sci. Comput. Program. 78(7), 907–932 (2013)CrossRefMATHGoogle Scholar
  7. [BCG07]
    Bettini, L., Capecchi, S., Giachino, E.: Featherweight wrap Java. In: Proceedings of the ACM symposium on Applied computing (2007)Google Scholar
  8. [BDNW08]
    Bergel, A., Ducasse, S., Nierstrasz, O., Wuyts, R.: Stateful traits and their formalization. J. Comput. Lang. Syst. Struct. 34(2–3), 83–108 (2008)Google Scholar
  9. [BU04]
    Bracha, G., Ungar, D.: Mirrors: design principles for meta-level facilities of object-oriented programming languages. In: Proceedings of the International Conference on Object-Oriented Programming, Systems, Languages, and Applications (2004)Google Scholar
  10. [BW00]
    Büchi, M., Weck, W.: Generic wrappers. In: Bertino, E. (ed.) ECOOP 2000 — Object-Oriented Programming. LNCS, vol. 1850, pp. 201–225. Springer, Heidelberg (2000) CrossRefGoogle Scholar
  11. [CKL96]
    Chiba, S., Kiczales, G., Lamping, J.: Avoiding confusion in metacircularity: The meta-helix. In: Futatsugi, K., Matsuoka, S. (eds.) Object Technologies for Advanced Software. LNCS, vol. 1049, pp. 157–172. Springer, Heidelberg (1996) CrossRefGoogle Scholar
  12. [Deu81]
    Deutsch, P.L.: Building control structures in the Smalltalk-80 system. BYTE Magazine Special Issue on Smalltalk 6(8), 322–346 (1981)MathSciNetGoogle Scholar
  13. [DSD08]
    Denker, M., Suen, M., Ducasse, S.: The meta in meta-object architectures. In: Paige, R.F., Meyer, B. (eds.) TOOLS EUROPE 2008. LNBIP, vol. 11, pp. 218–237. Springer, Heidelberg (2008) CrossRefGoogle Scholar
  14. [Eug06]
    Eugster, P.: Uniform proxies for Java. In: Proceedings of Object-oriented programming systems, languages, and applications (2006)Google Scholar
  15. [FKF98]
    Flatt, M., Krishnamurthi, S., Felleisen, M.: Classes and mixins. In: Proceedings of Principles of Programming Languages (1998)Google Scholar
  16. [Fut99]
    Futamura, Y.: Partial evaluation of computation process–an approach to a compiler-compiler. Higher-Order and Symbolic Comput. 12(4), 381–391 (1999)CrossRefMATHGoogle Scholar
  17. [HCN08]
    Hirschfeld, R., Costanza, P., Nierstrasz, O.: Context-oriented programming. J. Object Technol. 7(3), 125–151 (2008)CrossRefGoogle Scholar
  18. [HO93]
    Harrison, W., Ossher, H.: Subject-oriented programming (a critique of pure objects). In: Proceedings of Object-Oriented Programming, Systems, Languages, and Applications (1993)Google Scholar
  19. [HS07]
    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) CrossRefGoogle Scholar
  20. [Kni99]
    Kniesel, G.: Type-safe delegation for run-time component adaptation. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628, pp. 351–366. Springer, Heidelberg (1999) Google Scholar
  21. [Kri96]
    Kristensen, B.B.: Object-oriented modeling with roles. Springer, London (1996)CrossRefGoogle Scholar
  22. [Lie86]
    Lieberman, H.: Using prototypical objects to implement shared behavior in object oriented systems. In: Proceedings of Object-Oriented Programming, Systems, Languages, and Applications (1986)Google Scholar
  23. [MKD03]
    Masuhara, H., Kiczales, G., Dutchyn, C.: A compilation and optimization model for aspect-oriented programs. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2662, pp. 46–60. Springer, Heidelberg (2003) CrossRefGoogle Scholar
  24. [MPBD+11]
    Peck, M.M., Bouraqadi, N., Denker, M., Ducasse, S., Fabresse, L.: Efficient proxies in smalltalk. In: Proceedings of ESUG International Workshop on Smalltalk Technologies (2011)Google Scholar
  25. [Ost02]
    Ostermann, K.: Dynamically composable collaborations with delegation layers. In: Proceedings of European Conference on Object-Oriented Programming (2002)Google Scholar
  26. [Pas86]
    Pascoe, G.A.: Encapsulators: a new software paradigm in smalltalk-80. In: Proceedings of Object-Oriented Programming, Systems, Languages, and Applications (1986)Google Scholar
  27. [PLW09]
    Pluquet, F., Langerman, S., Wuyts, R.: Executing code in the past: efficient in-memory object graph versioning. In: Proceedings of Object-Oriented Programming, Systems, Languages, and Applications (2009)Google Scholar
  28. [RGN+12]
    Ressia, J., Gîrba, T., Nierstrasz, O., Perin, F., Renggli, L.: Talents: an environment for dynamically composing units of reuse. Softw. Pract. Experience 44(4), 413–432 (2014)CrossRefGoogle Scholar
  29. [SDNB03]
    Schárli, N., Ducasse, S., Nierstrasz, O., Black, A.P.: Traits: composable units of behaviour. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 248–274. Springer, Heidelberg (2003) CrossRefGoogle Scholar
  30. [STHFF12]
    Stephen Strickland, T., Tobin-Hochstadt, Sam., Findler, R.B., Flatt, M.: Chaperones and impersonators: run-time support for reasonable interposition. In: Proceedings of Object-Oriented Programming, Systems, Languages, and Applications (2012)Google Scholar
  31. [SU96]
    Smith, R.B., Ungar, D.: A simple and unifying approach to subjective objects. Theory and Practice of Object Systems (TAPOS) 2, 161–178 (1996). Special issue on Subjectivity in Object-Oriented SystemsCrossRefGoogle Scholar
  32. [Tan08]
    Tanter, É.: Expressive scoping of dynamically-deployed aspects. In: Proceedings of Aspect-Oriented Software Development (2008)Google Scholar
  33. [Tan10]
    Tanter, É.: Execution levels for aspect-oriented programming. In: Proceedings of Aspect-Oriented Software Development (2010)Google Scholar
  34. [TCD13]
    Teruel, C., Cassou, D., Ducasse, S.: Object Graph Isolation with Proxies. In: Workshop on Dynamic Languages and Applications - European Conference on Object-Oriented Programming (2013)Google Scholar
  35. [TFD+09]
    Tanter, É., Fabry, J., Douence, R., Noyé, J., Südholt, M.: Expressive scoping of distributed aspects. In: Proceedings Aspect-Oriented Software Development (2009)Google Scholar
  36. [TNCC03]
    Tanter, É., Noyé, J., Caromel, D., Cointe, P.: Partial behavioral reflection: Spatial and temporal selection of reification. Languages, and Applications. In: Proceedings of Object-Oriented Programming, Systems (2003)Google Scholar
  37. [VCM10]
    Van Cutsem, T., Miller, M.S.: Proxies: design principles for robust object-oriented intercession APIs. In: DLS ’10 Proceedings of the 6th symposium on Dynamic languages (2010)Google Scholar
  38. [VCM13]
    Van Cutsem, T., Miller, M.S.: Trustworthy proxies. In: Castagna, G. (ed.) ECOOP 2013. LNCS, vol. 7920, pp. 154–178. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  39. [vLDN07]
    von Löwis, M., Denker, M., Nierstrasz, O.: Context-oriented programming: Beyond layers. In: Proceedings of International Conference on Dynamic Languages (2007)Google Scholar
  40. [VTB98]
    Viega, J., Tutt, B., Behrends, R.: Automated elegation is a viable alternative to multiple inheritance in class based languages. University of Virginia, Charlottesville (1998) Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2015

Authors and Affiliations

  • Camille Teruel
    • 1
  • Erwann Wernli
    • 2
  • Stéphane Ducasse
    • 1
  • Oscar Nierstrasz
    • 2
  1. 1.RMOD, INRIA Lille Nord EuropeVilleneuve d’ascqFrance
  2. 2.Software Composition GroupUniversity of BernBernSwitzerland

Personalised recommendations