A Survey on Automatic Source Code Transformation for Green Software Generation
- Dorronsoro, Bernabé 1
- Aragón-Jurado, José M. 1
- Jareño, Javier 1
- de la Torre, Juan C. 1
- Ruiz, Patricia 1
- 1 School of Engineering, University of Cadiz, Spain
ISBN: 9780443222870
Year of publication: 2024
Pages: 765-779
Type: Book chapter
Abstract
Hardware rapidly develops, evolving incessantly towards new and more efficient architectures. We are witnessing a significant shift in the history of computing towards parallelism, which raises a new major concern in computing: the energy consumption of computing devices, from small battery-based devices to large data centers forming the cloud. The default electronic computing device today is a parallel machine. To improve the performance, computing devices include more and more processors and cores, as well as larger memories, consequently increasing their energy requirements.There are billions of computing devices in the world, many of them operating 24 h a day, 7 days a week. This, coupled with the fact that servers increasingly consume more energy, makes communication and information technologies a substantial contributor of emissions in the planet. Software is present in all computing devices and ultimately determines their energetic behavior. Consequently, any modern software requires the minimization of the energy consumption of the device while running.Unfortunately, writing software is complex and costly, and creating low consumption (or green) software is a challenging task that requires extensive programming experience and deep knowledge on architecture. Balancing between software energy efficiency and functionality might require trade-offs, potentially compromising user experience in certain situations. This chapter surveys the main existing works related to the automatic generation of green software, and emphasizes the main existing challenges in the field.
Bibliographic References
- Aggarwal, (2015), pp. 311
- Ahmed, (2022), Software: Practice and Experience, 52, pp. 1262
- Anand, (2023), SIGEnergy Energy Informatics Review, 3, pp. 71, 10.1145/3630614.3630627
- Aragon-Jurado, (2024), pp. 1
- Ashouri, (2017), ACM Transactions on Architecture and Code Optimization, 14
- Ashouri, (2018), ACM Computing Surveis, 51, pp. 5
- Bacon, (1994), ACM Computing Surveys (CSUR), 26, pp. 345, 10.1145/197405.197406
- Balanza-Martinez, (2024)
- Banerjee, U., Eigenmann, R., Nicolau, A., Padua, D.A., 1993. Automatic program parallelization. Proceedings of the IEEE, 81(2):211–243.
- Banerjee, T., Ranka, S., 2015. A genetic algorithm based autotuning approach for performance and energy optimization. In: Proceedings of the 2015 Sixth International Green and Sustainable Computing Conference (IGSC), pp. 1–8.
- Bangash, A.A., Ali, K., Hindle, A., 2022. Black box technique to reduce energy consumption of Android apps. In: Proceedingfs of the 2022 IEEE/ACM 44th International Conference on Software Engineering: New Ideas and Emerging Results (ICSE-NIER), pages 1–5.
- Bangash, (2023), pp. 272
- Bangash, A.A., Tiganov, D., Ali, K., Hindle, A. 2021a. Energy efficient guidelines for iOS core location framework. In: Proceedings of the 2021 IEEE International Conference on Software Maintenance and Evolution (ICSME), pp. 320–331.
- Bangash, (2021), pp. 320
- Blot, A. and Petke, J., 2022. A comprehensive survey of benchmarks for automated improvement of software’s non-functional properties. arXiv:2212.08540
- Bokhari, (2022), Empirical Software Engineering, 27, 10.1007/s10664-022-10188-5
- Bokhari, (2020), pp. 1232
- Bokhari, (2017), pp. 1501
- Bokhari, (2019), 2019 IEEE Congress on Evolutionary Computation (CEC), pp. 1330, 10.1109/CEC.2019.8790246
- Bokhari, M.A., Xia, Y., Zhou, B., Alexander, B., Wagner, M., 2017b. Validation of internal meters of mobile android devices. Technical report, CoRR.
- Brouwers, N., Zuniga, M., Langendoen, K., 2014. Neat: A novel energy analysis toolkit for free-roaming smartphones. In: Proceedings of the 12th ACM Conference on Embedded Network Sensor Systems, pp. 16–30.
- Bruce, (2016)
- Bruce, B.R., Petke, J., Harman, M., 2015. Reducing energy consumption using genetic improvement. In: Proceedings of the ACM Conference on Genetic and Evolutionary Computing (GECCO), pages 1327–1334.
- Burles, (2015), pp. 255
- Calero, (2019), International Journal of Sustainable Development & World Ecology, 26, pp. 439, 10.1080/13504509.2019.1590746
- (2015)
- Carette, (2017), pp. 115
- Carretero, (2015), Supercomputing Frontiersand Innovations: An International Journal, 2, pp. 77
- Chen, (2018), pp. 579
- Chen, J., Xu, N., Chen, P., Zhang, H., 2021. Efficient compiler autotuning via bayesian optimization. In: Proceedings of the 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE), pp. 1198–1209.
- Chowdhury, (2019), Empirical Software Engineering, 24, pp. 1649, 10.1007/s10664-018-9640-7
- Chowdhury, (2018), Empirical Software Engineering, 23, pp. 1422, 10.1007/s10664-017-9545-x
- Chowdhury, S.A., Hindle, A., 2016. Greenoracle: Estimating software energy consumption with energy measurement corpora. In: Proceedings of the 13th International Conference on Mining Software Repositories, pp. 49–60.
- Ciman, (2015), pp. 331
- Ciman, (2017), Pervasive and Mobile Computing, 39, pp. 214, 10.1016/j.pmcj.2016.10.004
- Cooper, (1999), pp. 1
- Corral, (2013), pp. 38
- Couto, (2017), pp. 84
- Couto, (2015), pp. 73
- Couto, (2020), pp. 217
- Cummins, C., Wasti, B., Guo, J., et al., 2022. CompilerGym: Robust, performant compiler optimization environments for AI research. In: Proceedings of the 2022 IEEE/ACM International Symposium on Code Generation and Optimization (CGO), 92–105.
- Danish, (2018), Environental Science and Pollution Research, 25, pp. 22850, 10.1007/s11356-018-2379-2
- Diniz, (2007), SIGARCH Computer Architecture News, 35, pp. 290, 10.1145/1273440.1250699
- Facebook Inc. (2021). Redex - an android bytecode optimizer. https://fbredex.com/.
- Farooq, M.U., Rehman Khan, S.U., Beg, M.O., 2019. Melta: A method level energy estimation technique for android development. In: Proceedings of the 2019 International Conference on Innovative Computing (ICIC), pages 1–10.
- Ferrari, (2015), pp. 421
- Fischbach, T., Kieffer, E., Bouvry, P., 2023. Challenges in automatic software optimization: The energy efficiency case. arXiv:2305.06397
- Fischer, (2015), pp. 48
- Fonseca, (2016), International Journal of Parallel Programming, 44, pp. 1337, 10.1007/s10766-016-0426-5
- (2011)
- García-Berná, (2019), Sustainable Development, 27, pp. 613, 10.1002/sd.1927
- García-Berná, (2020), Journal of Cleaner Production
- García-Mireles, (2018), Information and Software Technology, 95, pp. 108, 10.1016/j.infsof.2017.10.002
- Garciarena, (2016), pp. 1159
- Georgiou, (2020), The Computer Journal, 65, pp. 718, 10.1093/comjnl/bxaa103
- Goues, (2012), IEEE Transactions on Software Engineering, 38, pp. 54, 10.1109/TSE.2011.104
- Griffin, (2005), ACM SIGPLAN Notices, 40, pp. 230, 10.1145/1070891.1065943
- Guégain, (2021), pp. 89
- Hakimi, (2023), International Journal of Parallel Programming, 51, pp. 309, 10.1007/s10766-023-00758-5
- Hall, (1997), Johns Hopkins APL Technical Digest, 18, pp. 255
- Hankel, (2018), Technologies, 6, pp. 85, 10.3390/technologies6030085
- Hao, (2012), pp. 1
- Haraldsson, (2017), pp. 1521
- Hindle, (2014), Proceedings of the 11th working Conference on Mining Software Repositories, pp. 12, 10.1145/2597073.2597097
- Hoque, (2015), ACM Computing Surveys (CSUR), 48, pp. 1, 10.1145/2840723
- Hort, (2022), IEEE Transactions on Software Engineering, 48, pp. 2879, 10.1109/TSE.2021.3071193
- Huang, Q., Haj-Ali, A., Moses, W., et al., 2019. Autophase: Compiler phase-ordering for HLS with deep reinforcement learning. In: Proceedings of the 2019 IEEE 27th Annual International Symposium on Field-Programmable Custom Computing Machines (FCCM), 308–308.
- Huber, S., Lorey, T., Felderer, M., 2023. Techniques for improving the energy efficiency of mobile apps: A taxonomy and systematic literature review. In: Proceedings of the 2023 49th Euromicro Conference on Software Engineering and Advanced Applications (SEAA), pages 286–292.
- Ibrahim, (2009), pp. 1
- Ileana, M., 2023. Optimizing energy efficiency in distributed web systems. In: Proceedings of the 2023 7th International Symposium on Innovative Approaches in Smart Technologies (ISAS), 1–5.
- Jain, (2022), pp. 121
- Jareño, (2023), pp. 327
- Kandemir, (2002)
- Khan, (2021), Sustainable Computing: Informatics and Systems, 31
- Koedijk, L., Oprescu, A., 2022. Finding significant differences in the energy consumption when comparing programming languages and programs. In: Proceedings of the 2022 International Conference on ICT for Sustainability (ICT4S), 1–12.
- Kovac, M., Brcic, M., Krajna, A., Krleza, D., 2022. Towards intelligent compiler optimization. In: Proceedings of the 2022 45th Jubilee International Convention on Information, Communication and Electronic Technology (MIPRO), 948–953.
- Kuepper, J., Wu, D., Erbsen, A., et al., 2023. CryptOpt: Automatic optimization of straightline code. In: Proceedings of the 2023 IEEE/ACM 45th International Conference on Software Engineering: Companion Proceedings (ICSE-Companion), pages 141–145.
- Kulkarni, (2005), ACM Transactions on Architecture and Code Optimization, 2, pp. 165, 10.1145/1071604.1071607
- Kulkarni, P., Whalley, D., Tyson, G., Davidson, J., 2006. Exhaustive optimization phase order space exploration. In: Proceedings of the Int. Symposium on Code Generation and Optimization (CGO’06), pages 13 pp.–318.
- Lago, P., 2015. Challenges and opportunities for sustainable software. In: Proceedings of the International Conference on Software Engineering, keynote speech.
- Lamport, (1974), Communications of the ACM, 17, pp. 83, 10.1145/360827.360844
- Langdon, (2015), IEEE Transactions on Evolutionary Computation, 19, pp. 118, 10.1109/TEVC.2013.2281544
- Langdon, (2017), Genetic Programming and Evolvable Machines, 18, pp. 5, 10.1007/s10710-016-9273-9
- Lee, (2024), Journal of Systems and Software, 210, 10.1016/j.jss.2023.111944
- Lee, (2003), ACM Transactions on Design Automation of Electronic Systems (TODAES), 8, pp. 252, 10.1145/762488.762494
- Linares-Vásquez, M., Bavota, G., Bernal-Cárdenas, C., et al., 2014. Mining energy-greedy api usage patterns in android apps: an empirical study. In: Proceedings of the 11th Working Conference on Mining Software Repositories, pp. 2–11.
- Linares-Vásquez, (2018), ACM Transactions on Software Engineering and Methodology, 27, 10.1145/3241742
- Liu, (2021), ACM Transactions on Architecture and Code Optimization, 19, 10.1145/3480250
- Liu, (2023), Science of Computer Programming, 230, 10.1016/j.scico.2023.102962
- Liu, (2015), pp. 316
- Liu, (2013), pp. 2
- Li, D., Halfond, W.G., 2014. An investigation into energy-saving programming practices for android smartphone app development. In: Proceedings of the 3rd International Workshop on Green and Sustainable Software, pp. 46–53.
- Li, D., Hao, S., Gui, J., Halfond, W.G., 2014. An empirical study of the energy consumption of android applications. In: Proceedings of the 2014 IEEE International Conference on Software Maintenance and Evolution, pp. 121–130.
- Li, D., Hao, S., Halfond, W.G., and Govindan, R. (2013). Calculating source line level energy information for android applications. In Proceedings of the 2013 International Symposium on Software Testing and Analysis, 78–89.
- Li, (2020), pp. 256
- Li, X., Yang, Y., Liu, Y., Gallagher, J.P., Wu, K., 2020b. Detecting and diagnosing energy issues for mobile applications. In: Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis, 115–127.
- Luz, (2003), International Workshop on Embedded Software, pp. 156, 10.1007/978-3-540-45212-6_11
- Mancebo, (2020), pp. 1
- Manotas, (2018), pp. 278
- Marimuthu, (2017), pp. 34
- Martins, (2016), ACM Transactions on Architecture and Code Optimization, 13, pp. 1, 10.1145/2883614
- Mazuera-Rozo, (2020), Empirical Software Engineering, 25, pp. 1644, 10.1007/s10664-019-09795-6
- McGuire, S., Schultz, E., Ayoola, B., Ralph, P., 2023. Sustainability is stratified: Toward a better theory of sustainable software engineering. In: Proceedings of the 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE), pp. 1996–2008.
- Mehra, (2022), pp. 295
- Midkiff, (2012)
- Mittal, R., Kansal, A., Chandra, R., 2012. Empowering developers to estimate app energy consumption. In: Proceedings of the 18th Annual International Conference on Mobile Computing and Networking, pp. 317–328.
- Moghaddam, F.A., Lago, P., Ban, I.C., 2018. Self-adaptation approaches for energy efficiency: A systematic literature review. In: Proceedings of the International Workshop on Green And Sustainable Software (GREENS), pp. 35–42.
- Morales, (2018), Journal of Systems and Software, 145, pp. 25, 10.1016/j.jss.2018.07.076
- Müller, (2014), IEEE Computer, 47, pp. 41, 10.1109/MC.2014.262
- Murmuria, (2012), pp. 147
- Neto, (2021), Knowledge-Based Systems, 213, 10.1016/j.knosys.2020.106680
- Nimmer, J.W., 2002. Automatic generation and checking of program specifications. PhD thesis, Massachusetts Institute of Technology (MIT), Boston, USA.
- Ni, Y., Du, X., Ye, P., Xiao, R., and Wang, J. (2023). A two-stage option sequence optimization method for energy consumption minimization. Available at SSRN: https://ssrn.com/abstract=4611177.
- Noureddine, (2015), pp. 623
- Di Nucci, (2017), pp. 103
- Oliveira, (2021), pp. 123
- Oliveira, (2021), Empirical Software Engineering, pp. 26
- Pagliari, (2021), IEEE Transactions on Emerging Topics in Computing, 9, pp. 1625, 10.1109/TETC.2019.2908257
- Palomba, (2019), Information and Software Technology, 105, pp. 43, 10.1016/j.infsof.2018.08.004
- Parisi, E., Barchi, F., Bartolini, A., Tagliavini, G., Acquaviva, A., 2021. Source code classification for energy efficiency in parallel ultra low-power microcontrollers. In: Proceedings of the 2021 Design, Automation & Test in Europe Conference & Exhibition (DATE), pp. 878–883.
- Pathak, A., Hu, Y.C., Zhang, M., Bahl, P., Wang, Y.-M., 2011. Fine-grained power modeling for smartphones using system call tracing. In: Proceedings of the Sixth Conference on Computer systems, pp. 153–168.
- Pereira, (2021), Science of Computer Programming, 205, 10.1016/j.scico.2021.102609
- Petke, (2014), pp. 137
- Pinto, (2014), pp. 22
- Pinto, (2014), pp. 345
- Pinto, G., Liu, K., Castor, F., Liu, Y.D., 2016. A comprehensive study on the energy efficiency of java’s thread-safe collections. In: Proceedings of the 2016 IEEE International Conference on Software Maintenance and Evolution (ICSME), pp. 20–31.
- Pinto, G., Soares-Neto, F., Castor, F., 2015. Refactoring for energy efficiency: A reflection on the state of the art. In: Proceedings of the 2015 IEEE/ACM 4th International Workshop on Green and Sustainable Software, 29–35.
- Procaccianti, (2016), Journal of Systems and Software, pp. 185, 10.1016/j.jss.2016.02.035
- Qasim, (2021), Applied Computer Systems, 26, pp. 1, 10.2478/acss-2021-0001
- Qiu, (2009), pp. 1637
- Queiroz de Medeiros, (2023), pp. 64
- Rattagan, (2018), IEEE Transactions on Sustainable Computing, 3, pp. 306, 10.1109/TSUSC.2018.2832173
- Romansky, (2017), pp. 273
- Rua, (2024), Empirical Software Engineering, pp. 29
- Sachan, (2022), Microprocessors and Microsystems, 94, 10.1016/j.micpro.2022.104664
- Sandran, (2011), pp. 599
- Schuler, A., Anderst-Kotsis, G., 2020. Characterizing energy consumption of third-party api libraries using api utilization profiles. In: Proceedings of the 14th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM), pp. 1–11.
- Schuler, (2023), Sustainable Computing: Informatics and Systems
- Schulte, (2014), SIGARCH Computer Architure News, 42, pp. 639, 10.1145/2654822.2541980
- Singh, J., Naik, K., Mahinthan, V., 2015. Impact of developer choices on energy consumption of software on servers. Procedia Computer Science, 62:385–394. In: Proceedings of the 2015 International Conference on Soft Computing and Software Engineering (SCSE’15).
- de la Torre, (2023), Fractal and Fractional, 7, 10.3390/fractalfract7110794
- de la Torre, (2018), pp. 272
- de la Torre, (2023), pp. 1
- Traini, (2021), ACM Transactions on Software Engineering and Methodology, 31, 10.1145/3485136
- Trilla, (2019), IEEE Transactions on Sustainable Computing, 6, pp. 522, 10.1109/TSUSC.2019.2943142
- Venkatachalam, (2005), ACM Computing Surveys, 37, pp. 195, 10.1145/1108956.1108957
- Verdecchia, R., Saez, R.A., Procaccianti, G., Lago, P., 2018. Empirical evaluation of the energy impact of refactoring code smells. In: Proceedings of the International Conference on ICT for Sustainability, pp. 365–383.
- Verma, (2022), pp. 244
- Villarreal, (2002), Design Automation for Embedded Systems, 7, pp. 325, 10.1023/A:1020359206122
- Wang, J., Liu, Y., Xu, C., Ma, X., Lu, J., 2016. E-greendroid: Effective energy inefficiency analysis for android applications. In: Proceedings of the 8th Asia-Pacific Symposium on Internetware, pp. 71–80.
- Wang, Z. O’Boyle, M., 2018. Machine learning in compiler optimization. Proceedings of the IEEE, 106(11). pp. 1879–1901.
- Wang, (2014), ACM Transactions on Architecture and Code Optimization, 11, 10.1145/2579561
- Wang, (2013), pp. 120
- Weber, M., Kaltenecker, C., Sattler, F., Apel, S., Siegmund, N., 2023. Twins or false friends? A study on energy consumption and performance of configurable software. In: Proceedings of the 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE), pp. 2098–2110.
- White, (2011), IEEE Transactions on Evolutionary Computation, 15, pp. 515, 10.1109/TEVC.2010.2083669
- Wilke, C., Gotz, S., Cech, S., Waltsgott, J., Fritzsche, R., 2011. Aspects of software’s energy consumption. Technical report, Inst. fur Softw. und Multimediatechnik.
- Wilke, C., Götz, S., Richly, S., 2013. Jouleunit: A generic framework for software energy profiling and testing. In: Proceedings of the 2013 Workshop on Green in/by Software Engineering, pp. 9–14.
- Zambreno, J., Kandemir, M.T.,Choudhary, A., 2002. Enhancing compiler techniques for memory energy optimizations. In: Proceedings of theInternational Workshop on Embedded Software, pp. 364–381.
- Zhang, (2020), IEEE Transactions on Parallel and Distributed Systems, 31, pp. 1878, 10.1109/TPDS.2020.2978045
- Zhang, L., Tiwana, B., Qian, Z., et al., 2010. Accurate online power estimation and automatic battery behavior based power model generation for smartphones. In: Proceedings of the Eighth IEEE/ACM/IFIP International Conference on Hardware/Software Codesign and System Synthesis, pp. 105–114.
- Zhu, M., Hao, D., 2023. Compiler auto-tuning via critical flag selection. In: Proceedings of the 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 1000–1011.
- Zhu, M., Hao, D., Chen, J., 2024. Compiler autotuning through multiple phase learning. ACM Transactions in Software Engineering and Methodology. In press.
- Zhu, (2015), pp. 767