@Override public List<PExp> defaultSBinaryExp(SBinaryExp exp) throws AnalysisException { List<PExp> subs = exp.getLeft().apply(THIS); subs.addAll(exp.getRight().apply(THIS)); subs.add(exp); return subs; }
@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 public ValueList defaultSBinaryExp(SBinaryExp exp, ObjectContext ctxt) throws AnalysisException { ValueList list = exp.getLeft().apply(THIS, ctxt); list.addAll(exp.getRight().apply(THIS, ctxt)); return list; }
/************************* Defaults ***************************/ @Override public LexNameSet defaultSBinaryExp(SBinaryExp exp, FreeVarInfo info) throws AnalysisException { LexNameSet names = exp.getLeft().apply(this, info); names.addAll(exp.getRight().apply(this, info)); return names; }
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 LexNameList defaultSBinaryExp(SBinaryExp expression) throws org.overture.ast.analysis.AnalysisException { LexNameList list = af.createPExpAssistant().getOldNames(expression.getLeft()); list.addAll(af.createPExpAssistant().getOldNames(expression.getRight())); return list; }
@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; }
@Override public PExp defaultSBinaryExp(SBinaryExp node, Substitution question) throws AnalysisException { PExp subl = node.getLeft().clone().apply(main, question); PExp subr = node.getRight().clone().apply(main, question); node.setLeft(subl.clone()); node.setRight(subr.clone()); return node; }
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; }