Predicate Analysis Flashcards
A program contains a domain error if on an input it follows an incorrect path due to incorrect condition or incorrect computation
Domain testing
Where are the requirements for domain testing extracted from?
Code
Consists of a set of predicates that occur along the path in conditional or a loop statement
Path condition
Consists of one or more border segments
Boundary
How many borders are there corresponding to each predicate in the path condition
1
An error in any of the predicates in a path condition leads to a…
Border shift
Operators ≤, ≥, and = are associated with:
Closed border
T/F Points that lie on the closed border are part of the path domain
T
T/F Points that lie on the open border are not part of the path domain
T
A domain error occurs because of an unintended shift in the border
Border shifts
Must satisfy the path condition associated with the border
ON point
must be as close as possible to the ON point for that border
OFF point
T/F Only one ON and one OFF point are needed for inequalities
T
T/F One ON and two OFF points are needed for = and ≠ constraints
T
Models dependency relationships among program input conditions (causes) and output conditions (effects)
Cause-Effect graphing
What is cause-effect graphing expressed as?
Boolean Expression
One constraint on effects
Masking
T/F With masking, both effects cannot occur for the same state of the program
T
Avoid Combinatorial Explosion
OR/AND heuristics
T/F Only one ON and two OFF point are needed for inequalities
F, one OFF point
T/F Points that lie on the closed border are not part of the path domain
F, they are
T/F With masking, both effects can occur for the same state of the program
F, they cannot
T/F Points that lie on the open border are part of the path domain
F, are not
Operators >, less than, and not equal to are associated with:
Open border
T/F OFF points are on opposite sides of the border
T