Solving string constraints with Regex-dependent functions through transducers with priorities and variables
Taolue Chen, Alejandro Flores-Lamas, Matthew Hague, Zhilei Han, Denghang Hu, Shuanglong Kan, Anthony W. Lin, Philipp Rümmer, Zhilin Wu
摘要
Regular expressions are a classical concept in formal language theory. Regular expressions in programming languages (RegEx) such as JavaScript, feature non-standard semantics of operators (e.g. greedy/lazy Kleene star), as well as additional features such as capturing groups and references. While symbolic execution of programs containing RegExes appeals to string solvers natively supporting important features of RegEx, such a string solver is hitherto missing. In this paper, we propose the first string theory and string solver that natively provides such support. The key idea of our string solver is to introduce a new automata model, called prioritized streaming string transducers (PSST), to formalize the semantics of RegEx-dependent string functions. PSSTs combine priorities, which have previously been introduced in prioritized finite-state automata to capture greedy/lazy semantics, with string variables as in streaming string transducers to model capturing groups. We validate the consistency of the formal semantics with the actual JavaScript semantics by extensive experiments. Furthermore, to solve the string constraints, we show that PSSTs enjoy nice closure and algorithmic properties, in particular, the regularity-preserving property (i.e., pre-images of regular constraints under PSSTs are regular), and introduce a sound sequent calculus that exploits these properties and performs propagation of regular constraints by means of taking post-images or pre-images. Although the satisfiability of the string constraint language is generally undecidable, we show that our approach is complete for the so-called straight-line fragment. We evaluate the performance of our string solver on over 195000 string constraints generated from an open-source RegEx library. The experimental results show the efficacy of our approach, drastically improving the existing methods (via symbolic execution) in both precision and efficiency.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper11
- Testing the Limits: Unusual Text Inputs Generation for Mobile App Crash Detection with Large Language ModelZhe Liu, Chunyang Chen, Junjie Wang, Mengzhuo Chen 等ICSE 2024 · 被引用 41 次
- Word Equations in Synergy with Regular ConstraintsFrantisek Blahoudek, Yu-Fang Chen, David Chocholatý, Vojtech Havlena 等FM 2023 · 被引用 16 次
- RE#: High Performance Derivative-Based Regex Matching with Intersection, Complement, and Restricted LookaroundsIan Erik Varatalu, Margus Veanes, Juhan P. ErnitsPOPL 2025 · 被引用 9 次
- Decision Procedures for Sequence TheoriesArtur Jez, Anthony W. Lin, Oliver Markgraf, Philipp RümmerCAV 2023 · 被引用 8 次
- Repairing Regex-Dependent String FunctionsNariyoshi Chida, Tachio TerauchiASE 2024 · 被引用 3 次
它引用的顶会 Paper1
相关 Paper
- Formal Verification for JavaScript Regular Expressions: A Proven Mechanized Semantics and Its ApplicationsAurèle Barrière, Victor Deng, Clément Pit-ClaudelPOPL 2026
- Efficient handling of string-number conversionParosh Aziz Abdulla, Mohamed Faouzi Atig, Yu-Fang Chen, Bui Phi Diep 等PLDI 2020 · 被引用 25 次
- The Power of Regular Constraint PropagationMatthew Hague, Artur Jez, Anthony Widjaja Lin, Oliver Markgraf 等OOPSLA 2025 · 被引用 2 次
- Even Faster Conflicts and Lazier Reductions for String SolversAndres Nötzli, Andrew Reynolds, Haniel Barbosa, Clark W. Barrett 等CAV 2022 · 被引用 13 次
- Repairing Regular Expressions for ExtractionNariyoshi Chida, Tachio TerauchiPLDI 2023 · 被引用 9 次
