Lune

ICSE2021Top-tier venue

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

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

8 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Exploiting Input Sanitization for Regex Denial of Service cites FlashRegex: Deducing Anti-ReDoS Regexes from Examples
  • Exploiting Input Sanitization for Regex Denial of Service cites Multi-modal synthesis of regular expressions
  • Multi-modal program inference: a marriage of pre-trained language models and component-based synthesis cites Multi-modal synthesis of regular expressions
  • Search-Based Regular Expression Inference on a GPU cites FlashRegex: Deducing Anti-ReDoS Regexes from Examples
  • InfeRE: Step-by-Step Regex Generation via Chain of Inference cites FlashRegex: Deducing Anti-ReDoS Regexes from Examples
  • InfeRE: Step-by-Step Regex Generation via Chain of Inference cites Multi-modal synthesis of regular expressions
  • InfeRE: Step-by-Step Regex Generation via Chain of Inference cites Benchmarking Multimodal Regex Synthesis with Complex Structures
  • Push-Button Synthesis of Watch Companions for Android Apps cites Multi-modal synthesis of regular expressions
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers8

  1. Multi-modal program inference: a marriage of pre-trained language models and component-based synthesisKia Rahmani, Mohammad Raza, Sumit Gulwani, Vu Le et al.OOPSLA 2021 · 32 citations
  2. Exploiting Input Sanitization for Regex Denial of ServiceEfe Barlas, Xin Du, James C. DavisICSE 2022 · 16 citations
  3. Search-Based Regular Expression Inference on a GPUMojtaba Valizadeh, Martin BergerPLDI 2023 · 11 citations
  4. InfeRE: Step-by-Step Regex Generation via Chain of InferenceShuai Zhang, Xiaodong Gu, Yuting Chen, Beijun ShenASE 2023 · 8 citations
  5. Push-Button Synthesis of Watch Companions for Android AppsCong Li, Yanyan Jiang, Chang XuICSE 2022 · 7 citations

Builds on3

  1. Multi-modal synthesis of regular expressionsQiaochu Chen, Xinyu Wang, Xi Ye, Greg Durrett et al.PLDI 2020 · 81 citations
  2. FlashRegex: Deducing Anti-ReDoS Regexes from ExamplesYeting Li, Zhiwu Xu, Jialun Cao, Haiming Chen et al.ASE 2020 · 17 citations
  3. Benchmarking Multimodal Regex Synthesis with Complex StructuresXi Ye, Qiaochu Chen, Isil Dillig, Greg DurrettACL 2020 · 13 citations

Related papers

  1. Data Extraction via Semantic Regular Expression SynthesisQiaochu Chen, Arko Banerjee, Çagatay Demiralp, Greg Durrett et al.OOPSLA 2023 · 24 citations
  2. Repairing Regular Expressions for ExtractionNariyoshi Chida, Tachio TerauchiPLDI 2023 · 9 citations
  3. HISyn: human learning-inspired natural language programmingZifan Nan, Hui Guan, Xipeng ShenFSE 2020 · 12 citations
  4. Generating Pragmatic Examples to Train Neural Program SynthesizersSaujas Vaduguru, Daniel Fried, Yewen PuICLR 2024 · 7 citations
  5. RegexScalpel: Regular Expression Denial of Service (ReDoS) Defense by Localize-and-FixYeting Li, Yecheng Sun, Zhiwu Xu, Jialun Cao et al.USENIX Security 2022
Dusk over the sea between two cliffs drawn in fine vertical lines