GreenSoftwareLab: Towards an Engineering Discipline for Green Software
Description
The current widespread use of nonwired but powerful computing devices, such as, for example, smartphones, laptops, etc., is changing the way both computer manufacturers and software engineers develop their products. In fact, computer/software performance (ie, execution time), which was the primary goal in the last century, is no longer the only and main concern. Energy
consumption is becoming an increasing bottleneck for both hardware and software systems.
Recently, hardware manufacturers andresearchers have developed techniques to reduce energy consumption mainly focused on developing and optimizing their hardware. This is the natural approach to reduce energy consumption since it is the hardware which literally consumes energy. However, very much like how a driver operating a car can heavily influence its fuel consumption, the software which operates such hardware can drastically influence its energy consumption too!
Recent research in software engineering has defined powerful techniques to improve software developers productivity by providing, for example, advanced type and modular systems, integrating developing environments (IDE), testing and debugging frameworks and tools, etc. Moreover, compiler construction techniques were developed to improve the execution time of our software, namely by using partial and/or runtime compilation, advanced garbage collectors, parallel execution, etc. All these engineering techniques and tools aim at helping software developers quickly define correct programs with optimal runtime.
Unfortunately, none of these techniques nor tools have been adapted to support greenware software development. Indeed, there is no software engineering discipline providing techniques and tools to help software developers to analyze, understand and optimize the energy consumption of their software! As a consequence, if a developer notices that his/her software is responsible for a large battery drain, he/she gets no support from the language/compiler he/she is using.
In this project, we aim to study, develop, and apply methods to analyze “energy leaks” in software source code. Thus, the focus of the project is to reason about energy consumption at the software level. In this context, we define energy leaks as an abnormal and excessive consumption of energy by a software system. We will start the project by adapting well known techniques for fault localization and program debugging in software source code, to locate energyleaks in software and to relate such leaks to the software source code. Software source code metrics and a catalog of program smells will be adapted to the energyaware realm.
Using these techniques, we will identify what programming practices, design patterns, and other factors contribute to high energy consumption. Being able to locate such energy leaks in the developer’s code, we will construct both a catalog of software energy metrics and a catalog of red smells (i.e., energy inefficient smells in source code). These techniques are the main building blocks for the next phase: providing a set of source code refactorings and supporting tools that help developers in green decision making and in optimizing the code. A source code refactor is a sourcetosource transformation that does not change the semantic behaviour of a program. Our energyaware catalog of refactorings, named “green refactorings”, will be used to improve software energy consumption. First, red smells are marked in the source code, and one or more green refactoring will be suggested so that developers make their software greener. We envision an Integrated Energyaware Development Environment (IEDE) in which the refactorings are automatically applied, or semiautomatically applied with the developer’s guidance.
To validate our techniques we will develop libraries and tools to support green decision making such as generic and reusable libraries implementing the catalog of energy metrics, red smells and green refactorings. To analyze and locate energy leaks, an energy profiler, a red smell detector, and other energy monitorization tools, will be developed. To optimize energy leaks, a
framework implementing the red smells/green refactorings will be defined as IDE plugins (Eclipse, etc.). Such a framework will localize where in the source code is a red smell, while also providing the programmer the relevant information to show where and what is making his/her code energy inefficient, methods/alternatives, and automatically optimize the energy and refactor the code.
All of this will allow programmers to finally become energy-aware while programming and consider this aspect of their code, and with the appropriate tools, can finally have ways to support green decision making. Finally, we will validate our methods, tools, and techniques with real case studies with our industrial partners through benchmarks, and professional programmers through empirical studies.
Researchers
Funded by
Fundação para a Ciência e Tecnologia
Total budget
155 000,00 €
Local budget
38 500,00 €
Keywords
Software Analysis, Software Manipulation, Green Software Computing
Start Date
2016-07-01
Conference Articles
2018
(2 publications) - Melfe, G. and Alcides Fonseca and João Paulo Fernandes , "Evaluation of the impact on energy consumption of lazy versus strict evaluation of Haskell data-structures", in Proceedings of the XXII Brazilian Symposium on Programming Languages, SBLP 2018, São Carlos, Brazil, September 20-21, 2018, 2018
- Melfe, G. and Alcides Fonseca and João Paulo Fernandes , "Helping developers write energy efficient Haskell through a data-structure evaluation", in Proceedings of the 6th International Workshop on Green and Sustainable Software, GREENS@ICSE 2018, Gothenburg, Sweden, May 27, 2018, 2018
2017
(3 publications) - João Paulo Fernandes and Couto, M. and Borba, P. and Cunha, J. and Pereira, R. and Saraiva, J. , "Products go Green: Worst-Case Energy Consumption in Software Product Lines", in Proceedings of the 21st International Systems and Software Product Line Conference, SPLC 2017, Volume A, Sevilla, Spain, September 25-29, 2017, 2017
- Pereira, R. and Couto, M. and Ribeiro, F. and Rua, R. and João Paulo Fernandes and Cunha, J. and Saraiva, J. , "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, SLE 2017, Vancouver, BC, Canada, October 23-24, 2017, 2017
- Pereira, R. and Couto, M. and Cunha, J. and Saraiva, J. and João Paulo Fernandes , "Helping programmers improve the energy efficiency of source code", in Proceedings of the 39th International Conference on Software Engineering, ICSE 2017, Buenos Aires, Argentina, May 20-28, 2017 - Companion Volume, 2017