Lecture Notes on Logic Coverage Exercise | CEN 5035, Study notes of Software Engineering

Material Type: Notes; Class: SOFTWARE ENGINEERING; Subject: COMPUTER SOFTWARE ENGINEERING; University: University of Florida; Term: Unknown 1989;

Typology: Study notes

Pre 2010

Uploaded on 09/17/2009

koofers-user-jtk-1
koofers-user-jtk-1 🇺🇸

5

(1)

10 documents

1 / 32

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Logic Coverage Exercise
1. input(A,B)
if (A>0) OR (B<0) then
2. A := A+5
end_if
3. if (A+B>0) AND (A*B<0) then
4. B := A+B
end_if
5. output(A,B)
1
2
3
4
5
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20

Partial preview of the text

Download Lecture Notes on Logic Coverage Exercise | CEN 5035 and more Study notes Software Engineering in PDF only on Docsity!

Logic Coverage Exercise

if (A>0) OR (B<0) then

A := A+

end_if

B := A+B

end_if

Logic Coverage Exercise (a)

if (A>0) OR (B<0) then

A := A+

end_if

B := A+B

end_if

Path condition for

Logic Coverage Exercise (a)

Path condition for

: [(A>0) V (B<0)]

if (A>0) OR (B<0) then

A := A+

end_if

B := A+B

end_if

Logic Coverage Exercise (a)

Path condition for

: [(A>0) V (B<0)]

if (A>0) OR (B<0) then

A := A+

end_if

B := A+B

end_if

Logic Coverage Exercise (a)

if (A>0) OR (B<0) then

A := A+

end_if

B := A+B

end_if

Path condition for

Logic Coverage Exercise (a)

Path condition for

if (A>0) OR (B<0) then

A := A+

end_if

B := A+B

end_if

Logic Coverage Exercise (a)

Path condition for

:^

(A≤0)

(B≥0)

if (A>0) OR (B<0) then

A := A+

end_if

B := A+B

end_if

Logic Coverage Exercise (a)

Path condition for

:^

(A≤0)

(B≥0)

(A+B>0)

(AB<0)

if (A>0) OR (B<0) then

A := A+

end_if

B := A+B

end_if

Logic Coverage Exercise (b)

if (A>0) OR (B<0) then

A := A+

end_if

B := A+B

end_if

test case 1: A=1, B=

statementbranchcondition comp. cond. path

Logic Coverage Exercise (b)

if (A>0) OR (B<0) then

A := A+

end_if

B := A+B

end_if

test case 1: A=1, B=

T^

F^

statementbranchcondition comp. cond. path

Logic Coverage Exercise (b)

if (A>0) OR (B<0) then

A := A+

end_if

B := A+B

end_if

test case 1: A=1, B=

T^

F

T^

F

statementbranchcondition comp. cond. path

Logic Coverage Exercise (b)

if (A>0) OR (B<0) then

A := A+

end_if

B := A+B

end_if

test case 1: A=1, B=

T^

F

T^

F

statementbranchcondition comp. cond. path

Logic Coverage Exercise (b)

test case 1: A=1, B=3 test case 2: A=-1, B=-

statementbranchcondition comp. cond. path

if (A>0) OR (B<0) then

A := A+

end_if

B := A+B

end_if

T,

F

F,

T

T^

F

Logic Coverage Exercise (b)

test case 1: A=1, B=3 test case 2: A=-1, B=-

statementbranchcondition comp. cond. path

if (A>0) OR (B<0) then

A := A+

end_if

B := A+B

end_if

T,

F

F,

T

T,

F

F,

T