A Learning-Based Approach to Unit Testing of Numerical Software
We present an application of learning-based testing to the problem of automated test case generation (ATCG) for numerical software. Our approach uses n-dimensional polynomial models as an algorithmically learned abstraction of the SUT which supports n-wise testing. Test cases are iteratively generated by applying a satisfiability algorithm to first-order program specifications over real closed fields and iteratively refined piecewise polynomial models.
We benchmark the performance of our iterative ATCG algorithm against iterative random testing, and empirically analyse its performance in finding injected errors in numerical codes. Our results show that for software with small errors, or long mean time to failure, learning-based testing is increasingly more efficient than iterative random testing.
KeywordsModel Check Local Model Unit Test System Under Test Numerical Program
- 4.Cox, M.G., Harris, P.M., Johnson, E.G., Kenward, P.D., Parkin, G.I.: Testing the numerical correctness of software. Technical Report CMSC 34/04, National Physical Laboratory, Teddington (January 2004)Google Scholar
- 6.Hatton, L., Roberts, A.: How accurate is scientific software? ACM Transactions on Software Engineering 20(10), 786–797 (1994)Google Scholar
- 11.Poston, R.M.: Automating Specification-Based Software Testing. IEEE Computer Society Press, Los Alamitos (1997)Google Scholar
- 13.Roache, P.J.: Building pde codes to be verifiable and validatable. Computing in Science and Engineering, 30–38 (September/October 2004)Google Scholar