Green Software Lab

New paper @ SANER’20

Energy Refactorings for Android in the Large and in the Wild -Marco Couto, João Paulo Fernandes, and João Saraiva

Improving the energy efficiency of mobile applications is a timely goal, as it can contribute to increase a device’s usage time, which most often is powered by batteries. Recent studies have provided empirical evidence that refactoring energy-greedy code patterns can in fact reduce the energy consumed by an application. These studies, however, tested the impact of refactoring patterns individually, often locally (e.g., by measuring method-level gains) and using a small set of applications.

We studied the application-level impact of refactorings, comparing individual refactorings, among themselves and against the combinations on which they appear. We use scenarios that simulate realistic application usage on a large-scale repository of Android applications. To fully automate the detection and refactoring procedure, as well as the execution of test cases, we developed a publicly available tool called Chimera.

Our findings include statistical evidence that i) individual refactorings produce consistent gains, but with different impacts, ii) combining as much refactorings as possible most often, but not always, increases energy savings when compared to individual refactorings, and iii) a few combinations are harmful to energy savings, as they can actually produce more losses than gains.

We prepared a set of guidelines for developers to follow, aiding them on deciding how to refactor and consistently reduce energy.

Rui Rua received a PhD grant from FCT

Rui Rua received a PhD grant from FCT to work on “Green Software in the Large: Energy-driven Techniques, Tools and Repositories“. This work will be supervised by Prof. João Saraiva (University of Minho, Braga) with the collaboration of  Prof. Cristina Videira Lopes (Univ. of California at Irvine, USA).

Energyware Engineering: Techniques and Tools for Green Software Development – Rui Pereira’s PhD

Rui Alexandre Afonso Pereira concluded his PhD on October, 29th 2018, at Informatics Department (DI) of the  University of Minho (DI-UMinho), with a thesis entitled “Energyware Engineering: Techniques and Tools for Green Software Development“. He was advised by Professors João Saraiva and Jácome Cunha (DI/UMinho) and his research was also hosted by the research center HASLab/INESCTEC.

Abstract – Energy consumption is nowadays one of the most important concerns worldwide. While hardware is generally seen as the main culprit for a computer’s energy usage, software too has a tremendous impact on the energy spent, as it can cancel the efficiency introdued by the hardware. Green Computing is not a new field of study, but the focus has been,
until recently, on hardware. While there has been advancements in Green Software techniques, there is still not enough support for software developers so they can make their code more energy-aware, with various studies arguing there is both a lack of knowledge and lack of tools for energy-aware development.
This thesis intends to tackle these two problems and aims at further pushing forward research on Green Software. This software energy consumption issue is faced as a software engineering question. By using systematic, disciplined, and quantifiable approaches to the development, operation, and maintenance of software we defined several techniques, methodologies, and tools within this document. These focus on providing software developers more knowledge and tools to help with energy-aware software development, or Energyware Engineering.
Insights are provided on the energy influence of several stages performed during a software’s development process. We look at the energy efficiency of various popular programming languages, understanding which are the most appropriate if a developer’s concern is energy consumption. A detailed study on the energy profiles of different Java data structures is also presented, along with a technique and tool, further providing more knowledge on what energy efficient alternatives a developer has to choose from. To help developers with the lack of tools, we defined and implemented a technique to detect energy inefficient fragments within the source code of a software system. This technique and tool has been shown to help developers improve the energy efficiency of their programs, and even outperforming a runtime profiler.

Finally, answers are provided to common questions and misconceptions within this field of research, such as the relationship between time and energy, and how one can improve their software’s energy consumption. This thesis provides a great effort to help support both research and education on this topic, helps continue to grow green software out of its infancy, and contributes to solving the lack of knowledge and tools which exist for Energyware Engineering.

 

 

 

GSL members win Best Paper Award @ CIbSE’18

The article “Using Automatic Refactoring to Improve Energy Efficiency of Android Apps“, authored by Luis Cruz and Rui Abreu, was awarded the Best Paper Award at CIbSE’18.

The ever-growing popularity of mobile phones has brought additional challenges to the software development lifecycle. Mobile applications (apps, for short) ought to provide the same set of features as conventional software, with limited resources: such as, limited processing capabilities, storage, screen and, not less important, power source. Although energy efficiency is a valuable requirement, developers often lack knowledge of best practices. In this paper, we study whether or not automatic refactoring can aid developers ship energy efficient apps. We leverage a tool, Leafactor, with five energy code smells that tend to go unnoticed. We use Leafactor to analyze code smells in 140 free and open source apps. As a result, we detected and fixed code smells in 45 apps, from which 40% have successfully merged our changes into the official repository.

New Paper Accepted @ GREENS’18

Helping developers write energy efficient Haskell through a data-structure evaluation – Gilberto Melfe, Alcides Fonseca, João Paulo Fernandes

How a program is written has implications in the energy consumption of the running system, with economical and environmental consequences.

In this context, understanding the energy consumption of operations on data-structures is crucial when optimizing software to execute under power constricted environments. Existing studies have not focused on the different components of energy consumption that processors expose, rather considering the global consumption.

To understand the relationship between CPU and memory energy consumptions with execution time, we instrument a microbenchmark suite to collect such values, and we analyze the results.

Our benchmark suite is comprised of 16 implementations of functional sequences, collections and associative collections while measuring detailed energy and time metrics. We further investigate the energy consumption impact of using different compilation optimizations.

We have concluded that energy consumption is directly proportional to execution time. Additionally, DRAM and Package energy consumptions are directly proportional, with the DRAM representing between 15 and 31% of the total energy consumption. Finally, we also conclude that optimizations can have both a positive or a negative impact on energy consumption.

 

 

GSL members win Best Paper Award @ SBLP’17

The article “Towards a Green Ranking for Programming Languages”, authored by HASLab/INESC TEC & UMinho researchers Marco Couto, Rui Pereira, Francisco Ribeiro, Rui Rua and João Saraiva, was awarded the Best Paper Award at SBLP 2017.

In this work, the researchers analysed and compared the energy efficiency of various programming languages. More specifically, this award-winning research used a set of benchmarking programs and problems in 10 different programming languages in order to compare the energy efficiency of each. In a second phase, the execution time data of the programs was collected, in order to try to understand the relation between energy consumption and execution time.

Finally, while the obtained results showed that the C language is, unsurprisingly, the most efficient language in terms of both energy consumption and performance, the study also showed languages which are slower than others yet consume less energy. It should be noted that execution time and energy consumption vary in different and not directly related ways, since some languages are more efficient in some cases and less in others. Therefore, this study will allow not only the optimisation of energy consumption, but also the optimisation of the execution time of each program.

The 21st Brazilian Symposium on Programming Languages (SBLP 2017) took place on the 21st and 22nd of September, in Fortaleza, Brazil, and is one of the conferences that compose the Brazilian Conference on Software (CBSOFT).

Rui Pereira receives silver medal in ACM Student Research Competition at ICSE 2017

Rui Pereira, a doctoral student of HASLab, reached the second place in the ACM Student Research Competition at ICSE 2017, with the article “Locating energy hotspots in source code”.
The article entitled “Locating energy hotspots in source code”, which was initially submitted in the form of a long abstract paper, was presented in a second evaluation phase in poster form at the 39th International Conference on Software Engineering, one of the most important conferences in the field of Software Engineering, and it was carried out under the project GSL – Green Software Laboratory, a national project financed by FCT.

In this evaluation phase, along with nine other candidates, Rui Pereira made a small public presentation and exhibition of the poster during a special session of the same conference, before a jury composed of five ICSE and ACM members. Only four researchers advanced to the final phase of the competition.

In the third and final phase, with a research talk at ICSE, Rui Pereira achieved the second place in the competition, losing the first place to a researcher from Carnegie Mellon University, and prior Apple researcher. In this phase, three were awarded a medal.

The next round will be in the Grand Final of the ACM Research Competition, where all medalists participate in the ACM Student Research Competition. This round will be during the ACM Awards Banquet an event where, as a general rule, the Turing Award is presented, that is, a prize awarded by ACM to a person who contributed significantly to the area of Computing.

It is important to mention that this competition, sponsored by Microsoft, offers a unique forum for undergraduate and graduate students to present their original research before a panel of judges and attendees at well-known ACM-sponsored and co-sponsored conferences.

This edition of ICSE was held in Buenos Aires, Argentina, from May 20 to 28 and has an annual membership of approximately 1600 participants.

Pages:12