Utilize este identificador para referenciar este registo:
https://hdl.handle.net/1822/89919
Título: | GPT-3-powered type error debugging: investigating the use of large language models for code repair |
Autor(es): | Ribeiro, Francisco José Torres Macedo, José Nuno Castro Tsushima, Kanae Abreu, Rui Saraiva, João |
Palavras-chave: | Automated Program Repair GPT-3 Fault Localization Code Generation |
Data: | 2023 |
Editora: | Association for Computing Machinery (ACM) |
Resumo(s): | Type systems are responsible for assigning types to terms in programs. That way, they enforce the actions that can be taken and can, consequently, detect type errors during compilation. However, while they are able to ag the existence of an error, they often fail to pinpoint its cause or provide a helpful error message. Thus, without adequate support, debugging this kind of errors can take a considerable amount of effort. Recently, neural network models have been developed that are able to understand programming languages and perform several downstream tasks. We argue that type error debugging can be enhanced by taking advantage of this deeper understanding of the language’s structure. In this paper, we present a technique that leverages GPT-3’s capabilities to automatically fix type errors in OCaml programs. We perform multiple source code analysis tasks to produce useful prompts that are then provided to GPT-3 to generate potential patches. Our publicly available tool, Mentat, supports multiple modes and was validated on an existing public dataset with thousands of OCaml programs. We automatically validate successful repairs by using Quickcheck to verify which generated patches produce the same output as the user-intended fixed version, achieving a 39% repair rate. In a comparative study, Mentat outperformed two other techniques in automatically fixing ill-typed OCaml programs. |
Tipo: | Artigo em ata de conferência |
URI: | https://hdl.handle.net/1822/89919 |
ISBN: | 979-8-4007-0396-6 |
DOI: | 10.1145/3623476.3623522 |
Versão da editora: | https://dl.acm.org/doi/10.1145/3623476.3623522 |
Arbitragem científica: | yes |
Acesso: | Acesso aberto |
Aparece nas coleções: |
Ficheiros deste registo:
Ficheiro | Descrição | Tamanho | Formato | |
---|---|---|---|---|
3623476.3623522.pdf | 471,6 kB | Adobe PDF | Ver/Abrir |