Abstract:Predicate Switching locates and analyses the critical predicate to locate fault through dynamically changing the branch predicate outcomes at runtime and observes the changes in the program results. Predicate Switching Ordering algorithm determines the efficiency of locating the critical predicate. Existing ordering algorithms, such as the LEFS (Last Executed First Switched Ordering, LEFS) algorithm with lower efficiency and the PRIOR (Prioritization-based Ordering, PRIOR) algorithm with higher efficiency, the latter time consuming and complexity of algorithm, are defective. In this paper, we propose a novel and improved algorithm, which first determines the priority of the predicate by comparing different program spectra between the success and failure of test cases, then orders priorities of predicate, according to the reverse order of the predicate executions. To evaluate it, we tested our technique on Siemens Suite. The results have shown that the ordering algorithm is more efficient in locating the critical predicate than the LEFS, and less consuming but more implemented than the PRIOR.