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

Term

4. term

Education

Publication year

2022

Submitted on

Pages

91

Abstract

Energy consumption of software has become a prominent focus area for re- searchers and developers. Much work has gone into researching patterns and constructions that consume more en- ergy 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 ad- dition to this, not many tools for de- tecting these issues exist. This report examines a collection of code smells that have been proven to have an im- pact 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 ef- fort is made to create a linter-like tool that can detect such patterns using the analysis engine CodeQL.