inAOrdRelation(node); if(node.getLhsPattern() != null && !_visitedNodes.contains(node.getLhsPattern())) node.getLhsPattern().apply(this); if(node.getRhsPattern() != null && !_visitedNodes.contains(node.getRhsPattern())) node.getRhsPattern().apply(this); if(node.getRelExp() != null && !_visitedNodes.contains(node.getRelExp())) node.getRelExp().apply(this); if(node.getRelDef() != null && !_visitedNodes.contains(node.getRelDef())) node.getRelDef().apply(this); if(node.getMinDef() != null && !_visitedNodes.contains(node.getMinDef())) node.getMinDef().apply(this); if(node.getMaxDef() != null && !_visitedNodes.contains(node.getMaxDef())) node.getMaxDef().apply(this);
/** * Creates a new complete constructor {@code AOrdRelation} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param minDef_ the {@link AExplicitFunctionDefinition} node for the {@code minDef} child of this {@link AOrdRelation} node * @param maxDef_ the {@link AExplicitFunctionDefinition} node for the {@code maxDef} child of this {@link AOrdRelation} node */ public AOrdRelation(ILexLocation location_, PPattern lhsPattern_, PPattern rhsPattern_, PExp relExp_, AExplicitFunctionDefinition relDef_, AExplicitFunctionDefinition minDef_, AExplicitFunctionDefinition maxDef_) { super(location_,lhsPattern_,rhsPattern_,relExp_,relDef_); this.setMinDef(minDef_); this.setMaxDef(maxDef_); }
@Override public PType caseAOrdRelation(AOrdRelation node, TypeCheckInfo question) throws AnalysisException { // Do not report TC errors for Min or Max. Just confusing. TypeChecker.suppressErrors(true); node.getMinDef().apply(THIS,question); node.getMaxDef().apply(THIS,question); TypeChecker.suppressErrors(false); return node.getRelDef().apply(THIS, question); }
node.getOrdRelation().apply(this);
@Override public IProofObligationList caseATypeDefinition(ATypeDefinition node, IPOContextStack question) throws AnalysisException { try { IProofObligationList list = new ProofObligationList(); AExplicitFunctionDefinition invDef = node.getInvdef(); if (invDef != null) { list.addAll(invDef.apply(mainVisitor, question)); list.add(new SatisfiabilityObligation(node, question, assistantFactory)); } if (node.getOrdRelation() != null) { list.addAll(node.getOrdRelation().getRelExp().apply(mainVisitor,question)); list.add(new StrictOrderRelationObligation(node, question, assistantFactory)); } if (node.getEqRelation() != null) { list.addAll(node.getEqRelation().getRelExp().apply(mainVisitor,question)); list.add(new EquivalenceRelationObligation(node,question,assistantFactory)); } return list; } catch (Exception e) { throw new POException(node, e.getMessage()); } }
if (def.getOrdRelation() != null && def.getOrdRelation().getRelDef() != null) PExp found = def.getOrdRelation().getRelDef().apply(THIS, lineno); if (found != null) if (def.getOrdRelation() != null && def.getOrdRelation().getMinDef() != null) PExp found = def.getOrdRelation().getMinDef().apply(THIS, lineno); if (found != null) if (def.getOrdRelation() != null && def.getOrdRelation().getMaxDef() != null) PExp found = def.getOrdRelation().getMaxDef().apply(THIS, lineno); if (found != null)
node.getOrdRelation().apply(this, question);
inAOrdRelation(node, question); if(node.getLhsPattern() != null && !_visitedNodes.contains(node.getLhsPattern())) node.getLhsPattern().apply(this, question); if(node.getRhsPattern() != null && !_visitedNodes.contains(node.getRhsPattern())) node.getRhsPattern().apply(this, question); if(node.getRelExp() != null && !_visitedNodes.contains(node.getRelExp())) node.getRelExp().apply(this, question); if(node.getRelDef() != null && !_visitedNodes.contains(node.getRelDef())) node.getRelDef().apply(this, question); if(node.getMinDef() != null && !_visitedNodes.contains(node.getMinDef())) node.getMinDef().apply(this, question); if(node.getMaxDef() != null && !_visitedNodes.contains(node.getMaxDef())) node.getMaxDef().apply(this, question);
if (def.getOrdRelation() != null && def.getOrdRelation().getRelDef() != null) FunctionValue func = new FunctionValue(def.getOrdRelation().getRelDef(), null, null, initialContext); nvl.add(new NameValuePair(def.getOrdRelation().getRelDef().getName(), func)); if (def.getOrdRelation() != null && def.getOrdRelation().getMinDef() != null) FunctionValue func = new FunctionValue(def.getOrdRelation().getMinDef(), null, null, initialContext); nvl.add(new NameValuePair(def.getOrdRelation().getMinDef().getName(), func)); if (def.getOrdRelation() != null && def.getOrdRelation().getMaxDef() != null) FunctionValue func = new FunctionValue(def.getOrdRelation().getMaxDef(), null, null, initialContext); nvl.add(new NameValuePair(def.getOrdRelation().getMaxDef().getName(), func));
node.getOrdRelation().apply(this);
inAOrdRelation(node); if(node.getLhsPattern() != null && !_visitedNodes.contains(node.getLhsPattern())) node.getLhsPattern().apply(this); if(node.getRhsPattern() != null && !_visitedNodes.contains(node.getRhsPattern())) node.getRhsPattern().apply(this); if(node.getRelExp() != null && !_visitedNodes.contains(node.getRelExp())) node.getRelExp().apply(this); if(node.getRelDef() != null && !_visitedNodes.contains(node.getRelDef())) node.getRelDef().apply(this); if(node.getMinDef() != null && !_visitedNodes.contains(node.getMinDef())) node.getMinDef().apply(this); if(node.getMaxDef() != null && !_visitedNodes.contains(node.getMaxDef())) node.getMaxDef().apply(this);
mergeReturns(retVal,node.getOrdRelation().apply(this));
mergeReturns(retVal,inAOrdRelation(node)); if(node.getLhsPattern() != null && !_visitedNodes.contains(node.getLhsPattern())) mergeReturns(retVal,node.getLhsPattern().apply(this)); if(node.getRhsPattern() != null && !_visitedNodes.contains(node.getRhsPattern())) mergeReturns(retVal,node.getRhsPattern().apply(this)); if(node.getRelExp() != null && !_visitedNodes.contains(node.getRelExp())) mergeReturns(retVal,node.getRelExp().apply(this)); if(node.getRelDef() != null && !_visitedNodes.contains(node.getRelDef())) mergeReturns(retVal,node.getRelDef().apply(this)); if(node.getMinDef() != null && !_visitedNodes.contains(node.getMinDef())) mergeReturns(retVal,node.getMinDef().apply(this)); if(node.getMaxDef() != null && !_visitedNodes.contains(node.getMaxDef())) mergeReturns(retVal,node.getMaxDef().apply(this));
mergeReturns(retVal,node.getOrdRelation().apply(this, question));
mergeReturns(retVal,inAOrdRelation(node, question)); if(node.getLhsPattern() != null && !_visitedNodes.contains(node.getLhsPattern())) mergeReturns(retVal,node.getLhsPattern().apply(this, question)); if(node.getRhsPattern() != null && !_visitedNodes.contains(node.getRhsPattern())) mergeReturns(retVal,node.getRhsPattern().apply(this, question)); if(node.getRelExp() != null && !_visitedNodes.contains(node.getRelExp())) mergeReturns(retVal,node.getRelExp().apply(this, question)); if(node.getRelDef() != null && !_visitedNodes.contains(node.getRelDef())) mergeReturns(retVal,node.getRelDef().apply(this, question)); if(node.getMinDef() != null && !_visitedNodes.contains(node.getMinDef())) mergeReturns(retVal,node.getMinDef().apply(this, question)); if(node.getMaxDef() != null && !_visitedNodes.contains(node.getMaxDef())) mergeReturns(retVal,node.getMaxDef().apply(this, question));
node.getOrdRelation().apply(THIS,question);
node.getOrdRelation().getRelDef().apply(this, question); af.createPPatternAssistant().typeResolve(node.getOrdRelation().getLhsPattern(), question.rootVisitor, question.question); af.createPPatternAssistant().typeResolve(node.getOrdRelation().getRhsPattern(), question.rootVisitor, question.question); if (node.getOrdRelation().getMinDef() != null) node.getOrdRelation().getMinDef().apply(this, question); if (node.getOrdRelation().getMaxDef() != null) node.getOrdRelation().getMaxDef().apply(this, question);