Multi-modal synthesis of regular expressions
Qiaochu Chen, Xinyu Wang, Xi Ye, Greg Durrett, Isil Dillig
摘要
In this paper, we propose a multi-modal synthesis technique for automatically constructing regular expressions (regexes) from a combination of examples and natural language. Using multiple modalities is useful in this context because natural language alone is often highly ambiguous, whereas examples in isolation are often not sufficient for conveying user intent. Our proposed technique first parses the English description into a so-called hierarchical sketch that guides our programming-by-example (PBE) engine. Since the hierarchical sketch captures crucial hints, the PBE engine can leverage this information to both prioritize the search as well as make useful deductions for pruning the search space.
We have implemented the proposed technique in a tool called Regel and evaluate it on over three hundred regexes. Our evaluation shows that Regel achieves 80% accuracy whereas the NLP-only and PBE-only baselines achieve 43% and 26% respectively. We also compare our proposed PBE engine against an adaptation of AlphaRegex, a state-of-theart regex synthesis tool, and show that our proposed PBE engine is an order of magnitude faster, even if we adapt the search algorithm of AlphaRegex to leverage the sketch. Finally, we conduct a user study involving 20 participants and show that users are twice as likely to successfully come up with the desired regex using Regel compared to without it.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper34
- Jigsaw: Large Language Models meet Program SynthesisNaman Jain, Skanda Vaidyanath, Arun Iyer, Nagarajan Natarajan 等ICSE 2022 · 被引用 134 次
- Discovering the Syntax and Strategies of Natural Language Programming with Generative Language ModelsEllen Jiang, Edwin Toh, Alejandra Molina, Kristen Olson 等CHI 2022 · 被引用 76 次
- Interactive Program Synthesis by Augmented ExamplesTianyi Zhang, London Lowmanstone, Xinyu Wang, Elena L. GlassmanUIST 2020 · 被引用 57 次
- Multi-modal program inference: a marriage of pre-trained language models and component-based synthesisKia Rahmani, Mohammad Raza, Sumit Gulwani, Vu Le 等OOPSLA 2021 · 被引用 32 次
- Top-Down Synthesis for Library LearningMatthew Bowers, Theo X. Olausson, Lionel Wong, Gabriel Grand 等POPL 2023 · 被引用 32 次
相关 Paper
- TRANSREGEX: Multi-modal Regular Expression Synthesis by Generate-and-RepairYeting Li, Shuaimin Li, Zhiwu Xu, Jialun Cao 等ICSE 2021 · 被引用 16 次
- Generating Pragmatic Examples to Train Neural Program SynthesizersSaujas Vaduguru, Daniel Fried, Yewen PuICLR 2024 · 被引用 7 次
- Repairing Regular Expressions for ExtractionNariyoshi Chida, Tachio TerauchiPLDI 2023 · 被引用 9 次
- Benchmarking Multimodal Regex Synthesis with Complex StructuresXi Ye, Qiaochu Chen, Isil Dillig, Greg DurrettACL 2020 · 被引用 13 次
- Data Extraction via Semantic Regular Expression SynthesisQiaochu Chen, Arko Banerjee, Çagatay Demiralp, Greg Durrett 等OOPSLA 2023 · 被引用 24 次
