A core calculus for dynamic delta-oriented programming

  • Ferruccio Damiani
  • Luca Padovani
  • Ina Schaefer
  • Christoph Seidl
Original Article
  • 103 Downloads

Abstract

Delta-oriented programming (DOP) is a flexible approach to the implementation of software product lines (SPLs). Delta-oriented SPLs consist of a code base (a set of delta modules encapsulating changes to object-oriented programs) and a product line declaration (providing the connection of the delta modules with the product features). In this paper, we present a core calculus that extends DOP with the capability to switch the implemented product configuration at runtime. A dynamic delta-oriented SPL is a delta-oriented SPL with a dynamic reconfiguration graph that specifies how to switch between different feature configurations. Dynamic DOP supports also (unanticipated) software evolution such that at runtime, the product line declaration, the code base and the dynamic reconfiguration graph can be changed in any (unanticipated) way that preserves the currently running product, which is essential when evolution affects existing features. The type system of our dynamic DOP core calculus ensures that the dynamic reconfigurations lead to type safe products and do not cause runtime type errors.

References

  1. 1.
    Aldrich, J., Sunshine,J., Saini, D., Sparks, Z.: Typestate-oriented programming. In: Proceedings of the 24th ACM SIGPLAN conference companion on object oriented programming systems languages and applications, OOPSLA ’09, pp. 1015–1022. ACM, New York 2009). doi:10.1145/1639950.1640073
  2. 2.
    Alves, V., Matos,P. Jr, Cole, L., Vasconcelos, A., Borba, P., Ramalho, G.: Extracting and evolving code in product lines with aspect-oriented programming. In: Transactions on aspect-oriented software development IV, pp. 117–142. Springer, Berlin (2007)Google Scholar
  3. 3.
    Ancona, D., Anderson, C., Damiani, F., Drossopoulou, S., Giannini, P., Zucca, E.: A provenly correct translation of fickle into java. ACM Trans. Program. Lang. Syst. 29(2), (2007). doi:10.1145/1216374.1216381
  4. 4.
    Andrade, R., Rebêlo, H., Ribeiro, M., Borba, P.: Flexible feature binding with aspectj-based idioms. J. UCS 20(5), 692–719 (2014)Google Scholar
  5. 5.
    Apel, S., Kästner, C., Größlinger, A., Lengauer, C.: Type safety for feature-oriented product lines. Autom. Softw. Eng. 17(3), 251–300 (2010). doi:10.1007/s10515-010-0066-8 CrossRefGoogle Scholar
  6. 6.
    Apel, S., Leich, T., Rosenmller, M., Saake, G.: Featurec++: on the symbiosis of feature-oriented and aspect-oriented programming. In: Glück, R., Lowry, M. (eds.) Generative Programming and Component Engineering, volume 3676 of Lecture Notes in Computer Science, pp. 125–140. Springer, Berlin (2005). doi:10.1007/11561347_10 Google Scholar
  7. 7.
    Aracic, I., Gasiunas, V., Mezini, M., Ostermann, K.: An overview of caesarj. In: Rashid, A., Aksit, M. (eds.) Transactions on Aspect-Oriented Software Development I. Lecture Notes in Computer Science, vol. 3880, pp. 135–173. Springer, Berlin (2006). doi:10.1007/11687061_5 Google Scholar
  8. 8.
    Batory, D.: Feature models, grammars, and propositional formulas. In: Obbink, H., Pohl, K. (eds.) Software Product Lines. Lecture Notes in Computer Science, vol. 3714, pp. 7–20. Springer, Berlin (2005). doi:10.1007/11554844_3 Google Scholar
  9. 9.
    Batory, D., Sarvela, J.N., Rauschmayer, A.: Scaling step-wise refinement. IEEE Trans. Softw. Eng. 30(6), 355–371 (2004). doi:10.1109/TSE.2004.23 CrossRefGoogle Scholar
  10. 10.
    Bettini, L., Bono, V.: Type safe dynamic object delegation in class-based languages. In: Proceedings of the 6th international symposium on principles and practice of programming in Java, PPPJ ’08, pp. 171–180. ACM, New York (2008). doi:10.1145/1411732.1411756
  11. 11.
    Bettini, L., Bono, V., Venneri, B.: Delegation by object composition. Sci. Comput. Program. 76(11):992–1014 (2011). doi:10.1016/j.scico.2010.04.006. http://www.sciencedirect.com/science/article/pii/S0167642310000754
  12. 12.
    Bettini, L., Capecchi, S., Damiani, F.: On flexible dynamic trait replacement for java-like languages. Sci. Comput. Program., 78(7):907–932 (2013a). doi:10.1016/j.scico.2012.11.003. http://www.sciencedirect.com/science/article/pii/S0167642312002092
  13. 13.
    Bettini, L., Damiani, F., Schaefer, I.: Compositional type checking of delta-oriented software product lines. Acta Informatica 50, 77–122 (2013b). doi:10.1007/s00236-012-0173-z MathSciNetCrossRefMATHGoogle Scholar
  14. 14.
    Bettini, L., Damiani, F., Schaefer, I.: Implementing type-safe software product lines using parametric traits. Sci. Comput. Program. (2013c). doi:10.1016/j.scico.2013.07.016. http://www.sciencedirect.com/science/article/pii/S0167642313001901
  15. 15.
    Bubel, R., Damiani, F., Hähnle, R., Johnsen, E.B., Owe, O., Schaefer, I., Yu, I.C.: Proof repositories for compositional verification of evolving software systems, pp. 130–156. Springer International Publishing, Cham (2016). doi:10.1007/978-3-319-46508-1_8
  16. 16.
    Capilla, R., Bosch, J., Trinidad, P., Ruiz-Corts, A., Hinchey, M.: An overview of dynamic software product line architectures and techniques: observations from research and industry. J. Syst. Softw. 91:3–23 (2014). doi:10.1016/j.jss.2013.12.038. http://www.sciencedirect.com/science/article/pii/S0164121214000119
  17. 17.
    Previtali, S.C., Gross, T.R.: Aspect-based dynamic software updating: a model and its empirical evaluation. In: AOSD, pp. 105–116. ACM, New York (2011). doi:10.1145/1960275.1960289
  18. 18.
    Chakravarthy, V., Regehr, J., Eide, E.: Edicts: implementing features with flexible binding times. In: Proceedings of the 7th international conference on aspect-oriented software development, AOSD ’08, pp. 108–119. ACM, New York (2008). doi:10.1145/1353482.1353496
  19. 19.
    Cytron, R., Ferrante, J., Rosen, B.K., Wegman, M.N., Kenneth Zadeck, F.: Efficiently computing static single assignment form and the control dependence graph. ACM Trans. Program. Lang. Syst. 13(4), 451–490 (1991). doi:10.1145/115372.115320 CrossRefGoogle Scholar
  20. 20.
    Damiani, F., Drossopoulou, S., Giannini, P.: Refined effects for unanticipated object re-classification: Fickle\(_{3}\). In: Blundo, C., Laneve, C. (eds.) Theoretical computer science. Lecture Notes in Computer Science, vol. 2841 pp. 97–110. Springer, Berlin (2003). doi:10.1007/978-3-540-45208-9_9
  21. 21.
    Damiani, F., Gladisch, C., Tyszberowicz, S.: Refinement-based testing of delta-oriented product lines. In: Proceedings of the 2013 international conference on principles and practices of programming on the java platform: virtual machines, languages, and tools, PPPJ ’13, pp. 135–140. ACM, New York (2013). doi:10.1145/2500828.2500841
  22. 22.
    Damiani, F., Lienhardt, M.: On Type Checking Delta-Oriented Product Lines, pp. 47–62. Springer International Publishing, Cham (2016). doi:10.1007/978-3-319-33693-0_4 Google Scholar
  23. 23.
    Damiani, F., Owe, O., Dovland, J., Schaefer, I., Johnsen, E.B. , Yu, I.C.: A transformational proof system for delta-oriented programming. In: Proceedings of the 16th international software product line conference, vol. 2, SPLC ’12, pp. 53–60. ACM, New York (2012a). doi:10.1145/2364412.2364422
  24. 24.
    Damiani, F., Padovani, L., Schaefer, I.: A formal foundation for dynamic delta-oriented software product lines. In: Proceedings of the 11th international conference on generative programming and component engineering, GPCE ’12, pp. 1–10. ACM, New York (2012b). doi:10.1145/2371401.2371403
  25. 25.
    Damiani, F., Schaefer, I.: Dynamic delta-oriented programming. In: Proceedings of the 15th international software product line conference, volume 2, SPLC ’11, pp. 34:1–34:8. ACM, New York (2011). doi:10.1145/2019136.2019175
  26. 26.
    Damiani, F., Schaefer, I.: Family-based analysis of type safety for delta-oriented software product lines, pp. 193–207. Springer, Berlin (2012). doi:10.1007/978-3-642-34026-0_15
  27. 27.
    Dinkelaker, T., Mitschke, R., Fetzer, K., Mezini, M.: A dynamic software product line approach using aspect models at runtime. In: Fifth domain-specific aspect languages workshop, vol. 39, (2010)Google Scholar
  28. 28.
    Drossopoulou, S., Damiani, F., Dezani-Ciancaglini, M., Giannini, P.: More dynamic object reclassification: Fickle&par. ACM Trans. Program. Lang. Syst. 24(2), 153–191 (2002). doi:10.1145/514952.514955 CrossRefGoogle Scholar
  29. 29.
    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). doi:10.1145/1119479.1119483 CrossRefGoogle Scholar
  30. 30.
    Ernst, E.: gbeta–a Language with Virtual Attributes, Block Structure, and Propagating, Dynamic Inheritance. PhD thesis, Department of Computer Science, University of Århus, Denmark (1999). http://www.daimi.au.dk/~eernst/gbeta/
  31. 31.
    Groher, I., Voelter, M.: Aspect-oriented model-driven software product line engineering. In: Transactions on aspect-oriented software development VI, pp. 111–152. Springer (2009)Google Scholar
  32. 32.
    Gu, T., Cao, C., Xu, C., Ma, X., Zhang, L., Lü, J.: Low-disruptive dynamic updating of java applications. Inf. Softw. Technol. 56(9):1086–1098 (2014). doi:10.1016/j.infsof.2014.04.003. http://www.sciencedirect.com/science/article/pii/S0950584914000846
  33. 33.
    Günther, S., Sunkle, S,: Dynamically adaptable software product lines using ruby metaprogramming. In: Proceedings of the 2nd international workshop on feature-oriented software development, FOSD ’10, pp. 80–87. ACM, New York (2010). doi:10.1145/1868688.1868700
  34. 34.
    Hähnle, R., Schaefer, I.: A liskov principle for delta-oriented programming. In: Margaria, T., Steffen, B. (eds.) Leveraging applications of formal methods, verification and validation. Technologies for Mastering Change. Lecture Notes in Computer Science, vol. 7609, pp. 32–46. Springer, Berlin (2012). doi:10.1007/978-3-642-34026-0_4
  35. 35.
    Hallsteinsen, S., Hinchey, M., Park, S., Schmid, K.: Dynamic software product lines. Computer 41(4), 93–95 (2008). doi:10.1109/MC.2008.123 CrossRefGoogle Scholar
  36. 36.
    Herrmann, S.: A precise model for contextual roles: The programming language ObjectTeams/Java. Appl. Ontol. 2(2):181–207 (2007). http://iospress.metapress.com/content/M186325145U8166N
  37. 37.
    Hirschfeld, R., Costanza, P., Nierstrasz, O.: Context-oriented programming. J. Object Technol. 7(3):125–151 (2008). doi:10.5381/jot.2008.7.3.a4. http://www.jot.fm/contents/issue_2008_03/article4.html
  38. 38.
    Igarashi, A., Pierce, B.C., Wadler, P.: Featherweight java: A minimal core calculus for java and gj. ACM Trans. Program. Lang. Syst. 23(3), 396–450 (2001). doi:10.1145/503502.503505 CrossRefGoogle Scholar
  39. 39.
    Johnsen, E.B., Kyas, M., Yu, I.C.: Dynamic classes: modular asynchronous evolution of distributed concurrent objects. In: Cavalcanti, A., Dams, D.R. (eds.) FM 2009: formal methods. Lecture Notes in Computer Science, vol. 5850, pp 596–611. Springer, Berlin (2009). doi:10.1007/978-3-642-05089-3_38
  40. 40.
    Kästner, C., Apel, S., Batory, D.: A case study implementing features using aspectJ. In: IEEE computer society software product line conference, pp. 223–232, Los Alamitos, CA (2007). doi:10.1109/SPLINE.2007.12
  41. 41.
    Kästner, C., Apel, S., Kuhlemann, M.:. Granularity in software product lines. In: Proceedings of the 30th international conference on software engineering, ICSE ’08, pp. 311–320. ACM, New York (2008). doi:10.1145/1368088.1368131
  42. 42.
    Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An overview of aspectj. In: Knudsen, J.L. (eds.) ECOOP 2001 object-oriented programming. Lecture Notes in Computer Science, vol. 2072, pp. 327–354. Springer, Berlin (2001). doi:10.1007/3-540-45337-7_18
  43. 43.
    Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C., Loingtier, J.-M., Irwin, J.: Aspect-Oriented Programming. Springer, Berlin (1997)CrossRefGoogle Scholar
  44. 44.
    Koscielny, J., Holthusen, S., Schaefer, I., Schulze, S., Bettini, L., Damiani, F.: Deltaj 1.5: delta-oriented programming for java 1.5. In: PPPJ 2014, pp. 63–74 (2014)Google Scholar
  45. 45.
    Krueger, C.: Eliminating the adoption barrier. IEEE Softw. 19(4), 29–31 (2002). doi:10.1109/MS.2002.1020284 CrossRefGoogle Scholar
  46. 46.
    Lochau, M., Schaefer, I., Kamischke, J., Lity, S.: Incremental model-based testing of delta-oriented software product lines. In: Brucker, A.D., Julliand, J. (eds.) Tests and proofs. Lecture Notes in Computer Science, vol. 7305, pp. 67–82. Springer, Berlin (2012). doi:10.1007/978-3-642-30473-6_7
  47. 47.
    Lopez-Herrejon, R.E., Batory, D., Cook, W.: Evaluating support for features in advanced modularization technologies. In: Black, A.P. (ed) ECOOP 2005–object-oriented programming. Lecture Notes in Computer Science, vol. 3586, pp. 169–194. Springer, Berlin (2005). doi:10.1007/11531142_8
  48. 48.
    Pohl, K., Böckle, G., van der Linden, F.J.: Software Product Line Engineering–Foundations, Principles and Techniques. Springer, Berlin (2005)MATHGoogle Scholar
  49. 49.
    Pukall, M., Kästner, C., Cazzola, W., Götz, S., Grebhahn, A., Schöter, R., Saake, G.: JavAdaptor–flexible runtime updates of java applications. Softw. Pract. Exp. 43(2), 153–185 (2013). doi:10.1002/spe.2107 CrossRefGoogle Scholar
  50. 50.
    Ribeiro, M., Cardoso, R., Borba, P., Bonifácio, R., Rebêlo, H.: Does aspectj provide modularity when implementing features with flexible binding times? Third Latin American Workshop on Aspect-Oriented Software Development (LA-WASP 2009), Fortaleza, Ceara, Brazil, pp. 1–6 (2009)Google Scholar
  51. 51.
    Rosenmüller, M., Siegmund, N., Apel, S., Saake, G.: Flexible feature binding in software product lines. Autom. Softw. Eng. 18(2), 163–197 (2011a). doi:10.1007/s10515-011-0080-5 CrossRefGoogle Scholar
  52. 52.
    Rosenmüller, M., Siegmund, N., Pukall, M., Apel, S.: Tailoring dynamic software product lines. SIGPLAN Not. 47(3), 3–12 (2011b). doi:10.1145/2189751.2047866 Google Scholar
  53. 53.
    Saini, D., Sunshine, J., Aldrich, J.: A theory of typestate-oriented programming. In: FTfJP, pp. 9:1–9:7. ACM (2010). doi:10.1145/1924520.1924529
  54. 54.
    Schaefer, I., Bettini, L., Bono, V., Damiani, F., Tanzarella, N.: Delta-oriented programming of software product lines. In: Bosch, J., Lee, J. (eds.) Software product lines: going beyond. Lecture Notes in Computer Science, vol. 6287, pp. 77–91. Springer, Berlin (2010). doi:10.1007/978-3-642-15579-6_6
  55. 55.
    Schaefer, I., Damiani, F.: Pure delta-oriented programming. In: Proceedings of the 2nd international workshop on feature-oriented software development, FOSD ’10, pp. 49–56. ACM, New York (2010). doi:10.1145/1868688.1868696
  56. 56.
    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. STTT 14(5), 477–495 (2012). doi:10.1007/s10009-012-0253-y CrossRefGoogle Scholar
  57. 57.
    Seidl, C., Schaefer, I., Aßmann, U.: Integrated management of variability in space and time in software families. In: Proceedings of the 18th international software product line conference (SPLC), SPLC’14 (2014)Google Scholar
  58. 58.
    Smaragdakis, Y., Batory, D.: Mixin layers: An object-oriented implementation technique for refinements and collaboration-based designs. ACM Trans. Softw. Eng. Methodol. 11(2), 215–255 (2002). doi:10.1145/505145.505148 CrossRefGoogle Scholar
  59. 59.
    Smith, C., Drossopoulou, S.: Chai: Traits for java-like languages. In: Black, A.P. (ed.) ECOOP 2005–object-oriented programming. Lecture Notes in Computer Science, vol. 3586, pp. 453–478. Springer, Berlin (2005). doi:10.1007/11531142_20
  60. 60.
    Tarr, P., Ossher, H., Harrison, W., Sutton, S.M. Jr.: N degrees of separation: Multi-dimensional separation of concerns. In: Proceedings of the 21st International conference on software engineering, ICSE ’99, pp. 107–119. ACM, New York (1999). doi:10.1145/302405.302457
  61. 61.
    Würthinger, T., Wimmer, C., Stadler, L.: Unrestricted and safe dynamic code evolution for java. Sci. Comput. Program. 78(5):481–498 (2013). doi:10.1016/j.scico.2011.06.005. http://www.sciencedirect.com/science/article/pii/S0167642311001456

Copyright information

© Springer-Verlag Berlin Heidelberg 2017

Authors and Affiliations

  1. 1.Università di TorinoTurinItaly
  2. 2.Technische Universität BraunschweigBraunschweigGermany

Personalised recommendations