a2-solns

a2-solns - Software Testing, Quality Assurance &...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Maintenance (ECE453/CS447/SE465): Assignment 2 Solutions Patrick Lam Question 2 (12 points) Predicate 1 a ( b c ) Determination analysis: a determines p iff [ true ( b c )] [ false ( b c )] ( b c ) false ( b c ) i.e. b : false ,c : false or b : true ,c : true . b determines p iff [ a ( true c )] [ a ( false c )] a c a ∧ ¬ c i.e. a c = true and a ∧ ¬ c = false , so a : true ,c : true ; or a c = false and a ∧ ¬ c = true , so a : true ,c : false . c determines p : symmetric to b , need a : true ,b : true or a : true ,b : false . Here is the truth table: 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
a ( b c ) p a det? b det? c det? 1 true true true true X X X 2 true true false false X X 3 true false true false X X 4 true false false true X X X 5 false true true false X 6 false true false false 7 false false true false 8 false false false false X GACC pairs: for a , we need one from { 1 , 4 } and one from { 5 , 8 } ; for b , we need one from { 1 , 2 } and one from { 3 , 4 } , and for c we need one from { 1 , 3 } and one from { 2 , 4 } . CACC pairs: same as GACC for a ; for b , possibilities are (1 , 3) , (2 , 4); for c , possibilities are (1 , 2) and (3 , 4). RACC pairs: for a , have (1 , 5) and (4 , 8); for b , have (1 , 3) , (2 , 4); for c , have (1 , 2) and (3 , 4). GICC and hence RICC are infeasible for all clauses: p is always false when the major clause does not determine the predicate. Predicate 2 a ( b c ) d Determination analysis: by using the textbook result on a ∨ * , we see that a determines p iff ( b c ) d is false; that is, d : false and at least one of b,c are false, so the possibilities are h b : false ,c : true ,d : false i ; h b : true ,c : false ,d : false i ; or h b : true ,c : true ,d : false i . Symmetrically, d determines p when h a : false ,b : false ,c : true i ; h a : false ,b : true ,c : false ; or h a : false ,b : true ,c : true . For b , we carry out the analysis: a ( c ) d a ( false c ) d 2
Background image of page 2
( a d ) c ( a d ) so we need a d true, a d c false, which is impossible; or a d false, a d c true, giving h a : false ,c : true ,d : false i . Symmetrically for c we need h a : false ,b : true ,d : true i . a ( b c ) d p a det? b det? c det? d det? 1 true true true true true 2 true true true false true 3 true true false true true 4 true true false false true X 5 true false true true true 6 true false true false true X 7 true false false true true 8 true false false false true X 9 false true true true true 10 false true true false true X X 11 false true false true true X 12 false true false false false X X X 13 false false true true true X 14 false false true false false X X X 15 false false false true true X 16 false false false false false X X GACC: for a , need one of { 4 , 6 , 8 } and one of { 12 , 14 , 16 } . For b , must use h 10 , 14 i . For c , must use
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 14

a2-solns - Software Testing, Quality Assurance &...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online