Multi-Modal Synthesis of Regular Expressions

08/09/2019
by   Qiaochu Chen, et al.
0

Despite their usefulness across a wide range of application domains, regular expressions (or regexes for short) have a reputation for being difficult to master. In this paper, we propose a multi-modal synthesis technique for automatically synthesizing regexes from a combination of examples and natural language. Using multiple modalities of the specification is useful in this context because natural language alone is often highly ambiguous, whereas examples in isolation are often not sufficient for conveying the user's intent. Our proposed synthesis algorithm first parses the English description into a so-called hierarchical sketch that is used to guide our programming-by-example (PBE) engine. Since the hierarchical sketch captures key hints embedded in the natural language description, 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 two different data sets, one curated from StackOverflow and another adopted from prior work. Our evaluation demonstrates the advantages of using multiple modalities of specification and also highlights the impact of key design choices underlying our PBE engine. Finally, a user study involving 20 participants demonstrates that users are more likely to successfully come up with the desired regex using REGEL compared to without using it.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/03/2021

Multi-modal Program Inference: a Marriage of Pre-trainedLanguage Models and Component-based Synthesis

Multi-modal program synthesis refers to the task of synthesizing program...
research
08/13/2023

The Usability of Pragmatic Communication in Regular Expression Synthesis

Programming-by-example (PBE) systems aim to alleviate the burden of prog...
research
12/31/2020

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

Since regular expressions (abbrev. regexes) are difficult to understand ...
research
08/16/2019

Sketch-Driven Regular Expression Generation from Natural Language and Examples

Recent systems for converting natural language descriptions into regular...
research
05/02/2020

Benchmarking Multimodal Regex Synthesis with Complex Structures

Existing datasets for regular expression (regex) generation from natural...
research
10/20/2022

ObSynth: An Interactive Synthesis System for Generating Object Models from Natural Language Specifications

We introduce ObSynth, an interactive system leveraging the domain knowle...
research
07/21/2017

What Looks Good with my Sofa: Multimodal Search Engine for Interior Design

In this paper, we propose a multi-modal search engine for interior desig...

Please sign up or login with your details

Forgot password? Click here to reset