public OrderedObligation(SBinaryExp node, List<PType> types, IPOContextStack ctxt,IPogAssistantFactory af) throws AnalysisException { super(node, POType.ORDERED,ctxt,node.getLocation(),af); PExp lExp = node.getLeft(); PExp rExp = node.getRight(); PExp r = stitchIsExps(types,lExp,rExp); valuetree.setPredicate(ctxt.getPredWithContext(r)); }
public SExpIR handleBinaryExp(SBinaryExp vdmExp, SBinaryExpIR codeGenExp, IRInfo question) throws AnalysisException { PType type = vdmExp.getType(); STypeIR typeCg = type != null ? type.apply(question.getTypeVisitor(), question) : null; codeGenExp.setType(typeCg); PExp vdmExpLeft = vdmExp.getLeft(); PExp vdmExpRight = vdmExp.getRight(); SExpIR leftExpCg = vdmExpLeft.apply(question.getExpVisitor(), question); SExpIR rightExpCg = vdmExpRight.apply(question.getExpVisitor(), question); codeGenExp.setLeft(leftExpCg); codeGenExp.setRight(rightExpCg); return codeGenExp; }
@Override public ILexLocation defaultSBinaryExp(SBinaryExp node) throws AnalysisException { return node.getLocation(); }
@Override public PExp defaultSBinaryExp(SBinaryExp exp, Integer lineno) throws AnalysisException { PExp found = exp.getLeft().apply(THIS, lineno);// PExpAssistantInterpreter.findExpression(exp.getLeft(), // lineno); if (found != null) { return found; } return exp.getRight().apply(THIS, lineno);// PExpAssistantInterpreter.findExpression(exp.getRight(), lineno); }
@Override // RWL public IProofObligationList defaultSBinaryExp(SBinaryExp node, IPOContextStack question) throws AnalysisException { IProofObligationList obligations = new ProofObligationList(); obligations.addAll(node.getLeft().apply(mainVisitor, question)); obligations.addAll(node.getRight().apply(mainVisitor, question)); return obligations; }