Skip to main content
Log in

Automatic refactoring of delta-oriented SPLs to remove-free form and replace-free form

  • Foundations for Mastering Change
  • Quantitative Variability Modelling and Analysis
  • Published:
International Journal on Software Tools for Technology Transfer Aims and scope Submit manuscript

Abstract

Delta-oriented programming (DOP) is a flexible transformational approach to implement software product lines (SPLs). In delta-oriented SPLs, variants are generated by applying operations contained in delta modules to a base program. These operations can add, remove or modify named elements in a program (e.g. classes, methods and fields in a Java program). This paper presents two notions of normal form for delta-oriented SPLs. Both normal forms do not contain the remove operation. Additionally, the second normal form enforces a limitation on the use of the method-modify operation. For each of the proposed normal forms an algorithm for refactoring a delta-oriented SPL into one that satisfies that normal form is described. The algorithms are formalized for a core calculus for delta-oriented SPLs of Java programs.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12

Similar content being viewed by others

Notes

  1. We assume unambiguity of the considered delta-oriented SPLs, i.e. for each product, any total order of the activated deltas that respects the (possibly partial) order specified in \(<_{\texttt {L}}\) generates the same variant—see [6, 37] for effective means to ensure unambiguity.

  2. If the activation conditions of deltas are expressed by propositional formulas over features, then the mapping \(\alpha _{\texttt {L}}\) is represented as a mapping from delta names \({\texttt {d}}\) to propositional formulas \(\phi \) (cf. the explanation before Example 2) and the activation condition is set to \(\alpha _{{\texttt {L}}}({\texttt {d}}')\wedge \lnot \alpha _{{\texttt {L}}}({\texttt {d}})\).

  3. When the number of products is too large, testing all the products is unfeasible. This could be addressed by using, e.g. sample-based SPL testing techniques [29, 30, 35, 40], where a subset of products—covering relevant combinations of features—is generated and tested by applying single system testing techniques.

References

  1. Albert, E., de Boer, F.S., Hähnle, R., Johnsen, E.B., Schlatte, R., TapiaTarifa, S.L., Wong, P.Y.H.: Formal modeling and analysis of resource management for cloud architectures: an industrial case study using real-time ABS. Serv. Oriented Comput. Appl. 8(4), 323–339 (2014). https://doi.org/10.1007/s11761-013-0148-0

    Article  Google Scholar 

  2. Alves, V., Gheyi, R., Massoni, T., Kulesza, U., Borba, P., Lucena, C.: Refactoring product lines. In: Proceedings of the 5th International Conference on Generative Programming and Component Engineering, GPCE ’06, pp. 201–210. ACM, New York, NY, USA (2006). https://doi.org/10.1145/1173706.1173737

  3. Apel, S., Batory, D., Kästner, C., Saake, G.: Feature-Oriented Software Product Lines: Concepts and Implementation. Springer, Berlin (2013). https://doi.org/10.1007/978-3-642-37521-7

    Book  Google Scholar 

  4. Batory, D.: Feature models, grammars, and propositional formulas. In: Proceedings of International Software Product Line Conference (SPLC), LNCS, vol. 3714, pp. 7–20. Springer (2005). https://doi.org/10.1007/11554844_3

    Chapter  Google Scholar 

  5. Batory, D., Sarvela, J.N., Rauschmayer, A.: Scaling step-wise refinement. IEEE Trans. Softw. Eng. 30, 355–371 (2004). https://doi.org/10.1109/TSE.2004.23

    Article  Google Scholar 

  6. Bettini, L., Damiani, F., Schaefer, I.: Compositional type checking of delta-oriented software product lines. Acta Inform. 50(2), 77–122 (2013). https://doi.org/10.1007/s00236-012-0173-z

    Article  MathSciNet  MATH  Google Scholar 

  7. Borba, P., Teixeira, L., Gheyi, R.: A theory of software product line refinement. Theor. Comput. Sci. 455, 2–30 (2012). https://doi.org/10.1016/j.tcs.2012.01.031

    Article  MathSciNet  MATH  Google Scholar 

  8. Capilla, R., Bosch, J., Trinidad, P., Ruiz-Cortés, 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). https://doi.org/10.1016/j.jss.2013.12.038

    Article  Google Scholar 

  9. Chesta, C., Damiani, F., Dobriakova, L., Guernieri, M., Martini, S., Nieke, M., Rodrigues, V., Schuster, S.: A toolchain for delta-oriented modeling of software product lines. In: Margaria T., Steffen B. (eds.) Leveraging Applications of Formal Methods, Verification and Validation: Discussion, Dissemination, Applications: 7th International Symposium, ISoLA 2016, Imperial, Corfu, Greece, 10–14 October 2016, Proceedings, Part II, Lecture Notes in Computer Science, vol. 9953, pp. 497–511. Springer International Publishing, Cham (2016). https://doi.org/10.1007/978-3-319-47169-3_40

    Chapter  Google Scholar 

  10. Clarke, D., Diakov, N., Hähnle, R., Johnsen, E., Schaefer, I., Schäfer, J., Schlatte, R., Wong, P.: Modeling spatial and temporal variability with the HATS abstract behavioral modeling language. In: Formal Methods for Eternal Networked Software Systems, Lecture Notes in Computer Science, vol. 6659, pp. 417–457. Springer International Publishing (2011). https://doi.org/10.1007/978-3-642-21455-4_13

    Chapter  Google Scholar 

  11. Clements, P., Northrop, L.: Software Product Lines: Practices & Patterns. Addison Wesley Longman, Boston (2001)

    Google Scholar 

  12. Damiani, F., Hähnle, R., Kamburjan, E., Lienhardt, M.: A unified and formal programming model for deltas and traits. In: Fundamental Approaches to Software Engineering—20th International Conference, FASE 2017, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2017, Uppsala, Sweden, 22–29 April 2017, Proceedings, Lecture Notes in Computer Science, vol. 10202, pp. 424–441. Springer (2017). https://doi.org/10.1007/978-3-662-54494-5_25

    Chapter  Google Scholar 

  13. Damiani, F., Lienhardt, M.: On type checking delta-oriented product lines. In: Integrated Formal Methods: 12th International Conference, iFM 2016, LNCS, vol. 9681, pp. 47–62. Springer (2016). https://doi.org/10.1007/978-3-319-33693-0_4

    Google Scholar 

  14. Damiani, F., Lienhardt, M.: Refactoring delta-oriented product lines to achieve monotonicity. In: Proceedings 7th International Workshop on Formal Methods and Analysis in Software Product Line Engineering, FMSPLE@ETAPS 2016, Eindhoven, The Netherlands, 3 April 2016, EPTCS, vol. 206, pp. 2–16 (2016). https://doi.org/10.4204/EPTCS.206.2

    Article  Google Scholar 

  15. Damiani, F., Lienhardt, M.: Refactoring delta-oriented product lines to enforce guidelines for efficient type-checking. In: Margaria T., Steffen B. (eds.) Leveraging Applications of Formal Methods, Verification and Validation: Discussion, Dissemination, Applications—7th International Symposium, ISoLA 2016, Imperial, Corfu, Greece, 10–14 October 2016, Proceedings, Part II, Lecture Notes in Computer Science, vol. 9953, pp. 579–596 (2016). https://doi.org/10.1007/978-3-319-47169-3_45

    Chapter  Google Scholar 

  16. Damiani, F., Schaefer, I.: Dynamic delta-oriented programming. In: Proceedings of the 15th International Software Product Line Conference, vol. 2, SPLC ’11, pp. 34:1–34:8. ACM, New York, NY, USA (2011). https://doi.org/10.1145/2019136.2019175

  17. Damiani, F., Faitelson, D., Gladisch, C., Tyszberowicz, S.: A novel model-based testing approach for software product lines. Softw. Syst. Model. 16(4), 1223–1251 (2017). https://doi.org/10.1007/s10270-016-0516-2

    Article  Google Scholar 

  18. Damiani, F., Padovani, L., Schaefer, I., Seidl, C.: A core calculus for dynamic delta-oriented programming. Acta Inform. 55(4), 269–307 (2018). https://doi.org/10.1007/s00236-017-0293-6

    Article  MathSciNet  MATH  Google Scholar 

  19. de Roever, W.P., Engelhardt, K.: Data Refinement: Model-oriented Proof Theories and Their Comparison. Cambridge Tracts in Theoretical Computer Science, vol. 46. Cambridge University Press, Cambridge (1998). https://doi.org/10.1017/CBO9780511663079

    Book  Google Scholar 

  20. Dubinsky, Y., Rubin, J., Berger, T., Duszynski, S., Becker, M., Czarnecki, K.: An exploratory study of cloning in industrial software product lines. In: Proceedings of the 2013 17th European Conference on Software Maintenance and Reengineering, CSMR ’13, pp. 25–34. IEEE Computer Society, Washington, DC, USA (2013). https://doi.org/10.1109/CSMR.2013.13

  21. Faitelson, D., Tyszberowicz, S.S.: Data refinement based testing. Int. J. Syst. Assur. Eng. Manag. 2(2), 144–154 (2011). https://doi.org/10.1007/s13198-011-0060-y

    Article  Google Scholar 

  22. Fowler, M.: Refactoring: Improving the design of existing code. In: Extreme Programming and Agile Methods—XP/Agile Universe 2002, Second XP Universe and First Agile Universe Conference Chicago, IL, USA, 4–7 August 2002, Proceedings, p. 256 (2002). https://doi.org/10.1007/3-540-45672-4_31

    Chapter  Google Scholar 

  23. Haber, A., Rendel, H., Rumpe, B., Schaefer, I.: Evolving delta-oriented software product line architectures. In: Calinescu R., Garlan D. (eds.) Large-Scale Complex IT Systems. Development, Operation and Management, pp. 183–208. Springer, Berlin, (2012). https://doi.org/10.1007/978-3-642-34059-8_10

    Chapter  Google Scholar 

  24. Hallsteinsen, S., Hinchey, M., Park, S., Schmid, K.: Dynamic software product lines. Computer 41(4), 93–95 (2008). https://doi.org/10.1109/MC.2008.123

    Article  Google Scholar 

  25. Harel, D.: Statecharts: a visual formalism for complex systems. Sci. Comput. Program. 8(3), 231–274 (1987). https://doi.org/10.1016/0167-6423(87)90035-9

    Article  MathSciNet  MATH  Google Scholar 

  26. Helvensteijn, M., Muschevici, R., Wong, P.Y.H.: Delta modeling in practice: a Fredhopper case study. In: Proceedings of VAMOS’12, pp. 139–148. ACM (2012). https://doi.org/10.1145/2110147.2110163

  27. Igarashi, A., Pierce, B., Wadler, P.: Featherweight Java: a minimal core calculus for Java and GJ. ACM TOPLAS 23(3), 396–450 (2001). https://doi.org/10.1145/503502.503505

    Article  Google Scholar 

  28. Itemis: Yakindu statechart tools. http://www.itemis.com/en/yakindu/state-machine/. Accessed 2 Sept 2019

  29. Johansen, M.F., Haugen, O., Fleurey, F.: An algorithm for generating t-wise covering arrays from large feature models. In: Proceedings of the 16th International Software Product Line Conference, vol. 1, SPLC ’12, pp. 46–55. ACM, New York, NY, USA (2012). https://doi.org/10.1145/2362536.2362547

  30. Johansen, M.F., Haugen, O., Fleurey, F.: Properties of realistic feature models make combinatorial testing of product lines feasible. In: Proceedings of the International Conference on Model Driven Engineering Languages and Systems (MODELS), pp. 638–652. Springer-Verlag, Berlin, Heidelberg (2011). https://doi.org/10.1007/978-3-642-24485-8_47

    Chapter  Google Scholar 

  31. Kamburjan, E., Hähnle, R.: Uniform modeling of railway operations. In: Proceedings of FTSCS 2016, CCIS, vol. 694, pp. 55–71. Springer (2017). https://doi.org/10.1007/978-3-319-53946-1_4

    Google Scholar 

  32. Kästner, C., Kuhlemann, M.: Automating feature-oriented refactoring of legacy applications. In: In ECOOP Workshop on Refactoring Tools (2007)

  33. Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An overview of AspectJ. In: ECOOP 2001— Object-Oriented Programming, Lecture Notes in Computer Science, vol. 2072, pp. 327–354. Springer (2001). https://doi.org/10.1007/3-540-45337-7_18

    Chapter  Google Scholar 

  34. Koscielny, J., Holthusen, S., Schaefer, I., Schulze, S., Bettini, L., Damiani, F.: DeltaJ 1.5: delta-oriented programming for Java. In: International Conference on Principles and Practices of Programming on the Java Platform Virtual Machines, Languages and Tools, PPPJ ’14, pp. 63–74 (2014). https://doi.org/10.1145/2647508.2647512

  35. Kowal, M., Schulze, S., Schaefer, I.: Towards efficient spl testing by variant reduction. In: Proceedings of the 4th International Workshop on Variability & Composition, VariComp ’13, pp. 1–6. ACM, New York, NY, USA (2013). https://doi.org/10.1145/2451617.2451619

  36. Krueger, C.: Eliminating the adoption barrier. IEEE Softw. 19(4), 29–31 (2002). https://doi.org/10.1109/MS.2002.1020284

    Article  Google Scholar 

  37. Lienhardt, M., Clarke, D.: Conflict detection in delta-oriented programming. In: Leveraging Applications of Formal Methods, Verification and Validation. Technologies for Mastering Change: 5th International Symposium, ISoLA 2012, Proceedings, Part I, pp. 178–192 (2012). https://doi.org/10.1007/978-3-642-34026-0_14

    Chapter  Google Scholar 

  38. Lienhardt, M., Damiani, F., Testa, L., Turin, G.: On checking delta-oriented product lines of statecharts. Sci. Comput. Program. 166, 3–34 (2018). https://doi.org/10.1016/j.scico.2018.05.007

    Article  Google Scholar 

  39. Liu, J., Batory, D., Lengauer, C.: Feature oriented refactoring of legacy applications. In: ICSE, pp. 112–121. ACM (2006). https://doi.org/10.1145/1134285.1134303

  40. Lochau, M., Goltz, U.: Feature interaction aware test case generation for embedded control systems. Electron. Notes Theor. Comput. Sci. 264(3), 37–52 (2010). https://doi.org/10.1016/j.entcs.2010.12.013

    Article  Google Scholar 

  41. Lopez-Herrejon, R., Batory, D., Cook, W.: Evaluating support for features in advanced modularization technologies. In: A.P. Black (ed.) ECOOP 2005—Object-Oriented Programming, LNCS, vol. 3586, pp. 169–194. Springer (2005). https://doi.org/10.1007/11531142_8

    Chapter  Google Scholar 

  42. Monteiro, M.P., Fernandes, J.M.: Towards a catalogue of refactorings and code smells for aspectj. In: Rashid A., Aksit M. (eds.) Transactions on Aspect-Oriented Software Development I, pp. 214–258. Springer, Berlin, Heidelberg (2006). https://doi.org/10.1007/11687061_7

    Chapter  Google Scholar 

  43. 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 (SPLC 2010), Lecture Notes in Computer Science, vol. 6287, pp. 77–91. Springer Berlin Heidelberg (2010). https://doi.org/10.1007/978-3-642-15579-6_6

    Chapter  Google Scholar 

  44. 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, NY, USA (2010). https://doi.org/10.1145/1868688.1868696

  45. Schulze, S., Richers, O., Schaefer, I.: Refactoring delta-oriented software product lines. In: Proceedings of the 12th Annual International Conference on Aspect-oriented Software Development, AOSD ’13, pp. 73–84. ACM, New York, NY, USA (2013). https://doi.org/10.1145/2451436.2451446

  46. Schulze, S., Thüm, T., Kuhlemann, M., Saake, G.: Variant-preserving refactoring in feature-oriented software product lines. In: Proceedings of the 6th International Workshop on Variability Modeling of Software-Intensive Systems, VaMoS ’12, pp. 73–81. ACM, New York, NY, USA (2012). https://doi.org/10.1145/2110147.2110156

  47. ter Beek, M., Legay, A., Lluch Lafuente, A., Vandin, A.: A framework for quantitative modeling and analysis of highly (re)configurable systems. IEEE Trans. Softw. Eng. (2018). https://doi.org/10.1109/TSE.2018.2853726

    Article  Google Scholar 

  48. Wille, D., Runge, T., Seidl, C., Schulze, S.: Extractive software product line engineering using model-based delta module generation. In: Proceedings of the 11th International Workshop on Variability Modelling of Software-intensive Systems, VAMOS’17, pp. 36–43. ACM, New York, NY, USA (2017). https://doi.org/10.1145/3023956.3023957

  49. Winkelmann, T., Koscielny, J., Seidl, C., Schuster, S., Damiani, F., Schaefer, I.: Parametric DeltaJ 1.5: propagating feature attributes into implementation artifacts. In: Gemeinsamer Tagungsband der Workshops der Tagung Software Engineering 2016 (SE 2016), Wien, 23–26 February 2016, CEUR Workshop Proceedings, vol. 1559, pp. 40–54. CEUR-WS.org (2016)

Download references

Acknowledgements

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

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ferruccio Damiani.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This work has been partially supported by: EU Horizon 2020 Project HyVar (www.hyvar-project.eu, GA No. 644298) and ICT COST Action IC1402 ARVI (www.cost-arvi.eu)

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Damiani, F., Lienhardt, M. & Paolini, L. Automatic refactoring of delta-oriented SPLs to remove-free form and replace-free form. Int J Softw Tools Technol Transfer 21, 691–707 (2019). https://doi.org/10.1007/s10009-019-00534-2

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10009-019-00534-2

Keywords

Navigation