Download PDF

18th Logic-Based Program Synthesis and Transformation, Date: 2008/07/17 - 2008/07/18, Location: Valencia, Spain

Publication date: 2009-01-01
Volume: 5438 Pages: 71 - 86
ISBN: 978-3-540-89981-5 ISSN: 0302-9743
Publisher: Springer

Lecture Notes in Computer Science

Author:

Degrave, François
Schrijvers, Tom ; Vanhoof, Wim ; DelaBanda, MG ; Pontelli, E

Keywords:

test generation, Mercury, software testing, white-box tests, constraint solving, Science & Technology, Technology, Computer Science, Artificial Intelligence, Computer Science, Theory & Methods, Computer Science

Abstract:

In this work, we consider the automatic generation of test inputs for Mercury programs. We use an abstract representation of a program that allows to reason about program executions as paths in a control-flow graph. Next, we define how such a path corresponds to a set of constraints whose solution defines input values for the predicate under test such that when the predicate is called with respect to these input values, the execution is guaranteed to follow the given path. The approach is similar to existing work for imperative languages, but has been considerably adapted to deal with the specificities of Mercury, such as symbolic data representation, predicate failure and non-determinism.