Project/Area Number |
20K11752
|
Research Category |
Grant-in-Aid for Scientific Research (C)
|
Allocation Type | Multi-year Fund |
Section | 一般 |
Review Section |
Basic Section 60050:Software-related
|
Research Institution | Shibaura 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等、構造エディタの研究が行われ、近年では、構造エディタでの編集の正しさを論じた研究もある。しかし構造エディタはプログラマが自由にプログラムテキストを編集するのを妨げる。本研究は、自由なプログラム編集を妨げることなく構文補完を行うための方式を提案したものである。
|