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