arrow
Return

Multi-modal regular expression synthesis method based on large language models and semantics

delete2026-03-04
delete0
PRE
AI
Z
Zipan Tang
Y
Yixuan Yan
H
Hanze Dong
B
Bo Sun
H
Haiming Chen *
H
Hongyu Gao
DOI:10.1016/j.sysarc.2026.103762delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Real-world regular expressions (regexes) are widely used in practice. However, due to their complex syntax and difficulty in both understanding and writing, automatic synthesis of regexes has been an important research challenge. Existing methods often have limited generalization ability and insufficient support for extended features. To address these challenges, we propose PowerSyn, a framework that leverages large language models (LLMs) and semantic manipulation of sub-expressions. PowerSyn synthesizes regexes from natural language descriptions and examples, and supports extended features. Specifically, our approach includes prompt design for synthesizing regexes with LLMs, as well as a novel algorithm for semantic manipulation of sub-expressions guided by examples and matching relationships. In addition, we explore the ability of LLMs to repair incorrect regexes. The experimental results demonstrate the significant effectiveness of our approach.
Keywords:
regex synthesis
large language models
semantic manipulation
natural language descriptions
extended features

Journal

Journal of Systems Architecture cover
Journal of Systems Architecture
IF:
4.1
Papers:
3.0K
Citations:
4.2K

Organization

C
Chinese Academy of Sciences
Scholars:
3.9W
Papers: 1.5W
Citations: 58.4W
B
Beijing University of Technology
Scholars:
2.8W
Papers: 2.1W
Citations: 2.7W