@Override public void caseATixeStm(ATixeStm node) throws AnalysisException { if (node.getBody() != null) { node.getBody().apply(this); } // The trap alternatives will be responsible for opening/ending the scope for (ATixeStmtAlternative trap : node.getTraps()) { trap.apply(this); } }
/** * Called by the {@link ATixeStm} node from {@link ATixeStm#apply(IPOFAnalysis)}. * @param node the calling {@link ATixeStm} node */ public void caseATixeStm(ATixeStm node) throws AnalysisException { _visitedNodes.add(node); inATixeStm(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } { List<ATixeStmtAlternative> copy = new ArrayList<ATixeStmtAlternative>(node.getTraps()); for( ATixeStmtAlternative e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } if(node.getBody() != null && !_visitedNodes.contains(node.getBody())) { node.getBody().apply(this); } outATixeStm(node); }
/** * Called by the {@link ATixeStm} node from {@link ATixeStm#apply(IAnalysis)}. * @param node the calling {@link ATixeStm} node */ public void caseATixeStm(ATixeStm node, Q question) throws AnalysisException { _visitedNodes.add(node); inATixeStm(node, question); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this, question); } { List<ATixeStmtAlternative> copy = new ArrayList<ATixeStmtAlternative>(node.getTraps()); for( ATixeStmtAlternative e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this, question); } } } if(node.getBody() != null && !_visitedNodes.contains(node.getBody())) { node.getBody().apply(this, question); } outATixeStm(node, question); }
/** * Called by the {@link ATixeStm} node from {@link ATixeStm#apply(IAnalysis)}. * @param node the calling {@link ATixeStm} node */ public void caseATixeStm(ATixeStm node) throws AnalysisException { _visitedNodes.add(node); inATixeStm(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } { List<ATixeStmtAlternative> copy = new ArrayList<ATixeStmtAlternative>(node.getTraps()); for( ATixeStmtAlternative e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } if(node.getBody() != null && !_visitedNodes.contains(node.getBody())) { node.getBody().apply(this); } outATixeStm(node); }
/** * Called by the {@link ATixeStm} node from {@link ATixeStm#apply(IAnalysis)}. * @param node the calling {@link ATixeStm} node */ public A caseATixeStm(ATixeStm node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inATixeStm(node)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this)); } { List<ATixeStmtAlternative> copy = new ArrayList<ATixeStmtAlternative>(node.getTraps()); for( ATixeStmtAlternative e : copy) { if(!_visitedNodes.contains(e)) { mergeReturns(retVal,e.apply(this)); } } } if(node.getBody() != null && !_visitedNodes.contains(node.getBody())) { mergeReturns(retVal,node.getBody().apply(this)); } mergeReturns(retVal,outATixeStm(node)); return retVal; }
/** * Called by the {@link ATixeStm} node from {@link ATixeStm#apply(IAnalysis)}. * @param node the calling {@link ATixeStm} node */ public A caseATixeStm(ATixeStm node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inATixeStm(node, question)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this, question)); } { List<ATixeStmtAlternative> copy = new ArrayList<ATixeStmtAlternative>(node.getTraps()); for( ATixeStmtAlternative e : copy) { if(!_visitedNodes.contains(e)) { mergeReturns(retVal,e.apply(this, question)); } } } if(node.getBody() != null && !_visitedNodes.contains(node.getBody())) { mergeReturns(retVal,node.getBody().apply(this, question)); } mergeReturns(retVal,outATixeStm(node, question)); return retVal; }
@Override public PType caseATixeStm(ATixeStm node, TypeCheckInfo question) throws AnalysisException { PType rt = node.getBody().apply(THIS, question); PTypeSet extypes = exitCheck(node.getBody(), question); if (!extypes.isEmpty()) { PType union = extypes.getType(node.getLocation()); for (ATixeStmtAlternative tsa : node.getTraps()) { tsa.setExp(union); tsa.apply(THIS, question); } } node.setType(rt); return rt; }
obligations.addAll(alt.apply(rootVisitor, question));