Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models

Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models

Software quality estimation is a challenging and time-consuming activity, and models are crucial to face the complexity of such activity on modern software applications. In this context, software refactoring is a crucial activity within development life-cycles where requirements and functionalities rapidly evolve.

One main challenge is that the improvement of distinctive quality attributes may require contrasting refactoring actions on software, as for trade-off between performance and reliability (or other non-functional attributes). In such cases, multi-objective optimization can provide the designer with a wider view on these trade-offs and, consequently, can lead to identify suitable refactoring actions that take into account independent or even competing objectives.

In this paper, we present an approach that exploits the NSGA-II as the genetic algorithm to search optimal Pareto frontiers for software refactoring while considering many objectives. We consider performance and reliability variations of a model alternative with respect to an initial model, the amount of performance antipatterns detected on the model alternative, and the architectural distance, which quantifies the effort to obtain a model alternative from the initial one.

We applied our approach on two case studies: a Train Ticket Booking Service, and CoCoME.
We observed that our approach is able to improve performance (by up to 42%) while preserving or even improving the reliability (by up to 32%) of generated model alternatives.
We also observed that there exists an order of preference of refactoring actions among model alternatives.

Daniele Di Pompeo

June 29, 2023
Tweet

More Decks by Daniele Di Pompeo

Other Decks in Research

Transcript

  1. Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software

    Models Vittorio Cortellessa Daniele Di Pompeo Vincenzo Stoico Michele Tucci {vittorio.cortellessa,daniele.dipompeo,michele.tucci}@univaq.it [email protected] QUALITA 2023, 19th June 2023 D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 1 / 20
  2. Software Quality Estimation Challenge Software quality estimation is challenging and

    time-consuming. Models are crucial to face the complexity of quality estimation. Models can be: used to estimate non-functional properties of the system; refactored to evaluate a new and upgraded software design; Goal Identification of optimal refactoring actions leading to improved software models D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 2 / 20
  3. Exploiting Multi-Objective Optimization Techniques The identification of optimal refactoring actions

    is a non-trivial task: due to the large space of solution; lack of automated support; A multi-objective optimization approaches are widely used to speed the exploration and integrate [1, 2, 3, 4, 5, 6, 7] Proposed solution Exploits 3 multi-objective evolutionary algorithms (NSGA-II, PESA2, SPEA2) to obtain sequences of refactoring action that improve the initial design. D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 3 / 20
  4. Approach at a glance [are the stopping criteria met?] #performance

    antipatterns D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 4 / 20
  5. Approach at a glance Initial UML Model UML + DAM-MARTE

    Software Models Objectives performance antipatterns: min, #changes: min, reliability: max, perfQ: max Genetic Algorithms NSGA-II/ SPEA2/ PESA2 selected on the basis of their different searching policies. [are the stopping criteria met?] #performance antipatterns D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 4 / 20
  6. Case Study We applied our optimization approach to two case

    studies from the literature:1 Train Ticket Booking Service [10]: is a web-based booking application, whose architecture is based on the microservice paradigm. The system is made up of 40 microservices, and it provides different scenarios through users that can perform realistic operations, e.g.,book a ticket or watch trip information. CoCoME [11]: describes a trading system containing several stores. A store can have one or more cash desks for processing goods. A cash desk is equipped with all the tools needed to serve a customer (e.g.,a Cash Box, Printer, Bar Code Scanner). Covers possible scenarios performed at a cash desk (e.g.,scanning products, paying by credit card, or ordering new goodies). 1https://github.com/SEALABQualityGroup/uml2lqn-casestudies D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 5 / 20
  7. Research Questions RQ1: To what extent do experimental configurations affect

    quality of Pareto frontiers? ▶ RQ1.1: Does antipattern detection contribute to find better solutions compared to the case where antipatterns are not considered at all? ▶ RQ1.2: Does the probabilistic nature of fuzzy antipatterns detection help to include higher quality solutions in Pareto frontiers with respect to deterministic one? ▶ RQ1.3: To what extent does the architectural distance contribute to find better alternatives? RQ2: Is it possible to increase reliability without performance degradation? RQ3: What type of refactoring actions are more likely to lead to better solutions? D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 6 / 20
  8. RQ1: To what extent do experimental configurations affect quality of

    Pareto frontiers? brf maxeval probpas q indicator value TTBS yes 72 95 HV 0.329645 yes 82 95 HV 0.304931 yes 82 95 HV 0.267898 yes 72 80 HV 0.266588 yes 82 55 HV 0.254973 brf maxeval probpas q indicator value CoCoME no 72 95 HV 0.360432 no 82 95 HV 0.359415 no 102 95 HV 0.342563 no 72 55 HV 0.326384 no 82 95 HV 0.305201 D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 7 / 20
  9. RQ1.1: Does antipattern detection contribute to find better solutions compared

    to the case where antipatterns are not considered at all? 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 PerfQ 0.0 0.2 0.4 0.6 0.8 1.0 Reliability initial PAs prob. 0.00 0.95 On the basis of our experimentation, we can state that the consideration of performance antipattern occurrences in the optimization process leads to better solutions than the ones found when ignoring them. D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 8 / 20
  10. R1.2: Does the probabilistic nature of fuzzy antipatterns detection help

    to include higher quality solutions in Pareto frontiers with respect to the deterministic one? 0.1 0.0 0.1 0.2 0.3 0.4 0.00 0.25 0.50 0.75 1.00 1.25 1.50 1.75 2.00 Density PAs prob. 0.00 0.55 0.80 0.95 (a) perfQ 0.2 0.0 0.2 0.4 0.6 0.8 1.0 1.2 0.0 0.2 0.4 0.6 0.8 Density PAs prob. 0.00 0.55 0.80 0.95 (b) reliability D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 9 / 20
  11. RQ1.3: To what extent does the architectural distance contribute to

    find better alternatives? 0.00 0.05 0.10 0.15 0.20 0.25 PerfQ 0.0 0.2 0.4 0.6 0.8 1.0 Reliability initial PAs prob. 0.00 0.55 0.80 0.95 (a) brf. 0.05 0.00 0.05 0.10 0.15 0.20 PerfQ 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Reliability initial probpas 0.00 0.55 0.80 0.95 (b) nobrf. Based on our results, we can state that brf helps better estimating #changes of refactoring actions, which generates Pareto frontiers showing higher quality (or at least it does not worsen the Pareto frontier quality). D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 10 / 20
  12. RQ2 : Is it possible to increase reliability without performance

    degradation? 0.00 0.05 0.10 0.15 0.20 0.25 perfQ 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 reliability initial Solutions improving both initial reliability and performance Solutions improving initial reliability or performance (a) TTBS 0.0 0.1 0.2 0.3 0.4 perfQ 0.2 0.4 0.6 0.8 reliability initial Solutions improving both initial reliability and performance Solutions improving initial reliability or performance (b) CoCoME D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 11 / 20
  13. RQ2 : Is it possible to increase reliability without performance

    degradation? Our experimentation shows that, our approach can find design alternatives characterized by a significant improvement of both reliability and performance. D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 11 / 20
  14. RQ3: What type of refactoring actions are more likely to

    lead to better solutions? 0 20 40 60 80 Percentage of refactoring type 0.0000 0.0025 0.0050 0.0075 0.0100 0.0125 0.0150 0.0175 Density Clon MO2N MO2C ReDe (a) Train Ticket 0 20 40 60 80 Percentage of refactoring type 0.0000 0.0025 0.0050 0.0075 0.0100 0.0125 0.0150 0.0175 Density Clon MO2N MO2C ReDe (b) CoCoME D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 12 / 20
  15. RQ3: What type of refactoring actions are more likely to

    lead to better solutions? From our experimentation, we were able to establish an order of preference among refactoring types that is consistent in both case studies. D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 12 / 20
  16. Conclusion From our experimentation, we gathered interesting insights about the

    quality of the generated solutions and the role of performance antipatterns as an objective of the algorithm. Including the detection of performance antipatterns in the optimization process, we are able to obtain better solutions in terms of performance and reliability The more we increase the probability of detecting a performance antipattern using the fuzziness threshold, the better the quality of the refactoring solutions The baseline refactoring factor generally helps discovering better model alternatives. Our approach did not worsen the reliability of the initial model. D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 13 / 20
  17. Any Questions? Many-Objective Optimization of Non-Functional Attributes based on Refactoring

    of Software Models Vittorio Cortellessa Daniele Di Pompeo Vincenzo Stoico Michele Tucci {vittorio.cortellessa,daniele.dipompeo,michele.tucci}@univaq.it [email protected] QUALITA 2023, 19th June 2023 D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 15 / 20
  18. References I [1] Aurora Ramı´ Orez, Jos´ e Ra´ ul

    Romero, and Sebasti´ an Ventura. “A survey of many-objective optimisation in search-based software engineering”. In: J. Syst. Softw. 149 (2019), pp. 382–395. doi: https://doi.org/10.1016/j.jss.2018.12.01510.1016/j.jss.2018.12.015. url: https://doi.org/10.1016/j.jss.2018.12.015. [2] Thain´ a Mariani and Silvia Regina Vergilio. “A systematic review on search-based refactoring”. In: Inf. Softw. Technol. 83 (2017), pp. 14–34. doi: https://doi.org/10.1016/j.infsof.2016.11.00910.1016/j.infsof.2016.11.009. url: https://doi.org/10.1016/j.infsof.2016.11.009. D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 16 / 20
  19. References II [3] Ali Ouni et al. “Web Service Antipatterns

    Detection Using Genetic Programming”. In: Proceedings of the Genetic and Evolutionary Computation Conference, GECCO 2015, Madrid, Spain, July 11-15, 2015. Ed. by Sara Silva and Anna Isabel Esparcia-Alc´ azar. ACM, 2015, pp. 1351–1358. doi: https://doi.org/10.1145/2739480.275472410.1145/2739480.2754724. url: https://doi.org/10.1145/2739480.2754724. [4] Ali Ouni et al. “Search-Based Web Service Antipatterns Detection”. In: IEEE Trans. Serv. Comput. 10.4 (2017), pp. 603–617. doi: https://doi.org/10.1109/TSC.2015.250259510.1109/TSC.2015.2502595. url: https://doi.org/10.1109/TSC.2015.2502595. [5] Mitrabinda Ray and Durga Prasad Mohapatra. “Multi-objective test prioritization via a genetic algorithm”. In: Innov. Syst. Softw. Eng. 10.4 (2014), pp. 261–270. doi: https://doi.org/10.1007/s11334-014-0234-210.1007/s11334-014-0234-2. url: https://doi.org/10.1007/s11334-014-0234-2. D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 17 / 20
  20. References III [6] Gabriele Bavota, Massimiliano Di Penta, and Rocco

    Oliveto. “Search Based Software Maintenance: Methods and Tools”. In: Evolving Software Systems. Ed. by Tom Mens, Alexander Serebrenik, and Anthony Cleve. Springer, 2014, pp. 103–137. doi: https://doi.org/10.1007/978-3-642-45398-4_410.1007/978-3-642-45398-4_4. url: https://doi.org/10.1007/978-3-642-45398-4_4. [7] Marouane Kessentini et al. “Search-based model transformation by example”. In: Softw. Syst. Model. 11.2 (2012), pp. 209–226. doi: https://doi.org/10.1007/s10270-010-0175-710.1007/s10270-010-0175-7. url: https://doi.org/10.1007/s10270-010-0175-7. [8] Vittorio Cortellessa and Daniele Di Pompeo. “Analyzing the sensitivity of multi-objective software architecture refactoring to configuration characteristics”. In: Inf. Softw. Technol. 135 (2021), p. 106568. doi: https://doi.org/10.1016/j.infsof.2021.10656810.1016/j.infsof.2021.106568. url: https://doi.org/10.1016/j.infsof.2021.106568. D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 18 / 20
  21. References IV [9] Vittorio Cortellessa et al. “On the impact

    of Performance Antipatterns in multi-objective software model refactoring optimization”. In: 47th Euromicro Conference on Software Engineering and Advanced Applications, SEAA 2021, Palermo, Italy, September 1-3, 2021. Ed. by Maria Teresa Baldassarre, Giuseppe Scanniello, and Amund Skavhaug. IEEE, 2021, pp. 224–233. doi: https://doi.org/10.1109/SEAA53835.2021.0003610.1109/SEAA53835.2021.00036. url: https://doi.org/10.1109/SEAA53835.2021.00036. D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 19 / 20
  22. References V [10] Daniele Di Pompeo et al. “A Microservice

    Reference Case Study for Design-Runtime Interaction in MDE”. In: STAF 2019 Co-Located Events Joint Proceedings: 1st Junior Researcher Community Event, 2nd International Workshop on Model-Driven Engineering for Design-Runtime Interaction in Complex Systems, and 1st Research Project Showcase Workshop co-located with Software Technologies: Applications and Foundations (STAF 2019), Eindhoven, The Netherlands, July 15 - 19, 2019. Ed. by Alessandra Bagnato et al. Vol. 2405. CEUR Workshop Proceedings. CEUR-WS.org, 2019, pp. 23–32. url: http://ceur-ws.org/Vol-2405/06_paper.pdf. [11] Sebastian Herold et al. “CoCoME - The Common Component Modeling Example”. In: The Common Component Modeling Example: Comparing Software Component Models. Vol. 5153. LNCS. Berlin, Heidelberg: Springer Berlin Heidelberg, 2008, pp. 16–53. isbn: 978-3-540-85289-6. doi: https://doi.org/10.1007/978-3-540-85289-6_310.1007/978-3-540-85289-6_3. url: https://doi.org/10.1007/978-3-540-85289-6_3. D. Di Pompeo Many-Objective Optimization of Non-Functional Attributes based on Refactoring of Software Models 20 / 20