private protected AnalysisEntityMapAbstractDomain(
     AbstractValueDomain <TValue> valueDomain,
     Func <AnalysisEntity, bool> isTrackedEntity,
     Func <PointsToAbstractValue, bool> isTrackedPointsToValue)
     : base(valueDomain)
 {
     _isTrackedEntity        = isTrackedEntity ?? throw new ArgumentNullException(nameof(isTrackedEntity));
     _isTrackedPointsToValue = isTrackedPointsToValue ?? throw new ArgumentNullException(nameof(isTrackedPointsToValue));
 }
Exemple #2
0
        protected AbstractDataFlowAnalysisContext(
            AbstractValueDomain <TAbstractAnalysisValue> valueDomain,
            WellKnownTypeProvider wellKnownTypeProvider,
            ControlFlowGraph controlFlowGraph,
            ISymbol owningSymbol,
            AnalyzerOptions analyzerOptions,
            InterproceduralAnalysisConfiguration interproceduralAnalysisConfig,
            bool pessimisticAnalysis,
            bool predicateAnalysis,
            bool exceptionPathsAnalysis,
            CopyAnalysisResult copyAnalysisResultOpt,
            PointsToAnalysisResult pointsToAnalysisResultOpt,
            ValueContentAnalysisResult valueContentAnalysisResultOpt,
            Func <TAnalysisContext, TAnalysisResult> tryGetOrComputeAnalysisResult,
            ControlFlowGraph parentControlFlowGraphOpt,
            InterproceduralAnalysisData <TAnalysisData, TAnalysisContext, TAbstractAnalysisValue> interproceduralAnalysisDataOpt,
            InterproceduralAnalysisPredicate interproceduralAnalysisPredicateOpt)
        {
            Debug.Assert(valueDomain != null, "valueDomain must not be null for use in ComputeHashCodeParts");
            Debug.Assert(controlFlowGraph != null);
            Debug.Assert(owningSymbol != null);
            Debug.Assert(owningSymbol.Kind == SymbolKind.Method ||
                         owningSymbol.Kind == SymbolKind.Field ||
                         owningSymbol.Kind == SymbolKind.Property ||
                         owningSymbol.Kind == SymbolKind.Event);
            Debug.Assert(Equals(owningSymbol.OriginalDefinition, owningSymbol));
            Debug.Assert(wellKnownTypeProvider != null);
            Debug.Assert(tryGetOrComputeAnalysisResult != null);
            Debug.Assert(pointsToAnalysisResultOpt == null ||
                         pointsToAnalysisResultOpt.ControlFlowGraph == controlFlowGraph);
            Debug.Assert(copyAnalysisResultOpt == null ||
                         copyAnalysisResultOpt.ControlFlowGraph == controlFlowGraph);
            Debug.Assert(valueContentAnalysisResultOpt == null ||
                         valueContentAnalysisResultOpt.ControlFlowGraph == controlFlowGraph);

            ValueDomain                          = valueDomain;
            WellKnownTypeProvider                = wellKnownTypeProvider;
            ControlFlowGraph                     = controlFlowGraph;
            ParentControlFlowGraphOpt            = parentControlFlowGraphOpt;
            OwningSymbol                         = owningSymbol;
            AnalyzerOptions                      = analyzerOptions;
            InterproceduralAnalysisConfiguration = interproceduralAnalysisConfig;
            PessimisticAnalysis                  = pessimisticAnalysis;
            PredicateAnalysis                    = predicateAnalysis;
            ExceptionPathsAnalysis               = exceptionPathsAnalysis;
            CopyAnalysisResultOpt                = copyAnalysisResultOpt;
            PointsToAnalysisResultOpt            = pointsToAnalysisResultOpt;
            ValueContentAnalysisResultOpt        = valueContentAnalysisResultOpt;
            TryGetOrComputeAnalysisResult        = tryGetOrComputeAnalysisResult;
            InterproceduralAnalysisDataOpt       = interproceduralAnalysisDataOpt;
            InterproceduralAnalysisPredicateOpt  = interproceduralAnalysisPredicateOpt;
        }
Exemple #3
0
        protected AbstractDataFlowAnalysisContext(
            AbstractValueDomain <TAbstractAnalysisValue> valueDomain,
            WellKnownTypeProvider wellKnownTypeProvider,
            ControlFlowGraph controlFlowGraph,
            ISymbol owningSymbol,
            AnalyzerOptions analyzerOptions,
            InterproceduralAnalysisConfiguration interproceduralAnalysisConfig,
            bool pessimisticAnalysis,
            bool predicateAnalysis,
            bool exceptionPathsAnalysis,
            CopyAnalysisResult?copyAnalysisResult,
            PointsToAnalysisResult?pointsToAnalysisResult,
            ValueContentAnalysisResult?valueContentAnalysisResult,
            Func <TAnalysisContext, TAnalysisResult?> tryGetOrComputeAnalysisResult,
            ControlFlowGraph?parentControlFlowGraph,
            InterproceduralAnalysisData <TAnalysisData, TAnalysisContext, TAbstractAnalysisValue>?interproceduralAnalysisData,
            InterproceduralAnalysisPredicate?interproceduralAnalysisPredicate)
        {
            Debug.Assert(owningSymbol.Kind == SymbolKind.Method ||
                         owningSymbol.Kind == SymbolKind.Field ||
                         owningSymbol.Kind == SymbolKind.Property ||
                         owningSymbol.Kind == SymbolKind.Event);
            Debug.Assert(Equals(owningSymbol.OriginalDefinition, owningSymbol));
            Debug.Assert(pointsToAnalysisResult == null ||
                         pointsToAnalysisResult.ControlFlowGraph == controlFlowGraph);
            Debug.Assert(copyAnalysisResult == null ||
                         copyAnalysisResult.ControlFlowGraph == controlFlowGraph);
            Debug.Assert(valueContentAnalysisResult == null ||
                         valueContentAnalysisResult.ControlFlowGraph == controlFlowGraph);

            ValueDomain            = valueDomain;
            WellKnownTypeProvider  = wellKnownTypeProvider;
            ControlFlowGraph       = controlFlowGraph;
            ParentControlFlowGraph = parentControlFlowGraph;
            OwningSymbol           = owningSymbol;
            AnalyzerOptions        = analyzerOptions;
            InterproceduralAnalysisConfiguration = interproceduralAnalysisConfig;
            PessimisticAnalysis              = pessimisticAnalysis;
            PredicateAnalysis                = predicateAnalysis;
            ExceptionPathsAnalysis           = exceptionPathsAnalysis;
            CopyAnalysisResult               = copyAnalysisResult;
            PointsToAnalysisResult           = pointsToAnalysisResult;
            ValueContentAnalysisResult       = valueContentAnalysisResult;
            TryGetOrComputeAnalysisResult    = tryGetOrComputeAnalysisResult;
            InterproceduralAnalysisData      = interproceduralAnalysisData;
            InterproceduralAnalysisPredicate = interproceduralAnalysisPredicate;
        }
Exemple #4
0
        protected AbstractDataFlowAnalysisContext(
            AbstractValueDomain <TAbstractAnalysisValue> valueDomain,
            WellKnownTypeProvider wellKnownTypeProvider,
            ControlFlowGraph controlFlowGraph,
            ISymbol owningSymbol,
            InterproceduralAnalysisConfiguration interproceduralAnalysisConfig,
            bool pessimisticAnalysis,
            bool predicateAnalysis,
            bool exceptionPathsAnalysis,
            CopyAnalysisResult copyAnalysisResultOpt,
            PointsToAnalysisResult pointsToAnalysisResultOpt,
            Func <TAnalysisContext, TAnalysisResult> getOrComputeAnalysisResult,
            ControlFlowGraph parentControlFlowGraphOpt,
            InterproceduralAnalysisData <TAnalysisData, TAnalysisContext, TAbstractAnalysisValue> interproceduralAnalysisDataOpt,
            InterproceduralAnalysisPredicate interproceduralAnalysisPredicateOpt)
        {
            Debug.Assert(controlFlowGraph != null);
            Debug.Assert(owningSymbol != null);
            Debug.Assert(owningSymbol.Kind == SymbolKind.Method ||
                         owningSymbol.Kind == SymbolKind.Field ||
                         owningSymbol.Kind == SymbolKind.Property ||
                         owningSymbol.Kind == SymbolKind.Event);
            Debug.Assert(Equals(owningSymbol.OriginalDefinition, owningSymbol));
            Debug.Assert(wellKnownTypeProvider != null);
            Debug.Assert(getOrComputeAnalysisResult != null);

            ValueDomain                          = valueDomain;
            WellKnownTypeProvider                = wellKnownTypeProvider;
            ControlFlowGraph                     = controlFlowGraph;
            ParentControlFlowGraphOpt            = parentControlFlowGraphOpt;
            OwningSymbol                         = owningSymbol;
            InterproceduralAnalysisConfiguration = interproceduralAnalysisConfig;
            PessimisticAnalysis                  = pessimisticAnalysis;
            PredicateAnalysis                    = predicateAnalysis;
            ExceptionPathsAnalysis               = exceptionPathsAnalysis;
            CopyAnalysisResultOpt                = copyAnalysisResultOpt;
            PointsToAnalysisResultOpt            = pointsToAnalysisResultOpt;
            GetOrComputeAnalysisResult           = getOrComputeAnalysisResult;
            InterproceduralAnalysisDataOpt       = interproceduralAnalysisDataOpt;
            InterproceduralAnalysisPredicateOpt  = interproceduralAnalysisPredicateOpt;
        }
Exemple #5
0
 protected AnalysisEntityMapAbstractDomain(AbstractValueDomain <TValue> valueDomain)
     : base(valueDomain)
 {
 }
 public MapAbstractDomain(AbstractValueDomain <TValue> valueDomain)
 {
     ValueDomain = valueDomain;
 }
 protected AnalysisEntityMapAbstractDomain(AbstractValueDomain <TValue> valueDomain, PointsToAnalysisResult?pointsToAnalysisResultOpt)
     : this(valueDomain,
            pointsToAnalysisResultOpt != null ? pointsToAnalysisResultOpt.IsTrackedEntity : s_defaultIsTrackedEntity,
            pointsToAnalysisResultOpt != null ? pointsToAnalysisResultOpt.IsTrackedPointsToValue : s_defaultIsTrackedPointsToValue)
 {
 }