Mutation Operators in Conformiq Designer

In recent blog posts about test generation for mutation testing, I have detailed that mutants introduce small changes into the original model each mimicking a potential software bug. These changes are seeded on a set of mutation operators that are rules applied to the system to create mutants. These are simple syntactic or semantic transformation rules: deleting an assignment expression and replacing or inserting new operators to create syntactically legal expressions are examples of typical mutation operators.

It has been shown that a large set of mutation operators may cause generation of too many mutated versions of the original system. This large number of mutants may then exhaust the memory and time resources without providing sufficient benefits. Therefore finding a small subset of mutation operators that yield the best possible performance in practice has been the task of several research initiatives.

Conformiq Designer implements a handful of mutation operators. This set of mutation operators is the one identified by Offut et al** and is about as effective as considerably larger set of mutation operators implemented in some mutation testing tools. These mutation operators implemented in Conformiq Designer are listed below:

Arithmetic Operator Replacement (AOR)

The QML modeling language of Conformiq Designer supports five arithmetic operators for all floating-point and integer numbers; (1) +, (2) -, (3) *, (4) /, and (5) %. These operators are all binary. Arithmetic Operator Replacement (AOR) coverage option causes Conformiq Designer to replace each of these basic binary arithmetic operators with other binary arithmetic operators.

For example, assume that we have an expression a = b + c in our model. Enabling AOR mutation operator in Conformiq Designer would cause it to internally create four mutated versions of the expression (and therefore four mutated versions of the whole system model) a = b - c, a = b * c, a = b / c and a = b % c.

Conditional Operator Replacement (COR)

The QML modeling language supports six conditional operators; five binary and one unary. Five binary conditional operators are (1) &&, (2) ||, (3) &, (4) |, and (5) ˆ. Conditional Operator Replacement (COR) coverage option causes Conformiq Designer to replace each of these basic binary conditional operators with other binary conditional operators

Relational Operator Replacement (ROR)

A relational operator compares two values and determines the relationship between them. QML provide six kinds of relational operators; (1) >, (2) >=, (3) <, (4) <=, (5) ==, and (6) !=. Relational Operators Replacement (ROR) coverage option causes Conformiq Designer to replace each of these relational operators with other relational operators and replace the entire predicate with true and false.

Unary Operator Insertion (UOI)

QML modeling language supports unary operators. All the floating-point and integer numbers can be prefixed with unary arithmetic operators (1) + and (2) -, while the outcome of each Boolean expression can be negated by unary operator !. Unary Operator Insertion (UOI) coverage option causes Conformiq Designer to insert these unary operators accordingly.

Absolute Value Insertion (ABS)

Absolute Value Insertion (ABS) coverage option causes Conformiq Designer to replace each numeric subexpression E with abs(E).

** Offutt, Jeff & Lee, Ammei & Rothermel, Gregg & Untch, Roland & Zapf, Christian. (2000). An Experimental Determination of Sufficient Mutant Operators. ACM Transactions on Software Engineering and Methodology. 5. 10.1145/227607.227610. [https://www.researchgate.net/publication/2349005_An_Experimental_Determination_of_Sufficient_Mutant_Operators]

 

Continue exploring
Products Case studies Demo