AAU Student Projects - visit Aalborg University's student projects portal
A master's thesis from Aalborg University
Book cover


An Energy Aware Linter: Helping programmers make more energy efficient code on the fly

Translated title

An Energy Aware Linter

Authors

;

Term

4. term

Education

Publication year

2022

Submitted on

Pages

91

Abstract

Energy consumption of software has become a prominent focus area for researchers and developers. Much work has gone into researching patterns and constructions that consume more energy than others, across programming languages and platforms. Code smells have been examined to a large extent, however not much research has gone into examining if the results carry over to other languages or platforms. In addition to this, not many tools for detecting these issues exist. This report examines a collection of code smells that have been proven to have an impact in Java on desktop systems and C++ on embedded systems to see if they have the same impact in C# on a desktop system, in both a micro- and macrobenchmarks. Initial tests show that removing a number of code smells from a macro system can save up to 23% in energy consumption. To ease the process of such refactoring, an effort is made to create a linter-like tool that can detect such patterns using the analysis engine CodeQL.