Graph Testing
Graph Testing
Quiz 1
Quick Review
Basic Concepts
Summary
Basic Concepts
Summary
n0 n0 n1 n2
n1 n2 n3 n4 n5 n6
n3 n7 n8 n9
N = {n0, n1, n2, n3} N = {n0, n1, n2, n3 , n4, n5, n6 , n7, n8, n9}
N0 = {n0} N0 = {n0 , n1, n2}
Nf = {n3} Nf = {n7, n8, n9}
E = {(n0, n1), (n0, n2), (n1, n3), (n2, n3)} E = {(n0, n3), (n0, n4), (n1, n4), (n1, n5), …}
n0 n1 n2
n3 n4 n5 n6
n7 n8 n9
n0
n1 n2
n3
n4 n5
n6
a<b
n0 n1
a=b
a>b
n2 n3
Basic Concepts
Summary
1
true false
2 3
false
5
true
6
7 true
false 8
end
n0
n1
n2
n0
a b
n1 n2
c d
n3
e f
n4 n5
g h
n6
n0
n3
n1
n4
n2
n3
n1
n4
n2
Prime paths = {[n0, n1, n2], [n0, n1, n3, n4], [n1, n3,
n4, n1], [n3, n4, n1, n3], [n4, n1, n3, n4], [n3, n4, n1,
n2]}
Path (t1) = [n0, n1, n2]
Path (t2) = [n0, n1, n3, n4, n1, n3, n4, n1, n2]
T = {t1, t2}
S0 a b d Sf
1 2 5 6
S0 a b d Sf
3 4
1 2 5
S0 a b d Sf
4
c
0 1
4 5
len = 4
32. [2, 3, 1, 5, 6]!
1) [0, 1, 2, 3, 1, 5, 6]
2) [0, 1, 2, 3, 1, 2, 3, 1, 5, 6]
3) [0, 1, 5, 6]
4) [0, 4, 6]
5) [0, 4, 4, 6]
Basic Concepts
Summary
1 def={x, y, z, count}
def={}
use = {x}
2
x <= 0 x>0
def={}
use = {y}
3 5 def={z}
y<0 use = {x}
y >= 0
def={z} 4 6
use = {y, z} def={count, y}
use = {count, x, y, z}
count == 0
7 def={}
use = {z}
all-uses
n1 n2
0-1-3-4
0-1-3-5
n3
all-du-paths
0-1-3-4
use(4) = {x} n4 n5 use(5) = {x}
0-1-3-5
0-2-3-4
0-2-3-5
n6
x y count
t1 -2 2 1
t2 -2 -2 1
t3 2 2 1
t4 2 2 2
Basic Concepts
Summary
Prime Path
Coverage
All-du-paths
Coverage Edge-pair
Coverage
All-Uses
Coverage Edge Coverage
All-Defs
Coverage Node Coverage