arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2012.15489cs.PLcs.SE
收藏

TransRegex:通过生成和修复的多模态正则表达式合成

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

Yeting Li, Shuaimin Li, Zhiwu Xu, Jialun Cao, Zixuan Chen, Yun Hu, Haiming Chen, Shing-Chi Cheung

摘要:

由于正则表达式(正则表达式)难以理解和组合,自动生成正则表达式一直是一个重要的研究问题。本文介绍了TransRegex,自动构造正则表达式从自然语言的描述和例子。据我们所知,TransRegex是第一个将基于NLP和示例的正则表达式合成问题视为带正则表达式修复的基于NLP的合成问题的人。为此,我们提出了新的算法,基于NLP的合成和正则表达式修复。我们在三个公开的数据集上使用十个相关的最先进的工具来评估TransRegex。测试结果表明,在三个数据集上,我们的TransRegex的准确率分别比基于NLP的方法高17.4%、35.8%和38.9%。此外,TransRegex可以实现比最先进的多模态技术更高的准确度,在所有三个数据集上的准确度都高出10%到30%。测试结果也表明,TransRegex在利用自然语言和实例方面更有效。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑