Metamorphic Testing of Constraint Solvers [chapter]

Özgür Akgün, Ian P. Gent, Christopher Jefferson, Ian Miguel, Peter Nightingale
2018 Lecture Notes in Computer Science  
Constraint solvers are complex pieces of software and are notoriously difficult to debug. In large part this is due to the difficulty of pinpointing the source of an error in the vast searches these solvers perform, since the effect of an error may only come to light long after the error is made. In addition, an error does not necessarily lead to the wrong result, further complicating the debugging process. A major source of errors in a constraint solver is the complex constraint propagation
more » ... orithms that provide the inference that controls and directs the search. In this paper we show that metamorphic testing is a principled way to test constraint solvers by comparing two different implementations of the same constraint. Specifically, specialised propagators for the constraint are tested against the general purpose table constraint propagator. We report on metamorphic testing of the constraint solver Minion. We demonstrate that the metamorphic testing method is very effective for finding artificial bugs introduced by random code mutation. 1 The authors have experienced both of these conditions being violated in both their own, and other, solvers.
doi:10.1007/978-3-319-98334-9_46 fatcat:3isau54rvzewdhyvtyhvaarxre