It has become a popular trend to build software’s regular expression or extended regular expression models in order to generate test sequences from these models. Such test sequences tend to have promising test coverage and fault detection capability. During this process, one critical step is expression parsing based on algebraic operations. However, the parsing can be very challenging as different algebraic systems have different algebraic operators and algebraic operations. Besides, the parsing difficulty continues to grow as software complexity increases. To address the above challenges, this paper proposes a general expression parsing framework for test sequence generation. The proposed framework consists of three stages, expression decomposition, algebraic operations, and subexpression combination. To implement the framework, an expression parsing algorithm based on abstract syntax tree is developed. Case studies based on 117 expressions collected from the literature over the past 30 years as well as 13 software systems are conducted to evaluate the effectiveness of the proposed algorithm. The results indicate that our algorithm is superior to three existing and commonly used algorithms with respect to expression parsing and software fault detection.
Read full abstract