Research on the Static Testing Method of Referencing Uninitialized Variables
暂无分享,去创建一个
Referencing uninitialized variables usually exist in C/C++ programs, and often lead to system crash. Since the limitation of traditional testing methods, compilers and existing static testing tools in detecting referencing uninitialized variables, a static testing method based on the fault model of referencing uninitialized variables is proposed in this paper. Formal definition of referencing uninitialized variables is given firstly, as the basis of investigating referencing uninitialized variables. Variable's state and its transformations are analyzed, and the generation model of variables’ states set is established, as the preconditions of identifying referencing uninitialized variables statically. Fault model of referencing uninitialized variables is established, as the basis of identifying referencing uninitialized variables statically. The automatic testing algorithm of referencing uninitialized variables is proposed. The experimental result shows that the static testing method could detect referencing uninitialized variables with higher accuracy and efficiency, which means that the fault model and the automatic testing method are valid.