{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,10,12]],"date-time":"2025-10-12T01:53:58Z","timestamp":1760234038359,"version":"build-2065373602"},"reference-count":56,"publisher":"MDPI AG","issue":"1","license":[{"start":{"date-parts":[[2021,3,23]],"date-time":"2021-03-23T00:00:00Z","timestamp":1616457600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/501100010790","name":"Erasmus+","doi-asserted-by":"publisher","award":["2020-1-PT01-KA203-078646"],"award-info":[{"award-number":["2020-1-PT01-KA203-078646"]}],"id":[{"id":"10.13039\/501100010790","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["JLPEA"],"abstract":"<jats:p>Optimizing software to become (more) energy efficient is an important concern for the software industry. Although several techniques have been proposed to measure energy consumption within software engineering, little work has specifically addressed Software Product Lines (SPLs). SPLs are a widely used software development approach, where the core concept is to study the systematic development of products that can be deployed in a variable way, e.g., to include different features for different clients. The traditional approach for measuring energy consumption in SPLs is to generate and individually measure all products, which, given their large number, is impractical. We present a technique, implemented in a tool, to statically estimate the worst-case energy consumption for SPLs. The goal is to reason about energy consumption in all products of a SPL, without having to individually analyze each product. Our technique combines static analysis and worst-case prediction with energy consumption analysis, in order to analyze products in a feature-sensitive manner: a feature that is used in several products is analyzed only once, while the energy consumption is estimated once per product. This paper describes not only our previous work on worst-case prediction, for comprehensibility, but also a significant extension of such work. This extension has been realized in two different axis: firstly, we incorporated in our methodology a simulated annealing algorithm to improve our worst-case energy consumption estimation. Secondly, we evaluated our new approach in four real-world SPLs, containing a total of 99 software products. Our new results show that our technique is able to estimate the worst-case energy consumption with a mean error percentage of 17.3% and standard deviation of 11.2%.<\/jats:p>","DOI":"10.3390\/jlpea11010013","type":"journal-article","created":{"date-parts":[[2021,3,23]],"date-time":"2021-03-23T23:59:41Z","timestamp":1616543981000},"page":"13","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":2,"title":["Statically Analyzing the Energy Efficiency of Software Product Lines"],"prefix":"10.3390","volume":"11","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-2333-6095","authenticated-orcid":false,"given":"Marco","family":"Couto","sequence":"first","affiliation":[{"name":"HASLab\/INESC TEC &amp; Department of Informatics, Universidade do Minho, 4710-057 Braga, Portugal"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-1952-9460","authenticated-orcid":false,"given":"Jo\u00e3o Paulo","family":"Fernandes","sequence":"additional","affiliation":[{"name":"Departamento de Engenharia Inform\u00e1tica, Faculdade de Engenharia, Universidade do Porto, 4099-002 Porto, Portugal"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-5686-7151","authenticated-orcid":false,"given":"Jo\u00e3o","family":"Saraiva","sequence":"additional","affiliation":[{"name":"HASLab\/INESC TEC &amp; Department of Informatics, Universidade do Minho, 4710-057 Braga, Portugal"}]}],"member":"1968","published-online":{"date-parts":[[2021,3,23]]},"reference":[{"key":"ref_1","unstructured":"(2019, July 25). World Energy Consumption Statistics. Available online: https:\/\/yearbook.enerdata.net\/total-energy\/world-consumption-statistics.html."},{"key":"ref_2","unstructured":"(2019, July 25). ICT Could Consume up to 20% of Electricity in 2030. Available online: https:\/\/www.enerdata.net\/publications\/executive-briefing\/expected-world-energy-consumption-increase-from-digitalization.html."},{"key":"ref_3","unstructured":"(2019, July 25). Why Energy Is A Big And Rapidly Growing Problem For Data Centers. Available online: https:\/\/www.forbes.com\/sites\/forbestechcouncil\/2017\/12\/15\/why-energy-is-a-big-and-rapidly-growing-problem-for-data-centers\/#43c301b75a30."},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"3","DOI":"10.1016\/j.jss.2013.12.038","article-title":"An overview of Dynamic Software Product Line architectures and techniques: Observations from research and industry","volume":"91","author":"Capilla","year":"2014","journal-title":"J. Syst. Softw."},{"key":"ref_5","unstructured":"Sharp, D.C. (November, January 31). Reducing avionics software cost through component based product line development. Proceedings of the 17th DASC. AIAA\/IEEE\/SAE. Digital Avionics Systems Conference, Proceedings (Cat. No.98CH36267), Bellevue, WA, USA."},{"key":"ref_6","doi-asserted-by":"crossref","unstructured":"Nord, R.L. (2004). Introducing PLA at Bosch Gasoline Systems: Experiences and Practices, Springer. Software Product Lines.","DOI":"10.1007\/b100081"},{"key":"ref_7","unstructured":"Donohoe, P. (1999, January 22\u201324). Medical Product Line Architectures. Proceedings of the Software Architecture: TC2 First Working IFIP Conference on Software Architecture (WICSA1), San Antonio, TX, USA."},{"key":"ref_8","doi-asserted-by":"crossref","unstructured":"Van Ommering, R. (2002, January 25). Building Product Populations with Software Components. Proceedings of the 24th International Conference on Software Engineering, Orlando, FL, USA.","DOI":"10.1145\/581372.581373"},{"key":"ref_9","doi-asserted-by":"crossref","unstructured":"Pereira, R., Car\u00e7\u00e3o, T., Couto, M., Cunha, J., Fernandes, J.P., and Saraiva, J. (2017, January 20\u201328). Helping Programmers Improve the Energy Efficiency of Source Code. Proceedings of the 39th International Conference on Software Engineering Companion, Buenos Aires, Argentina.","DOI":"10.1109\/ICSE-C.2017.80"},{"key":"ref_10","unstructured":"Jabbarvand, R., Sadeghi, A., Garcia, J., Malek, S., and Ammann, P. (2015, January 18). EcoDroid: An Approach for Energy-based Ranking of Android Apps. Proceedings of the Workshop on Green and Sustainable Software, Florence, Italy."},{"key":"ref_11","doi-asserted-by":"crossref","unstructured":"Li, D., Jin, Y., Sahin, C., Clause, J., and Halfond, W.G.J. (2014, January 12\u201316). Integrated Energy-directed Test Suite Optimization. Proceedings of the Symposium on Software Testing and Analysis, San Jose, CA, USA.","DOI":"10.1145\/2610384.2610414"},{"key":"ref_12","doi-asserted-by":"crossref","unstructured":"Pereira, R., Couto, M., Ribeiro, F., Rua, R., Cunha, J., Fernandes, J.P., and Saraiva, J. (2017, January 23\u201324). Energy Efficiency Across Programming Languages: How Do Energy, Time, and Memory Relate?. Proceedings of the 10th ACM SIGPLAN International Conference on Software Language Engineering, Vancouver, BC, Canada.","DOI":"10.1145\/3136014.3136031"},{"key":"ref_13","doi-asserted-by":"crossref","unstructured":"Hu, Y., Yan, J., Yan, D., Lu, Q., and Yan, J. (2018). Lightweight energy consumption analysis and prediction for Android applications. Sci. Comput. Program., 132\u2013147.","DOI":"10.1016\/j.scico.2017.05.002"},{"key":"ref_14","doi-asserted-by":"crossref","unstructured":"Couto, M., Borba, P., Cunha, J., Fernandes, J.P., Pereira, R., and Saraiva, J. (2017, January 25\u201329). Products Go Green: Worst-Case Energy Consumption in Software Product Lines. Proceedings of the 21st International Systems and Software Product Line Conference-Volume A, Sevilla, Spain.","DOI":"10.1145\/3106195.3106214"},{"key":"ref_15","doi-asserted-by":"crossref","first-page":"15","DOI":"10.1016\/j.adhoc.2018.08.004","article-title":"Context-aware energy-efficient applications for cyber-physical systems","volume":"82","author":"Horcas","year":"2019","journal-title":"Ad. Hoc. Netw."},{"key":"ref_16","doi-asserted-by":"crossref","unstructured":"Varshosaz, M., Al-Hajjaji, M., Th\u00fcm, T., Runge, T., Mousavi, M.R., and Schaefer, I. (2018, January 10\u201314). A Classification of Product Sampling for Software Product Lines. Proceedings of the 22nd International Systems and Software Product Line Conference-Volume 1, Gothenburg, Sweden.","DOI":"10.1145\/3233027.3233035"},{"key":"ref_17","doi-asserted-by":"crossref","unstructured":"Sarkar, A., Guo, J., Siegmund, N., Apel, S., and Czarnecki, K. (2015, January 9\u201313). Cost-Efficient Sampling for Performance Prediction of Configurable Systems. Proceedings of the 2015 30th IEEE\/ACM International Conference on Automated Software Engineering, Lincoln, NE, USA.","DOI":"10.1109\/ASE.2015.45"},{"key":"ref_18","unstructured":"Siegmund, N., Grebhahn, A., Apel, S., and K\u00e4stner, C. (October, January 29). Performance-influence Models for Highly Configurable Systems. Proceedings of the 10th Joint Meeting on Foundations of Software Engineering, Cleveland, OH, USA."},{"key":"ref_19","doi-asserted-by":"crossref","first-page":"68","DOI":"10.1145\/3154384","article-title":"Energy Efficiency: A New Concern for Application Software Developers","volume":"60","author":"Pinto","year":"2017","journal-title":"Commun. ACM"},{"key":"ref_20","unstructured":"ISO\/IEC 25010 (2021, March 14). ISO\/IEC 25010:2011. Systems and Software Engineering\u2014Systems and Software Quality Requirements and Evaluation (SQuaRE)\u2014System and Software Quality Models. Available online: https:\/\/www.iso.org\/standard\/35733.html."},{"key":"ref_21","unstructured":"Brabrand, C., Ribeiro, M., Tol\u00eado, T., and Borba, P. (2021, March 14). Intraprocedural Dataflow Analysis for Software Product Lines. Available online: https:\/\/dl.acm.org\/doi\/abs\/10.1145\/2162049.2162052."},{"key":"ref_22","doi-asserted-by":"crossref","unstructured":"Pinto, G., Castor, F., and Liu, Y.D. (1, January 31). Mining Questions About Software Energy Consumption. Proceedings of the 11th Working Conference on Mining Software Repositories, Hyderabad, India. MSR 2014.","DOI":"10.1145\/2597073.2597110"},{"key":"ref_23","unstructured":"Pinto, G., and Castor, F. (2014, January 21). Characterizing the Energy Efficiency of Java\u2019s Thread-Safe Collections in a Multi-Core Environment. Proceedings of the SPLASH\u20192014 workshop on Software Engineering for Parallel Systems (SEPS), SEPS, Portland, OR, USA."},{"key":"ref_24","doi-asserted-by":"crossref","unstructured":"Lima, L.G., Soares-Neto, F., Lieuthier, P., Castor, F., Melfe, G., and Fernandes, J.P. (2016, January 14\u201318). Haskell in Green Land: Analyzing the Energy Behavior of a Purely Functional Language. Proceedings of the 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER), Osaka, Japan.","DOI":"10.1109\/SANER.2016.85"},{"key":"ref_25","doi-asserted-by":"crossref","unstructured":"Pereira, R., Couto, M., Cunha, J., Fernandes, J.P., and Saraiva, J. (2016, January 16). The Influence of the Java Collection Framework on Overall Energy Consumption. Proceedings of the 5th International Workshop on Green and Sustainable Software, Austin, TX, USA.","DOI":"10.1145\/2896967.2896968"},{"key":"ref_26","doi-asserted-by":"crossref","unstructured":"Sahin, C., Cayci, F., Gutierrez, I.L.M., Clause, J., Kiamilev, F., Pollock, L., and Winbladh, K. (2012, January 3). Initial explorations on design pattern energy usage. Proceedings of the Green and Sustainable Software (GREENS), 2012 First International Workshop, Zurich, Switzerland.","DOI":"10.1109\/GREENS.2012.6224257"},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Sahin, C., Pollock, L., and Clause, J. (2014, January 18\u201319). How Do Code Refactorings Affect Energy Usage?. Proceedings of the 8th ACM\/IEEE International Symposium on Empirical Software Engineering and Measurement, Torino, Italy.","DOI":"10.1145\/2652524.2652538"},{"key":"ref_28","unstructured":"Verdecchia, R., Saez, R.A., Procaccianti, G., and Lago, P. (2018, January 14\u201318). Empirical Evaluation of the Energy Impact of Refactoring Code Smells. Proceedings of the ICT4S2018. 5th International Conference on Information and Communication Technology for Sustainability, Toronto, ON, Canada."},{"key":"ref_29","unstructured":"Li, D., and Halfond, W.G.J. (June, January 31). An Investigation into Energy-saving Programming Practices for Android Smartphone App Development. Proceedings of the 3rd International Workshop on Green and Sustainable Software, Hyderabad, India."},{"key":"ref_30","first-page":"138","article-title":"Unsupervised Power Profiling for Mobile Devices","volume":"Volume 104","author":"Puiatti","year":"2012","journal-title":"Mobile and Ubiquitous Systems: Computing, Networking, and Services"},{"key":"ref_31","first-page":"77","article-title":"Detecting Anomalous Energy Consumption in Android Applications","volume":"Volume 8771","year":"2014","journal-title":"Programming Languages"},{"key":"ref_32","doi-asserted-by":"crossref","unstructured":"Li, D., Hao, S., Halfond, W.G.J., and Govindan, R. (2013, January 15). Calculating Source Line Level Energy Information for Android Applications. Proceedings of the 2013 International Symposium on Software Testing and Analysis, Lugano, Switzerland.","DOI":"10.1145\/2483760.2483780"},{"key":"ref_33","unstructured":"Linares-V\u00e1squez, M., Bavota, G., Bernal-C\u00e1rdenas, C., Oliveto, R., Di Penta, M., and Poshyvanyk, D. (June, January 31). Mining Energy-greedy API Usage Patterns in Android Apps: An Empirical Study. Proceedings of the 11th Working Conference on Mining Software Repositories, Hyderabad, India."},{"key":"ref_34","first-page":"378","article-title":"Using Real-Time Maude to Model Check Energy Consumption Behavior","volume":"Volume 9109","year":"2015","journal-title":"FM 2015: Formal Methods"},{"key":"ref_35","doi-asserted-by":"crossref","unstructured":"Cardin, M.A., Krob, D., Lui, P.C., Tan, Y.H., and Wood, K. (2015). Model Checking of Energy Consumption Behavior. Complex Systems Design & Management Asia, Springer International.","DOI":"10.1007\/978-3-319-12544-2"},{"key":"ref_36","doi-asserted-by":"crossref","unstructured":"Hao, S., Li, D., Halfond, W.G.J., and Govindan, R. (2013, January 18\u201326). Estimating Mobile Application Energy Consumption using Program Analysis. Proceedings of the 35th International Conference on Software Engineering (ICSE), San Francisco, CA, USA.","DOI":"10.1109\/ICSE.2013.6606555"},{"key":"ref_37","doi-asserted-by":"crossref","unstructured":"Grech, N., Georgiou, K., Pallister, J., Kerrison, S., and Eder, K. (2015, January 1\u20133). Static energy consumption analysis for LLVM IR programs. Proceedings of the 18th International Workshop on Software and Compilers for Embedded Systems (SCOPES), Sankt Goar, Germany.","DOI":"10.1145\/2764967.2764974"},{"key":"ref_38","first-page":"6:1","article-title":"A Classification and Survey of Analysis Strategies for Software Product Lines","volume":"47","author":"Apel","year":"2014","journal-title":"ACM Comput. Surv."},{"key":"ref_39","unstructured":"Bodden, E., Tol\u00eado, T., Ribeiro, M., Brabrand, C., Borba, P., and Mezini, M. (2013, January 16\u201322). SPLLIFT: Statically Analyzing Software Product Lines in Minutes Instead of Years. Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation, Seattle, WA, USA."},{"key":"ref_40","unstructured":"Guo, J., Czarnecki, K., Apel, S., Siegmund, N., and Wasowski, A. (2021, March 14). Variability-Aware Performance Modeling: A Statistical Learning Approach. Available online: https:\/\/dl.acm.org\/doi\/10.1109\/ASE.2013.6693089."},{"key":"ref_41","doi-asserted-by":"crossref","unstructured":"Couto, M.V., Valente, M.T., and Figueiredo, E. (2011, January 1\u20134). Extracting Software Product Lines: A Case Study Using Conditional Compilation. Proceedings of the 2011 15th European Conference on Software Maintenance and Reengineering, Oldenburg, Germany.","DOI":"10.1109\/CSMR.2011.25"},{"key":"ref_42","doi-asserted-by":"crossref","first-page":"36:1","DOI":"10.1145\/1347375.1347389","article-title":"The Worst-case Execution-time Problem-Overview of Methods and Survey of Tools","volume":"7","author":"Wilhelm","year":"2008","journal-title":"ACM Trans. Embed. Comput. Syst."},{"key":"ref_43","unstructured":"Nielson, F., Nielson, H., and Hankin, C. (2021, March 14). Principles of Program Analysis. Available online: https:\/\/www.springer.com\/gp\/book\/9783540654100."},{"key":"ref_44","unstructured":"M\u00f8ller, A., and Schwartzbach, M.I. (2015). Static Program Analysis, Aarhus University."},{"key":"ref_45","doi-asserted-by":"crossref","unstructured":"Gustafsson, J., Ermedahl, A., Sandberg, C., and Lisper, B. (2006, January 5\u20138). Automatic Derivation of Loop Bounds and Infeasible Paths for WCET Analysis Using Abstract Execution. Proceedings of the 2006 27th IEEE International Real-Time Systems Symposium (RTSS\u201906), Rio de Janeiro, Brazil.","DOI":"10.1109\/RTSS.2006.12"},{"key":"ref_46","unstructured":"Li, Y.S., and Malik, S. (2021, March 14). Performance Analysis of Embedded Software Using Implicit Path Enumeration. Available online: https:\/\/dl.acm.org\/doi\/proceedings\/10.1145\/217474."},{"key":"ref_47","doi-asserted-by":"crossref","unstructured":"Venkata, S.K., Ahn, I., Jeon, D., Gupta, A., Louie, C., Garcia, S., Belongie, S., and Taylor, M.B. (2009, January 4\u20136). SD-VBS: The San Diego Vision Benchmark Suite. Proceedings of the 2009 IEEE International Symposium on Workload Characterization (IISWC), IEEE Computer Society, Austin, TX, USA.","DOI":"10.1109\/IISWC.2009.5306794"},{"key":"ref_48","doi-asserted-by":"crossref","unstructured":"Apel, S., Speidel, H., Wendler, P., von Rhein, A., and Beyer, D. (2011, January 6\u201310). Detection of Feature Interactions Using Feature-aware Verification. Proceedings of the 2011 26th IEEE\/ACM International Conference on Automated Software Engineering. IEEE Computer Society, Lawrence, KS, USA.","DOI":"10.1109\/ASE.2011.6100075"},{"key":"ref_49","doi-asserted-by":"crossref","unstructured":"Apel, S., Rhein, A.V., Wendler, P., Gr\u00f6\u00dflinger, A., and Beyer, D. (2013, January 18\u201326). Strategies for Product-line Verification: Case Studies and Experiments. Proceedings of the 2013 International Conference on Software Engineering, San Francisco, CA, USA.","DOI":"10.1109\/ICSE.2013.6606594"},{"key":"ref_50","doi-asserted-by":"crossref","first-page":"95","DOI":"10.1145\/2637365.2517209","article-title":"Family-based Performance Measurement","volume":"49","author":"Siegmund","year":"2013","journal-title":"ACM SIGPLAN Not."},{"key":"ref_51","doi-asserted-by":"crossref","unstructured":"Medeiros, F., K\u00e4stner, C., Ribeiro, M., Gheyi, R., and Apel, S. (2016, January 14\u201322). A Comparison of 10 Sampling Algorithms for Configurable Systems. Proceedings of the 38th International Conference on Software Engineering, Association for Computing Machinery, Austin, TX, USA.","DOI":"10.1145\/2884781.2884793"},{"key":"ref_52","doi-asserted-by":"crossref","first-page":"72","DOI":"10.1007\/978-3-319-14125-1_5","article-title":"Energy Consumption Analysis of Programs Based on XMOS ISA-Level Models","volume":"Volume 8901","author":"Gupta","year":"2014","journal-title":"Logic-Based Program Synthesis and Transformation"},{"key":"ref_53","doi-asserted-by":"crossref","first-page":"671","DOI":"10.1126\/science.220.4598.671","article-title":"Optimization by Simulated Annealing","volume":"220","author":"Kirkpatrick","year":"1983","journal-title":"Science"},{"key":"ref_54","unstructured":"Pandruvada, S. (2021, March 16). Intel\u00ae Power Governor. Available online: https:\/\/01.org\/blogs\/2014\/running-average-power-limit."},{"key":"ref_55","doi-asserted-by":"crossref","unstructured":"David, H., Gorbatov, E., Hanebutte, U.R., Khanna, R., and Le, C. (2010, January 18\u201320). RAPL: Memory Power Estimation and Capping. Proceedings of the 16th ACM\/IEEE International Symposium on Low Power Electronics and Design, Austin, TX, USA.","DOI":"10.1145\/1840845.1840883"},{"key":"ref_56","doi-asserted-by":"crossref","first-page":"13","DOI":"10.1145\/2425248.2425252","article-title":"Measuring Energy Consumption for Short Code Paths Using RAPL","volume":"40","year":"2012","journal-title":"Sigmetrics Perform. Eval. Rev."}],"container-title":["Journal of Low Power Electronics and Applications"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2079-9268\/11\/1\/13\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,11]],"date-time":"2025-10-11T05:39:46Z","timestamp":1760161186000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2079-9268\/11\/1\/13"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2021,3,23]]},"references-count":56,"journal-issue":{"issue":"1","published-online":{"date-parts":[[2021,3]]}},"alternative-id":["jlpea11010013"],"URL":"https:\/\/doi.org\/10.3390\/jlpea11010013","relation":{},"ISSN":["2079-9268"],"issn-type":[{"type":"electronic","value":"2079-9268"}],"subject":[],"published":{"date-parts":[[2021,3,23]]}}}