public static ASeqSeqType newASeqSeqType(ILexLocation location, PType type) { ASeqSeqType result = new ASeqSeqType(); initType(result, location); result.setSeqof(type); result.setEmpty(false); return result; }
/** * Called by the {@link ASeqSeqType} node from {@link ASeqSeqType#apply(IPOFAnalysis)}. * @param node the calling {@link ASeqSeqType} node */ public void caseASeqSeqType(ASeqSeqType node) throws AnalysisException { _visitedNodes.add(node); inASeqSeqType(node); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } if(node.getSeqof() != null && !_visitedNodes.contains(node.getSeqof())) { node.getSeqof().apply(this); } outASeqSeqType(node); }
ASeq1SeqType s1t = AstFactory.newASeq1SeqType(st.getLocation(), st.getSeqof());
@Override public PTypeList caseASeqSeqType(ASeqSeqType node) throws AnalysisException { return node.getSeqof().apply(THIS); }
/** * Returns a deep clone of this {@link ASeqSeqType} node. * @return a deep clone of this {@link ASeqSeqType} node */ public ASeqSeqType clone() { return new ASeqSeqType( _location, _resolved, _definitions, _seqof, _empty ); }
/** * Called by the {@link ASeqSeqType} node from {@link ASeqSeqType#apply(IAnalysis)}. * @param node the calling {@link ASeqSeqType} node */ public void caseASeqSeqType(ASeqSeqType node) throws AnalysisException { _visitedNodes.add(node); inASeqSeqType(node); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } if(node.getSeqof() != null && !_visitedNodes.contains(node.getSeqof())) { node.getSeqof().apply(this); } outASeqSeqType(node); }
@Override public LexNameSet caseASeqSeqType(ASeqSeqType node, FreeVarInfo info) throws AnalysisException { return node.getSeqof().apply(this, info); }
/** * Creates a deep clone of this {@link ASeqSeqType} 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 ASeqSeqType} node */ public ASeqSeqType clone(Map<INode,INode> oldToNewMap) { ASeqSeqType node = new ASeqSeqType( _location, _resolved, _definitions, _seqof, _empty ); oldToNewMap.put(this, node); return node; }
/** * Called by the {@link ASeqSeqType} node from {@link ASeqSeqType#apply(IAnalysis)}. * @param node the calling {@link ASeqSeqType} node */ public void caseASeqSeqType(ASeqSeqType node, Q question) throws AnalysisException { _visitedNodes.add(node); inASeqSeqType(node, question); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this, question); } } } if(node.getSeqof() != null && !_visitedNodes.contains(node.getSeqof())) { node.getSeqof().apply(this, question); } outASeqSeqType(node, question); }
public static ASeqSeqType newASeqSeqType(ILexLocation location) { ASeqSeqType result = new ASeqSeqType(); initType(result, location); result.setSeqof(AstFactory.newAUnknownType(location)); result.setEmpty(true); return result; }
/** * Called by the {@link ASeqSeqType} node from {@link ASeqSeqType#apply(IAnalysis)}. * @param node the calling {@link ASeqSeqType} node */ public A caseASeqSeqType(ASeqSeqType node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inASeqSeqType(node, question)); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { mergeReturns(retVal,e.apply(this, question)); } } } if(node.getSeqof() != null && !_visitedNodes.contains(node.getSeqof())) { mergeReturns(retVal,node.getSeqof().apply(this, question)); } mergeReturns(retVal,outASeqSeqType(node, question)); return retVal; }
@Override public Boolean caseASeqSeqType(ASeqSeqType type, Object other) throws AnalysisException { other = deBracket((PType) other); if (other instanceof ASeqSeqType) { ASeqSeqType os = (ASeqSeqType) other; // NB. Empty sequence is the same type as any sequence return type.getEmpty() || os.getEmpty() || af.createPTypeAssistant().equals(type.getSeqof(), os.getSeqof()); } return false; }
/** * Called by the {@link ASeqSeqType} node from {@link ASeqSeqType#apply(IAnalysis)}. * @param node the calling {@link ASeqSeqType} node */ public A caseASeqSeqType(ASeqSeqType node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inASeqSeqType(node)); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { mergeReturns(retVal,e.apply(this)); } } } if(node.getSeqof() != null && !_visitedNodes.contains(node.getSeqof())) { mergeReturns(retVal,node.getSeqof().apply(this)); } mergeReturns(retVal,outASeqSeqType(node)); return retVal; }