
Test Generation from Requirements
Program P2.3
1 begin
2 int
a, b, c, d, r, e
;
3 input (
r, e
);
4 getParam(
r, e
);
5 if(
e
<0)
6 then
7 task1(
a, b
);
8 else
9 if(
a
<
b
&&
c
>
d
)
10 then
11 task2(
C, D
);
12 else
13 task3(
c, d
);
14 end
Suppose that the BOR-CSET procedure has been used to gen-
erate BOR constraints from the predicate a < b&&c > d. Satisfying
these constraints would be relatively easier if the parameters a, b, c,
and d were program inputs. However, as is the case in our exam-
ple program, these four parameters depend on the values of r and e.
Thus, satisfying these constraints will require a determination of the
relationship between r, e, and the four parameters ...