• Search Research Projects
  • Search Researchers
  • How to Use
  1. Back to previous page

Theory and practice of type error debugging, including automatic correction based on data

Research Project

Project/Area Number 19K20248
Research Category

Grant-in-Aid for Early-Career Scientists

Allocation TypeMulti-year Fund
Review Section Basic Section 60050:Software-related
Research InstitutionNational Institute of Informatics

Principal Investigator

Tsushima Kanae  国立情報学研究所, 情報学プリンシプル研究系, 特任研究員 (80754663)

Project Period (FY) 2019-04-01 – 2024-03-31
Project Status Completed (Fiscal Year 2023)
Budget Amount *help
¥3,510,000 (Direct Cost: ¥2,700,000、Indirect Cost: ¥810,000)
Fiscal Year 2021: ¥1,040,000 (Direct Cost: ¥800,000、Indirect Cost: ¥240,000)
Fiscal Year 2020: ¥1,040,000 (Direct Cost: ¥800,000、Indirect Cost: ¥240,000)
Fiscal Year 2019: ¥1,430,000 (Direct Cost: ¥1,100,000、Indirect Cost: ¥330,000)
Keywords関数型言語 / プログラミング言語 / デバッギング / 型エラー / 大規模言語モデル / デバッグ
Outline of Research at the Start

多くのものがプログラムで動く現代において、プログラムの安全性は重要な課題である。プログラムの安全性を高める方法の一つとして「型」が存在するが、型の「不整合」を持たないプログラムを書くことは容易ではない。本研究では、プログラマが型の不整合を持たないプログラムを書くことを容易にできるよう支援することを目的としている。具体的には、データに基づく修正を可能にすることと、プログラマの負担を軽減するために自動での修正を可能にすることを目指している。

Outline of Final Research Achievements

Two main results were obtained in this study.
The first is type error debugging using GPT-3. Specifically, it performs a source code analysis task on a program with type errors to generate useful prompts. Provide it to GPT-3 to generate a patch to correct the type error. We created three different modes and validated on the existing public dataset of OCaml. In comparison, it outperformed two other OCaml-based studies of automatic correction.
The second is a method that uses partial evaluation to perform and present the location of type errors in an easy-to-understand manner. We implemented a prototype and verified its effectiveness on the aforementioned programs on the existing public datasets.

Academic Significance and Societal Importance of the Research Achievements

型はプログラムの信頼性を高めるために重要である一方で、プログラミング時の型エラーはプログラマにとって手間である。そのデバッグを容易にすることは、プログラマの実際の生産性、およびプログラムの信頼度を高めるために重要である。また、本研究では大規模言語モデルのプログラミング言語に対する深い理解を活用することで、プログラマのデバッグを手助けすることが可能であることを示した。これはこれからのプログラミングをサポートしていく上で重要な成果である。

Report

(6 results)
  • 2023 Annual Research Report   Final Research Report ( PDF )
  • 2022 Research-status Report
  • 2021 Research-status Report
  • 2020 Research-status Report
  • 2019 Research-status Report
  • Research Products

    (9 results)

All 2023 2022 2020 2019 Other

All Int'l Joint Research (1 results) Journal Article (4 results) (of which Int'l Joint Research: 3 results,  Peer Reviewed: 4 results) Presentation (4 results) (of which Int'l Joint Research: 3 results)

  • [Int'l Joint Research] University of Kent(英国)

    • Related Report
      2019 Research-status Report
  • [Journal Article] GPT-3-Powered Type Error Debugging: Investigating the Use of Large Language Models for Code Repair2023

    • Author(s)
      Ribeiro Francisco, Macedo Jos Nuno Castro, Tsushima Kanae, Abreu Rui, Saraiva Joao
    • Journal Title

      ACM SIGPLAN International Conference on Software Language Engineering

      Volume: - Pages: 111-124

    • DOI

      10.1145/3623476.3623522

    • Related Report
      2023 Annual Research Report
    • Peer Reviewed / Int'l Joint Research
  • [Journal Article] Towards Type Debugging using Partial Evaluation2023

    • Author(s)
      Kanae Tsushima, Robert Glueck
    • Journal Title

      ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation

      Volume: -

    • Related Report
      2023 Annual Research Report
    • Peer Reviewed / Int'l Joint Research
  • [Journal Article] 型エラープログラムの部分評価2022

    • Author(s)
      Kanae Tsushima, Robert Glueck
    • Journal Title

      第24回プログラミングおよびプログラミング言語ワークショップ

      Volume: 1

    • Related Report
      2021 Research-status Report
    • Peer Reviewed
  • [Journal Article] Type Debugging with Counter-Factual Type Error Messages Using an Existing Type Checker2020

    • Author(s)
      Kanae Tsushima, Olaf Chitil, Joanna Sharrad
    • Journal Title

      The 31st symposium on Implementation and Application of Functional Languages

    • Related Report
      2019 Research-status Report
    • Peer Reviewed / Int'l Joint Research
  • [Presentation] GPT-3-Powered Type Error Debugging: Investigating the Use of Large Language Models for Code Repair2023

    • Author(s)
      Ribeiro Francisco
    • Organizer
      ACM SIGPLAN International Conference on Software Language Engineering
    • Related Report
      2023 Annual Research Report
    • Int'l Joint Research
  • [Presentation] Towards Type Debugging using Partial Evaluation2023

    • Author(s)
      Kanae Tsushima
    • Organizer
      ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation
    • Related Report
      2023 Annual Research Report
    • Int'l Joint Research
  • [Presentation] 型エラープログラムの部分評価2022

    • Author(s)
      Kanae Tsushima
    • Organizer
      第24回プログラミングおよびプログラミング言語ワークショップ
    • Related Report
      2021 Research-status Report
  • [Presentation] Type Debugging with Counter-Factual Type Error Messages Using an Existing Type Checker2019

    • Author(s)
      Kanae Tsushima, Olaf Chitil, Joanna Sharrad
    • Organizer
      The 31st symposium on Implementation and Application of Functional Languages
    • Related Report
      2019 Research-status Report
    • Int'l Joint Research

URL: 

Published: 2019-04-18   Modified: 2025-01-30  

Information User Guide FAQ News Terms of Use Attribution of KAKENHI

Powered by NII kakenhi