Example CBV
int p = 2;
int q = 3;
int f1(int b, int c) { // 2 3 || 2 3 || 3 3
b=2*c; //b=2*3 ||b=2*3||b=2*3
c=5+b;//c=5+6||c=5+6 ||c=5+6
} returnb+c;//6+11=17||6+11=17 ||6+11=17
int f2( int a) { // 3
} return f1(a, a); // 17
print f1(p,q) // 17 print p, q // 2 3 f1(p,q) // 17
print f2(q) // 17 print p, q // 2 3
1
Example CB- Reference
int p = 2;
int q = 3;
int f1(int b, int c) { // 2 3 || 6 11 || 27 27
b=2*c; //b=2*3 ||b=2*11||b=2*27
c=5+b;//c=5+6||c=5+22 ||c=5+54
} returnb+c;//6+11=17||22+27=49 ||59+59=118(notebandcarealiases)
int f2( int a) { // 27
} return f1(a, a); // 118
print f1(p,q) // 17 print p, q // 6 11 f1(p,q) // 49
print f2(q) // 118 print p, q // 22 59
2
Example CB-Value Result
int p = 2;
int q = 3;
int f1(int b, int c) { // 2 3 || 6 11 || 27 27
b=2*c; //b=2*3 ||b=2*11||b=2*27
c=5+b;//c=5+6||c=5+22 ||c=5+54
} returnb+c;//6+11=17||22+27=49 ||54+59=113(notebandcarenotaliases)
int f2( int a) { // 27
} return f1(a, a); // 113
print f1(p,q) // 17 print p, q // 6 11 f1(p,q) // 49
print f2(q) // 113 print p, q // 22 59
3
CB-value: 17, 2, 3, 17, 2, 3
CB-reference: 17, 6, 11, 118, 22, 59
CB-Value-Result: 17, 6, 11, 113, 22, 59.
4