Word equations with length constraints: what's decidable?

  • Authors:
  • Vijay Ganesh;Mia Minnes;Armando Solar-Lezama;Martin Rinard

  • Affiliations:
  • Massachusetts Institute of Technology;University of California, San Diego;Massachusetts Institute of Technology;Massachusetts Institute of Technology

  • Venue:
  • HVC'12 Proceedings of the 8th international conference on Hardware and Software: verification and testing
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

We prove several decidability and undecidability results for the satisfiability and validity problems for languages that can express solutions to word equations with length constraints. The atomic formulas over this language are equality over string terms (word equations), linear inequality over the length function (length constraints), and membership in regular sets. These questions are important in logic, program analysis, and formal verification. Variants of these questions have been studied for many decades by mathematicians. More recently, practical satisfiability procedures (aka SMT solvers) for these formulas have become increasingly important in the context of security analysis for string-manipulating programs such as web applications. We prove three main theorems. First, we give a new proof of undecidability for the validity problem for the set of sentences written as a ∀∃ quantifier alternation applied to positive word equations. A corollary of this undecidability result is that this set is undecidable even with sentences with at most two occurrences of a string variable. Second, we consider Boolean combinations of quantifier-free formulas constructed out of word equations and length constraints. We show that if word equations can be converted to a solved form, a form relevant in practice, then the satisfiability problem for Boolean combinations of word equations and length constraints is decidable. Third, we show that the satisfiability problem for quantifier-free formulas over word equations in regular solved form, length constraints, and the membership predicate over regular expressions is also decidable.