iconLogo
Published:2025/8/23 0:22:31

コード補完、義務で最強💅💕

  1. 超要約: コードエラー、義務(穴埋め)で解決✨賢すぎ!

  2. ギャル的キラキラポイント✨

    • ● エラーを「削除」じゃなく「埋める」発想が斬新💎
    • ● 補完候補が多すぎ問題も解決!見やすいって最高💖
    • ● まるでテキストエディタみたいに自由なのに、文法はバッチリ👌
  3. 詳細解説

    • 背景: コード書くとき、エラーってウザくない?😱 エラーが出ると、コードエディタ(コードを書くソフト)の機能が制限されちゃうのよね😭
    • 方法: エラーを「義務(穴埋め)」として表現するの! 欠けてる部分を埋めて、文法的に正しいコードに自動変換しちゃうんだって😍
    • 結果: エラーに強いし、補完候補も分かりやすくなるから、開発がめっちゃ捗るようになるらしい🎵
    • 意義(ここがヤバい♡ポイント): 開発者の生産性爆上がり!✨高品質なソフトが作れる!✨ 開発が楽しくなるって、最強じゃん?🥰
  4. リアルでの使いみちアイデア💡

    • プログラミング教室の教材で、子供たちがエラーを気にせず楽しくプログラミングできるツールに発展させられるかも!👧👦
    • AIがコードを自動生成するツールに組み込んで、生成されるコードの品質をさらに向上させられるかも!🤖

続きは「らくらく論文」アプリで

Syntactic Completions with Material Obligations

David Moon / Andrew Blinn / Thomas J. Porter / Cyrus Omar

Code editors provide essential services that help developers understand, navigate, and modify programs. However, these services often fail in the presence of syntax errors. Existing syntax error recovery techniques, like panic mode and multi-option repairs, are either too coarse, e.g. in deleting large swathes of code, or lead to a proliferation of possible completions. This paper introduces $\texttt{tylr}$, a parser and editor generator that completes arbitrarily malformed code by inserting obligations, which generalize holes to cover missing operands, operators, mixfix keywords, and sort transitions. $\texttt{tylr}$ is backed by a novel theory of tile-based parsing, which extends operator-precedence parsing in two ways. First, traditional token precedence comparisons are replaced by a notion of grammar walks, which form the basis for generating obligations. Second, a distinct "molding" system based on grammar zippers expand grammar expressivity by allowing the system to disambiguate between possible parses and completions based on an obligation minimization criterion. In addition to serving as a novel approach to error correction, $\texttt{tylr}$'s design enables the development of an editor that visually materializes obligations to the human user, serving as a novel hybrid between a text editor and a structure editor. We introduce $\texttt{tylr}$ by example, then formalize its key ideas. Finally, we conduct a human subjects study to evaluate the extent to which an editor like $\texttt{tylr}$ that materializes syntactic obligations might be usable and useful, finding both points of positivity and interesting new avenues for future work.

cs / cs.PL