コード例 #1
0
        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>();
        }
コード例 #2
0
 /// <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));
 }
コード例 #3
0
        /// <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;
        }
コード例 #4
0
 protected WorkList(AnalysisDirection Direction)
 {
     this.Direction = Direction;
 }
コード例 #5
0
 internal WorkListReorderingSegments(bool nextPhase, AnalysisDirection Direction) : base(Direction)
 {
     this.nextPhase = nextPhase;
 }
コード例 #6
0
 internal WorklistReordering2(bool nextPhase, AnalysisDirection Direction) : base(Direction)
 {
     this.nextPhase = nextPhase;
 }
コード例 #7
0
 public WorkListReordering1(AnalysisDirection Direction)
     : base(Direction)
 {
 }
コード例 #8
0
 public WorklistNaive(AnalysisDirection Direction)
     : base(Direction)
 {
 }