Noname manuscript No. (will be inserted by the editor) Using Constraints to Diagnose Faulty Spreadsheets Rui Abreu · Birgit Hofer · Alexandre Perez · Franz Wotawa the date of receipt and acceptance should be inserted later Abstract Spreadsheets can be viewed as a highly flexible programming environ- ment for end-users. Spreadsheets are widely adopted for decision making, and may have a serious economical impact for the business. However, spreadsheets are stag- geringly prone to errors. Hence, approaches for aiding the process of pinpointing the faulty cells in a spreadsheet are of great value. We present a constraint-based approach, ConBug, for debugging spreadsheets. The approach takes as input a (faulty) spreadsheet and a test case that reveals the fault and computes a set of diagnosis candidates for the debugging problem. Therefore, we convert the spread- sheet and a test case to a constraint satisfaction problem. We perform an empirical evaluation with 78 spreadsheets from different sources, where we demonstrate that our approach is light-weight and efficient. From our experimental results, we con- clude that ConBug helps end-users to pinpoint faulty cells. Keywords Spreadsheets · Debugging · Constraints 1 Introduction Spreadsheet tools, such as Microsoft Excel 1 , iWork’s Numbers 2 , and OpenOffice’s Calc 3 , can be viewed as programming environments for non-professional program- Rui Abreu · Alexandre Perez Dept. of Informatics Engineering, University of Porto, Porto, Portugal E-mail: rui@computer.org, alexandre.perez@fe.up.pt Birgit Hofer · Franz Wotawa Institute for Software Technology, Graz University of Technology, Graz, Austria E-mail: bhofer@ist.tugraz.at, wotawa@ist.tugraz.at 1 http://office.microsoft.com/en-gb/excel/ 2 http://www.apple.com/iwork/numbers/ 3 http://www.openoffice.org/product/calc.html