paperbot · PL 论文追踪

全部论文 待读 收藏

P2 TransRegex: Multi-modal Regular Expression Synthesis by Generate-and-Repair

TransRegex:基于生成与修复的多模态正则表达式合成
ICSE 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE)2021匹配度 2/10 · 该论文研究自然语言与示例驱动的正则表达式合成及修复,属于程序合成/修复方向,与用户关注的静态分析、Agentic 程序分析、浮点程序分析、贝叶斯程序分析及 LLM/Agent 改进形式化验证等核心方向没有直接关联。引用 24 inbox
Yeting Li, Shuaimin Li, Zhiwu Xu, Jialun Cao, Zixuan Chen, Yun Hu, Haiming Chen, Shing-Chi Cheung
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出 TransRegex,将自然语言与示例的正则合成转化为基于 NLP 的生成加正则修复,提升准确率。

正则表达式难以理解和编写,自动生成正则表达式一直是重要研究问题。本文提出 TransRegex,可从自然语言描述和示例自动构造正则表达式。据作者所言,该工作首次将“自然语言加示例”的正则合成问题视为“基于 NLP 的合成 + 正则修复”问题,并分别针对基于 NLP 的合成和正则修复提出新算法。评估在三个公开数据集上与十个相关最先进工具比较:相比基于 NLP 的方法,TransRegex 在三个数据集上的准确率分别高 17.4%、35.8% 和 38.9%;相比最先进的多模态技术,在所有三个数据集上准确率高 10% 到 30%。结果还表明,TransRegex 能更有效地利用自然语言和示例信息。

问题
如何从自然语言描述和示例中自动合成难以手工编写的正则表达式,并克服现有基于 NLP 或多模态方法准确率不足的问题。
方法
将自然语言与示例的正则合成建模为“基于 NLP 的合成 + 正则修复”,并为基于 NLP 的合成和利用示例进行正则修复分别设计新算法。
评估
在三个公开数据集上与十个相关最先进工具对比,报告准确率提升,并分析自然语言与示例信息的利用效果。
原文摘要(Abstract)

Since regular expressions (abbrev. regexes) are difficult to understand and compose, automatically generating regexes has been an important research problem. This paper introduces TransRegex, for automatically constructing regexes from both natural language descriptions and examples. To the best of our knowledge, TransRegex is the first to treat the NLP-and-example-based regex synthesis problem as the problem of NLP-based synthesis with regex repair. For this purpose, we present novel algorithms for both NLP-based synthesis and regex repair. We evaluate TransRegex with ten relevant state-of-the-art tools on three publicly available datasets. The evaluation results demonstrate that the accuracy of our TransRegex is 17.4%, 35.8% and 38.9% higher than that of NLP-based approaches on the three datasets, respectively. Furthermore, TransRegex can achieve higher accuracy than the state-of-the-art multi-modal techniques with 10% to 30% higher accuracy on all three datasets. The evaluation results also indicate TransRegex utilizing natural language and examples in a more effective way.

链接与引用

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

BibTeX
@inproceedings{abs-2012-15489,
  title = {TransRegex: Multi-modal Regular Expression Synthesis by Generate-and-Repair},
  author = {Yeting Li and Shuaimin Li and Zhiwu Xu and Jialun Cao and Zixuan Chen and Yun Hu and Haiming Chen and Shing-Chi Cheung},
  booktitle = {ICSE},
  year = {2021},
  doi = {10.1109/icse43902.2021.00111}
}