![]() |
void main(){
int sum = 0;
int i = 1;
while (i<11) {
sum = add(sum,i);
i = add(i, 1);
}
printf(“sum=%d\n”, sum);
printf(“i=%d\n”, i);
}
static int add(int a, int b){
return (a+b);
} |
| System Dependence Graph. In the deep-structure representation, the flow of data between statements, and the way in which one statement controls whether another statement executes, are represented by edges between program points in a structure known as the system dependence graph, or SDG for short. The portion of the SDG for an individual function is known as a procedure dependence graph, or PDG for short. In the illustration above, control dependence edges are shown in blue and data dependence edges are shown in green. Intraprocedural dependences are shown with solid lines while interprocedural dependences are shown with dashed lines. The System Dependence Graph is one of the many program representations calculated by CodeSurfer. |
|