paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Improving IDE code inspections with tree automata

用树自动机改进 IDE 代码检查
FSE Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2022匹配度 3/10 · 论文属于静态分析、程序合成与IDE工具,与用户在PL方面的兴趣有交集,但未涉及LLM/Agent或ML系统,不属于用户核心的PL↔AI交叉、浮点程序分析或贝叶斯程序分析方向。引用 0 inbox
Yunjeong Lee
crossref: 2026-09-12

AI 速览

一句话:提出基于示例编程合成树自动机的框架,精准抑制 IDE 代码检查中的误报。

IDE 的代码检查通过数据流分析提醒不良或错误代码,但可能在不相关处产生误报。现有避免误报的方法要么过于保守,在整个代码库中抑制同类警告;要么不可持续,需要不断为数据流分析添加启发式规则。本文提出一个基于示例的编程(PBE)框架,根据用户提供的示例合成树自动机(TA),用于在包含相同模式的代码中抑制误报。原型实验表明,生产级 IDE 中若干被启发式抑制的真实模式,可以被系统性地机械转换为 TA。文章还简要讨论基于 TA 的方案在其他 IDE 功能(如代码重构)中的潜在用途。

问题
IDE 代码检查的数据流分析会产生无关误报,现有全局抑制或启发式方式不够精准且难以维护。
方法
提出 PBE 框架,从用户示例合成树自动机,以模式匹配方式抑制同类误报。
评估
用原型将生产 IDE 中若干启发式抑制的真实模式转换为 TA,验证可行性;并讨论在重构等 IDE 功能中的应用。
原文摘要(Abstract)

Integrated development environments (IDEs) are equipped with code inspections to warn developers of malformed or incorrect code by analyzing the code's data flow. However, the data flow analysis performed by the IDE code inspections may issue warnings in code where warnings are irrelevant. Existing methods to prevent any bogus warnings are either too conservative --- suppressing the same type of warnings in the entire codebase --- or are not sustainable as they require adding a set of heuristics to the data flow analysis. We propose a programming-by-example (PBE) framework that synthesizes tree automata (TAs) to suppress bogus warnings in all the code containing the same patterns as the user-provided examples. Experiments with a prototype of the framework demonstrate that several real-world patterns heuristically suppressed in production IDE can be mechanically translated to a TA in a systematic way. Furthermore, we briefly discuss how TA-based solution can be useful in other IDE features such as code refactoring.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot6971,
  title = {Improving IDE code inspections with tree automata},
  author = {Yunjeong Lee},
  booktitle = {FSE},
  year = {2022},
  doi = {10.1145/3540250.3559081}
}