What Is Decidable about String Constraints with the ReplaceAll Function
Taolue Chen, Yan Chen, Matthew Hague, Anthony W. Lin, and Zhilin Wu

TL;DR
This paper investigates the decidability of string constraints involving the replaceAll function under straight-line restrictions, introducing a decidable class that balances expressiveness and computational feasibility.
Contribution
It provides the first systematic study of straight-line string constraints with replaceAll and regular constraints, identifying a large decidable fragment and a decision procedure based on automata theory.
Findings
A large class of straight-line string constraints with replaceAll is decidable.
The decision procedure is automata-theoretic and modular, removing replaceAll terms iteratively.
Extensions such as variable patterns and length constraints lead to undecidability.
Abstract
Recently, it was shown that any theory of strings containing the string-replace function (even the most restricted version where pattern/replacement strings are both constant strings) becomes undecidable if we do not impose some kind of straight-line (aka acyclicity) restriction on the formulas. Despite this, the straight-line restriction is still practically sensible since this condition is typically met by string constraints that are generated by symbolic execution. In this paper, we provide the first systematic study of straight-line string constraints with the string-replace function and the regular constraints as the basic operations. We show that a large class of such constraints (i.e. when only a constant string or a regular expression is permitted in the pattern) is decidable. We note that the string-replace function, even under this restriction, is sufficiently powerful for…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsWeb Application Security Vulnerabilities · Software Testing and Debugging Techniques · Advanced Malware Detection Techniques
