/** * Called by the {@link ARangeResToBinaryExp} node from {@link ARangeResToBinaryExp#apply(IAnalysis)}. * @param node the calling {@link ARangeResToBinaryExp} node */ public void caseARangeResToBinaryExp(ARangeResToBinaryExp node, Q question) throws AnalysisException { _visitedNodes.add(node); inARangeResToBinaryExp(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); } outARangeResToBinaryExp(node, question); }
/** * Called by the {@link ARangeResToBinaryExp} node from {@link ARangeResToBinaryExp#apply(IPOFAnalysis)}. * @param node the calling {@link ARangeResToBinaryExp} node */ public void caseARangeResToBinaryExp(ARangeResToBinaryExp node) throws AnalysisException { _visitedNodes.add(node); inARangeResToBinaryExp(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); } outARangeResToBinaryExp(node); }
/** * Called by the {@link ARangeResToBinaryExp} node from {@link ARangeResToBinaryExp#apply(IAnalysis)}. * @param node the calling {@link ARangeResToBinaryExp} node */ public void caseARangeResToBinaryExp(ARangeResToBinaryExp node) throws AnalysisException { _visitedNodes.add(node); inARangeResToBinaryExp(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); } outARangeResToBinaryExp(node); }
/** * Called by the {@link ARangeResToBinaryExp} node from {@link ARangeResToBinaryExp#apply(IAnalysis)}. * @param node the calling {@link ARangeResToBinaryExp} node */ public A caseARangeResToBinaryExp(ARangeResToBinaryExp node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inARangeResToBinaryExp(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,outARangeResToBinaryExp(node, question)); return retVal; }
/** * Called by the {@link ARangeResToBinaryExp} node from {@link ARangeResToBinaryExp#apply(IAnalysis)}. * @param node the calling {@link ARangeResToBinaryExp} node */ public A caseARangeResToBinaryExp(ARangeResToBinaryExp node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inARangeResToBinaryExp(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,outARangeResToBinaryExp(node)); return retVal; }
@Override public Value caseARangeResToBinaryExp(ARangeResToBinaryExp node, Context ctxt) throws AnalysisException { // breakpoint.check(location, ctxt); node.getLocation().hit(); // Mark as covered ValueSet set = null; ValueMap map = null; try { set = node.getRight().apply(VdmRuntime.getExpressionEvaluator(), ctxt).setValue(ctxt); map = node.getLeft().apply(VdmRuntime.getExpressionEvaluator(), ctxt).mapValue(ctxt); } catch (ValueException e) { return VdmRuntimeError.abort(node.getLocation(), e); } ValueMap modified = new ValueMap(map); for (Value k : map.keySet()) { if (!set.contains(map.get(k))) { modified.remove(k); } } return new MapValue(modified); }