Advertisement

A Unified and Formal Programming Model for Deltas and Traits

  • Ferruccio DamianiEmail author
  • Reiner Hähnle
  • Eduard Kamburjan
  • Michael Lienhardt
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10202)

Abstract

This paper presents a unified model for two complementary approaches of code reuse: Traits and Delta-Oriented Programming (DOP). Traits are used to modularly construct classes, while DOP is a modular approach to construct Software Product Lines. In this paper, we identify the common structure of these two approaches, present a core calculus that combine Traits and DOP in a unified framework, provide an implementation for the ABS modelling language, and illustrate its application in an industrial modeling scenario.

Keywords

Software Product Line Trait Expression Tool Chain Trait Composition Abstract Syntax Tree 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Notes

Acknowledgments

We thank the anonymous reviewers for comments and suggestions for improving the presentation.

References

  1. 1.
    Apel, S., Batory, D.S., Kästner, C., Saake, G.: Feature-Oriented Software Product Lines: Concepts and Implementation. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  2. 2.
    Batory, D., Sarvela, J., Rauschmayer, A.: Scaling step-wise refinement. IEEE TSE 30(6), 355–371 (2004)Google Scholar
  3. 3.
    Bettini, L., Damiani, F.: Generic traits for the Java platform. In: PPPJ, pp. 5–16. ACM (2014)Google Scholar
  4. 4.
    Bettini, L., Damiani, F., Schaefer, I.: Compositional type checking of delta-oriented software product lines. Acta Informatica 50(2), 77–122 (2013)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Bettini, L., Damiani, F., Schaefer, I.: Implementing type-safe software product lines using parametric traits. Sci. Comput. Program. 97, 282–308 (2015). Part 3CrossRefGoogle Scholar
  6. 6.
    Bettini, L., Damiani, F., Schaefer, I., Strocco, F.: TraitRecordJ: a programming language with traits and records. Sci. Comput. Program. 78(5), 521–541 (2013)CrossRefGoogle Scholar
  7. 7.
    Bezirgiannis, N., de Boer, F.: ABS: a high-level modeling language for cloud-aware programming. In: Freivalds, R.M., Engels, G., Catania, B. (eds.) SOFSEM 2016. LNCS, vol. 9587, pp. 433–444. Springer, Heidelberg (2016). doi: 10.1007/978-3-662-49192-8_35 CrossRefGoogle Scholar
  8. 8.
    Bubel, R., Flores Montoya, A., Hähnle, R.: Analysis of executable software models. In: Bernardo, M., Damiani, F., Hähnle, R., Johnsen, E.B., Schaefer, I. (eds.) SFM 2014. LNCS, vol. 8483, pp. 1–25. Springer, Cham (2014). doi: 10.1007/978-3-319-07317-0_1 CrossRefGoogle Scholar
  9. 9.
    Cassou, D., Ducasse, S., Wuyts, R.: Traits at work: the design of a new trait-based stream library. Comput. Lang. Syst. Struct. 35(1), 2–20 (2009)Google Scholar
  10. 10.
    Clarke, D., Diakov, N., Hähnle, R., Johnsen, E.B., Schaefer, I., Schäfer, J., Schlatte, R., Wong, P.Y.H.: Modeling spatial and temporal variability with the HATS abstract behavioral modeling language. In: Bernardo, M., Issarny, V. (eds.) SFM 2011. LNCS, vol. 6659, pp. 417–457. Springer, Heidelberg (2011). doi: 10.1007/978-3-642-21455-4_13 CrossRefGoogle Scholar
  11. 11.
    Damiani, F., Lienhardt, M.: On type checking delta-oriented product lines. In: Ábrahám, E., Huisman, M. (eds.) IFM 2016. LNCS, vol. 9681, pp. 47–62. Springer, Cham (2016). doi: 10.1007/978-3-319-33693-0_4 CrossRefGoogle Scholar
  12. 12.
    Damiani, F., Schaefer, I.: Family-based analysis of type safety for delta-oriented software product lines. In: Margaria, T., Steffen, B. (eds.) ISoLA 2012. LNCS, vol. 7609, pp. 193–207. Springer, Heidelberg (2012). doi: 10.1007/978-3-642-34026-0_15 CrossRefGoogle Scholar
  13. 13.
    Damiani, F., Schaefer, I., Schuster, S., Winkelmann, T.: Delta-trait programming of software product lines. In: Margaria, T., Steffen, B. (eds.) ISoLA 2014. LNCS, vol. 8802, pp. 289–303. Springer, Heidelberg (2014). doi: 10.1007/978-3-662-45234-9_21 Google Scholar
  14. 14.
    Ducasse, S., Nierstrasz, O., Schärli, N., Wuyts, R., Black, A.P.: Traits: a mechanism for fine-grained reuse. ACM Trans. Program. Lang. Syst. 28(2), 331–388 (2006)CrossRefGoogle Scholar
  15. 15.
    Evaluation of Core Framework. Deliverable 5.2 of project FP7-231620 (HATS), August 2010. http://www.hats-project.eu
  16. 16.
    Kamburjan, E., Hähnle, R.: Uniform modeling of railway operations. In: Artho, C., Ölveczky, P. (eds.) FTSCS 2016. CCIS, vol. 694, pp. 55–71. Springer, Cham (2016). doi: 10.1007/978-3-319-53946-1_4 CrossRefGoogle Scholar
  17. 17.
    Hähnle, R., Muschevici, R.: Towards incremental validation of railway systems. In: Margaria, T., Steffen, B. (eds.) ISoLA 2016. LNCS, vol. 9953, pp. 433–446. Springer, Cham (2016). doi: 10.1007/978-3-319-47169-3_36 CrossRefGoogle Scholar
  18. 18.
    Helvensteijn, M., Muschevici, R., Wong, P.: Delta modeling in practice, a Fredhopper case study. In: 6th International Workshop on Variability Modelling of Software-intensive Systems, Leipzig, Germany. ACM (2012)Google Scholar
  19. 19.
    Henrio, L., Rochas, J.: From modelling to systematic deployment of distributed active objects. In: Lluch Lafuente, A., Proença, J. (eds.) COORDINATION 2016. LNCS, vol. 9686, pp. 208–226. Springer, Cham (2016). doi: 10.1007/978-3-319-39519-7_13 Google Scholar
  20. 20.
    Johnsen, E.B., Hähnle, R., Schäfer, J., Schlatte, R., Steffen, M.: ABS: a core language for abstract behavioral specification. In: Aichernig, B.K., Boer, F.S., Bonsangue, M.M. (eds.) FMCO 2010. LNCS, vol. 6957, pp. 142–164. Springer, Heidelberg (2011). doi: 10.1007/978-3-642-25271-6_8 CrossRefGoogle Scholar
  21. 21.
    Koscielny, J., Holthusen, S., Schaefer, I., Schulze, S., Bettini, L., Damiani, F.: DeltaJ 1.5: delta-oriented programming for Java 1.5. In: PPPJ, pp. 63–74. ACM (2014)Google Scholar
  22. 22.
    Liquori, L., Spiwack, A.: Feathertrait: a modest extension of featherweight java. ACM Trans. Program. Lang. Syst. 30(2), 11:1–11:32 (2008)CrossRefzbMATHGoogle Scholar
  23. 23.
    Lopez-Herrejon, R.E., Batory, D., Cook, W.: Evaluating support for features in advanced modularization technologies. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 169–194. Springer, Heidelberg (2005). doi: 10.1007/11531142_8 CrossRefGoogle Scholar
  24. 24.
    Mikhajlov, L., Sekerinski, E.: A study of the fragile base class problem. In: Jul, E. (ed.) ECOOP 1998. LNCS, vol. 1445, pp. 355–382. Springer, Heidelberg (1998). doi: 10.1007/BFb0054099 CrossRefGoogle Scholar
  25. 25.
    Murphy-Hill, E.R., Quitslund, P.J., Black, A.P.: Removing duplication from java.io: a case study using traits. In: Companion 20th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA, pp. 282–291. ACM (2005)Google Scholar
  26. 26.
    Nierstrasz, O., Ducasse, S., Schärli, N.: Flattening traits. J. Object Technol. 5(4), 129–148 (2006)CrossRefGoogle Scholar
  27. 27.
    Pohl, K., Böckle, G., Van Der Linden, F.: Software Product Line Engineering: Foundations, Principles, and Techniques. Springer, Heidelberg (2005)CrossRefzbMATHGoogle Scholar
  28. 28.
    Quitslund, P.J., Murphy-Hill, R., Black, A.P.: Supporting java traits in eclipse. In: OOPSLA Workshop on Eclipse Technology eXchange, ETX, pp. 37–41. ACM (2004)Google Scholar
  29. 29.
    Reppy, J., Turon, A.: Metaprogramming with traits. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 373–398. Springer, Heidelberg (2007). doi: 10.1007/978-3-540-73589-2_18 CrossRefGoogle Scholar
  30. 30.
    Resource-aware Modeling of the ENG Case Study. Deliverable 4.4.2 of project FP7-610582 (Envisage), July 2015. http://www.envisage-project.eu
  31. 31.
    Schaefer, I., Bettini, L., Bono, V., Damiani, F., Tanzarella, N.: Delta-oriented programming of software product lines. In: Bosch, J., Lee, J. (eds.) SPLC 2010. LNCS, vol. 6287, pp. 77–91. Springer, Heidelberg (2010). doi: 10.1007/978-3-642-15579-6_6 CrossRefGoogle Scholar
  32. 32.
    Schaefer, I., Damiani, F.: Pure delta-oriented programming. In: Proceedings of the 2nd International Workshop on Feature-Oriented Software Development, FOSD, pp. 49–56. ACM (2010)Google Scholar
  33. 33.
    Schaefer, I., Rabiser, R., Clarke, D., Bettini, L., Benavides, D., Botterweck, G., Pathak, A., Trujillo, S., Villela, K.: Software diversity: state of the art and perspectives. J. Softw. Tools Technol. Transf. 14(5), 477–495 (2012)CrossRefGoogle Scholar
  34. 34.
    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). doi: 10.1007/978-3-540-45070-2_12 CrossRefGoogle Scholar
  35. 35.
    Serbanescu, V., Azadbakht, K., de Boer, F.S., Nagarajagowda, C., Nobakht, B.: A design pattern for optimizations in data intensive applications using ABS and Java 8. Concurrency Comput. Pract. Experience 28(2), 374–385 (2016)CrossRefGoogle Scholar
  36. 36.
    Smith, C., Drossopoulou, S.: Chai: traits for java-like languages. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 453–478. Springer, Heidelberg (2005). doi: 10.1007/11531142_20 CrossRefGoogle Scholar
  37. 37.
    Winkelmann, T., Koscielny, J., Seidl, C., Schuster, S., Damiani, F., Schaefer, I.: Parametric DeltaJ 1.5: propagating feature attributes into implementation artifacts. In: Workshops Software Engineering. CEUR Workshop Proceedings, vol. 1559, pp. 40–54. CEUR-WS.org (2016)Google Scholar

Copyright information

© Springer-Verlag GmbH Germany 2017

Authors and Affiliations

  • Ferruccio Damiani
    • 1
    Email author
  • Reiner Hähnle
    • 1
    • 2
  • Eduard Kamburjan
    • 2
  • Michael Lienhardt
    • 1
  1. 1.University of TorinoTorinoItaly
  2. 2.Technical University DarmstadtDarmstadtGermany

Personalised recommendations