paperbot · PL 论文追踪

全部论文 待读 收藏

P2 V-Star: Learning Visibly Pushdown Grammars from Program Inputs

V-Star:从程序输入中学习可见下推文法
PLDI 8(PLDI)2024匹配度 3/10 · 论文属于程序语言与形式语言/自动机学习,研究从程序输入推断可见下推文法,不涉及 LLM/Agent、静态分析、浮点程序分析或贝叶斯程序分析,因此与研究方向核心匹配度低。引用 3 inbox
Xiaodong Jia, Gang Tan
dblp: 2026-09-10crossref: 2026-09-10arxiv: 2026-09-10

AI 速览

一句话:提出 V-Star,用可见下推自动机主动学习,从样本输入推断程序输入文法的嵌套结构,并学习 S-表达式、JSON、XML。

准确描述程序输入语言是程序语言领域的重要挑战。现有主动学习可精确学习正则语言,但难以直接处理嵌套结构。本文提出 V-Star,基于可见下推自动机(VPA)的主动学习进行文法推断。其核心是一种基于嵌套模式的新推断机制,能从样本输入中识别 token 边界并推导嵌套结构,将 XML 等语言转换为 visibly pushdown languages(VPL)。作者进一步将 Angluin 的 L-Star 精确学习算法适配到 VPA 学习,以提高推断精度。评估表明,V-Star 能有效且高效地学习 S-表达式、JSON、XML 等多种实用文法,并优于其他先进工具。

问题
程序输入语言通常包含嵌套结构,准确描述这些语言仍很困难;主动学习虽能精确学习正则语言,却不能直接处理可见下推语言。
方法
V-Star 采用基于嵌套模式的新机制从样本输入中识别 token 边界并推导嵌套结构,将 Angluin 的 L-Star 精确学习算法适配到可见下推自动机学习。
评估
在 S-表达式、JSON、XML 等实用文法上评估,显示 V-Star 能有效且高效地学习,并优于其他先进工具。
原文摘要(Abstract)

Accurate description of program inputs remains a critical challenge in the field of programming languages. Active learning, as a well-established field, achieves exact learning for regular languages. We offer an innovative grammar inference tool, V-Star, based on the active learning of visibly pushdown automata. V-Star deduces nesting structures of program input languages from sample inputs, employing a novel inference mechanism based on nested patterns. This mechanism identifies token boundaries and converts languages such as XML documents into VPLs. We then adapted Angluin’s L-Star, an exact learning algorithm, for VPA learning, which improves the precision of our tool. Our evaluation demonstrates that V-Star effectively and efficiently learns a variety of practical grammars, including S-Expressions, JSON, and XML, and outperforms other state-of-the-art tools.

链接与引用

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

BibTeX
@article{JiaT24,
  title = {V-Star: Learning Visibly Pushdown Grammars from Program Inputs},
  author = {Xiaodong Jia and Gang Tan},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {PLDI},
  year = {2024},
  doi = {10.1145/3656458}
}