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 João Alexandre Saraiva

2016

The influence of the Java collection framework on overall energy consumption

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

Publication
Proceedings of the 5th International Workshop on Green and Sustainable Software, GREENS@ICSE 2016, Austin, Texas, USA, May 16, 2016

Abstract
This paper presents a detailed study of the energy consumption of the different Java Collection Framework (JFC) implementations. For each method of an implementation in this framework, we present its energy consumption when handling different amounts of data. Knowing the greenest methods for each implementation, we present an energy optimization approach for Java programs: based on calls to JFC methods in the source code of a program, we select the greenest implementation. Finally, we present preliminary results of optimizing a set of Java programs where we obtained 6.2% energy savings. © 2016 ACM.

2017

Towards a Green Ranking for Programming Languages

Authors
Couto, M; Pereira, R; Ribeiro, F; Rua, R; Saraiva, J;

Publication
PROCEEDINGS OF THE 21ST BRAZILIAN SYMPOSIUM ON PROGRAMMING LANGUAGES (SBLP 2017)

Abstract
While in the past the primary goal to optimize software was the run time optimization, nowadays there is a growing awareness of the need to reduce energy consumption. Additionally, a growing number of developers wish to become more energy-aware when programming and feel a lack of tools and the knowledge to do so. In this paper we define a ranking of energy efficiency in programming languages. We consider a set of computing problems implemented in ten well-known programming languages, and monitored the energy consumed when executing each language. Our preliminary results show that although the fastest languages tend to be the lowest consuming ones, there are other interesting cases where slower languages are more energy efficient than faster ones.

2013

Zipper-Based Attribute Grammars and Their Extensions

Authors
Martins, P; Fernandes, JP; Saraiva, J;

Publication
PROGRAMMING LANGUAGES, SBLP 2013

Abstract
Attribute grammars are a suitable formalism to express complex software language analysis and manipulation algorithms, which rely on multiple traversals of the underlying syntax tree. Recently, Attribute Grammars have been extended with mechanisms such as references and high-order and circular attributes. Such extensions provide a powerful modular mechanism and allow the specification of complex fix-point computations. This paper defines an elegant and simple, zipper-based embedding of attribute grammars and their extensions as first class citizens. In this setting, language specifications are defined as a set of independent, off-the-shelf components that can easily be composed into a powerful, executable language processor. Several real examples of language specification and processing programs have been implemented in this setting.

2015

Zipper-Based Modular and Deforested Computations

Authors
Martins, P; Fernandes, JP; Saraiva, J;

Publication
Central European Functional Programming School, CEFP 2013

Abstract
In this paper we present a methodology to implement multiple traversal algorithms in a functional programming setting. The implementations we obtain s of highly modular and intermediate structure free programs, that rely on the concept of functional zippers to navigate on data structures. Even though our methodology is developed and presented under Haskell, a lazy functional language, we do not make essential use of laziness. This is an essential difference with respect to other attribute grammar embeddings. This also means that an approach similar to ours can be followed in a strict functional setting such as Ocaml, for example. In the paper, our technique is applied to a significant number of problems that are well-known to the functional programming community, demonstrating its practical interest.

2014

Generating attribute grammar-based bidirectional transformations from rewrite rules

Authors
Martins, P; Saraiva, J; Fernandes, JP; Van Wyk, E;

Publication
PEPM 2014 - Proceedings of the ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, Co-located with POPL 2014

Abstract
Higher order attribute grammars provide a convenient means for specifying uni-directional transformations, but they provide no direct support for bidirectional transformations. In this paper we show how rewrite rules (with non-linear right hand sides) that specify a forward/get transformation can be inverted to specify a partial backward/put transformation. These inverted rewrite rules can then be extended with additional rules based on characteristics of the source language grammar and forward transformations to create, under certain circumstances, a total backward transformation. Finally, these rules are used to generate attribute grammar specifications implementing both transformations. Categories and Subject Descriptors D.3.3 [Programming Languages]: Data Types and Structures, Recursion; F.3.2 [Logics and Meanings of Programs]: Semantics of Programming Languages- Algebraic approaches to semantics; I.1.1 [Symbolic and Algebraic Manipulation]: Expressions and Their Representation.

2017

Helping Programmers Improve the Energy Efficiency of Source Code

Authors
Pereira, R; Carcao, T; Couto, M; Cunha, J; Fernandes, JP; Saraiva, J;

Publication
PROCEEDINGS OF THE 2017 IEEE/ACM 39TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING COMPANION (ICSE-C 2017)

Abstract
This paper briefly proposes a technique to detect energy inefficient fragments in the source code of a software system. Test cases are executed to obtain energy consumption measurements, and a statistical method, based on spectrum-based fault localization, is introduced to relate energy consumption to the system's source code. The result of our technique is an energy ranking of source code fragments pointing developers to possible energy leaks in their code.

  • 6
  • 26