Question: Q-1) Exercise on Data-Flow Coverage: Given the following code: begin read(x, y, z, w); if (z >= 0) then w = z; //L-II while
Q-1) Exercise on Data-Flow Coverage: Given the following code: begin read(x, y, z, w); if (z >= 0) then w = z; //L-II while w 0 do begin //L-I Z := Z * w; W:= z; //L-III end; if (x < 0) then z++; output(x, y); end. a- Draw a flow-graph of the above code annotated with definitions, uses, and predicate uses. b- Give minimal length test paths for the program using All-Uses Criteria for variables z at L-I c- Give minimal length test paths for the program using All-Uses Criteria for variables w at L-III d- Give minimal length test paths for all-predicate uses of the variable w defined at L-II e- Give minimal length test paths for all DU-paths of the variable y defined at L-I
Step by Step Solution
3.51 Rating (158 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
