Publication:
Verification of linked data structures in Dafny

Research Projects
Organizational Units
Journal Issue
Abstract
Formal verification is gaining adoption in the parts of the software industry where full correctness of a system is needed. Dafny is a programming language with verification capabilities that allows the programmer to formally specify their code and have it verified by an underlying theorem prover. Verification in Dafny, however, is not always an easy task. The programmer must give a detailed description of the behavior of the program. We devise a novel methodology to formally verify Abstract Data Types (ADTs) implemented with heap-based linked data structures that allows code reuse and full abstraction from the implementation details of the ADT. We have developed a library of ADTs that follows that methodology and have written complete examples of programs using that library in an ergonomic way. We have started the expansion of the methodology to iterators, which has already given promising results by providing a specification of iterators that maintains their validity when the modification of the instance they are traversing does not afect them.
El uso de la verificación formal está creciendo en las áreas de la industria del software donde se necesita la corrección total de un sistema. Dafny es un lenguaje de programación capaz de verificar programas que permite al programador especificar formalmente su código y que sea verificado por un demostrador de teoremas interno. Sin embargo, la verificación en Dafny no es una tarea sencilla. El programador tiene que dar una descripción detallada del comportamiento de su programa. Hemos ideado una metodología para verificar Tipos Abstractos de Datos (TAD) implementados con estructuras de datos enlazadas almacenadas en la heap que permite reutilizar código y mantiene la abstracción absoluta de los detalles de implementación del TAD. Hemos desarrollado una biblioteca de TAD que sigue dicha metodología y hemos escrito ejemplos completos de programas que usan la biblioteca de manera cómoda. Hemos empezado la expansión de nuestra metodología para incluir iteradores, la cual ya ha dado resultados prometedores al aportar una especificación de iteradores que mantiene su validez cuando la modificación de la lista que están recorriendo no les afecta.
Description
Trabajo de Fin de Grado en Ingeniería Informática, Facultad de Informática UCM, Departamento de Sistemas Informáticos y Computación, Curso 2020/2021, the code associated with this work is available at https://github.com/jorge-jbs/TFG/ and is licensed under the GNU General Public License Version 3, found at http://www.gnu.org/licenses/gpl-3.0.en.html.
Keywords
Citation