
What to expect of predicates: An empirical analysis of predicates in real world programs
2015; Elsevier BV; Volume: 113; Linguagem: Inglês
10.1016/j.jss.2015.12.022
ISSN1873-1228
AutoresVinícius H. S. Durelli, Jeff Offutt, Nan Li, Márcio Eduardo Delamaro, Jin Guo, Zengshu Shi, Xinge Ai,
Tópico(s)Software Reliability and Analysis Research
ResumoOne source of complexity in programs is logic expressions, i.e., predicates. Predicates define much of the functional behavior of the software. Many logic-based test criteria have been developed, including the active clause coverage (ACC) criteria and the modified condition/decision coverage (MCDC). The MCDC/ACC criteria is viewed as being expensive, which motivated us to evaluate the cost of applying these criteria using a basic proxy: the number of clauses. We looked at the frequency and percentage of predicates in 63 Java programs. Moreover, we also compared these Java programs with three programs in the safety-critical domain, in which logic-basic testing is often used. Although around 99% of the predicates within Java programs contain at most three clauses, there is a positive linear correlation between overall measures of size and the number of predicates that have more than three clauses. Furthermore, safety-critical C/C++ programs have more complex predicates than non-safety-critical programs. However, similar to the predicates in non-safety-critical programs, most predicates in safety-critical programs have up to three clauses. We conclude that non-safety-critical and safety-critical programs do not have many complex predicates. Thus, MCDC/ACC is only needed on a small fraction of the predicates.
Referência(s)