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. In this paper, we present 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. For instance, programmers can benefit from it when they have a reference implementation and need to analyse their contract options. Similarly, in education, it can serve as an aid for students, providing hints to correct their contracts.
Presentation Slides - Exploring Automatic Specification Repair in Dafny Programs (ASYDE 2023 Slides - Exploring Automatic Specification Repair in Dafny Programs.pdf) | 341KiB |
Mon 11 SepDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
15:30 - 16:40 | Session 3: Contract and Microservices[Workshop] ASYDE at Room FR Chair(s): Gian Luca Scoccia University of L'Aquila | ||
15:30 20mTalk | Modelling Multi-Party Role-Based Access Control Policies for iContractML Smart Contracts [Workshop] ASYDE Issam Al-Azzoni Al Ain University of Science, United Arab Emirates, Reiko Heckel University of Leicester, United Kingdom File Attached | ||
15:50 20mTalk | Exploring Automatic Specification Repair in Dafny Programs [Workshop] ASYDE Alexandre Abreu University of Porto & INESC TEC, Nuno Macedo University of Porto; INESC TEC, Alexandra Mendes Faculty of Engineering, University of Porto & INESC TEC File Attached | ||
16:10 20mTalk | Migrating from monoliths to microservices: enforcing correct coordination [Workshop] ASYDE Marco Autili University of L'Aquila, Italy, Gianluca Filippone University of L'Aquila, Italy, Massimo Tivoli University of L'Aquila |