Introduction
Modern software security relies heavily on string solvers—automated tools that verify string-based conditions in code to detect vulnerabilities like Cross-Site Scripting (XSS). However, string constraint solving is a complex domain where adding features like concatenation, regular expression (regex) membership, or length constraints can quickly push a problem from solvable to mathematically undecidable. This research bridges the gap between theoretical complexity and practical application by identifying which string operations are most common in industry and mapping their decidability.
Empirical Analysis and Datasets
To understand the practical landscape, the authors analyzed a massive dataset of 56,993 string-solving instances. This collection included benchmarks from academic tools (e.g., AppScan, Kaluza, Sloth), nearly 20,000 real-world regex queries from the University of Wisconsin, and approximately 15,000 security policy instances from Amazon Web Services (AWS).
As shown in the empirical distribution, the most frequent theories in practice are $A_s$ (simple regex membership) and $A_{sl}$ (regex + length). Notably, while "extended" regular expressions (including complement operators) significantly increase complexity, they appeared in fewer than 0.02% of the real-world instances studied.
Theoretical Mapping
The researchers defined a hierarchy of logic theories based on combinations of features: simple regex ($s$), extended regex ($e$), length ($l$), string-number conversion ($n$), and concatenation ($c$). By applying automata-theoretic techniques, they established the complexity and decidability of these combinations.
A key finding was the "sweet spot" of complexity: theories involving simple regex, length, and concatenation ($A_{slc}$) were proven to be PSPACE-complete. This is a positive result for the field, as PSPACE-complete problems are generally manageable for modern solvers. Conversely, adding string-to-number conversion to a logic that already includes concatenation and regex ($A_{slnc}$) renders the theory undecidable.
Key Results and Performance
The study's theoretical insights led to several significant outcomes:
- PSPACE-Completeness Proofs: Established for $A_{slc}$ and $A_{sn}$ (simple regex + string-number conversion).
- Undecidability Proofs: Confirmed for $A_{slnc}$, marking a clear boundary for solver developers.
- Practical Decidability: Approximately 51% of all analyzed benchmarks fall into known decidable fragments. Excluding word equations, this figure rises to 85%.
- Solver Optimization: These insights informed the development of the Z3str3RE solver. By focusing on the most relevant decidable sub-theories, Z3str3RE demonstrated superior performance compared to existing state-of-the-art solvers.
Limitations and Future Work
Despite these advances, several challenges remain. The decidability of certain fragments, such as $A_{enc}$ (extended regex + concatenation) and $A_{eln}$ (extended regex + length + number conversion), remains open. Furthermore, the decidability of word equations combined with linear length constraints—a long-standing "holy grail" in string solving—was not resolved. Future research will continue to target these gaps to develop even more specialized and efficient decision procedures for industrial use.
Summary updated