factory.addLabel(counterLabel);
factory.addStatement(new IfStatement(new CmpGE(counter, length), exitLabel, bodyLabel));
// start the body here
factory.addLabel(bodyLabel);
factory.addStatement(new Assignment(elementVariable, new ElementAccess(vector, counter)));
LoopContext loopContext = new LoopContext(nextLabel, exitLabel);
factory.translateStatements(loopContext, body);
// increment the counter