/** * Called by the {@link ARepeatTraceDefinition} node from {@link ARepeatTraceDefinition#apply(IAnalysis)}. * @param node the calling {@link ARepeatTraceDefinition} node */ public void caseARepeatTraceDefinition(ARepeatTraceDefinition node, Q question) throws AnalysisException { _visitedNodes.add(node); inARepeatTraceDefinition(node, question); if(node.getCore() != null && !_visitedNodes.contains(node.getCore())) { node.getCore().apply(this, question); } outARepeatTraceDefinition(node, question); }
/** * Called by the {@link ARepeatTraceDefinition} node from {@link ARepeatTraceDefinition#apply(IAnalysis)}. * @param node the calling {@link ARepeatTraceDefinition} node */ public void caseARepeatTraceDefinition(ARepeatTraceDefinition node) throws AnalysisException { _visitedNodes.add(node); inARepeatTraceDefinition(node); if(node.getCore() != null && !_visitedNodes.contains(node.getCore())) { node.getCore().apply(this); } outARepeatTraceDefinition(node); }
/** * Called by the {@link ARepeatTraceDefinition} node from {@link ARepeatTraceDefinition#apply(IPOFAnalysis)}. * @param node the calling {@link ARepeatTraceDefinition} node */ public void caseARepeatTraceDefinition(ARepeatTraceDefinition node) throws AnalysisException { _visitedNodes.add(node); inARepeatTraceDefinition(node); if(node.getCore() != null && !_visitedNodes.contains(node.getCore())) { node.getCore().apply(this); } outARepeatTraceDefinition(node); }
/** * Called by the {@link ARepeatTraceDefinition} node from {@link ARepeatTraceDefinition#apply(IAnalysis)}. * @param node the calling {@link ARepeatTraceDefinition} node */ public A caseARepeatTraceDefinition(ARepeatTraceDefinition node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inARepeatTraceDefinition(node, question)); if(node.getCore() != null && !_visitedNodes.contains(node.getCore())) { mergeReturns(retVal,node.getCore().apply(this, question)); } mergeReturns(retVal,outARepeatTraceDefinition(node, question)); return retVal; }
/** * Called by the {@link ARepeatTraceDefinition} node from {@link ARepeatTraceDefinition#apply(IAnalysis)}. * @param node the calling {@link ARepeatTraceDefinition} node */ public A caseARepeatTraceDefinition(ARepeatTraceDefinition node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inARepeatTraceDefinition(node)); if(node.getCore() != null && !_visitedNodes.contains(node.getCore())) { mergeReturns(retVal,node.getCore().apply(this)); } mergeReturns(retVal,outARepeatTraceDefinition(node)); return retVal; }
@Override public PType caseARepeatTraceDefinition(ARepeatTraceDefinition node, TypeCheckInfo question) throws AnalysisException { if (node.getFrom() > node.getTo()) { TypeCheckerErrors.report(3277, "Trace repeat illegal values", node.getLocation(), node); } // Environment local = question.env; return node.getCore().apply(THIS, question); }
@Override public TraceNode caseARepeatTraceDefinition(ARepeatTraceDefinition term, Context ctxt) throws AnalysisException { TraceNode body = term.getCore().apply(af.getTraceExpander(),ctxt); //expand(term.getCore(), ctxt); if (term.getFrom() == 1 && term.getTo() == 1) { return body; } else { return new RepeatTraceNode(body, term.getFrom(), term.getTo()); } }
@Override public STraceDeclIR caseARepeatTraceDefinition(ARepeatTraceDefinition node, IRInfo question) throws AnalysisException { PTraceCoreDefinition core = node.getCore(); Long from = node.getFrom(); Long to = node.getTo(); STraceCoreDeclIR coreCg = core.apply(question.getTraceCoreDeclVisitor(), question); ARepeatTraceDeclIR repeatTraceDecl = new ARepeatTraceDeclIR(); repeatTraceDecl.setCore(coreCg); repeatTraceDecl.setFrom(from); repeatTraceDecl.setTo(to); return repeatTraceDecl; }