Utilize este identificador para referenciar este registo: https://hdl.handle.net/1822/89919

TítuloGPT-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-chaveAutomated Program Repair
GPT-3
Fault Localization
Code Generation
Data2023
EditoraAssociation 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.
TipoArtigo em ata de conferência
URIhttps://hdl.handle.net/1822/89919
ISBN979-8-4007-0396-6
DOI10.1145/3623476.3623522
Versão da editorahttps://dl.acm.org/doi/10.1145/3623476.3623522
Arbitragem científicayes
AcessoAcesso aberto
Aparece nas coleções:HASLab - Artigos em atas de conferências internacionais (texto completo)

Ficheiros deste registo:
Ficheiro Descrição TamanhoFormato 
3623476.3623522.pdf471,6 kBAdobe PDFVer/Abrir

Partilhe no FacebookPartilhe no TwitterPartilhe no DeliciousPartilhe no LinkedInPartilhe no DiggAdicionar ao Google BookmarksPartilhe no MySpacePartilhe no Orkut
Exporte no formato BibTex mendeley Exporte no formato Endnote Adicione ao seu ORCID