/** * Called by the {@link AEqRelation} node from {@link AEqRelation#apply(IAnalysis)}. * @param node the calling {@link AEqRelation} node */ public void caseAEqRelation(AEqRelation node) throws AnalysisException { _visitedNodes.add(node); inAEqRelation(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); } outAEqRelation(node); }
public static AEqRelation newAEqRelation(PPattern leftPattern, PPattern rightPattern, PExp exp) { AEqRelation result = new AEqRelation(); result.setLhsPattern(leftPattern); result.setRhsPattern(rightPattern); result.setRelExp(exp); return result; }
/** * Returns a deep clone of this {@link AEqRelation} node. * @return a deep clone of this {@link AEqRelation} node */ public AEqRelation clone() { return new AEqRelation( _location, cloneNode(_lhsPattern), cloneNode(_rhsPattern), cloneNode(_relExp), cloneNode(_relDef) ); }
node.getEqRelation().getRelDef().apply(this, question); af.createPPatternAssistant().typeResolve(node.getEqRelation().getLhsPattern(), question.rootVisitor, question.question); af.createPPatternAssistant().typeResolve(node.getEqRelation().getRhsPattern(), question.rootVisitor, question.question);
@Override public PType caseAEqRelation(AEqRelation node, TypeCheckInfo question) throws AnalysisException { return node.getRelDef().apply(THIS,question); }
node.getEqRelation().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()); } }
node.getEqRelation().apply(this, question);
/** * Called by the {@link AEqRelation} node from {@link AEqRelation#apply(IPOFAnalysis)}. * @param node the calling {@link AEqRelation} node */ public void caseAEqRelation(AEqRelation node) throws AnalysisException { _visitedNodes.add(node); inAEqRelation(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); } outAEqRelation(node); }
node.getEqRelation().apply(this);
/** * Creates a deep clone of this {@link AEqRelation} node while putting all * old node-new node relations in the map {@code oldToNewMap}. * @param oldToNewMap the map filled with the old node-new node relation * @return a deep clone of this {@link AEqRelation} node */ public AEqRelation clone(Map<INode,INode> oldToNewMap) { AEqRelation node = new AEqRelation( _location, cloneNode(_lhsPattern, oldToNewMap), cloneNode(_rhsPattern, oldToNewMap), cloneNode(_relExp, oldToNewMap), cloneNode(_relDef, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
/** * Called by the {@link AEqRelation} node from {@link AEqRelation#apply(IAnalysis)}. * @param node the calling {@link AEqRelation} node */ public void caseAEqRelation(AEqRelation node, Q question) throws AnalysisException { _visitedNodes.add(node); inAEqRelation(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); } outAEqRelation(node, question); }
PDefinition eqdef = node.getEqRelation() == null ? null : node.getEqRelation().getRelDef();
mergeReturns(retVal,node.getEqRelation().apply(this, question));
/** * Called by the {@link AEqRelation} node from {@link AEqRelation#apply(IAnalysis)}. * @param node the calling {@link AEqRelation} node */ public A caseAEqRelation(AEqRelation node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inAEqRelation(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)); } mergeReturns(retVal,outAEqRelation(node)); return retVal; }
mergeReturns(retVal,node.getEqRelation().apply(this));
/** * Called by the {@link AEqRelation} node from {@link AEqRelation#apply(IAnalysis)}. * @param node the calling {@link AEqRelation} node */ public A caseAEqRelation(AEqRelation node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inAEqRelation(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)); } mergeReturns(retVal,outAEqRelation(node, question)); return retVal; }