pith. sign in

arxiv: 1908.03316 · v3 · pith:I4SVOUHDnew · submitted 2019-08-09 · 💻 cs.PL

Multi-modal Synthesis of Regular Expressions

classification 💻 cs.PL
keywords engineproposedregelsearchsketchsynthesistechniquealpharegex
0
0 comments X
read the original abstract

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-the-art 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.

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. From IOCs to Regex: Automating CTI Operationalization for SOC with LLMs

    cs.CR 2026-04 unverdicted novelty 6.0

    IOCRegex-gen automates IOC-to-regex conversion with LLMs via group-aware grouping and multi-stage validation, reporting 99.1% hit rate and 0.8% false-positive rate on 3000+ CTI reports and 2400 ground-truth strings.