@Override public void caseACallObjectExpStmIR(ACallObjectExpStmIR node) throws AnalysisException { if (node.getObj() instanceof SVarExpIR) { SVarExpIR obj = (SVarExpIR) node.getObj(); handleStateUpdate(node, obj); } else if (node.getObj() instanceof ACastUnaryExpIR) { ACastUnaryExpIR cast = (ACastUnaryExpIR) node.getObj(); if (cast.getExp() instanceof SVarExpIR) { SVarExpIR obj = (SVarExpIR) cast.getExp(); handleStateUpdate(node, obj); } else { log.error("Expected subject of cast expression to be a variable expression at this point. Got: " + cast.getExp()); } } else { log.error("Expected object of call object statement " + " to be a variable or cast expression by now. Got: " + node.getObj()); } }
/** * Called by the {@link ACallObjectExpStmIR} node from {@link ACallObjectExpStmIR#apply(IIsaAnalysis)}. * @param node the calling {@link ACallObjectExpStmIR} node */ public void caseACallObjectExpStmIR(ACallObjectExpStmIR node) throws AnalysisException { _visitedNodes.add(node); inACallObjectExpStmIR(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getObj() != null && !_visitedNodes.contains(node.getObj())) { node.getObj().apply(this); } { List<SExpIR> copy = new ArrayList<SExpIR>(node.getArgs()); for( SExpIR e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } outACallObjectExpStmIR(node); }
/** * Called by the {@link ACallObjectExpStmIR} node from {@link ACallObjectExpStmIR#apply(IAnalysis)}. * @param node the calling {@link ACallObjectExpStmIR} node */ public void caseACallObjectExpStmIR(ACallObjectExpStmIR node) throws AnalysisException { _visitedNodes.add(node); inACallObjectExpStmIR(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getObj() != null && !_visitedNodes.contains(node.getObj())) { node.getObj().apply(this); } { List<SExpIR> copy = new ArrayList<SExpIR>(node.getArgs()); for( SExpIR e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } outACallObjectExpStmIR(node); }
/** * Called by the {@link ACallObjectExpStmIR} node from {@link ACallObjectExpStmIR#apply(IAnalysis)}. * @param node the calling {@link ACallObjectExpStmIR} node */ public void caseACallObjectExpStmIR(ACallObjectExpStmIR node, Q question) throws AnalysisException { _visitedNodes.add(node); inACallObjectExpStmIR(node, question); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this, question); } if(node.getObj() != null && !_visitedNodes.contains(node.getObj())) { node.getObj().apply(this, question); } { List<SExpIR> copy = new ArrayList<SExpIR>(node.getArgs()); for( SExpIR e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this, question); } } } outACallObjectExpStmIR(node, question); }
/** * Called by the {@link ACallObjectExpStmIR} node from {@link ACallObjectExpStmIR#apply(IAnalysis)}. * @param node the calling {@link ACallObjectExpStmIR} node */ public A caseACallObjectExpStmIR(ACallObjectExpStmIR node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inACallObjectExpStmIR(node, question)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this, question)); } if(node.getObj() != null && !_visitedNodes.contains(node.getObj())) { mergeReturns(retVal,node.getObj().apply(this, question)); } { List<SExpIR> copy = new ArrayList<SExpIR>(node.getArgs()); for( SExpIR e : copy) { if(!_visitedNodes.contains(e)) { mergeReturns(retVal,e.apply(this, question)); } } } mergeReturns(retVal,outACallObjectExpStmIR(node, question)); return retVal; }
/** * Called by the {@link ACallObjectExpStmIR} node from {@link ACallObjectExpStmIR#apply(IAnalysis)}. * @param node the calling {@link ACallObjectExpStmIR} node */ public A caseACallObjectExpStmIR(ACallObjectExpStmIR node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inACallObjectExpStmIR(node)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this)); } if(node.getObj() != null && !_visitedNodes.contains(node.getObj())) { mergeReturns(retVal,node.getObj().apply(this)); } { List<SExpIR> copy = new ArrayList<SExpIR>(node.getArgs()); for( SExpIR e : copy) { if(!_visitedNodes.contains(e)) { mergeReturns(retVal,e.apply(this)); } } } mergeReturns(retVal,outACallObjectExpStmIR(node)); return retVal; }
call.getObj().apply(new CallObjTraceLocalizer(getTransAssist(), traceTrans.getTracePrefixes(), traceEnclosingClass)); } catch (AnalysisException e)
public boolean simpleRecSetCallOutsideAtomic(ACallObjectExpStmIR node) { if (handler.getInvTrans().getJmlGen().getJavaGen().getInfo().getStmAssistant().inAtomic(node)) { return false; } SExpIR obj = node.getObj(); if (!(obj.getType() instanceof ARecordTypeIR)) { return false; } if (obj instanceof SVarExpIR) { return true; } if (obj instanceof ACastUnaryExpIR && ((ACastUnaryExpIR) obj).getExp() instanceof SVarExpIR) { return true; } return false; }
SExpIR recObj = node.getObj();
SExpIR obj = callObj.getObj(); String field = callObj.getFieldName(); LinkedList<SExpIR> args = callObj.getArgs();
if (callObjStm.getObj() == exp)
setCall.getObj().apply(this); inTarget = false;
SExpIR objExp = node.getObj();