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 an assistant professor at the Department of Informatics Engineering (DEI) of the Faculty of Engineering of the University of Porto (FEUP), Portugal, and a senior researcher at HASLab, INESC TEC's unit focused on high-assurance software development, developing, teaching and applying formal techniques for software engineering.


My main research interest lies in trustworthy software design, particularly in the application of lightweight formal methods based on model checking and model finding to software engineering. I'm one of the developers of Alloy 6 and its Analyzer, a tool to analyze software models. I've also been tailoring such techniques for the robotics domain to promote the development of dependable robotics software, and I've applied them in knowledge transfer and consultancy projects.


My teaching activities mainly focus on programming languages and formal methods for software engineering. In this context, I also maintain Alloy4Fun, a platform for teaching Alloy.

Interest
Topics
Details

Details

  • Name

    Nuno Moreira Macedo
  • Role

    Senior Researcher
  • Since

    01st November 2011
003
Publications

2024

Assessing the impact of hints in learning formal specification

Authors
Cunha, A; Macedo, N; Campos, JC; Margolis, I; Sousa, E;

Publication
Proceedings of the 46th International Conference on Software Engineering: Software Engineering Education and Training, SEET@ICSE 2024, Lisbon, Portugal, April 14-20, 2024

Abstract
Background: Many programming environments include automated feedback in the form of hints to help novices learn autonomously. Some experimental studies investigated the impact of automated hints in the immediate performance and learning retention in that context. Automated feedback is also becoming a popular research topic in the context of formal specification languages, but so far no experimental studies have been conducted to assess its impact while learning such languages. Objective: We aim to investigate the impact of different types of automated hints while learning a formal specification language, not only in terms of immediate performance and learning retention, but also in the emotional response of the students. Method: We conducted a simple one-factor randomised experiment in 2 sessions involving 85 BSc students majoring in CSE. In the 1st session students were divided in 1 control group and 3 experimental groups, each receiving a different type of hint while learning to specify simple requirements with the Alloy formal specification language. To assess the impact of hints on learning retention, in the 2nd session, 1 week later, students had no hints while formalising requirements. Before and after each session the students answered a standard self-reporting emotional survey to assess their emotional response to the experiment. Results: Of the 3 types of hints considered, only those pointing to the precise location of an error had a positive impact on the immediate performance and none had significant impact in learning retention. Hint availability also causes a significant impact on the emotional response, but no significant emotional impact exists once hints are no longer available (i.e. no deprivation effects were detected). Conclusion: Although none of the evaluated hints had an impact on learning retention, learning a formal specification language with an environment that provides hints with precise error locations seems to contribute to a better overall experience without apparent drawbacks. Further studies are needed to investigate if other kind of feedback, namely hints combined with some sort of self-explanation prompts, can have a positive impact in learning retention. © 2024 Copyright held by the owner/author(s).

2023

Task Model Design and Analysis with Alloy

Authors
Cunha, A; Macedo, N; Kang, E;

Publication
Rigorous State-Based Methods - 9th International Conference, ABZ 2023, Nancy, France, May 30 - June 2, 2023, Proceedings

Abstract
This paper describes a methodology for task model design and analysis using the Alloy Analyzer, a formal, declarative modeling tool. Our methodology leverages (1) a formalization of the HAMSTERS task modeling notation in Alloy and (2) a method for encoding a concrete task model and compose it with a model of the interactive system. The Analyzer then automatically verifies the overall model against desired properties, revealing counter-examples (if any) in terms of interaction scenarios between the operator and the system. In addition, we demonstrate how Alloy can be used to encode various types of operator errors (e.g., inserting or omitting an action) into the base HAMSTERS model and generate erroneous interaction scenarios. Our methodology is applied to a task model describing the interaction of a traffic air controller with a semi-autonomous Arrival MANager (AMAN) planning tool. © 2023, The Author(s), under exclusive license to Springer Nature Switzerland AG.

2023

Verifying Temporal Relational Models with Pardinus

Authors
Macedo, N; Brunel, J; Chemouil, D; Cunha, A;

Publication
Rigorous State-Based Methods - 9th International Conference, ABZ 2023, Nancy, France, May 30 - June 2, 2023, Proceedings

Abstract
This short paper summarizes an article published in the Journal of Automated Reasoning [7]. It presents, an extension of the popular [12] relational model finder with linear temporal logic (including past operators) to simplify the analysis of dynamic systems. includes a SAT-based bounded model checking engine and an SMV-based complete model checking engine, both allowing iteration through the different instances (or counterexamples) of a specification. It also supports a decomposed parallel analysis strategy that improves the efficiency of both analysis engines on commodity multi-core machines. © 2023, The Author(s), under exclusive license to Springer Nature Switzerland AG.

2023

Adding Records to Alloy

Authors
Brunel, J; Chemouil, D; Cunha, A; Macedo, N;

Publication
Rigorous State-Based Methods - 9th International Conference, ABZ 2023, Nancy, France, May 30 - June 2, 2023, Proceedings

Abstract
Records are a composite data type available in most programming and specification languages, but they are not natively supported by Alloy. As a consequence, users often find themselves having to simulate records in ad hoc ways, a strategy that is error prone and often encumbers the analysis procedures. This paper proposes a conservative extension to the Alloy language to support record signatures. Uniqueness and completeness is imposed on the atoms of such signatures, while still supporting Alloy’s flexible signature hierarchy. The Analyzer has been extended to internally expand such record signatures as partial knowledge for the solving procedure. Evaluation shows that the proposed approach is more efficient than commonly used idioms. © 2023, The Author(s), under exclusive license to Springer Nature Switzerland AG.

2023

Exploring Automatic Specification Repair in Dafny Programs

Authors
Abreu, A; Macedo, N; Mendes, A;

Publication
2023 38TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING WORKSHOPS, ASEW

Abstract
Formal verification has become increasingly crucial in ensuring the accurate and secure functioning of modern software systems. Given a specification of the desired behaviour, i.e. a contract, a program is considered to be correct when all possible executions guarantee the specification. Should the software fail to behave as expected, then a bug is present. Most existing research assumes that the bug is present in the implementation, but it is also often the case that the specified expectations are incorrect, meaning that it is the specification that must be repaired. Research and tools for providing alternative specifications that fix details missing during contract definition, considering that the implementation is correct, are scarce. This paper presents a preliminary tool, focused on Dafny programs, for automatic specification repair in contract programming. Given a Dafny program that fails to verify, the tool suggests corrections that repair the specification. Our approach is inspired by a technique previously proposed for another contract programming language and relies on Daikon for dynamic invariant inference. Although the tool is focused on Dafny, it makes use of specification repair techniques that are generally applicable to programming languages that support contracts. Such a tool can be valuable in various scenarios, such as when programmers have a reference implementation and need to analyse their contract options, or in educational contexts, where it can provide students with hints to correct their contracts. The results of the evaluation show that the approach is feasible in Dafny and that the overall process has reasonable performance but that there are stages of the process that need further improvements.

Supervised
thesis

2020

Life Bracelet

Author
Tiago Miguel Delgadinho Simões

Institution
UP-FEUP

2020

Radio-Frequency Based Location Service

Author
João Filipe Lopes de Carvalho

Institution
UP-FEUP

2020

Interactive multimodal and procedurally-assisted creation of VR environments

Author
João Pedro Martins Ferreira

Institution
UP-FEUP

2019

Arquitetura segura no desenvolvimento de software: Abordagem à plataforma digital U.OPENLAB

Author
Domingos Alberto Teixeira Guedes Ferreira

Institution
UP-FCUP

2016

Identificação, Mapeamento e Análise dos Processos dos Serviços Prestados a um Cliente Interno: Estudo de Caso

Author
Isabel Maria de Moura Pereira

Institution
UP-FEP