@Override public List<PExp> caseAIfExp(AIfExp exp) throws AnalysisException { List<PExp> subs = exp.getTest().apply(THIS); subs.addAll(exp.getThen().apply(THIS)); for (AElseIfExp elif : exp.getElseList()) { subs.addAll(elif.apply(THIS)); } if (exp.getElse() != null) { subs.addAll(exp.getElse().apply(THIS)); } subs.add(exp); return subs; }
e.apply(this);
e.apply(this, question);
e.apply(this);
mergeReturns(retVal,e.apply(this));
mergeReturns(retVal,e.apply(this, question));
@Override public ValueList caseAIfExp(AIfExp exp, ObjectContext ctxt) throws AnalysisException { ValueList list = exp.getTest().apply(THIS, ctxt); list.addAll(exp.getThen().apply(THIS, ctxt)); for (AElseIfExp elif : exp.getElseList()) { list.addAll(elif.apply(THIS, ctxt)); } if (exp.getElse() != null) { list.addAll(exp.getElse().apply(THIS, ctxt)); } return list; }
found = stmt.apply(THIS, lineno); if (found != null)
@Override public IProofObligationList caseAIfExp(AIfExp node, IPOContextStack question) throws AnalysisException { IProofObligationList obligations = node.getTest().apply(mainVisitor, question); question.push(new POImpliesContext(node.getTest())); obligations.addAll(node.getThen().apply(mainVisitor, question)); question.pop(); question.push(new PONotImpliesContext(node.getTest())); for (AElseIfExp e : node.getElseList()) { obligations.addAll(e.apply(mainVisitor, question)); question.push(new PONotImpliesContext(e.getElseIf())); } int sizeBefore = question.size(); obligations.addAll(node.getElse().apply(mainVisitor, question)); assert sizeBefore <= question.size(); for (int i = 0; i < node.getElseList().size(); i++) { question.pop(); } question.pop(); return obligations; }