fundamentals of static ic and dynamic ic software verif
play

Fundamentals of (Static ic and Dynamic ic) ) Software Verif ific - PowerPoint PPT Presentation

Fundamentals of (Static ic and Dynamic ic) ) Software Verif ific icatio ion Control-flow Analysis Data-flow Analysis Static VS Dynamic Analysis Software Testing Control Con ol Flow ow Gr Graph entry S1 Procedure AVG S1 count =


  1. printSum : : sta state tement t cove verage ge a == 3 b == 9 printSum(int a, int b) { int result = a + b; if (result > 0) printcol(“red”, result); else if (result < 0) printcol(“blue”, result); } Coverage : 0%

  2. printSum : : sta state tement t cove verage ge a == 3 b == 9 printSum(int a, int b) { int result = a + b; if (result > 0) printcol(“red”, result); else if (result < 0) printcol(“blue”, result); } Coverage : 71%

  3. printSum : : sta state tement t cove verage ge a == 3 a == 0 b == 9 b == -1 printSum(int a, int b) { int result = a + b; if (result > 0) printcol(“red”, result); else if (result < 0) printcol(“blue”, result); } Coverage : 71%

  4. printSum : : sta state tement t cove verage ge a == 3 a == 0 b == 9 b == -1 printSum(int a, int b) { int result = a + b; if (result > 0) printcol(“red”, result); else if (result < 0) printcol(“blue”, result); } Coverage : 100%

  5. printSum : : sta state tement t cove verage ge a == 3 a == 0 b == 9 b == -1 printSum(int a, int b) { int result = a + b; if (result > 0) printcol(“red”, result); else if (result < 0) printcol(“blue”, result); } Coverage : 100%

  6. printSum : : sta state tement t cove verage ge a == 3 a == 0 b == 9 b == -1 printSum(int a, int b) { int result = a + b; if (result > 0) printcol(“red”, result); else if (result < 0) printcol(“blue”, result); [else do nothing] } Coverage : 100%

  7. printSum : : sta state tement t cove verage ge a == 3 a == 0 b == 9 b == -1 printSum(int a, int b) { int result = a + b; if (result > 0) printcol(“red”, result); else if (result < 0) printcol(“blue”, result); [else do nothing] } Coverage : 100%

  8. printSum : : branch cove verage ge a == 3 a == 0 b == 9 b == -1 printSum(int a, int b) { int result = a + b; if (result > 0) printcol(“red”, result); else if (result < 0) printcol(“blue”, result); [else do nothing]} Coverage : ?

  9. printSum : : branch cove verage ge a == 3 a == 0 b == 9 b == -1 printSum(int a, int b) { int result = a + b; if (result > 0) printcol(“red”, result); else if (result < 0) printcol(“blue”, result); [else do nothing]} Coverage : 75%

  10. printSum : : branch cove verage ge a == 3 a == 0 a == -5 b == 9 b == -1 b == 5 printSum(int a, int b) { int result = a + b; if (result > 0) printcol(“red”, result); else if (result < 0) printcol(“blue”, result); [else do nothing]} Coverage : 75%

  11. printSum : : branch cove verage ge a == 3 a == 0 a == -5 b == 9 b == -1 b == 5 printSum(int a, int b) { int result = a + b; if (result > 0) printcol(“red”, result); else if (result < 0) printcol(“blue”, result); [else do nothing]} Coverage : 100%

Recommend


More recommend