论文标题
使用整数数据类型操纵程序的路径可行性的决策程序
A Decision Procedure for Path Feasibility of String Manipulating Programs with Integer Data Type
论文作者
论文摘要
字符串广泛用于程序中,尤其是在Web应用程序中。整数数据类型自然发生在字符串操纵程序中,并且经常用于指字符串的长度或位置。字符串操纵程序的分析和测试可以作为路径可行性问题进行表述:给定符号执行路径,是否存在对输入的分配,该输入产生了实现此路径的具体执行?这样的问题自然可以作为解决问题的解决问题进行重新重新校正。尽管最先进的字符串约束求解器通常为字符串和整数数据类型提供支持,但它们主要是诉诸启发式,而无需保证。在本文中,我们为一类字符串操纵程序提出了决策程序,该程序不仅包括串联操作,例如串联,替换,反向和有限的传感器,而且还包括涉及整数数据类型的串联传感器,例如长度,indexof和substring。据我们所知,这代表了目前已知是可决定的最具表现力的字符串约束语言之一。我们的决策程序基于成本寄存器自动机的变体。我们实施决策程序,从而产生新的求解器鸵鸟+。我们在广泛的现有基准和新基准测试中评估了鸵鸟+的性能。实验结果表明,Ostrich+是第一个能够解决有限传感器和整数约束的字符串决策过程,同时其整体性能与最新的字符串约束求解器相当。
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.