Research Article

Combining Slicing and Constraint Solving for Better Debugging: The CONBAS Approach

Algorithm 3

CONSTRAINTS ( , , ssa).
Require: An execution trace in SSA form, a test case ,
 and a function ssa returning the final index value for each variable.
Ensure: The constraint representation of and the test case.
(1) Let be the empty set.
(2) for all     do
(3) Add “ ” to .
(4) end for
(5) for all   do
(6) Add “ ” to .
(7) end for
(8) for   to   do
(9) if   is an assignment statement of the form   then
(10) Add “ ” to .
(11)  else
(12)  Let be the condition of where & is replaced with and with .
(13)  Add “ ” to .
(14)  end if
(15) end for
(16) Return .