A Decision Procedure for Path Feasibility of String Manipulating Programs with Integer Data Type

07/14/2020
by   Taolue Chen, et al.
0

Strings are widely used in programs, especially in web applications. Integer data type occurs naturally in string-manipulating programs, and is frequently used to refer to lengths of, or positions in, strings. Analysis and testing of string-manipulating programs can be formulated as the path feasibility problem: given a symbolic execution path, does there exist an assignment to the inputs that yields a concrete execution that realizes this path? Such a problem can naturally be reformulated as a string constraint solving problem. Although state-of-the-art string constraint solvers usually provide support for both string and integer data types, they mainly resort to heuristics without completeness guarantees. In this paper, we propose a decision procedure for a class of string-manipulating programs which includes not only a wide range of string operations such as concatenation, replaceAll, reverse, and finite transducers, but also those involving the integer data-type such as length, indexof, and substring. To the best of our knowledge, this represents one of the most expressive string constraint languages that is currently known to be decidable. Our decision procedure is based on a variant of cost register automata. We implement the decision procedure, giving rise to a new solver OSTRICH+. We evaluate the performance of OSTRICH+ on a wide range of existing and new benchmarks. The experimental results show that OSTRICH+ is the first string decision procedure capable of tackling finite transducers and integer constraints, whilst its overall performance is comparable with the state-of-the-art string constraint solvers.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/07/2018

Decision Procedures for Path Feasibility of String-Manipulating Programs with Complex Operations

The design and implementation of decision procedures for checking path f...
research
10/29/2020

String Constraints with Concatenation and Transducers Solved Efficiently (Technical Report)

String analysis is the problem of reasoning about how strings are manipu...
research
05/01/2010

The Exact Closest String Problem as a Constraint Satisfaction Problem

We report (to our knowledge) the first evaluation of Constraint Satisfac...
research
11/02/2021

From Strings to Data Science: a Practical Framework for Automated String Handling

Many machine learning libraries require that string features be converte...
research
11/09/2017

What Is Decidable about String Constraints with the ReplaceAll Function

Recently, it was shown that any theory of strings containing the string-...
research
11/29/2017

A critical analysis of string APIs: The case of Pharo

Most programming languages, besides C, provide a native abstraction for ...
research
09/26/2021

An Analysis into the Performance and Memory Usage of MATLAB Strings

MATLAB is a mathematical computing environment used by many engineers, m...

Please sign up or login with your details

Forgot password? Click here to reset