Lab for Automated Reasoning and Analysis LARA

Translate manually into bytecodes using the techniques in Compilation as Tree Transformation:

  • First translate the while loop to $branch$ instructions.
  • Give code for the loop
  • Take care of the rest

b should be treated as a member of the current class.

boolean b;
int f(int x, int y, int z) {
  while ((!b && (x > 2*(y+z))) || (x < 2*y +z)) {
    x = x +3;
  }
  return x;
}

Solution

 
cc09/homework_08.txt · Last modified: 2009/11/19 20:23 by losa
 
© EPFL 2018 - Legal notice