Cookies Policy
The website need some cookies and similar means to function. If you permit us, we will use those means to collect data on your visits for aggregated statistics to improve our service. Find out More
Accept Reject
  • Menu
Publications

Publications by HASLab

2019

Memoized zipper-based attribute grammars and their higher order extension

Authors
Fernandes, JP; Martins, P; Pardo, A; Saraiva, J; Viera, M;

Publication
SCIENCE OF COMPUTER PROGRAMMING

Abstract
Attribute grammars are a powerfull, well-known formalism to implement and reason about programs which, by design, are conveniently modular. In this work we focus on a state of the art zipper-based embedding of classic attribute grammars and higher-order attribute grammars. We improve their execution performance through controlling attribute (re)evaluation by means of memoization techniques. We present the results of our optimizations by comparing their impact in various implementations of different, well-studied, attribute grammars and their Higher-Order extensions.

2019

Towards using Memoization for Saving Energy in Android

Authors
Rua, R; Couto, M; Pinto, A; Cunha, J; Saraiva, J;

Publication
Proceedings of the XXII Iberoamerican Conference on Software Engineering, CIbSE 2019, La Habana, Cuba, April 22-26, 2019.

Abstract
Over the last few years, the interest in the analysis of the energy consumption of Android applications has been increasing significantly. Indeed, there are a considerable number of studies which aim at analyzing the energy consumption in the Android ecosystem, such as measuring/estimating the energy consumed by an application or block of code, or even detecting energy expensive coding patterns or APIs. In this paper, we present an initial study of the impact of memoization in the energy consumption of Android applications. We compare implementations of 18 methods from different applications, with and without using memoization, and measure the energy consumption of both of them. The results show that using memoization can be a good approach for saving energy, since 13 of those methods decreased their energy consumption.

2019

GreenSource: a large-scale collection of Android code, tests and energy metrics

Authors
Rua, R; Couto, M; Saraiva, J;

Publication
Proceedings of the 16th International Conference on Mining Software Repositories, MSR 2019, 26-27 May 2019, Montreal, Canada.

Abstract
This paper presents the GreenSource infrastructure: a large body of open source code, executable Android applications, and curated dataset containing energy code metrics. The dataset contains energy metrics obtained by both static analysing the applications' source code and by executing them with available test inputs. To automate the execution of the applications we developed the AnaDroid tool which instruments its code, compiles and executes it with test inputs in any Android device, while collecting energy metrics. GreenSource includes all Android applications included in the MUSE Java source code repository, while AnaDroid implements all Android's energy greedy features described in the literature, GreenSource aims at characterizing energy consumption in the Android ecosystem, providing both Android developers and researchers a setting to reason about energy efficient Android software development. © 2019 IEEE.

2019

Get Your Spreadsheets Under (Version) Control

Authors
Macedo, JN; Moreira, R; Cunha, J; Saraiva, J;

Publication
Proceedings of the XXII Iberoamerican Conference on Software Engineering, CIbSE 2019, La Habana, Cuba, April 22-26, 2019.

Abstract
Spreadsheets play a pivotal role in many organizations. They serve to store and manipulate data or forecasting, and they are often used to help in the decision process, thus directly impacting the success, or not, of organizations. As the research community already realized, spreadsheets tend to have the same problems “professional” software contain. Thus, in the past decade many software engineering techniques have been successfully proposed to aid spreadsheet developers and users. However, one of the most used mechanisms to manage software projects is still lacking in spreadsheets: a version control system. A version control system allows for collaborative development, while also allowing individual developers to explore different alternatives without compromising the main project. In this paper we present a version control system, named SheetGit, oriented for end-user programmers. It allows to graphically visualize the history of versions (including branches), to switch between different versions just by pointing and clicking, and to visualize the differences between any two versions in an animated way. To validate our approach/tool we performed an empirical evaluation which shows evidence that SheetGit can aid users when compared to other tools.

2019

Java Stream Fusion: Adapting FP mechanisms for an OO setting

Authors
Ribeiro, F; Saraiva, J; Pardo, A;

Publication
XXIII BRAZILIAN SYMPOSIUM ON PROGRAMMING LANGUAGES

Abstract
In this paper, we show how stream fusion, a program transformation technique used in functional programming, can be adapted for an Object-Oriented setting. This makes it possible to have more Stream operators than the ones currently provided by the Java Stream API. The addition of more operators allows for a greater deal of expressiveness. To this extent, we show how these operators are incorporated in the stream setting. Furthermore, we also demonstrate how a specific set of optimizations eliminates overheads and produces equivalent code in the form of for loops. In this way, programmers are relieved from the burden of writing code in such a cumbersome style, thus allowing for a more declarative and intuitive programming approach.

2019

Paint Your Programs Green: On the Energy Efficiency of Data Structures

Authors
Pereira, R; Couto, M; Cunha, J; Melfe, G; Saraiva, J; Fernandes, JP;

Publication
Composability, Comprehensibility and Correctness of Working Software - 8th Summer School, CEFP 2019, Budapest, Hungary, June 17-21, 2019, Revised Selected Papers

Abstract

  • 62
  • 247