/** * Returns a deep clone of this {@link AIncrementStmIR} node. * @return a deep clone of this {@link AIncrementStmIR} node */ public AIncrementStmIR clone() { return new AIncrementStmIR( _sourceNode, _tag, _metaData, cloneNode(_var) ); }
/** * Creates a deep clone of this {@link AIncrementStmIR} node while putting all * old node-new node relations in the map {@code oldToNewMap}. * @param oldToNewMap the map filled with the old node-new node relation * @return a deep clone of this {@link AIncrementStmIR} node */ public AIncrementStmIR clone(Map<INode,INode> oldToNewMap) { AIncrementStmIR node = new AIncrementStmIR( _sourceNode, _tag, _metaData, cloneNode(_var, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
public AIfStmIR consConditionalIncrement(String counterName, SExpIR predicate) { AIdentifierVarExpIR col = new AIdentifierVarExpIR(); col.setType(new AIntNumericBasicTypeIR()); col.setIsLambda(false); col.setIsLocal(true); col.setName(counterName); AIncrementStmIR inc = new AIncrementStmIR(); inc.setVar(col); AIfStmIR ifStm = new AIfStmIR(); ifStm.setIfExp(predicate); ifStm.setThenStm(inc); return ifStm; }
col.setName(counterName); AIncrementStmIR inc = new AIncrementStmIR(); inc.setVar(col);