/** * Called by the {@link AMapInverseUnaryExp} node from {@link AMapInverseUnaryExp#apply(IPOFAnalysis)}. * @param node the calling {@link AMapInverseUnaryExp} node */ public void caseAMapInverseUnaryExp(AMapInverseUnaryExp node) throws AnalysisException { _visitedNodes.add(node); inAMapInverseUnaryExp(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { node.getExp().apply(this); } if(node.getMapType() != null && !_visitedNodes.contains(node.getMapType())) { node.getMapType().apply(this); } outAMapInverseUnaryExp(node); }
/** * Called by the {@link AMapInverseUnaryExp} node from {@link AMapInverseUnaryExp#apply(IAnalysis)}. * @param node the calling {@link AMapInverseUnaryExp} node */ public void caseAMapInverseUnaryExp(AMapInverseUnaryExp node) throws AnalysisException { _visitedNodes.add(node); inAMapInverseUnaryExp(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { node.getExp().apply(this); } if(node.getMapType() != null && !_visitedNodes.contains(node.getMapType())) { node.getMapType().apply(this); } outAMapInverseUnaryExp(node); }
/** * Called by the {@link AMapInverseUnaryExp} node from {@link AMapInverseUnaryExp#apply(IAnalysis)}. * @param node the calling {@link AMapInverseUnaryExp} node */ public void caseAMapInverseUnaryExp(AMapInverseUnaryExp node, Q question) throws AnalysisException { _visitedNodes.add(node); inAMapInverseUnaryExp(node, question); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this, question); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { node.getExp().apply(this, question); } if(node.getMapType() != null && !_visitedNodes.contains(node.getMapType())) { node.getMapType().apply(this, question); } outAMapInverseUnaryExp(node, question); }
@Override public SMapTypeIR findType(PType type) throws org.overture.ast.analysis.AnalysisException { SMapType mapType = transAssistant.getInfo().getTcFactory().createPTypeAssistant().getMap(type); return mapType != null ? (SMapTypeIR) mapType.apply(transAssistant.getInfo().getTypeVisitor(), transAssistant.getInfo()) : null; } });
/** * Called by the {@link AMapSeqStateDesignator} node from {@link AMapSeqStateDesignator#apply(IAnalysis)}. * @param node the calling {@link AMapSeqStateDesignator} node */ public void caseAMapSeqStateDesignator(AMapSeqStateDesignator node) throws AnalysisException { _visitedNodes.add(node); inAMapSeqStateDesignator(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getMapseq() != null && !_visitedNodes.contains(node.getMapseq())) { node.getMapseq().apply(this); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { node.getExp().apply(this); } if(node.getMapType() != null && !_visitedNodes.contains(node.getMapType())) { node.getMapType().apply(this); } if(node.getSeqType() != null && !_visitedNodes.contains(node.getSeqType())) { node.getSeqType().apply(this); } outAMapSeqStateDesignator(node); }
/** * Called by the {@link AMapSeqStateDesignator} node from {@link AMapSeqStateDesignator#apply(IAnalysis)}. * @param node the calling {@link AMapSeqStateDesignator} node */ public void caseAMapSeqStateDesignator(AMapSeqStateDesignator node, Q question) throws AnalysisException { _visitedNodes.add(node); inAMapSeqStateDesignator(node, question); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this, question); } if(node.getMapseq() != null && !_visitedNodes.contains(node.getMapseq())) { node.getMapseq().apply(this, question); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { node.getExp().apply(this, question); } if(node.getMapType() != null && !_visitedNodes.contains(node.getMapType())) { node.getMapType().apply(this, question); } if(node.getSeqType() != null && !_visitedNodes.contains(node.getSeqType())) { node.getSeqType().apply(this, question); } outAMapSeqStateDesignator(node, question); }
/** * Called by the {@link AMapSeqStateDesignator} node from {@link AMapSeqStateDesignator#apply(IPOFAnalysis)}. * @param node the calling {@link AMapSeqStateDesignator} node */ public void caseAMapSeqStateDesignator(AMapSeqStateDesignator node) throws AnalysisException { _visitedNodes.add(node); inAMapSeqStateDesignator(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getMapseq() != null && !_visitedNodes.contains(node.getMapseq())) { node.getMapseq().apply(this); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { node.getExp().apply(this); } if(node.getMapType() != null && !_visitedNodes.contains(node.getMapType())) { node.getMapType().apply(this); } if(node.getSeqType() != null && !_visitedNodes.contains(node.getSeqType())) { node.getSeqType().apply(this); } outAMapSeqStateDesignator(node); }
/** * Called by the {@link AMapInverseUnaryExp} node from {@link AMapInverseUnaryExp#apply(IAnalysis)}. * @param node the calling {@link AMapInverseUnaryExp} node */ public A caseAMapInverseUnaryExp(AMapInverseUnaryExp node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inAMapInverseUnaryExp(node)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this)); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { mergeReturns(retVal,node.getExp().apply(this)); } if(node.getMapType() != null && !_visitedNodes.contains(node.getMapType())) { mergeReturns(retVal,node.getMapType().apply(this)); } mergeReturns(retVal,outAMapInverseUnaryExp(node)); return retVal; }
/** * Called by the {@link AMapInverseUnaryExp} node from {@link AMapInverseUnaryExp#apply(IAnalysis)}. * @param node the calling {@link AMapInverseUnaryExp} node */ public A caseAMapInverseUnaryExp(AMapInverseUnaryExp node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inAMapInverseUnaryExp(node, question)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this, question)); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { mergeReturns(retVal,node.getExp().apply(this, question)); } if(node.getMapType() != null && !_visitedNodes.contains(node.getMapType())) { mergeReturns(retVal,node.getMapType().apply(this, question)); } mergeReturns(retVal,outAMapInverseUnaryExp(node, question)); return retVal; }
node.getMapType().apply(this, question);
node.getMapType().apply(this);
node.getMapType().apply(this);
mergeReturns(retVal,node.getMapType().apply(this, question));
mergeReturns(retVal,node.getMapType().apply(this));
mergeReturns(retVal,node.getMapType().apply(this));
mergeReturns(retVal,node.getMapType().apply(this, question));
@Override public void inAMapDomainUnaryExpIR(AMapDomainUnaryExpIR node) throws AnalysisException { if (handleUnaryExp(node)) { SExpIR exp = node.getExp(); PType vdmType = (PType) exp.getType().getSourceNode().getVdmNode(); SMapType mapType = transAssistant.getInfo().getTcFactory().createPTypeAssistant().getMap(vdmType); try { STypeIR typeCg = mapType.apply(transAssistant.getInfo().getTypeVisitor(), transAssistant.getInfo()); if (typeCg instanceof SMapTypeIR) { correctTypes(exp, typeCg); } } catch (org.overture.ast.analysis.AnalysisException e) { } } }
@Override public PType defaultSMapType(SMapType type, Newquestion question) throws AnalysisException { if (type.getResolved()) { return type; } else { type.setResolved(true); } try { if (!type.getEmpty()) { type.setFrom(af.createPTypeAssistant().typeResolve(type.getFrom(), question.root, question.rootVisitor, question.question)); type.setTo(af.createPTypeAssistant().typeResolve(type.getTo(), question.root, question.rootVisitor, question.question)); } return type; } catch (TypeCheckException e) { type.apply(af.getTypeUnresolver()); throw e; } }
return mapType.apply(question.getTypeVisitor(), question); } else if (question.getTypeAssistant().isProductOfSameSize(node, typeAssistant))