/** * Called by the {@link ADivNumericBinaryExp} node from {@link ADivNumericBinaryExp#apply(IAnalysis)}. * @param node the calling {@link ADivNumericBinaryExp} node */ public void caseADivNumericBinaryExp(ADivNumericBinaryExp node, Q question) throws AnalysisException { _visitedNodes.add(node); inADivNumericBinaryExp(node, question); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this, question); } if(node.getLeft() != null && !_visitedNodes.contains(node.getLeft())) { node.getLeft().apply(this, question); } if(node.getOp() != null ) { node.getOp().apply(this, question); } if(node.getRight() != null && !_visitedNodes.contains(node.getRight())) { node.getRight().apply(this, question); } outADivNumericBinaryExp(node, question); }
@Override public PType caseADivNumericBinaryExp(ADivNumericBinaryExp node, TypeCheckInfo question) throws AnalysisException { checkNumeric(node, THIS, question.newConstraint(null)); node.setType(AstFactory.newAIntNumericBasicType(node.getLocation())); return node.getType(); }
/** * Called by the {@link ADivNumericBinaryExp} node from {@link ADivNumericBinaryExp#apply(IAnalysis)}. * @param node the calling {@link ADivNumericBinaryExp} node */ public void caseADivNumericBinaryExp(ADivNumericBinaryExp node) throws AnalysisException { _visitedNodes.add(node); inADivNumericBinaryExp(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getLeft() != null && !_visitedNodes.contains(node.getLeft())) { node.getLeft().apply(this); } if(node.getOp() != null ) { node.getOp().apply(this); } if(node.getRight() != null && !_visitedNodes.contains(node.getRight())) { node.getRight().apply(this); } outADivNumericBinaryExp(node); }
/** * Called by the {@link ADivNumericBinaryExp} node from {@link ADivNumericBinaryExp#apply(IPOFAnalysis)}. * @param node the calling {@link ADivNumericBinaryExp} node */ public void caseADivNumericBinaryExp(ADivNumericBinaryExp node) throws AnalysisException { _visitedNodes.add(node); inADivNumericBinaryExp(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getLeft() != null && !_visitedNodes.contains(node.getLeft())) { node.getLeft().apply(this); } if(node.getOp() != null ) { node.getOp().apply(this); } if(node.getRight() != null && !_visitedNodes.contains(node.getRight())) { node.getRight().apply(this); } outADivNumericBinaryExp(node); }
/** * Called by the {@link ADivNumericBinaryExp} node from {@link ADivNumericBinaryExp#apply(IAnalysis)}. * @param node the calling {@link ADivNumericBinaryExp} node */ public A caseADivNumericBinaryExp(ADivNumericBinaryExp node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inADivNumericBinaryExp(node, question)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this, question)); } if(node.getLeft() != null && !_visitedNodes.contains(node.getLeft())) { mergeReturns(retVal,node.getLeft().apply(this, question)); } if(node.getOp() != null ) { mergeReturns(retVal,node.getOp().apply(this, question)); } if(node.getRight() != null && !_visitedNodes.contains(node.getRight())) { mergeReturns(retVal,node.getRight().apply(this, question)); } mergeReturns(retVal,outADivNumericBinaryExp(node, question)); return retVal; }
/** * Called by the {@link ADivNumericBinaryExp} node from {@link ADivNumericBinaryExp#apply(IAnalysis)}. * @param node the calling {@link ADivNumericBinaryExp} node */ public A caseADivNumericBinaryExp(ADivNumericBinaryExp node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inADivNumericBinaryExp(node)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this)); } if(node.getLeft() != null && !_visitedNodes.contains(node.getLeft())) { mergeReturns(retVal,node.getLeft().apply(this)); } if(node.getOp() != null ) { mergeReturns(retVal,node.getOp().apply(this)); } if(node.getRight() != null && !_visitedNodes.contains(node.getRight())) { mergeReturns(retVal,node.getRight().apply(this)); } mergeReturns(retVal,outADivNumericBinaryExp(node)); return retVal; }