public Analysis(Program program, AnalysisDirection direction, string worklistName) { _program = program; _blocks = FlowUtil.Blocks(program); _worklistMethodName = worklistName; var flow = FlowUtil.Flow(program); if (direction == AnalysisDirection.Forward) { _flow = flow; _extremalLabels = FlowUtil.Init(program).Singleton(); } else { _flow = FlowUtil.FlowR(flow); _extremalLabels = FlowUtil.Final(program); } _analysisCircle = new List <ILattice <T> >(); _analysisFilled = new List <ILattice <T> >(); _iterationSteps = new List <IterationStep>(); }
/// <summary> /// Gets the instance of Worklist that should be used for the analysis. /// </summary> /// <param name="nextPhase">Indicates whether the worklist will be used for the next phase.</param> /// <returns>The instance of the worklist.</returns> public static WorkList GetInstance(bool nextPhase = false, AnalysisDirection Direction = AnalysisDirection.Forward) { //return new WorklistNaive(Direction); //return new WorkListReordering1(Direction); //return new WorklistReordering2(nextPhase, Direction); return(new WorkListReorderingSegments(nextPhase, Direction)); }
/// <summary> /// Initializes a new instance of the <see cref="ForwardAnalysisBase" /> class. /// Create forward analysis object for given entry method graph. /// </summary> /// <param name="analyzedPPG">The analyzed PPG.</param> /// <param name="direction">The direction of analysis.</param> /// <param name="analyzer">The analyzer.</param> public NextPhaseAnalysis(ProgramPointGraph analyzedPPG, AnalysisDirection direction, NextPhaseAnalyzer analyzer) { _analyzer = analyzer; Direction = direction; AnalyzedProgramPointGraph = analyzedPPG; WideningLimit = int.MaxValue; }
protected WorkList(AnalysisDirection Direction) { this.Direction = Direction; }
internal WorkListReorderingSegments(bool nextPhase, AnalysisDirection Direction) : base(Direction) { this.nextPhase = nextPhase; }
internal WorklistReordering2(bool nextPhase, AnalysisDirection Direction) : base(Direction) { this.nextPhase = nextPhase; }
public WorkListReordering1(AnalysisDirection Direction) : base(Direction) { }
public WorklistNaive(AnalysisDirection Direction) : base(Direction) { }