DocumentCode :
596237
Title :
Memory Modeling-Based Automatic Test Data Generation for String-Manipulating Programs
Author :
Feiyu Li ; Yunzhan Gong
Author_Institution :
State Key Lab. of Networking & Switching Tech, Beijing Univ. of Posts & Telecommun., Beijing, China
Volume :
2
fYear :
2012
fDate :
4-7 Dec. 2012
Firstpage :
95
Lastpage :
104
Abstract :
String is a fundamental data type in C programming language, and is accessed through character pointer. Programs that manipulate string variables often use a set of string library functions. When generating test data for a path in a function with string parameters, the string length and each character element of the string must be determined. In this paper, we present an automatic string test data generation method based on memory modeling. We introduce a string abstract memory model, which is used to assist symbolic execution of the tested path. The operation of character pointer pointing to string and the string library functions can be simulated accurately through the operation on the abstract memory model. After symbolic execution of the tested path, we can get path constraints on argument strings in the abstract memory model. The string constraints contain two parts: the constraints on string length and special constrained character´s location, and the constraints on each character element of string. We adopt a two-step constraint solving method to solve these constraints to generate the string test data. Experiments on functions from oSIP library and other benchmarks show that our method is feasible.
Keywords :
C++ language; constraint handling; program testing; string matching; C programming language; SIP library; argument strings; automatic string test data generation method; character element; character pointer; constraint solving method; memory modeling-based automatic test data generation; path constraints; special constrained character location; string abstract memory model; string constraints; string length; string library functions; string parameters; string variables; string-manipulating programs; symbolic execution; tested path; Abstracts; Arrays; Computer languages; Data models; Libraries; Software testing; automatic test data generation; memory modeling; string constraints; symbolic execution;
fLanguage :
English
Publisher :
ieee
Conference_Titel :
Software Engineering Conference (APSEC), 2012 19th Asia-Pacific
Conference_Location :
Hong Kong
ISSN :
1530-1362
Print_ISBN :
978-1-4673-4930-7
Type :
conf
DOI :
10.1109/APSEC.2012.75
Filename :
6462787
Link To Document :
بازگشت