gMeta: Template-based Regular Expression Generation over Noisy Examples

10/30/2022
by   Shujun Wang, et al.
0

Regular expressions (regexes) are widely used in different fields of computer science, such as programming languages, string processing, and databases. However, existing tools for synthesizing or repairing regexes always assume that the input examples are faultless. In real industrial scenarios, this assumption does not entirely hold. Thus, this paper presents a simple but effective templated-based approach to generate regular expressions over noisy examples. Specifically, we present a data model (i.e., MetaParam) to extract features of strings for clustering all examples. Then, we propose a practical dynamic thresholding scheme to filter out anomalous examples via detecting knee points on CDF graphs. Finally, we design a template-based algorithm to translate a finite of positve examples to regular expression, which is efficient, interpretable, and extensible. We performed an experimental evaluation on four different extraction tasks applied to real-world datasets and obtained promising results in terms of F-measure. Moreover, gMeta achieves excellent results in real industrial scenarios.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/10/2018

Sound Regular Expression Semantics for Dynamic Symbolic Execution of JavaScript

Existing support for regular expressions in automated test generation or...
research
10/23/2020

Automatic Repair of Vulnerable Regular Expressions

A regular expression is called vulnerable if there exist input strings o...
research
08/16/2019

Sketch-Driven Regular Expression Generation from Natural Language and Examples

Recent systems for converting natural language descriptions into regular...
research
08/15/2023

The Regular Expression Inference Challenge

We propose regular expression inference (REI) as a challenge for code/la...
research
12/08/2022

Technical Report: Match-reference regular expressions and lenses

A lens is a single program that specifies two data transformations at on...
research
07/12/2023

A Program That Simplifies Regular Expressions (Tool paper)

This paper presents the main features of a system that aims to transform...
research
05/31/2018

Practical Study of Deterministic Regular Expressions from Large-scale XML and Schema Data

Regular expressions are a fundamental concept in computer science and wi...

Please sign up or login with your details

Forgot password? Click here to reset