Classifying C++ Solutions Based on Their Energy Profile

Resumo


The algorithm classification problem consists of finding which algorithm a program implements among a given finite set of algorithms. We propose a novel classification strategy using the power slope that best represents an algorithm energy consumption profile. Thenwe classify a set of solutions by using a greedy approach to match two sets of solutions that are aimed to solve the same problem. To evaluate our approach, we used sets of random C++ solutions for 32 problems from CSES, a programming competition site. We executed two datasets twice in two different machines. In one machine, we restricted the classification task to a subset that varies from 14 to 16 CSES problems (a reduction of at least 50% in the search space). In the other one, we could reach a reduction in the search space that varied from 38% up to 53%.
Palavras-chave: program classification, energy profile, C

Referências

Dirk Beyer and Philipp Wendler. 2020. CPU Energy Meter: A tool for energy-aware algorithms engineering. In Tools and Algorithms for the Construction and Analysis of Systems: 26th International Conference, TACAS 2020, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2020, Dublin, Ireland, April 25–30, 2020, Proceedings, Part II 26. Springer, 126–133.

Marcelo Borges Nogueira and Sérgio Queiroz de Medeiros. 2024. Dataset and Software Supporting the Paper "Classifying C++ Solutions Based on Their Energy Profile". DOI: 10.5281/zenodo.13235026

Richard Burden and J. Douglas Faires. 2016. Análise numérica (3ª edição ed.). Cengage Learning.

Thaís Damásio, Michael Canesche, Vinícius Pacheco, Marcus Botacin, Anderson Faustino da Silva, and Fernando M. Quintão Pereira. 2023. A Game-Based Framework to Compare Program Classifiers and Evaders. In Proceedings of the 21st ACM/IEEE International Symposium on Code Generation and Optimization (Montréal, QC, Canada) (CGO 2023). Association for Computing Machinery, New York, NY, USA, 108–121. DOI: 10.1145/3579990.3580012

Marcus Hähnel, Björn Döbel, Marcus Völp, and Hermann Härtig. 2012. Measuring energy consumption for short code paths using RAPL. ACM SIGMETRICS Performance Evaluation Review 40, 3 (2012), 13–17.

Jaimie Kelley, Christopher Stewart, Devesh Tiwari, and Saurabh Gupta. 2016. Adaptive power profiling for many-core HPC architectures. In 2016 IEEE International Conference on Autonomic Computing (ICAC). IEEE, 179–188.

Kashif Nizam Khan, Mikael Hirki, Tapio Niemi, Jukka K. Nurminen, and Zhonghong Ou. 2018. RAPL in Action: Experiences in Using RAPL for Power Measurements. 3, 2 (2018), 1–26. DOI: 10.1145/3177754

Lukas Koedijk and Ana Oprescu. 2022. Finding Significant Differences in the Energy Consumption when Comparing Programming Languages and Programs. In 2022 International Conference on ICT for Sustainability (ICT4S). 1–12. DOI: 10.1109/ICT4S55073.2022.00012

Antti Laaksonen, Roope Salmi, and Topi Talvitie. 2015. Code Submission Evaluation System. [link]

Luís Gabriel Lima, Francisco Soares-Neto, Paulo Lieuthier, Fernando Castor, Gilberto Melfe, and João Paulo Fernandes. 2019. On Haskell and energy efficiency. Journal of Systems and Software 149 (2019), 554–580. DOI: 10.1016/j.jss.2018.12.014

Charalampos Marantos, Lazaros Papadopoulos, Christos P Lamprakos, Konstantinos Salapas, and Dimitrios Soudris. 2022. Bringing Energy Efficiency closer to Application Developers: An Extensible Software Analysis Framework. IEEE Transactions on Sustainable Computing (2022).

Lili Mou, Ge Li, Lu Zhang, TaoWang, and Zhi Jin. 2016. Convolutional neural networks over tree structures for programming language processing. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence (Phoenix, Arizona) (AAAI’16). AAAI Press, 1287–1293.

Adel Noureddine. 2022. PowerJoular and JoularJX: Multi-Platform Software Power Monitoring Tools. In 2022 18th International Conference on Intelligent Environments (IE). 1–4. DOI: 10.1109/IE54923.2022.9826760

Dinglan Peng, Shuxin Zheng, Yatao Li, Guolin Ke, Di He, and Tie-Yan Liu. 2021. How could neural networks understand programs?. In International Conference on Machine Learning. PMLR, 8476–8486.

Rui Pereira, Marco Couto, Francisco Ribeiro, Rui Rua, Jácome Cunha, João Paulo Fernandes, and João Saraiva. 2017. Energy Efficiency across Programming Languages: How Do Energy, Time, and Memory Relate?. In Proceedings of the 10th ACM SIGPLAN International Conference on Software Language Engineering (Vancouver, BC, Canada) (SLE 2017). Association for Computing Machinery, New York, NY, USA, 256–267. DOI: 10.1145/3136014.3136031

Rui Pereira, Marco Couto, Francisco Ribeiro, Rui Rua, Jácome Cunha, João Paulo Fernandes, and João Saraiva. 2021. Ranking programming languages by energy efficiency. Science of Computer Programming 205 (2021), 102609.

Gustavo Pinto and Fernando Castor. 2017. Energy Efficiency: A New Concern for Application Software Developers. Commun. ACM 60, 12 (nov 2017), 68–75. DOI: 10.1145/3154384

Sérgio Queiroz de Medeiros, Marcelo Borges Nogueira, and Gustavo Quezado Gurgel Magalhães. 2023. Analyzing the Time x Energy Relation in C++ Solutions Mined from a Programming Contest Site. In Proceedings of the XXVII Brazilian Symposium on Programming Languages (SBLP ’23). Association for Computing Machinery, New York, NY, USA, 64–72. DOI: 10.1145/3624309.3624312

Henry Gordon Rice. 1953. Classes of recursively enumerable sets and their decision problems. Transactions of the American Mathematical society 74, 2 (1953), 358–366. DOI: 10.1090/S0002-9947-1953-0053041-6

Vincent M Weaver, Matt Johnson, Kiran Kasichayanula, James Ralph, Piotr Luszczek, Dan Terpstra, and Shirley Moore. 2012. Measuring energy and power with PAPI. In 2012 41st international conference on parallel processing workshops. IEEE, 262–268.
Publicado
30/09/2024
NOGUEIRA, Marcelo Borges; MEDEIROS, Sérgio Queiroz de. Classifying C++ Solutions Based on Their Energy Profile. In: SIMPÓSIO BRASILEIRO DE LINGUAGENS DE PROGRAMAÇÃO (SBLP), 28. , 2024, Curitiba/PR. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2024 . p. 98-101.