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

Text-based code completion using syntax analysis

Research Project

Project/Area Number 20K11752
Research Category

Grant-in-Aid for Scientific Research (C)

Allocation TypeMulti-year Fund
Section一般
Review Section Basic Section 60050:Software-related
Research InstitutionShibaura Institute of Technology

Principal Investigator

Sasano Isao  芝浦工業大学, 工学部, 教授 (10362021)

Project Period (FY) 2020-04-01 – 2024-03-31
Project Status Completed (Fiscal Year 2023)
Budget Amount *help
¥3,250,000 (Direct Cost: ¥2,500,000、Indirect Cost: ¥750,000)
Fiscal Year 2022: ¥910,000 (Direct Cost: ¥700,000、Indirect Cost: ¥210,000)
Fiscal Year 2021: ¥910,000 (Direct Cost: ¥700,000、Indirect Cost: ¥210,000)
Fiscal Year 2020: ¥1,430,000 (Direct Cost: ¥1,100,000、Indirect Cost: ¥330,000)
Keywordsコード補完 / 構文補完 / LR構文解析 / 文形式 / 簡約 / 統合開発環境 / 構文解析器生成系 / 文法 / 生成規則 / プログラミングツール / LR解析 / 構文解析 / 構造エディタ / 属性文法
Outline of Research at the Start

本研究では、テキストベース(プログラマが自由にコードを編集するのを妨げない)でかつ形式的に仕様が定められたコード補完機能、特に構文補完機能を構文解析器と連携しながら実現する方式の考案および実装を行う。理論面では、構文解析器の内部状態を用いたコード補完方式を開発する。実装面では、理論面の研究に基づき、コード補完機能を構文解析器と連携しながら系統的に行う技法を考案し、Emacs等のエディタの編集操作に応じて動作するコード補完機能を提供する。

Outline of Final Research Achievements

In this research project, we proposed and implemented a new method for code completion during programming using a text editor. This method utilizes the internal state of an LR parser, parsing the code from the beginning to the cursor position. Based on the sequence of symbols and states on the parser's stack at the moment, it calculates potential syntax candidates that can follow the cursor position and presents them to the programmer. The implementation was done for Emacs, with the completion candidate calculation implemented in Haskell and the interface in Emacs Lisp. It has been confirmed to work with languages such as Haskell and C. Additionally, the source code of the implemented code completion system has been made available on a web page.

Academic Significance and Societal Importance of the Research Achievements

Visual Studio等の開発環境において構文補完機能が使われ始めているが、通常、仕様が明示されていない。本研究課題は、構文解析を用いて、カーソル位置までに構文エラーがない場合に、カーソル位置以降の構文の候補を提示する方式を考案したものである。学術的には1980年代にSynthesizer GeneratorやMENTOR等、構造エディタの研究が行われ、近年では、構造エディタでの編集の正しさを論じた研究もある。しかし構造エディタはプログラマが自由にプログラムテキストを編集するのを妨げる。本研究は、自由なプログラム編集を妨げることなく構文補完を行うための方式を提案したものである。

Report

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

    (7 results)

All 2024 2023 2021 Other

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

  • [Int'l Joint Research] 全南大学校(韓国)

    • Related Report
      2023 Annual Research Report
  • [Int'l Joint Research] 全南大学校(韓国)

    • Related Report
      2022 Research-status Report
  • [Int'l Joint Research] Chonnam National University(韓国)

    • Related Report
      2020 Research-status Report
  • [Journal Article] A text-based syntax completion method using LR parsing and its evaluation2023

    • Author(s)
      Isao Sasano, Kwanghoon Choi
    • Journal Title

      Science of Computer Programming

      Volume: 228 Pages: 102957-102957

    • DOI

      10.1016/j.scico.2023.102957

    • Related Report
      2023 Annual Research Report
    • Peer Reviewed / Int'l Joint Research
  • [Presentation] Ranked syntax completion with LR parsing2024

    • Author(s)
      Kwanghoon Choi, Sooyeon Hwang, Hyeonah Moon, Isao Sasano
    • Organizer
      The 39th ACM SIGAPP Symposium on Applied Computing (SAC 2024)
    • Related Report
      2023 Annual Research Report
    • Int'l Joint Research
  • [Presentation] A text-based syntax completion method using LR parsing2021

    • Author(s)
      Isao Sasano and Kwanghoon Choi
    • Organizer
      ACM SIGPLAN 2021 Workshop on Partial Evaluation and Program Manipulation (PEPM 2021)
    • Related Report
      2020 Research-status Report
    • Int'l Joint Research
  • [Remarks] YAPB: Yet Another Parser Builder

    • URL

      https://github.com/kwanghoon/yapb

    • Related Report
      2022 Research-status Report 2020 Research-status Report

URL: 

Published: 2020-04-28   Modified: 2025-01-30  

Information User Guide FAQ News Terms of Use Attribution of KAKENHI

Powered by NII kakenhi