João F. Ferreira

@ulisboa.pt

INESC-ID & Instituto Superior Técnico, University of Lisbon



                       

https://researchid.co/jff

RESEARCH INTERESTS

My research interests include software reliability, software verification, and formal methods applied to software engineering. I am also interested in interactive storytelling.

54

Scopus Publications

1041

Scholar Citations

14

Scholar h-index

25

Scholar i10-index

Scopus Publications

  • DifFuzzAR: automatic repair of timing side-channel vulnerabilities via refactoring
    Rui Lima, João F. Ferreira, Alexandra Mendes, and Carolina Carreira

    Springer Science and Business Media LLC
    AbstractVulnerability detection and repair is a demanding and expensive part of the software development process. As such, there has been an effort to develop new and better ways to automatically detect and repair vulnerabilities. DifFuzz is a state-of-the-art tool for automatic detection of timing side-channel vulnerabilities, a type of vulnerability that is particularly difficult to detect and correct. Despite recent progress made with tools such as DifFuzz, work on tools capable of automatically repairing timing side-channel vulnerabilities is scarce. In this paper, we propose DifFuzzAR, a tool for automatic repair of timing side-channel vulnerabilities in Java code. The tool works in conjunction with DifFuzz and it is able to repair 56% of the vulnerabilities identified in DifFuzz’s dataset. The results show that the tool can automatically correct timing side-channel vulnerabilities, being more effective with those that are control-flow based. In addition, the results of a user study show that users generally trust the refactorings produced by DifFuzzAR and that they see value in such a tool, in particular for more critical code.


  • SmartBugs 2.0: An Execution Framework for Weakness Detection in Ethereum Smart Contracts
    Monika di Angelo, Thomas Durieux, João F. Ferreira, and Gernot Salzer

    IEEE
    Smart contracts are blockchain programs that often handle valuable assets. Writing secure smart contracts is far from trivial, and any vulnerability may lead to significant financial losses. To support developers in identifying and eliminating vulnerabilities, methods and tools for the automated analysis of smart contracts have been proposed. However, the lack of commonly accepted benchmark suites and performance metrics makes it difficult to compare and evaluate such tools. Moreover, the tools are heterogeneous in their interfaces and reports as well as their runtime requirements, and installing several tools is time-consuming. In this paper, we present SmartBugs 2.0, a modular execution framework. It provides a uniform interface to 19 tools aimed at smart contract analysis and accepts both Solidity source code and EVM bytecode as input. After describing its architecture, we highlight the features of the framework. We evaluate the framework via its reception by the community and illustrate its scalability by describing its role in a study involving 3.25 million analyses.

  • Polyglot Code Smell Detection for Infrastructure as Code with GLITCH
    Nuno Saavedra, João Gonçalves, Miguel Henriques, João F. Ferreira, and Alexandra Mendes

    IEEE
    This paper presents GLITCH, a new technology-agnostic framework that enables automated polyglot code smell detection for Infrastructure as Code scripts. GLITCH uses an intermediate representation on which different code smell detectors can be defined. It currently supports the detection of nine security smells and nine design & implementation smells in scripts written in Ansible, Chef, Docker, Puppet, or Terraform. Studies conducted with GLITCH not only show that GLITCH can reduce the effort of writing code smell analyses for multiple IaC technologies, but also that it has higher precision and recall than current state-of-the-art tools. A video describing and demonstrating GLITCH is available at: https://youtu.be/E4RhCcZjWbk.

  • bGSL: An imperative language for specification and refinement of backtracking programs
    Steve Dunne, João F. Ferreira, Alexandra Mendes, Campbell Ritchie, Bill Stoddart, and Frank Zeyda

    Elsevier BV

  • Integrating an academic management system with blockchain: A case study
    Sérgio Guerreiro, João F. Ferreira, Tiago Fonseca, and Miguel Correia

    Elsevier BV

  • GLITCH: Automated Polyglot Security Smell Detection in Infrastructure as Code
    Nuno Saavedra and João F. Ferreira

    ACM
    Infrastructure as Code (IaC) is the process of managing IT infrastructure via programmable configuration files (also called IaC scripts). Like other software artifacts, IaC scripts may contain security smells, which are coding patterns that can result in security weaknesses. Automated analysis tools to detect security smells in IaC scripts exist, but they focus on specific technologies such as Puppet, Ansible, or Chef. This means that when the detection of a new smell is implemented in one of the tools, it is not immediately available for the technologies supported by the other tools — the only option is to duplicate the effort. This paper presents an approach that enables consistent security smell detection across different IaC technologies. We conduct a large-scale empirical study that analyzes security smells on three large datasets containing 196,755 IaC scripts and 12,281,251 LOC. We show that all categories of security smells are identified across all datasets and we identify some smells that might affect many IaC projects. To conduct this study, we developed GLITCH, a new technology-agnostic framework that enables automated polyglot smell detection by transforming IaC scripts into an intermediate representation, on which different security smell detectors can be defined. GLITCH currently supports the detection of nine different security smells in scripts written in Ansible, Chef, or Puppet. We compare GLITCH with state-of-the-art security smell detectors. The results obtained not only show that GLITCH can reduce the effort of writing security smell analyses for multiple IaC technologies, but also that it has higher precision and recall than the current state-of-the-art tools.

  • Message from the RSDA 2022 Workshop Chairs: ISSREW 2022
    Raffaele Della Corte, Marta Catillo, Joao F. Ferreira, and Guanpeng Li

    IEEE

  • Extending EcoAndroid with Automated Detection of Resource Leaks
    Ricardo B. Pereira, J. Ferreira, A. Mendes and Rui Abreu


    When developing mobile applications, developers often have to decide when to acquire and when to release resources. This leads to resource leaks, a kind of bug where a resource is acquired but never released. This is a common problem in Android applications that can degrade energy efficiency and, in some cases, can cause resources to not function properly. In this paper, we present an extension of EcoAndroid, an Android Studio plugin that improves the energy efficiency of Android applications, with an inter-procedural static analysis that detects resource leaks. Our analysis is implemented using Soot, FlowDroid, and Heros, which provide a static-analysis environment capable of processing Android applications and performing inter-procedural analysis with the IFDS framework. It currently supports the detection of leaks related to four Android resources: Cursor, SQLite-Database, Wakelock, and Camera. We evaluated our tool with the DroidLeaks benchmark and compared it with 8 other resource leak detectors. We obtained a precision of 72.5% and a recall of 83.2%. Our tool was able to uncover 191 previously unidentified leaks in this benchmark. These results show that our analysis can help developers identify resource leaks.

  • A Preliminary Study on Generating Well-Formed Q# Quantum Programs for Fuzz Testing
    Miguel Trinca, Joao F. Ferreira, and Rui Abreu

    IEEE
    Generative Sequence-To-Sequence models have been proposed for the task of generating well-formed programs, an important task for fuzz testing tools such as compilers. In this paper, we propose a Sequence-to-Sequence model to generate well-formed Q# Quantum programs. The ratio of syntactically valid programs among 1,000 Q# files generated by our model is 79.6%. In addition, we also contribute with a dataset of 1,723 Q# files taken from publicly available repositories on GitHub, which can be used by the growing community of Quantum Software Engineering.

  • Verified Password Generation from Password Composition Policies
    Miguel Grilo, João Campos, João F. Ferreira, José Bacelar Almeida, and Alexandra Mendes

    Springer International Publishing

  • Exploring usable security to improve the impact of formal verification: A research agenda
    Carolina Carreira, João F. Ferreira, Alexandra Mendes, and Nicolas Christin

    Open Publishing Association
    As software becomes more complex and assumes an even greater role in our lives, formal verification is set to become the gold standard in securing software systems into the future, since it can guarantee the absence of errors and entire classes of attack. Recent advances in formal verification are being used to secure everything from unmanned drones to the internet. At the same time, the usable security research community has made huge progress in improving the usability of security products and end-users comprehension of security issues. However, there have been no human-centered studies focused on the impact of formal verification on the use and adoption of formally verified software products. We propose a research agenda to fill this gap and to contribute with the first collection of studies on people’s mental models on formal verification and associated security and privacy guarantees and threats. The proposed research has the potential to increase the adoption of more secure products and it can be directly used by the security and formal methods communities to create more effective and secure software tools.

  • Automated narrative planning model extension
    Julie Porteous, João F. Ferreira, Alan Lindsay, and Marc Cavazza

    Springer Science and Business Media LLC

  • EcoAndroid: An Android Studio Plugin for Developing Energy-Efficient Java Mobile Applications
    Ana Ribeiro, Joao F. Ferreira, and Alexandra Mendes

    IEEE
    Mobile devices have become indispensable in our daily life and reducing the energy consumed by them has become essential. However, developing energy-efficient mobile applications is not a trivial task. To address this problem, we present EcoAndroid, an Android Studio plugin that automatically applies energy patterns to Java source code. It currently supports ten different cases of energy-related refactorings, divided over five energy patterns taken from the literature. We used EcoAndroid to analyze 100 Java mobile applications (≈ 1.5M LOC) and we found that 35 of the projects had a total of 95 energy code smells. EcoAndroid was able to automatically refactor all the code smells identified.


  • Automatic Repair of Java Code with Timing Side-Channel Vulnerabilities
    Rui Lima, Joao F. Ferreira, and Alexandra Mendes

    IEEE
    Vulnerability detection and repair is a demanding and expensive part of the software development process. As such, there has been an effort to develop new and better ways to automatically detect and repair vulnerabilities. DifFuzz is a state-of-the-art tool for automatic detection of timing side-channel vulnerabilities, a type of vulnerability that is particularly difficult to detect and correct. Despite recent progress made with tools such as DifFuzz, work on tools capable of automatically repairing timing side-channel vulnerabilities is scarce. In this paper, we propose DifFuzzAR, a new tool for automatic repair of timing side-channel vulnerabilities in Java code. The tool works in conjunction with DifFuzz and it is able to repair 56% of the vulnerabilities identified in DifFuzz's dataset. The results show that the tool can indeed automatically correct timing side-channel vulnerabilities, being more effective with those that are control-flow based.

  • Preface


  • Skeptic: Automatic, Justified and Privacy-Preserving Password Composition Policy Selection
    Saul Johnson, João F. Ferreira, Alexandra Mendes, and Julien Cordry

    ACM
    The choice of password composition policy to enforce on a password-protected system represents a critical security decision, and has been shown to significantly affect the vulnerability of user-chosen passwords to guessing attacks. In practice, however, this choice is not usually rigorous or justifiable, with a tendency for system administrators to choose password composition policies based on intuition alone. In this work, we propose a novel methodology that draws on password probability distributions constructed from large sets of real-world password data which have been filtered according to various password composition policies. Password probabilities are then redistributed to simulate different user password reselection behaviours in order to automatically determine the password composition policy that will induce the distribution of user-chosen passwords with the greatest uniformity, a metric which we show to be a useful proxy to measure overall resistance to password guessing attacks. Further, we show that by fitting power-law equations to the password probability distributions we generate, we can justify our choice of password composition policy without any direct access to user password data. Finally, we present Skeptic---a software toolkit that implements this methodology, including a DSL to enable system administrators with no background in password security to compare and rank password composition policies without resorting to expensive and time-consuming user studies. Drawing on 205,176,321 passwords across 3 datasets, we lend validity to our approach by demonstrating that the results we obtain align closely with findings from a previous empirical study into password composition policy effectiveness.

  • Evaluating the Accuracy of Password Strength Meters using Off-The-Shelf Guessing Attacks
    David Pereira, Joao F. Ferreira, and Alexandra Mendes

    IEEE
    In this paper we measure the accuracy of password strength meters (PSMs) using password guessing resistance against off-the-shelf guessing attacks. We consider 13 PSMs, 5 different attack tools, and a random selection of 60,000 passwords extracted from three different datasets of real-world password leaks. Our results show that a significant percentage of passwords classified as strong were cracked, thus suggesting that current password strength estimation methods can be improved.

  • SmartBugs: A Framework to Analyze Solidity Smart Contracts
    João F. Ferreira, Pedro Cruz, Thomas Durieux, and Rui Abreu

    ACM
    Over the last few years, there has been substantial research on automated analysis, testing, and debugging of Ethereum smart contracts. However, it is not trivial to compare and reproduce that research. To address this, we present SmartBugs, an extensible and easy-to-use execution framework that simplifies the execution of analysis tools on smart contracts written in Solidity, the primary language used in Ethereum. SmartBugs is currently distributed with support for 10 tools and two datasets of Solidity contracts. The first dataset can be used to evaluate the precision of analysis tools, as it contains 143 annotated vulnerable contracts with 208 tagged vulnerabilities. The second dataset contains 47,518 unique contracts collected through Etherscan. We discuss how SmartBugs supported the largest experimental setup to date both in the number of tools and in execution time. Moreover, we show how it enables easy integration and comparison of analysis tools by presenting a new extension to the tool SmartCheck that improves substantially the detection of vulnerabilities related to the DASP10 categories Bad Randomness, Time Manipulation, and Access Control(identified vulnerabilities increased from 11% to 24%).

  • Empirical review of automated analysis tools on 47,587 ethereum smart contracts
    Thomas Durieux, João F. Ferreira, Rui Abreu, and Pedro Cruz

    ACM
    Over the last few years, there has been substantial research on automated analysis, testing, and debugging of Ethereum smart contracts. However, it is not trivial to compare and reproduce that research. To address this, we present an empirical evaluation of 9 state-of-the-art automated analysis tools using two new datasets: i) a dataset of 69 annotated vulnerable smart contracts that can be used to evaluate the precision of analysis tools; and ii) a dataset with all the smart contracts in the Ethereum Blockchain that have Solidity source code available on Etherscan (a total of 47,518 contracts). The datasets are part of SmartBugs, a new extendable execution framework that we created to facilitate the integration and comparison between multiple analysis tools and the analysis of Ethereum smart contracts. We used SmartBugs to execute the 9 automated analysis tools on the two datasets. In total, we ran 428,337 analyses that took approximately 564 days and 3 hours, being the largest experimental setup to date both in the number of tools and in execution time. We found that only 42% of the vulnerabilities from our annotated dataset are detected by all the tools, with the tool Mythril having the higher accuracy (27%). When considering the largest dataset, we observed that 97% of contracts are tagged as vulnerable, thus suggesting a considerable number of false positives. Indeed, only a small number of vulnerabilities (and of only two categories) were detected simultaneously by four or more tools.

  • Narrative planning model acquisition from text summaries and descriptions


  • Extending narrative planning domains with linguistic resources


  • Open and interactive learning resources for algorithmic problem solving
    João F. Ferreira and Alexandra Mendes

    Springer International Publishing
    Algorithmic problem solving is a way of approaching and solving problems by using the advances that have been made in the principles of correct-by-construction algorithm design. The approach has been taught at first-year undergraduate level since September 2003 and, since then, a substantial amount of learning materials have been developed. However, the existing materials are distributed in a conventional and static way (e.g. as a textbook and as several documents in PDF format available online), not leveraging the capabilities provided by modern collaborative and open-source platforms.

  • Lost in disclosure: On the inference of password composition policies
    Saul Johnson, Joao Ferreira, Alexandra Mendes, and Julien Cordry

    IEEE
    Large-scale password data breaches are becoming increasingly commonplace, which has enabled researchers to produce a substantial body of password security research utilising real-world password datasets, which often contain numbers of records in the tens or even hundreds of millions. While much study has been conducted on how password composition policies—sets of rules that a user must abide by when creating a password—influence the distribution of user-chosen passwords on a system, much less research has been done on inferring the password composition policy that a given set of user-chosen passwords was created under. In this paper, we state the problem with the naive approach to this challenge, and suggest a simple approach that produces more reliable results. We also present pol-infer, a tool that implements this approach, and demonstrates its use in inferring password composition policies.

RECENT SCHOLAR PUBLICATIONS

  • DifFuzzAR: automatic repair of timing side-channel vulnerabilities via refactoring
    R Lima, JF Ferreira, A Mendes, C Carreira
    Automated Software Engineering 31 (1), 1 2024

  • Evolution of automated weakness detection in Ethereum bytecode: a comprehensive study
    M Di Angelo, T Durieux, JF Ferreira, G Salzer
    Empirical Software Engineering 29 (2), 1-44 2024

  • Contract Usage and Evolution in Android Mobile Applications
    DR Ferreira, A Mendes, JF Ferreira
    arXiv preprint arXiv:2401.14244 2024

  • Leveraging Large Language Models to Boost Dafny's Developers Productivity
    Silva, A Mendes, JF Ferreira
    arXiv preprint arXiv:2401.00963 2024

  • Polyglot Code Smell Detection for Infrastructure as Code with GLITCH
    N Saavedra, J Gonalves, M Henriques, JF Ferreira, A Mendes
    2023 38th IEEE/ACM International Conference on Automated Software 2023

  • Smartbugs 2.0: An execution framework for weakness detection in ethereum smart contracts
    M Di Angelo, T Durieux, JF Ferreira, G Salzer
    2023 38th IEEE/ACM International Conference on Automated Software 2023

  • MUFIN: Improving Neural Repair Models with Back-Translation
    A Silva, JF Ferreira, H Ye, M Monperrus
    arXiv preprint arXiv:2304.02301 2023

  • Hoogle⋆: Constants and λ-abstractions in Petri-net-based Synthesis using Symbolic Execution (Artifact)
    H Botelho Guerra, JF Ferreira, J Costa Seco
    Schloss-Dagstuhl-Leibniz Zentrum fr Informatik 2023

  • Hoogle⋆: Constants and λ-abstractions in Petri-net-based Synthesis using Symbolic Execution
    H Botelho Guerra, JF Ferreira, J Costa Seco
    37th European Conference on Object-Oriented Programming (ECOOP 2023) 2023

  • bGSL: An imperative language for specification and refinement of backtracking programs
    S Dunne, JF Ferreira, A Mendes, C Ritchie, B Stoddart, F Zeyda
    Journal of Logical and Algebraic Methods in Programming 130, 100811 2023

  • Integrating an academic management system with blockchain: A case study
    S Guerreiro, JF Ferreira, T Fonseca, M Correia
    Blockchain: Research and Applications 3 (4), 100099 2022

  • Message from the RSDA 2022 Workshop Chairs: ISSREW 2022
    R Della Corte, M Catillo, JF Ferreira, G Li
    2022 IEEE International Symposium on Software Reliability Engineering 2022

  • Glitch: Automated polyglot security smell detection in infrastructure as code
    N Saavedra, JF Ferreira
    Proceedings of the 37th IEEE/ACM International Conference on Automated 2022

  • Verified password generation from password composition policies
    M Grilo, J Campos, JF Ferreira, JB Almeida, A Mendes
    International Conference on Integrated Formal Methods, 271-288 2022

  • Extending EcoAndroid with automated detection of resource leaks
    RB Pereira, JF Ferreira, A Mendes, R Abreu
    Proceedings of the 9th IEEE/ACM International Conference on Mobile Software 2022

  • A preliminary study on generating well-formed Q# quantum programs for fuzz testing
    M Trinca, JF Ferreira, R Abreu
    2022 IEEE International Conference on Software Testing, Verification and 2022

  • Ecoandroid: An android studio plugin for developing energy-efficient java mobile applications
    A Ribeiro, JF Ferreira, A Mendes
    2021 IEEE 21st international conference on software quality, reliability and 2021

  • Exploring usable security to improve the impact of formal verification: a research agenda
    C Carreira, JF Ferreira, A Mendes, N Christin
    arXiv preprint arXiv:2111.08209 2021

  • Automatic repair of Java code with timing side-channel vulnerabilities
    R Lima, JF Ferreira, A Mendes
    2021 36th IEEE/ACM International Conference on Automated Software 2021

  • Automated narrative planning model extension
    J Porteous, JF Ferreira, A Lindsay, M Cavazza
    Autonomous Agents and Multi-Agent Systems 35 (2), 19 2021

MOST CITED SCHOLAR PUBLICATIONS

  • Empirical review of automated analysis tools on 47,587 ethereum smart contracts
    T Durieux, JF Ferreira, R Abreu, P Cruz
    Proceedings of the ACM/IEEE 42nd International conference on software 2020
    Citations: 271

  • Smartbugs: A framework to analyze solidity smart contracts
    JF Ferreira, P Cruz, T Durieux, R Abreu
    Proceedings of the 35th IEEE/ACM international conference on automated 2020
    Citations: 100

  • Framer: Planning models from natural language action descriptions
    A Lindsay, J Read, J Ferreira, T Hayton, J Porteous, P Gregory
    Proceedings of the International Conference on Automated Planning and 2017
    Citations: 69

  • JaSkel: A Java skeleton-based framework for structured cluster and grid computing
    JF Ferreira, JL Sobral, AJ Proena
    Sixth IEEE International Symposium on Cluster Computing and the Grid (CCGRID 2006
    Citations: 63

  • Linear logic programming for narrative generation
    C Martens, AG Bosser, JF Ferreira, M Cavazza
    Logic Programming and Nonmonotonic Reasoning: 12th International Conference 2013
    Citations: 41

  • Automated verification of the FreeRTOS scheduler in Hip/Sleek
    JF Ferreira, C Gherghina, G He, S Qin, WN Chin
    International Journal on Software Tools for Technology Transfer 16, 381-397 2014
    Citations: 38

  • Generative story worlds as linear logic programs
    C Martens, JF Ferreira, AG Bosser, M Cavazza
    Seventh Intelligent Narrative Technologies Workshop 2014
    Citations: 29

  • Ecoandroid: An android studio plugin for developing energy-efficient java mobile applications
    A Ribeiro, JF Ferreira, A Mendes
    2021 IEEE 21st international conference on software quality, reliability and 2021
    Citations: 21

  • On Euclid’s algorithm and elementary number theory
    R Backhouse, JF Ferreira
    Science of Computer Programming 76 (3), 160-180 2011
    Citations: 21

  • Certified password quality: a case study using Coq and Linux pluggable authentication modules
    JF Ferreira, SA Johnson, A Mendes, PJ Brooke
    Integrated Formal Methods: 13th International Conference, IFM 2017, Turin 2017
    Citations: 18

  • Storyframer: From input stories to output planning models
    T Hayton, J Porteous, J Ferreira, A Lindsay, J Read
    Workshop on Knowledge Engineering for Planning and Scheduling (KEPS). The 2017
    Citations: 17

  • Structure editing of handwritten mathematics: Improving the computer support for the calculational method
    A Mendes, R Backhouse, JF Ferreira
    Proceedings of the Ninth ACM International Conference on Interactive 2014
    Citations: 17

  • Recounting the rationals: twice!
    R Backhouse, JF Ferreira
    Mathematics of Program Construction: 9th International Conference, MPC 2008 2008
    Citations: 17

  • Reasoning about fences and relaxed atomics
    M He, V Vafeiadis, S Qin, JF Ferreira
    2016 24th Euromicro International Conference on Parallel, Distributed, and 2016
    Citations: 16

  • Narrative planning model acquisition from text summaries and descriptions
    T Hayton, J Porteous, J Ferreira, A Lindsay
    Proceedings of the AAAI Conference on Artificial Intelligence 34 (02), 1709-1716 2020
    Citations: 14

  • Students' feedback on teaching mathematics through the calculational method
    JF Ferreira, A Mendes
    2009 39th IEEE Frontiers in Education Conference, 1-6 2009
    Citations: 14

  • Which mathematics for the information society?
    JF Ferreira, A Mendes, R Backhouse, LS Barbosa
    Teaching Formal Methods: Second International Conference, TFM 2009 2009
    Citations: 14

  • Automated narrative planning model extension
    J Porteous, JF Ferreira, A Lindsay, M Cavazza
    Autonomous Agents and Multi-Agent Systems 35 (2), 19 2021
    Citations: 13

  • Logic training through algorithmic problem solving
    JF Ferreira, A Mendes, A Cunha, C Baquero, P Silva, LS Barbosa, ...
    Tools for Teaching Logic: Third International Congress, TICTTL 2011 2011
    Citations: 13

  • Skeptic: Automatic, justified and privacy-preserving password composition policy selection
    S Johnson, JF Ferreira, A Mendes, J Cordry
    Proceedings of the 15th ACM Asia Conference on Computer and Communications 2020
    Citations: 12