Update hw5 to a newer version.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
parent
b24a264f7e
commit
9224001a22
262 changed files with 2575 additions and 1442 deletions
17
hw5/hw4programs/arrayargs3.oat
Normal file
17
hw5/hw4programs/arrayargs3.oat
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
int[] f(int[] x, int[] y, bool b) {
|
||||
if ( b ) {
|
||||
return x;
|
||||
} else {
|
||||
return y;
|
||||
}
|
||||
}
|
||||
|
||||
global x = new int[]{1, 2, 3};
|
||||
global y = new int[]{4, 5, 6};
|
||||
|
||||
|
||||
int program (int argc, string[] argv) {
|
||||
f(x, y, true)[0] = 17; /* non-trivial lhs path */
|
||||
var z = f(x, y, true)[0] + f(y, x, false)[0]; /* non-trivial expression paths */
|
||||
return z;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue