Decision Procedure for A Theory of String Sequences

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Hu, Denghang, Chen, Taolue, Rümmer, Philipp, Song, Fu, Wu, Zhilin
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909773629227008
author Hu, Denghang
Chen, Taolue
Rümmer, Philipp
Song, Fu
Wu, Zhilin
author_facet Hu, Denghang
Chen, Taolue
Rümmer, Philipp
Song, Fu
Wu, Zhilin
contents The theory of sequences, supported by many SMT solvers, can model program data types including bounded arrays and lists. Sequences are parameterized by the element data type and provide operations such as accessing elements, concatenation, forming sub-sequences and updating elements. Strings and sequences are intimately related; many operations, e.g., matching a string according to a regular expression, splitting strings, or joining strings in a sequence, are frequently used in string-manipulating programs. Nevertheless, these operations are typically not directly supported by existing SMT solvers, which instead only consider the generic theory of sequences. In this paper, we propose a theory of string sequences and study its satisfiability. We show that, while it is undecidable in general, the decidability can be recovered by restricting to the straight-line fragment. This is shown by encoding each string sequence as a string, and each string sequence operation as a corresponding string operation. We provide pre-image computation for the resulting string operations with respect to automata, effectively casting it into the generic OSTRICH string constraint solving framework. We implement the new decision procedure as a tool $\ostrichseq$, and carry out experiments on benchmark constraints generated from real-world JavaScript programs, hand-crafted templates and unit tests. The experiments confirm the efficacy of our approach.
format Preprint
id arxiv_https___arxiv_org_abs_2509_00948
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Decision Procedure for A Theory of String Sequences
Hu, Denghang
Chen, Taolue
Rümmer, Philipp
Song, Fu
Wu, Zhilin
Programming Languages
Formal Languages and Automata Theory
The theory of sequences, supported by many SMT solvers, can model program data types including bounded arrays and lists. Sequences are parameterized by the element data type and provide operations such as accessing elements, concatenation, forming sub-sequences and updating elements. Strings and sequences are intimately related; many operations, e.g., matching a string according to a regular expression, splitting strings, or joining strings in a sequence, are frequently used in string-manipulating programs. Nevertheless, these operations are typically not directly supported by existing SMT solvers, which instead only consider the generic theory of sequences. In this paper, we propose a theory of string sequences and study its satisfiability. We show that, while it is undecidable in general, the decidability can be recovered by restricting to the straight-line fragment. This is shown by encoding each string sequence as a string, and each string sequence operation as a corresponding string operation. We provide pre-image computation for the resulting string operations with respect to automata, effectively casting it into the generic OSTRICH string constraint solving framework. We implement the new decision procedure as a tool $\ostrichseq$, and carry out experiments on benchmark constraints generated from real-world JavaScript programs, hand-crafted templates and unit tests. The experiments confirm the efficacy of our approach.
title Decision Procedure for A Theory of String Sequences
topic Programming Languages
Formal Languages and Automata Theory
url https://arxiv.org/abs/2509.00948