< Summary

Information
Class: Lattice.Analyzers.DeterminismGuardAnalyzer
Assembly: Lattice.Analyzers
File(s): /home/runner/work/Sideline/Sideline/godot/scripts/lattice/Tools/Lattice.Analyzers/DeterminismGuardAnalyzer.cs
Line coverage
81%
Covered lines: 277
Uncovered lines: 62
Coverable lines: 339
Total lines: 573
Line coverage: 81.7%
Branch coverage
54%
Covered branches: 146
Total branches: 268
Branch coverage: 54.4%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

File(s)

/home/runner/work/Sideline/Sideline/godot/scripts/lattice/Tools/Lattice.Analyzers/DeterminismGuardAnalyzer.cs

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3using System.Collections.Immutable;
 4using System.Linq;
 5using Microsoft.CodeAnalysis;
 6using Microsoft.CodeAnalysis.CSharp.Syntax;
 7using Microsoft.CodeAnalysis.Diagnostics;
 8using Microsoft.CodeAnalysis.Operations;
 9
 10namespace Lattice.Analyzers
 11{
 12    /// <summary>
 13    /// 为确定性运行时提供最小静态守卫:
 14    /// - 禁止系统 / runtime 类型引入可变静态字段
 15    /// - 禁止在正式模拟入口中调用典型非确定性 API
 16    /// - 禁止系统在未显式声明或错误声明 Contract 时使用受守卫的 Frame API
 17    /// </summary>
 18    [DiagnosticAnalyzer(LanguageNames.CSharp)]
 19    public sealed class DeterminismGuardAnalyzer : DiagnosticAnalyzer
 20    {
 21        public const string MutableStaticFieldId = "LATTICE100";
 22        public const string NondeterministicApiId = "LATTICE101";
 23        public const string MissingContractId = "LATTICE102";
 24
 125        private static readonly DiagnosticDescriptor MutableStaticFieldRule = new(
 126            MutableStaticFieldId,
 127            "确定性模拟类型禁止可变静态字段",
 128            "类型 '{0}' 包含可变静态字段 '{1}',会引入跨 Tick / 跨 Session 的隐式共享状态",
 129            "Determinism",
 130            DiagnosticSeverity.Error,
 131            isEnabledByDefault: true,
 132            description: "ISystem 与 SessionRuntime 相关类型不应通过可变静态字段缓存运行态数据。");
 33
 134        private static readonly DiagnosticDescriptor NondeterministicApiRule = new(
 135            NondeterministicApiId,
 136            "正式模拟入口禁止非确定性 API",
 137            "方法 '{0}' 调用了非确定性 API '{1}'",
 138            "Determinism",
 139            DiagnosticSeverity.Error,
 140            isEnabledByDefault: true,
 141            description: "系统 OnUpdate 与输入应用等正式模拟入口不应依赖时间、随机数、异步调度等非确定性 API。");
 42
 143        private static readonly DiagnosticDescriptor MissingContractRule = new(
 144            MissingContractId,
 145            "系统使用受守卫 Frame API 时必须显式声明兼容 Contract",
 146            "系统 '{0}' 使用了受守卫的 Frame API '{1}',但 Contract 未显式声明或未授予所需权限 '{2}'",
 147            "Determinism",
 148            DiagnosticSeverity.Error,
 149            isEnabledByDefault: true,
 150            description: "使用 global state 或结构性修改相关 API 的系统必须显式声明兼容的 SystemAuthoringContract。");
 51
 52        public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
 1053            ImmutableArray.Create(MutableStaticFieldRule, NondeterministicApiRule, MissingContractRule);
 54
 55        public override void Initialize(AnalysisContext context)
 56        {
 1057            context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None);
 1058            context.EnableConcurrentExecution();
 59
 1060            context.RegisterCompilationStartAction(static startContext =>
 1061            {
 1062                Compilation compilation = startContext.Compilation;
 1063                INamedTypeSymbol? systemType = compilation.GetTypeByMetadataName("Lattice.ECS.Framework.ISystem");
 1064                INamedTypeSymbol? runtimeType = compilation.GetTypeByMetadataName("Lattice.ECS.Session.SessionRuntime");
 1065                INamedTypeSymbol? frameType = compilation.GetTypeByMetadataName("Lattice.ECS.Core.Frame");
 1066                INamedTypeSymbol? contractType = compilation.GetTypeByMetadataName("Lattice.ECS.Framework.SystemAuthorin
 1067
 1068                if (systemType == null || runtimeType == null || frameType == null || contractType == null)
 1069                {
 070                    return;
 1071                }
 1072
 1073                startContext.RegisterSymbolAction(
 574                    symbolContext => AnalyzeField(symbolContext, systemType, runtimeType),
 1075                    SymbolKind.Field);
 1076
 1077                startContext.RegisterOperationBlockStartAction(operationContext =>
 1078                {
 3479                    if (operationContext.OwningSymbol is not IMethodSymbol method)
 1080                    {
 381                        return;
 1082                    }
 1083
 3184                    bool isSystemUpdate = IsSystemUpdateMethod(method, systemType);
 3185                    bool isSimulationHook = IsSystemSimulationMethod(method, systemType) || IsRuntimeSimulationHook(meth
 3186                    if (!isSimulationHook)
 1087                    {
 688                        return;
 1089                    }
 1090
 2591                    bool sawGuardedApi = false;
 2592                    string? firstGuardedApiName = null;
 2593                    string? firstRequiredCapability = null;
 2594                    Location? firstGuardedLocation = null;
 2595                    bool needsStructuralContract = false;
 2596                    bool needsGlobalReadContract = false;
 2597                    bool needsGlobalWriteContract = false;
 1098
 2599                    operationContext.RegisterOperationAction(static operationAction =>
 25100                    {
 6101                        var invocation = (IInvocationOperation)operationAction.Operation;
 6102                        if (TryGetNondeterministicApiName(invocation.TargetMethod, out string? apiName))
 25103                        {
 2104                            operationAction.ReportDiagnostic(
 2105                                Diagnostic.Create(
 2106                                    NondeterministicApiRule,
 2107                                    invocation.Syntax.GetLocation(),
 2108                                    operationAction.ContainingSymbol.Name,
 2109                                    apiName));
 25110                        }
 31111                    }, OperationKind.Invocation);
 10112
 25113                    operationContext.RegisterOperationAction(static operationAction =>
 25114                    {
 1115                        var creation = (IObjectCreationOperation)operationAction.Operation;
 1116                        if (TryGetNondeterministicTypeName(creation.Type, out string? apiName))
 25117                        {
 1118                            operationAction.ReportDiagnostic(
 1119                                Diagnostic.Create(
 1120                                    NondeterministicApiRule,
 1121                                    creation.Syntax.GetLocation(),
 1122                                    operationAction.ContainingSymbol.Name,
 1123                                    apiName));
 25124                        }
 26125                    }, OperationKind.ObjectCreation);
 10126
 25127                    operationContext.RegisterOperationAction(static operationAction =>
 25128                    {
 1129                        var propertyReference = (IPropertyReferenceOperation)operationAction.Operation;
 1130                        if (TryGetNondeterministicPropertyName(propertyReference.Property, out string? apiName))
 25131                        {
 1132                            operationAction.ReportDiagnostic(
 1133                                Diagnostic.Create(
 1134                                    NondeterministicApiRule,
 1135                                    propertyReference.Syntax.GetLocation(),
 1136                                    operationAction.ContainingSymbol.Name,
 1137                                    apiName));
 25138                        }
 26139                    }, OperationKind.PropertyReference);
 10140
 25141                    if (!isSystemUpdate)
 10142                    {
 17143                        return;
 10144                    }
 10145
 8146                    operationContext.RegisterOperationAction(operationAction =>
 8147                    {
 4148                        var invocation = (IInvocationOperation)operationAction.Operation;
 4149                        if (!SymbolEqualityComparer.Default.Equals(invocation.TargetMethod.ContainingType, frameType))
 8150                        {
 0151                            return;
 8152                        }
 8153
 4154                        if (!TryGetRequiredContractCapability(invocation.TargetMethod.Name, out string? requiredCapabili
 8155                        {
 0156                            return;
 8157                        }
 8158
 4159                        sawGuardedApi = true;
 4160                        firstGuardedApiName ??= invocation.TargetMethod.Name;
 4161                        firstRequiredCapability ??= requiredCapability;
 4162                        firstGuardedLocation ??= invocation.Syntax.GetLocation();
 8163
 8164                        switch (requiredCapability)
 8165                        {
 8166                            case nameof(ContractRequirement.StructuralChange):
 2167                                needsStructuralContract = true;
 2168                                break;
 8169                            case nameof(ContractRequirement.GlobalRead):
 2170                                needsGlobalReadContract = true;
 2171                                break;
 8172                            case nameof(ContractRequirement.GlobalWrite):
 0173                                needsGlobalWriteContract = true;
 8174                                break;
 8175                        }
 8176                    }, OperationKind.Invocation);
 10177
 8178                    operationContext.RegisterOperationBlockEndAction(endContext =>
 8179                    {
 8180                        if (!sawGuardedApi)
 8181                        {
 4182                            return;
 8183                        }
 8184
 4185                        if (!TryGetContractCapabilities(compilation, method.ContainingType, contractType, out ContractCa
 8186                        {
 2187                            endContext.ReportDiagnostic(
 2188                                Diagnostic.Create(
 2189                                    MissingContractRule,
 2190                                    firstGuardedLocation ?? method.Locations.FirstOrDefault(),
 2191                                    method.ContainingType.Name,
 2192                                    firstGuardedApiName ?? "Frame API",
 2193                                    firstRequiredCapability ?? "ExplicitContract"));
 2194                            return;
 8195                        }
 8196
 2197                        bool lacksStructural = needsStructuralContract && !capabilities.AllowsStructuralChanges;
 2198                        bool lacksGlobalRead = needsGlobalReadContract && !capabilities.AllowsGlobalReads;
 2199                        bool lacksGlobalWrite = needsGlobalWriteContract && !capabilities.AllowsGlobalWrites;
 8200
 2201                        if (!lacksStructural && !lacksGlobalRead && !lacksGlobalWrite)
 8202                        {
 2203                            return;
 8204                        }
 8205
 0206                        string missingCapability = lacksStructural
 0207                            ? nameof(ContractRequirement.StructuralChange)
 0208                            : lacksGlobalWrite
 0209                                ? nameof(ContractRequirement.GlobalWrite)
 0210                                : nameof(ContractRequirement.GlobalRead);
 8211
 0212                        endContext.ReportDiagnostic(
 0213                            Diagnostic.Create(
 0214                                MissingContractRule,
 0215                                firstGuardedLocation ?? method.Locations.FirstOrDefault(),
 0216                                method.ContainingType.Name,
 0217                                firstGuardedApiName ?? "Frame API",
 0218                                missingCapability));
 8219                    });
 18220                });
 20221            });
 10222        }
 223
 224        private static void AnalyzeField(SymbolAnalysisContext context, INamedTypeSymbol systemType, INamedTypeSymbol ru
 225        {
 5226            var field = (IFieldSymbol)context.Symbol;
 5227            if (!field.IsStatic || field.IsConst || field.IsReadOnly)
 228            {
 3229                return;
 230            }
 231
 2232            INamedTypeSymbol containingType = field.ContainingType;
 2233            if (!Implements(containingType, systemType) && !DerivesFrom(containingType, runtimeType))
 234            {
 0235                return;
 236            }
 237
 2238            context.ReportDiagnostic(
 2239                Diagnostic.Create(
 2240                    MutableStaticFieldRule,
 2241                    field.Locations.FirstOrDefault(),
 2242                    containingType.Name,
 2243                    field.Name));
 2244        }
 245
 246        private static bool IsSystemSimulationMethod(IMethodSymbol method, INamedTypeSymbol systemType)
 247        {
 31248            if (method.ContainingType == null || !Implements(method.ContainingType, systemType))
 249            {
 5250                return false;
 251            }
 252
 26253            return ((method.Name == "OnInit" || method.Name == "OnDestroy") &&
 26254                    method.Parameters.Length == 1) ||
 26255                   IsSystemUpdateMethod(method, systemType);
 256        }
 257
 258        private static bool IsSystemUpdateMethod(IMethodSymbol method, INamedTypeSymbol systemType)
 259        {
 41260            return method.Name == "OnUpdate" &&
 41261                   method.Parameters.Length == 2 &&
 41262                   method.ContainingType != null &&
 41263                   Implements(method.ContainingType, systemType);
 264        }
 265
 266        private static bool IsRuntimeSimulationHook(IMethodSymbol method, INamedTypeSymbol runtimeType)
 267        {
 7268            if (method.ContainingType == null || !DerivesFrom(method.ContainingType, runtimeType))
 269            {
 2270                return false;
 271            }
 272
 5273            return method.Name == "ApplyInputSet" ||
 5274                   method.Name == "ApplyInputs";
 275        }
 276
 277        private static bool Implements(INamedTypeSymbol type, INamedTypeSymbol interfaceType)
 278        {
 98279            return type.AllInterfaces.Any(candidate => SymbolEqualityComparer.Default.Equals(candidate, interfaceType));
 280        }
 281
 282        private static bool DerivesFrom(INamedTypeSymbol type, INamedTypeSymbol baseType)
 283        {
 8284            INamedTypeSymbol? current = type;
 18285            while (current != null)
 286            {
 16287                if (SymbolEqualityComparer.Default.Equals(current, baseType))
 288                {
 6289                    return true;
 290                }
 291
 10292                current = current.BaseType;
 293            }
 294
 2295            return false;
 296        }
 297
 298        private static bool TryGetNondeterministicApiName(IMethodSymbol method, out string? apiName)
 299        {
 6300            string containingType = method.ContainingType.ToDisplayString();
 6301            string methodName = method.Name;
 302
 6303            if (containingType == "System.Guid" && methodName == "NewGuid")
 304            {
 1305                apiName = "System.Guid.NewGuid()";
 1306                return true;
 307            }
 308
 5309            if (containingType == "System.Threading.Tasks.Task" && (methodName == "Run" || methodName == "Delay"))
 310            {
 0311                apiName = $"System.Threading.Tasks.Task.{methodName}";
 0312                return true;
 313            }
 314
 5315            if (containingType == "System.Threading.Thread" && (methodName == "Sleep" || methodName == "Yield"))
 316            {
 0317                apiName = $"System.Threading.Thread.{methodName}";
 0318                return true;
 319            }
 320
 5321            if (containingType == "System.Threading.SpinWait" && methodName == "SpinUntil")
 322            {
 0323                apiName = "System.Threading.SpinWait.SpinUntil";
 0324                return true;
 325            }
 326
 5327            if (containingType == "System.Diagnostics.Stopwatch" && (methodName == "StartNew" || methodName == "GetTimes
 328            {
 0329                apiName = $"System.Diagnostics.Stopwatch.{methodName}";
 0330                return true;
 331            }
 332
 5333            if (containingType == "System.Random")
 334            {
 1335                apiName = $"System.Random.{methodName}";
 1336                return true;
 337            }
 338
 4339            apiName = null;
 4340            return false;
 341        }
 342
 343        private static bool TryGetNondeterministicTypeName(ITypeSymbol? type, out string? apiName)
 344        {
 1345            string? typeName = type?.ToDisplayString();
 1346            if (typeName == "System.Random" ||
 1347                typeName == "System.Diagnostics.Stopwatch" ||
 1348                typeName == "System.Threading.Thread")
 349            {
 1350                apiName = typeName;
 1351                return true;
 352            }
 353
 0354            apiName = null;
 0355            return false;
 356        }
 357
 358        private static bool TryGetNondeterministicPropertyName(IPropertySymbol property, out string? apiName)
 359        {
 1360            string containingType = property.ContainingType.ToDisplayString();
 1361            string propertyName = property.Name;
 362
 1363            if ((containingType == "System.DateTime" || containingType == "System.DateTimeOffset") &&
 1364                (propertyName == "Now" || propertyName == "UtcNow"))
 365            {
 1366                apiName = $"{containingType}.{propertyName}";
 1367                return true;
 368            }
 369
 0370            if (containingType == "System.Environment" &&
 0371                (propertyName == "TickCount" || propertyName == "TickCount64"))
 372            {
 0373                apiName = $"{containingType}.{propertyName}";
 0374                return true;
 375            }
 376
 0377            if (containingType == "System.Random" && propertyName == "Shared")
 378            {
 0379                apiName = "System.Random.Shared";
 0380                return true;
 381            }
 382
 0383            apiName = null;
 0384            return false;
 385        }
 386
 387        private static bool TryGetRequiredContractCapability(string frameMethodName, out string? requiredCapability)
 388        {
 389            switch (frameMethodName)
 390            {
 391                case "CreateEntity":
 392                case "DestroyEntity":
 393                case "Add":
 394                case "Remove":
 2395                    requiredCapability = nameof(ContractRequirement.StructuralChange);
 2396                    return true;
 397
 398                case "HasGlobal":
 399                case "TryGetGlobal":
 2400                    requiredCapability = nameof(ContractRequirement.GlobalRead);
 2401                    return true;
 402
 403                case "GetGlobal":
 404                case "GetGlobalEntity":
 405                case "TryGetGlobalEntity":
 406                case "SetGlobal":
 407                case "RemoveGlobal":
 0408                    requiredCapability = nameof(ContractRequirement.GlobalWrite);
 0409                    return true;
 410
 411                default:
 0412                    requiredCapability = null;
 0413                    return false;
 414            }
 415        }
 416
 417        private static bool TryGetContractCapabilities(
 418            Compilation compilation,
 419            INamedTypeSymbol type,
 420            INamedTypeSymbol contractType,
 421            out ContractCapabilities capabilities)
 422        {
 4423            IPropertySymbol? contractProperty = type.GetMembers("Contract")
 4424                .OfType<IPropertySymbol>()
 6425                .FirstOrDefault(static property => !property.IsImplicitlyDeclared);
 426
 4427            if (contractProperty == null)
 428            {
 2429                capabilities = default;
 2430                return false;
 431            }
 432
 6433            foreach (SyntaxReference syntaxReference in contractProperty.DeclaringSyntaxReferences)
 434            {
 2435                if (syntaxReference.GetSyntax() is not PropertyDeclarationSyntax propertySyntax)
 436                {
 437                    continue;
 438                }
 439
 2440                ExpressionSyntax? expression = propertySyntax.ExpressionBody?.Expression;
 2441                if (expression == null && propertySyntax.AccessorList != null)
 442                {
 0443                    AccessorDeclarationSyntax? getter = propertySyntax.AccessorList.Accessors
 0444                        .FirstOrDefault(static accessor => accessor.Keyword.Text == "get");
 445
 0446                    if (getter?.ExpressionBody != null)
 447                    {
 0448                        expression = getter.ExpressionBody.Expression;
 449                    }
 0450                    else if (getter?.Body?.Statements.Count == 1 &&
 0451                             getter.Body.Statements[0] is ReturnStatementSyntax returnStatement)
 452                    {
 0453                        expression = returnStatement.Expression;
 454                    }
 455                }
 456
 2457                if (expression == null)
 458                {
 459                    continue;
 460                }
 461
 2462                SemanticModel semanticModel = compilation.GetSemanticModel(propertySyntax.SyntaxTree);
 2463                IOperation? operation = semanticModel.GetOperation(expression);
 2464                if (operation == null)
 465                {
 466                    continue;
 467                }
 468
 2469                if (TryEvaluateContractOperation(operation, contractType, out capabilities))
 470                {
 2471                    return true;
 472                }
 473            }
 474
 0475            capabilities = default;
 0476            return false;
 477        }
 478
 479        private static bool TryEvaluateContractOperation(
 480            IOperation operation,
 481            INamedTypeSymbol contractType,
 482            out ContractCapabilities capabilities)
 483        {
 2484            switch (operation)
 485            {
 486                case IPropertyReferenceOperation propertyReference
 0487                    when SymbolEqualityComparer.Default.Equals(propertyReference.Property.ContainingType, contractType):
 0488                    if (propertyReference.Property.Name == "Default")
 489                    {
 0490                        capabilities = default;
 0491                        return true;
 492                    }
 493
 0494                    if (propertyReference.Property.Name == "ReadOnly")
 495                    {
 0496                        capabilities = default;
 0497                        return true;
 498                    }
 499
 500                    break;
 501
 502                case IObjectCreationOperation creation
 2503                    when SymbolEqualityComparer.Default.Equals(creation.Constructor?.ContainingType, contractType):
 2504                    int globalAccess = 0;
 2505                    int structuralChangeAccess = 0;
 506
 16507                    foreach (IArgumentOperation argument in creation.Arguments)
 508                    {
 6509                        string? parameterName = argument.Parameter?.Name;
 6510                        if (string.Equals(parameterName, "globalAccess", StringComparison.Ordinal))
 511                        {
 2512                            globalAccess = GetEnumValue(argument.Value);
 2513                            continue;
 514                        }
 515
 4516                        if (string.Equals(parameterName, "structuralChangeAccess", StringComparison.Ordinal))
 517                        {
 2518                            structuralChangeAccess = GetEnumValue(argument.Value);
 519                            continue;
 520                        }
 521                    }
 522
 2523                    capabilities = new ContractCapabilities(
 2524                        allowsGlobalReads: globalAccess >= 1,
 2525                        allowsGlobalWrites: globalAccess >= 2,
 2526                        allowsStructuralChanges: structuralChangeAccess >= 1);
 2527                    return true;
 528            }
 529
 0530            capabilities = default;
 0531            return false;
 532        }
 533
 534        private static int GetEnumValue(IOperation operation)
 535        {
 4536            Optional<object?> constantValue = operation.ConstantValue;
 4537            if (constantValue.HasValue && constantValue.Value != null)
 538            {
 4539                return Convert.ToInt32(constantValue.Value, System.Globalization.CultureInfo.InvariantCulture);
 540            }
 541
 0542            if (operation is IConversionOperation conversion)
 543            {
 0544                return GetEnumValue(conversion.Operand);
 545            }
 546
 0547            return 0;
 548        }
 549
 550        private enum ContractRequirement
 551        {
 552            StructuralChange,
 553            GlobalRead,
 554            GlobalWrite
 555        }
 556
 557        private readonly struct ContractCapabilities
 558        {
 559            public ContractCapabilities(bool allowsGlobalReads, bool allowsGlobalWrites, bool allowsStructuralChanges)
 560            {
 2561                AllowsGlobalReads = allowsGlobalReads;
 2562                AllowsGlobalWrites = allowsGlobalWrites;
 2563                AllowsStructuralChanges = allowsStructuralChanges;
 2564            }
 565
 1566            public bool AllowsGlobalReads { get; }
 567
 0568            public bool AllowsGlobalWrites { get; }
 569
 1570            public bool AllowsStructuralChanges { get; }
 571        }
 572    }
 573}

Methods/Properties

.cctor()
get_SupportedDiagnostics()
Initialize(Microsoft.CodeAnalysis.Diagnostics.AnalysisContext)
AnalyzeField(Microsoft.CodeAnalysis.Diagnostics.SymbolAnalysisContext,Microsoft.CodeAnalysis.INamedTypeSymbol,Microsoft.CodeAnalysis.INamedTypeSymbol)
IsSystemSimulationMethod(Microsoft.CodeAnalysis.IMethodSymbol,Microsoft.CodeAnalysis.INamedTypeSymbol)
IsSystemUpdateMethod(Microsoft.CodeAnalysis.IMethodSymbol,Microsoft.CodeAnalysis.INamedTypeSymbol)
IsRuntimeSimulationHook(Microsoft.CodeAnalysis.IMethodSymbol,Microsoft.CodeAnalysis.INamedTypeSymbol)
Implements(Microsoft.CodeAnalysis.INamedTypeSymbol,Microsoft.CodeAnalysis.INamedTypeSymbol)
DerivesFrom(Microsoft.CodeAnalysis.INamedTypeSymbol,Microsoft.CodeAnalysis.INamedTypeSymbol)
TryGetNondeterministicApiName(Microsoft.CodeAnalysis.IMethodSymbol,System.String&)
TryGetNondeterministicTypeName(Microsoft.CodeAnalysis.ITypeSymbol,System.String&)
TryGetNondeterministicPropertyName(Microsoft.CodeAnalysis.IPropertySymbol,System.String&)
TryGetRequiredContractCapability(System.String,System.String&)
TryGetContractCapabilities(Microsoft.CodeAnalysis.Compilation,Microsoft.CodeAnalysis.INamedTypeSymbol,Microsoft.CodeAnalysis.INamedTypeSymbol,Lattice.Analyzers.DeterminismGuardAnalyzer/ContractCapabilities&)
TryEvaluateContractOperation(Microsoft.CodeAnalysis.IOperation,Microsoft.CodeAnalysis.INamedTypeSymbol,Lattice.Analyzers.DeterminismGuardAnalyzer/ContractCapabilities&)
GetEnumValue(Microsoft.CodeAnalysis.IOperation)
.ctor(System.Boolean,System.Boolean,System.Boolean)
get_AllowsGlobalReads()
get_AllowsGlobalWrites()
get_AllowsStructuralChanges()