@Override public LexNameSet caseATixeStm(ATixeStm node, FreeVarInfo info) throws AnalysisException { return node.getBody().apply(this, info); }
/** * 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(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) 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, 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; }
/** * 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; }
@Override public PExp caseATixeStm(ATixeStm stm, Integer lineno) throws AnalysisException { PExp found = stm.getBody().apply(THIS, lineno);// PStmAssistantInterpreter.findExpression(stm.getBody(), // lineno); if (found != null) { return found; } for (ATixeStmtAlternative tsa : stm.getTraps()) { found = tsa.getStatement().apply(THIS, lineno);// PStmAssistantInterpreter.findExpression(tsa.getStatement(), // lineno); if (found != null) { break; } } return found; }
@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; }
@Override public PTypeSet caseATixeStm(ATixeStm statement) throws AnalysisException { PTypeSet types = new PTypeSet(af); types.addAll(statement.getBody().apply(THIS)); for (ATixeStmtAlternative tsa : statement.getTraps()) { types.addAll(exitCheck(tsa)); } return types; }
@Override public PStm caseATixeStm(ATixeStm stm, Integer lineno) throws AnalysisException { PStm found = findStatementBaseCase(stm, lineno); if (found != null) { return found; } found = stm.getBody().apply(THIS, lineno);// PStmAssistantInterpreter.findStatement(stm.getBody(), lineno); if (found != null) { return found; } for (ATixeStmtAlternative tsa : stm.getTraps()) { found = tsa.getStatement().apply(THIS, lineno);// PStmAssistantInterpreter.findStatement(tsa.getStatement(), // lineno); if (found != null) { break; } } return found; }
rv = node.getBody().apply(VdmRuntime.getStatementEvaluator(), ctxt); } catch (ExitException original)
obligations.addAll(node.getBody().apply(rootVisitor, question)); return obligations; } catch (Exception e)