Return
Multi-modal regular expression synthesis method based on large language models and semantics
DOI:10.1016/j.sysarc.2026.103762.png)
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
IF:
4.1
Papers:
3.0K
Citations:
4.2K

