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
About

About

I'm a post-doctoral researcher at the SPeCS lab in the Faculty of Engineering, University of Porto. My area of expertise is source-to-source compilers and code generation, and I have done work both in high-level languages, such as MATLAB and C++, and low-level languages, such as assembly and VHDL.

From 2012 to 2015, my main line of research was MATLAB to C compilation, and I was the creator and main developer of the tool MATISSE (specs.fe.up.pt/tools/matisse). Currently I am working on Clava (specs.fe.up.pt/tools/clava), a C++ source-to-source transformation tool based on Clang, as part of the H2020 project ANTAREX (antarex-project.eu) which focus on strategies for autotunning and energy efficiency in HPC.

Previous work includes translation of Perl-Compatible Regular Expressions (PCRE) to HDL, and automatic runtime migration of loops found in MicroBlaze assembly traces to customized hardware (the subject of the PhD thesis).

I've received a Bachelor's degree in Computer Systems and Informatics from the Univ. of Algarve in July 2006, and in July 2012 received the Ph.D. degree from Instituto Superior Técnico (IST), Lisbon, with the thesis “Mapping Runtime-Detected Loops from Microprocessors to Reconfigurable Processing Units”.

Interest
Topics
Details

Details

001
Publications

2023

Challenges and Opportunities in C/C++ Source-To-Source Compilation (Invited Paper)

Authors
Bispo, J; Paulino, N; Sousa, LM;

Publication
14th Workshop on Parallel Programming and Run-Time Management Techniques for Many-Core Architectures and 12th Workshop on Design Tools and Architectures for Multicore Embedded Computing Platforms, PARMA-DITAM 2023, January 17, 2023, Toulouse, France.

Abstract
The C/C++ compilation stack (Intermediate Representations (IRs), compilation passes and backends) is encumbered by a steep learning curve, which we believe can be lowered by complementing it with approaches such as source-to-source compilation. Source-to-source compilation is a technology that is widely used and quite mature in certain programming environments, such as JavaScript, but that faces a low adoption rate in others. In the particular case of C and C++ some of the identified factors include the high complexity of the languages, increased difficulty in building and maintaining C/C++ parsers, or limitations on using source code as an intermediate representation. Additionally, new technologies such as Multi-Level Intermediate Representation (MLIR) have appeared as potential competitors to source-to-source compilers at this level. In this paper, we present what we have identified as current challenges of source-to-source compilation of C and C++, as well as what we consider to be opportunities and possible directions forward. We also present several examples, implemented on top of the Clava source-to-source compiler, that use some of these ideas and techniques to raise the abstraction level of compiler research on complex compiled languages such as C or C++. The examples include automatic parallelization of for loops, high-level synthesis optimisation, hardware/software partitioning with run-time decisions, and automatic insertion of inline assembly for fast prototyping of custom instructions. © João Bispo, Nuno Paulino, and Luís Miguel Sousa.

2023

14th Workshop on Parallel Programming and Run-Time Management Techniques for Many-Core Architectures and 12th Workshop on Design Tools and Architectures for Multicore Embedded Computing Platforms, PARMA-DITAM 2023, January 17, 2023, Toulouse, France

Authors
Bispo, J; Charles, HP; Cherubin, S; Massari, G;

Publication
PARMA-DITAM

Abstract

2023

E-APK: Energy pattern detection in decompiled android applications

Authors
Gregorio, N; Bispo, J; Fernandes, JP; de Medeiros, SQ;

Publication
JOURNAL OF COMPUTER LANGUAGES

Abstract
Energy efficiency is a non-functional requirement that developers must consider, particularly when building software for battery-operated devices like mobile ones: a long-lasting battery is an essential requirement for an enjoyable user experience.In previous studies, it has been shown that many mobile applications include inefficiencies that cause battery to be drained faster than necessary. Some of these inefficiencies result from software patterns that have been catalogued, and for which more energy-efficient alternatives are also known.The existing catalogues, however, assume as a fundamental requirement that one has access to the source code of an application in order to be able to analyse it. This requirement makes independent energy analysis challenging, or even impossible, e.g. for a mobile user or, most significantly, an App Store trying to provide information on how efficient an application being submitted for publication is.We study the viability of looking for known energy patterns in applications by decompiling them and analysing the resulting code. For this, we decompiled and analysed 420 open-source applications by extending an existing tool, which is now capable of transparently decompiling and analysing android applications. With the collected data, we performed a comparative study of the presence of four energy patterns between the source code and the decompiled code.We performed two types of analysis: (i) comparing the total number of energy pattern detections; (ii) comparing the similarity between energy pattern detections. When comparing the total number of detections in source code against decompiled code, we found that 79.29% of the applications reported the same number of energy pattern detections.To test the similarity between source code and APKs, we calculated, for each application, a similarity score based on our four implemented detectors. Of all applications, 35.76% achieved a perfect similarity score of 4, and 89.40% got a score of 3 or more out of 4. Furthermore, only two applications got a score of 0.When viewed in tandem, the results of the two analyses we performed point in a promising direction. They provide initial evidence that static analysis techniques, typically used in source code, can be a viable method to inspect APKs when access to source code is restricted, and further research in this area is worthwhile.

2023

A DSL-based runtime adaptivity framework for Java

Authors
Carvalho, T; Bispo, J; Pinto, P; Cardoso, JMP;

Publication
SOFTWAREX

Abstract
This article presents Kadabra, a Java source-to-source compiler that allows users to make code queries, code analysis and code transformations, all user-programmable using the domain-specific language LARA. We show how Kadabra can be used as the basis for developing a runtime autotuning and adaptivity framework, able to adapt existing source Java code in order to take advantage of runtime autotuning. Specifically, this article presents the framework, consisting of Kadabra and an API for runtime adaptivity. We show the use of the framework to extend Java applications with autotuning and runtime adaptivity mechanisms to target performance improvement and/or energy saving goals.(c) 2023 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/).

2022

Pegasus: Performance Engineering for Software Applications Targeting HPC Systems

Authors
Pinto, P; Bispo, J; Cardoso, J; Barbosa, JG; Gadioli, D; Palermo, G; Martinovic, J; Golasowski, M; Slaninova, K; Cmar, R; Silvano, C;

Publication
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING

Abstract
Developing and optimizing software applications for high performance and energy efficiency is a very challenging task, even when considering a single target machine. For instance, optimizing for multicore-based computing systems requires in-depth knowledge about programming languages, application programming interfaces (APIs), compilers, performance tuning tools, and computer architecture and organization. Many of the tasks of performance engineering methodologies require manual efforts and the use of different tools not always part of an integrated toolchain. This paper presents Pegasus, a performance engineering approach supported by a framework that consists of a source-to-source compiler, controlled and guided by strategies programmed in a Domain-Specific Language, and an autotuner. Pegasus is a holistic and versatile approach spanning various decision layers composing the software stack, and exploiting the system capabilities and workloads effectively through the use of runtime autotuning. The Pegasus approach helps developers by automating tasks regarding the efficient implementation of software applications in multicore computing systems. These tasks focus on application analysis, profiling, code transformations, and the integration of runtime autotuning. Pegasus allows developers to program their strategies or to automatically apply existing strategies to software applications in order to ensure the compliance of non-functional requirements, such as performance and energy efficiency. We show how to apply Pegasus and demonstrate its applicability and effectiveness in a complex case study, which includes tasks from a smart navigation system.

Supervised
thesis

2022

Multi-Language Detection of Design Pattern Instances

Author
Hugo Miguel Felgueira de Andrade

Institution
UP-FEUP

2022

AST-Based Large-Scale Vulnerability Analysis for C/C++

Author
Diogo Ferreira de Sousa

Institution
UP-FEUP

2022

Mutation Testing Effectiveness - An Empirical Analysis on Java Mutation Testing Tools

Author
Luís Carlos de Sousa Pinto

Institution
UP-FEUP

2022

Automatic C/C++ Source-Code Analysis and Normalization

Author
João Nuno Carvalho de Matos

Institution
UP-FEUP

2022

Programming FPGAs Using Task-Graphs and C code

Author
Luís Miguel Jardim Noites

Institution
UP-FEUP