Automatic techniques for helping developers in finding the root causes of software failures are extremely important in the development cycle of software. In this paper we study a dynamic modeling approach to fault localization, which is based on logic reasoning over program traces. We present a simple diagnostic performance model to assess the influence of various parameters, such as test set size and coverage, on the debugging effort required to find the root causes of software failures. The model shows that our approach un-ambiguously reveals the actual faults, provided that suffi-cient test cases are available. This optimal diagnostic per-formance is confirmed by numerical experiments. Further-more, we present preliminary experiments on ...