Research Article

Path-Wise Test Data Generation Based on Heuristic Look-Ahead Methods

Algorithm 1

Best-first-search branch and bound.
Input : the path to be traversed
Output  result : the test data making feasible
Stage 1: Initialization
(1)  call Algorithm Irrelevant variable removal;
(2) result  null;
(3)  call Algorithm Maintaining path consistency;
(4)  call Algorithm Dynamic variable ordering;
(5)  call Algorithm Path tendency calculation;
(6)  head ( );
(7)  call Algorithm Initial domain calculation;
(8)  select ( );
(9)  initial state  (null, , active, );
(10)  initial state;
Stage 2: State space search
Begin
(11)for (Pre, , active, ) ( : )
(12)   path consistent  false;
(13)   call Algorithm Maintaining path consistency;
(14)   if (path consistent = true)
(15)       (Pre, , extensive, );
(16)     resultresult ;
(17)     FV  FV −  ;
(18)     PV  PV + ;
(19)     call Algorithm Dynamic variable ordering;
(20)     if ( = null)
(21)         final state;
(22)       foreach  
(23)          resultresult ;
(24)     else  Pre ;
(25)         head ( );
(26)       call Algorithm Initial domain calculation;
(27)         select ( );
(28)         (Pre, , active, );
(29)   else if   &&
(30)       call Algorithm Bisection;
(31)         select ( );
(32)         (Pre, , active, );
(33)     else    (Pre, , inactive, );
(34)        ;
(35)         (Pre, , active, );
(36)       PV  PV −  ;
(37)return  result;
End