/** * 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 new complete constructor {@code AIncrementStmIR} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param var_ the {@link SExpIR} node for the {@code var} child of this {@link AIncrementStmIR} node */ public AIncrementStmIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, SExpIR var_) { super(sourceNode_,tag_,metaData_); this.setVar(var_); }
/** * Essentially this.toString().equals(o.toString()). **/ @Override public boolean equals(Object o) { if (o != null && o instanceof AIncrementStmIR) { return toString().equals(o.toString()); } return false; }
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; }
/** * Called by the {@link AIncrementStmIR} node from {@link AIncrementStmIR#apply(IIsaAnalysis)}. * @param node the calling {@link AIncrementStmIR} node */ public void caseAIncrementStmIR(AIncrementStmIR node) throws AnalysisException { _visitedNodes.add(node); inAIncrementStmIR(node); if(node.getVar() != null && !_visitedNodes.contains(node.getVar())) { node.getVar().apply(this); } outAIncrementStmIR(node); }
col.setName(counterName); AIncrementStmIR inc = new AIncrementStmIR(); inc.setVar(col);
/** * Called by the {@link AIncrementStmIR} node from {@link AIncrementStmIR#apply(IAnalysis)}. * @param node the calling {@link AIncrementStmIR} node */ public void caseAIncrementStmIR(AIncrementStmIR node, Q question) throws AnalysisException { _visitedNodes.add(node); inAIncrementStmIR(node, question); if(node.getVar() != null && !_visitedNodes.contains(node.getVar())) { node.getVar().apply(this, question); } outAIncrementStmIR(node, question); }
/** * Called by the {@link AIncrementStmIR} node from {@link AIncrementStmIR#apply(IAnalysis)}. * @param node the calling {@link AIncrementStmIR} node */ public void caseAIncrementStmIR(AIncrementStmIR node) throws AnalysisException { _visitedNodes.add(node); inAIncrementStmIR(node); if(node.getVar() != null && !_visitedNodes.contains(node.getVar())) { node.getVar().apply(this); } outAIncrementStmIR(node); }
/** * 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; }
/** * Creates a new tree field only constructor {@code AIncrementStmIR TAG=increment} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param var_ the {@link SExpIR} node for the {@code var} child of this {@link AIncrementStmIR} node */ public AIncrementStmIR(SExpIR var_) { super(null,null,null); this.setVar(var_); }
/** * Called by the {@link AIncrementStmIR} node from {@link AIncrementStmIR#apply(IAnalysis)}. * @param node the calling {@link AIncrementStmIR} node */ public A caseAIncrementStmIR(AIncrementStmIR node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inAIncrementStmIR(node, question)); if(node.getVar() != null && !_visitedNodes.contains(node.getVar())) { mergeReturns(retVal,node.getVar().apply(this, question)); } mergeReturns(retVal,outAIncrementStmIR(node, question)); return retVal; }
/** * Called by the {@link AIncrementStmIR} node from {@link AIncrementStmIR#apply(IAnalysis)}. * @param node the calling {@link AIncrementStmIR} node */ public A caseAIncrementStmIR(AIncrementStmIR node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inAIncrementStmIR(node)); if(node.getVar() != null && !_visitedNodes.contains(node.getVar())) { mergeReturns(retVal,node.getVar().apply(this)); } mergeReturns(retVal,outAIncrementStmIR(node)); return retVal; }