graph.addEdge(x.getOutputPort(0), adder.getInputPort(0));
graph.addEdge(x.getOutputPort(0), multiplier.getInputPort(0));
graph.addEdge(y.getOutputPort(0), adder.getInputPort(1));
graph.addEdge(y.getOutputPort(0), multiplier.getInputPort(1));
graph.addEdge(const0.getOutputPort(0), ifNode.getInputPort(0));
graph.addEdge(ifNode.getControlOutPorts().get(0), adder
.getControlInPort());
graph.addEdge(ifNode.getControlOutPorts().get(1), multiplier
.getControlInPort());
graph.addEdge(adder.getOutputPort(0), endif.getInputPort(0));
graph.addEdge(multiplier.getOutputPort(0), endif.getInputPort(1));