Abstract

Word equations are a crucial element in the theoretical foundation of constraint solving over strings. A word equation relates two words over string variables and constants. Its solution amounts to a function mapping variables to constant strings that equate the left and right hand sides of the equation. While the problem of solving word equations is decidable, the decidability of the problem of solving a word equation with a length constraint (i.e., a constraint relating the lengths of words in the word equation) has remained a long-standing open problem. We focus on the subclass of quadratic word equations, i.e., in which each variable occurs at most twice. We first show that the length abstractions of solutions to quadratic word equations are in general not Presburger-definable. We then describe a class of counter systems with Presburger transition relations which capture the length abstraction of a quadratic word equation with regular constraints. We provide an encoding of the effect of a simple loop of the counter systems in the existential theory of Presburger Arithmetic with divisibility (PAD). Since PAD is decidable (NP-hard and is in NEXP), we obtain a decision procedure for quadratic words equations with length constraints for which the associated counter system is flat (i.e., all nodes belong to at most one cycle). In particular, we show a decidability result (in fact, also an NP algorithm with a PAD oracle) for a recently proposed NP-complete fragment of word equations called regular-oriented word equations, when augmented with length constraints. We extend this decidability result (in fact, with a complexity upper bound of PSPACE with a PAD oracle) in the presence of regular constraints.

Highlights

  • Reasoning about strings is a fundamental problem in computer science and mathematics

  • We describe a class of counter systems with Presburger transition relations which capture the length abstraction of a quadratic word equation with regular constraints

  • We provide an encoding of the effect of a simple loop of the counter systems in the existential theory of Presburger Arithmetic with divisibility (PAD)

Read more

Summary

Introduction

Reasoning about strings is a fundamental problem in computer science and mathematics. The same encoding shows decidability for word equations with length constraints, provided the proof tree is associated with flat counter systems. The satisfiability problem for quadratic regular-oriented word equations with length constraints is decidable. A standard monoid technique for handling regular constraints in word equations (e.g. see [DR99]) can be used to extend our decidability result in the presence of regular constraints. This results in a PSPACE algorithm with an oracle access to PAD. While our decidability result is for a simple subclass, this class is already non-trivial without length and regular constraints: satisfiability of regular-oriented word equations is NP-complete [DMN17]. We believe that the techniques in this paper — the connection between acceleration and word equations, and the use of existential Presburger with divisibility — can pave the way to more sophisticated decision procedures based on counter system acceleration

Preliminaries
Solving Quadratic Word Equations
Reduction to Counter Systems
Decidability via Linear Arithmetic with Divisibility
Conclusion
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call