Article ID Journal Published Year Pages File Type
459253 Journal of Systems and Software 2016 13 Pages PDF
Abstract

•We analyzed 63 open source, non-safety-critical Java programs ranging from 423 to 629,114 lines of code, with a total of 400,811 predicates.•We also analyzed three railway safety-critical programs implemented in C/C++ whose sizes range from 42,380 to 65,887 lines of code, with a total of 24,546 predicates.•99% of the predicates within Java programs contain at most three clauses and approximately 95.17% of the predicates in the safety-critical programs have up to three clauses.•Since both safety-critical and non-safety critical programs have very few predicates containing more than a few clauses, ACC is only needed on a small fraction of all the predicates.

One 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.

Related Topics
Physical Sciences and Engineering Computer Science Computer Networks and Communications
Authors
, , , , , , ,