Cookies
O website necessita de alguns cookies e outros recursos semelhantes para funcionar. Caso o permita, o INESC TEC irá utilizar cookies para recolher dados sobre as suas visitas, contribuindo, assim, para estatísticas agregadas que permitem melhorar o nosso serviço. Ver mais
Aceitar Rejeitar
  • Menu
Sobre

Sobre

João Saraiva é Professor Auxiliar no Departmento de Informática da Universidade do Minho em Braga, Portugal, e um investigador no  HASLab/INESC TEC. Ele obteve o grau de Mestre pela University do Minho em 1993 e o Doutoramento em Ciências da Computação pela Universidade de Utreque, Holanda em 1999. As suas maiores contribuições científicas são nas áreas de linguagens de programação, análise e transformação de programas  e na programação funcional.  Ele foi supervisor de 4 projetos de  PostDoc (financiados pela FCT), 8 projetos de doutoramento (5 concluidos e 3 em execução)  e mais de 30  teses de Mestrado  (Pos-Bologna). Ele publicou mais de 80  atigos científicos (scopus)  em conferências e revistas. Ele foi membro de mais de 60 comites de programa de eventos internacionais e ainda na avaliação de projetos de 5 agências científicas:  ANII (Uruguai), FRS-FNRS (Belgica), NWO (Holanda), FWF (Austria), e FCT (Portugal).

Ele tem experiências na participação e coordenação de projetos de investigação nas suas área de investigação, quer a nível nacional  (projectos financiados pela FCT: PURe, IVY, AMADEUS, CROSS, SSaaPP, AutoSeer, FATBIT, and GreenSwLab), quer a nível internacional com projetos financiados pela  EPSRC (UK), FLAD/NSF (USA) a pela União Europeia.

João Saraiva é um dos fundadores da pretigiada escola  verão  GTTSE - Grand Timely Topics in Software Engineering (inicialmente designada Generative and Transformational Techniques in Software Engineering), que co-organizou em  2005, 2007, 2009, 2011, and 2015 (volumes 4143, 5235, 6491, and 7680 of LNCS - Tutorial by Springer-Verlag) em  Braga. Ele foi o organizador principal  ETAPS'07, The European Joint Conferences on Theory and Practice of Software, em Braga em 2007,  e um membro do seu comité científico (2007-2012).

Tópicos
de interesse
Detalhes

Detalhes

  • Nome

    João Alexandre Saraiva
  • Cargo

    Investigador Coordenador
  • Desde

    01 novembro 2011
Publicações

2024

A large-scale empirical study on mobile performance: energy, run-time and memory

Autores
Rua, R; Saraiva, J;

Publicação
EMPIRICAL SOFTWARE ENGINEERING

Abstract
Software performance concerns have been attracting research interest at an increasing rate, especially regarding energy performance in non-wired computing devices. In the context of mobile devices, several research works have been devoted to assessing the performance of software and its underlying code. One important contribution of such research efforts is sets of programming guidelines aiming at identifying efficient and inefficient programming practices, and consequently to steer software developers to write performance-friendly code.Despite recent efforts in this direction, it is still almost unfeasible to obtain universal and up-to-date knowledge regarding software and respective source code performance. Namely regarding energy performance, where there has been growing interest in optimizing software energy consumption due to the power restrictions of such devices. There are still many difficulties reported by the community in measuring performance, namely in large-scale validation and replication. The Android ecosystem is a particular example, where the great fragmentation of the platform, the constant evolution of the hardware, the software platform, the development libraries themselves, and the fact that most of the platform tools are integrated into the IDE's GUI, makes it extremely difficult to perform performance studies based on large sets of data/applications. In this paper, we analyze the execution of a diversified corpus of applications of significant magnitude. We analyze the source-code performance of 1322 versions of 215 different Android applications, dynamically executed with over than 27900 tested scenarios, using state-of-the-art black-box testing frameworks with different combinations of GUI inputs. Our empirical analysis allowed to observe that semantic program changes such as adding functionality and repairing bugfixes are the changes more associated with relevant impact on energy performance. Furthermore, we also demonstrate that several coding practices previously identified as energy-greedy do not replicate such behavior in our execution context and can have distinct impacts across several performance indicators: runtime, memory and energy consumption. Some of these practices include some performance issues reported by the Android Lint and Android SDK APIs. We also provide evidence that the evaluated performance indicators have little to no correlation with the performance issues' priority detected by Android Lint. Finally, our results allowed us to demonstrate that there are significant differences in terms of performance between the most used libraries suited for implementing common programming tasks, such as HTTP communication, JSON manipulation, image loading/rendering, among others, providing a set of recommendations to select the most efficient library for each performance indicator. Based on the conclusions drawn and in the extension of the developed work, we also synthesized a set of guidelines that can be used by practitioners to replicate energy studies and build more efficient mobile software.

2024

Zipper-based embedding of strategic attribute grammars

Autores
Macedo, JN; Rodrigues, E; Viera, M; Saraiva, J;

Publicação
JOURNAL OF SYSTEMS AND SOFTWARE

Abstract
Strategic term re-writing and attribute grammars are two powerful programming techniques widely used in language engineering. The former relies on strategies to apply term re-write rules in defining largescale language transformations, while the latter is suitable to express context-dependent language processing algorithms. These two techniques can be expressed and combined via a powerful navigation abstraction: generic zippers. This results in a concise zipper-based embedding offering the expressiveness of both techniques. In addition, we increase the functionalities of strategic programming, enabling the definition of outwards traversals; i.e. outside the starting position. Such elegant embedding has a severe limitation since it recomputes attribute values. This paper presents a proper and efficient embedding of both techniques. First, attribute values are memoized in the zipper data structure, thus avoiding their re-computation. Moreover, strategic zipper based functions are adapted to access such memoized values. We have hosted our memoized zipper-based embedding of strategic attribute grammars both in the Haskell and Python programming languages. Moreover, we benchmarked the libraries supporting both embedding against the state-of-the-art Haskell-based Strafunski and Scala-based Kiama libraries. The first results show that our Haskell Ztrategic library is very competitive against those two well established libraries.

2024

pyZtrategic: A Zipper-Based Embedding of Strategies and Attribute Grammars in Python

Autores
Rodrigues, E; Macedo, JN; Viera, M; Saraiva, J;

Publicação
Proceedings of the 19th International Conference on Evaluation of Novel Approaches to Software Engineering, ENASE 2024, Angers, France, April 28-29, 2024.

Abstract
This paper presents pyZtrategic: a library that embeds strategic term rewriting and attribute grammars in the Python programming language. Strategic term rewriting and attribute grammars are two powerful programming techniques widely used in language engineering: The former relies on strategies to apply term rewrite rules in defining large-scale language transformations, while the latter is suitable to express context-dependent language processing algorithms. Thus, pyZtrategic offers Python programmers recursion schemes (strategies) which apply term rewrite rules in defining large scale language transformations. It also offers attribute grammars to express context-dependent language processing algorithms. PyZtrategic offers the best of those two worlds, thus providing powerful abstractions to express software maintenance and evolution tasks. Moreover, we developed several language engineering problems in pyZtrategic, and we compare it to well established strategic programming and attribute grammar systems. Our preliminary results show that our library offers similar expressiveness as such systems, but, unfortunately, it does suffer from the current poor runtime performance of the Python language. © 2024 by SCITEPRESS – Science and Technology Publications, Lda.

2024

Tabulation with Zippers

Autores
Viera, M; Pardo, A; Saraiva, J;

Publicação
FUNCTIONAL AND LOGIC PROGRAMMING, FLOPS 2024

Abstract
Tabulation is a well-known technique for improving the efficiency of recursive functions with redundant function calls. A key point in the application of this technique is to identify a suitable representation for the table. In this paper, we propose the use of zippers as tables in the tabulation process. Our approach relies on a generic function zipWithZipper, that makes strong use of lazy evaluation to traverse two zippers in a circular manner. The technique turns out to be particularly efficient when the arguments to recursive calls are closely situated within the function domain. For example, in the case of natural numbers this means function calls on fairly contiguous values. Likewise, when dealing with tree structures, it means functions calls on immediate sub-trees and parent nodes. This results in a concise and efficient zipper-based embedding of attribute grammars.

2024

Programming languages ranking based on energy measurements

Autores
Gordillo, A; Calero, C; Moraga, MA; García, F; Fernandes, JP; Abreu, R; Saraiva, J;

Publicação
SOFTWARE QUALITY JOURNAL

Abstract
Software is developed using programming languages whose choice is made based on a wide range of criteria, but it should be noted that the programming language selected can affect the quality of the software product. In this paper, we focus on analysing the differences in energy consumption when running certain algorithms that have been developed using different programming languages. Therefore, we focus on the software quality from the perspective of greenability, in concrete in the aspects related to energy efficiency. For this purpose, this study has conducted an empirical investigation about the most suitable programming languages from an energy efficiency perspective using a hardware-based consumption measurement instrument that obtains real data about energy consumption. The study builds upon a previous study in which energy efficiency of PL were ranked using a software-based approach where the energy consumption is an estimation. As a result, no significant differences are obtained between two approaches, in terms of ranking the PL. However, if it is required to have a more realistic knowledge of consumption, it is necessary to use hardware approaches. Furthermore, the hardware approach provides information about the energy consumption of specific DUT hardware components, such as, HDD, graphics card, and processor, and a ranking for each of component is elaborated. This can provide useful information to make a more informed decision on the choice of a PL, depending on several factors, such as the type of algorithms to be implemented, or the effects on power consumption not only in overall, but also depending on specific DUT hardware components.

Teses
supervisionadas

2023

Automatic generation of program executions

Autor
José Nuno Castro de Macedo

Instituição
UM

2023

Green Software in the Large: Energy-driven Techniques, Tools and Repositories

Autor
Rui António Ramada Rua

Instituição
UM

2023

Explaining Software Faults in Source Code

Autor
Francisco José Torres Ribeiro

Instituição
UM

2023

Análise e Optimização da Performance de Programação Estratégica baseda em Zippers

Autor
José Emanuel Silva Rodrigues

Instituição
UM

2023

Large Language Models in Automated Program Repair

Autor
Sofia Guilherme Rodrigues dos Santos

Instituição
UM