Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
d5c770a
Validate cached mutation shard catalogs
alexyorke Aug 21, 2026
1bbc03d
Validate verifier invocation cleanup paths
alexyorke Aug 22, 2026
1250282
Admit supported callable kinds in contract binding
alexyorke Aug 22, 2026
ec59520
Analyze zero-argument primary base calls
alexyorke Aug 22, 2026
bfa64b7
Respect assignment evaluation completion
alexyorke Aug 22, 2026
d849be1
Respect binary operand evaluation order
alexyorke Aug 22, 2026
81e1b4e
Sequence compound assignment effects
alexyorke Aug 22, 2026
837b1e1
Sequence constructor member initializers
alexyorke Aug 22, 2026
21a9e61
Ignore unreachable alias assignments
alexyorke Aug 22, 2026
11d7ebd
Recognize bind-mounted Git checkouts
alexyorke Aug 22, 2026
3c8afb2
Decompose assignment effect scanning
alexyorke Aug 22, 2026
bb8ac6c
Reject malformed package base addresses
alexyorke Aug 22, 2026
cf21273
Verify generated files byte for byte
alexyorke Aug 22, 2026
b1def21
Validate packaged analyzer identities
alexyorke Aug 22, 2026
b00b641
Resolve contained paths through links
alexyorke Aug 22, 2026
b64ece8
Reject empty fuzz campaigns
alexyorke Aug 22, 2026
36ba2fc
Respect expression completion in effect scans
alexyorke Aug 22, 2026
fc1fe57
Validate fuzz summary evidence
alexyorke Aug 22, 2026
be34277
Require reviewed pilot qualification evidence
alexyorke Aug 22, 2026
fe86023
Bind constructed partial method contracts
alexyorke Aug 22, 2026
4579511
Preserve frontend runtime semantics
alexyorke Aug 22, 2026
afbb78c
Reject negative fuzz coverage evidence
alexyorke Aug 22, 2026
f2fe551
Respect throw expression completion
alexyorke Aug 22, 2026
1e80009
Specialize constructed contract value domains
alexyorke Aug 22, 2026
9c0f7ca
Add BuildTasks verifier process supervisor and broaden coverage acros…
alexyorke Aug 22, 2026
401f502
Fix CI build failures: unsafe blocks, local function collision, Rosly…
alexyorke Aug 22, 2026
1b62d53
Fix remaining CI build failures: scope collisions, CA rule violations…
alexyorke Aug 22, 2026
cd705b8
Fix remaining IDE0055 formatting and CA1508/CS0518 issues in SharpPro…
alexyorke Aug 22, 2026
77f030a
Fix last IDE0055 formatting hits from concurrent edits
alexyorke Aug 22, 2026
372ccd3
Fix SharpProof.Analyzer.Core compile failures and CA rule violations
alexyorke Aug 22, 2026
5cdea42
Fix CA1308 in extracted CreateSupervisorNonce and matching validator
alexyorke Aug 22, 2026
b3893d1
Fix SharpProof.Package.Test compile failures after RunVerifier gained…
alexyorke Aug 22, 2026
254b9af
Revert Assert.Throws/Assert.Multiple delegate cast to Action
alexyorke Aug 22, 2026
9badfd8
Allow the task workspace's own artifacts symlink through containment …
alexyorke Aug 23, 2026
f4d7386
Fix real test/infrastructure bugs found by full coverage run
alexyorke Aug 23, 2026
8ac80ad
Update TCB digest pin and a stale test expectation
alexyorke Aug 23, 2026
dd81060
Fix ImmutableArray.Builder capacity mismatch and a stale analyzer test
alexyorke Aug 23, 2026
df83586
Classify SharpProof.Fuzz as a production project
alexyorke Aug 23, 2026
7490d8c
Update SharpProof.Fuzz lock file for BannedApiAnalyzers
alexyorke Aug 23, 2026
e133b07
Route SharpProof.Fuzz semantic models through the audited host boundary
alexyorke Aug 23, 2026
bdf5eff
Fix stale expectations in the alias-precedence generator test
alexyorke Aug 23, 2026
e926b12
Fix DirectLockReceiverCompletionControlsRefutation to match the Worke…
alexyorke Aug 23, 2026
9bef698
Fix stale expectations in coalesce-assignment and local-function disc…
alexyorke Aug 23, 2026
e5b41bd
Close several completion-analysis and reachability gaps in the analyzer
alexyorke Aug 23, 2026
82babed
Add SharpProof.Fuzz to the banned-API-scope architecture test
alexyorke Aug 23, 2026
e73e770
Resolve SharpProof.Fuzz's Tools/ subdirectory in architecture source-…
alexyorke Aug 23, 2026
adc94f1
Copy Resolve-SharpProofContainedPath.ps1 into the release-tag fixture…
alexyorke Aug 23, 2026
4fd8f02
Fix the last delegate-tracking gap: ignore flow-capture-only target r…
alexyorke Aug 23, 2026
a38dd78
Recognize ref-field reads as ref-rebinding sources in ClassifyRegion
alexyorke Aug 23, 2026
78196c0
Fix effect reachability analysis for CI
alexyorke Aug 23, 2026
7a6676c
Reject non-regular compiler manifests before opening
alexyorke Aug 23, 2026
8965cca
Allow delayed supervisor output authentication
alexyorke Aug 23, 2026
d1a4d92
Authenticate supervisor cleanup before stdout EOF
alexyorke Aug 23, 2026
97dc053
Keep live supervisor cleanup pending
alexyorke Aug 23, 2026
c0db058
Give instrumented verifier cleanup more time
alexyorke Aug 23, 2026
56bd48a
Scope extended cleanup reserve to worker launches
alexyorke Aug 23, 2026
bb1eeb5
Add fuzz project to coverage baseline
alexyorke Aug 23, 2026
071d973
Include fuzz in production coverage owners
alexyorke Aug 23, 2026
f4a9f69
Map fuzz project in architecture checks
alexyorke Aug 23, 2026
5bd82be
Allow fuzz assumption construction in architecture checks
alexyorke Aug 23, 2026
6a2b79b
Stabilize instrumented supervisor deadline tests
alexyorke Aug 23, 2026
387773e
Fix production coverage ownership
alexyorke Aug 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ dotnet_style_collection_initializer = true:suggestion
dotnet_style_object_initializer = true:suggestion
dotnet_style_prefer_collection_expression = true:suggestion

[SharpProof.BuildTasks/InvalidatePublishedResult.cs]
dotnet_diagnostic.CA1515.severity = none

[SharpProof.BuildTasks/ResetPublishedVerification.cs]
dotnet_diagnostic.CA1515.severity = none

[SharpProof.BuildTasks/RunVerifier.cs]
dotnet_diagnostic.CA1515.severity = none

[SharpProof.BuildTasks/ValidatePublishedVerificationResult.cs]
dotnet_diagnostic.CA1515.severity = none

[SharpProof.Dataflow/IntervalDomain.cs]
dotnet_diagnostic.CA1822.severity = none

Expand Down
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
'$(MSBuildProjectName)' == 'SharpProof.Dataflow' Or
'$(MSBuildProjectName)' == 'SharpProof.Effects' Or
'$(MSBuildProjectName)' == 'SharpProof.Frontend' Or
'$(MSBuildProjectName)' == 'SharpProof.Fuzz' Or
'$(MSBuildProjectName)' == 'SharpProof.Gates' Or
'$(MSBuildProjectName)' == 'SharpProof.Host' Or
'$(MSBuildProjectName)' == 'SharpProof.Ir' Or
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ both implemented feature groups:
verification.

`SharpProofFeatures` values are `effects`, `contracts`, and `all` (the
default). The effective selection is sealed into the schema-14 compiler
default). The effective selection is sealed into the schema-15 compiler
artifact and filters its manifest: `contracts` excludes effect-only
annotations, `effects` excludes postcondition claims and contract assumptions,
and `all` selects both surfaces. Every effective effect contract has one typed
Expand Down Expand Up @@ -425,7 +425,7 @@ Each manifest claim receives:

Effect claims use canonical compiler-produced evidence. They are `Proven` only
when a complete effect summary establishes the selected contract. Compiler
artifact schema 14 retains schema 10's independently replayable,
artifact schema 15 retains schema 10's independently replayable,
unconditional direct event for a definite managed object or array allocation.
The worker validates the event's order, source-tree hash and span, semantic
identity, selected constraint, and compiler witness, then derives the
Expand Down Expand Up @@ -524,7 +524,7 @@ unsupported opcodes, recursive dependencies, and exhausted budgets abstain as
typed `Unknown`; they are never treated as implementation proof authority.
Every composed call seals its origin, evidence digest, optional pack identity,
and complete transitive dependency-evidence closure into compiler artifact
schema 14. Relational-summary schema version 2 and specification-pack schema
schema 15. Relational-summary schema version 2 and specification-pack schema
version 1 govern those evidence records.

Specification packs are off by default. The preview ships one data-driven
Expand Down Expand Up @@ -720,7 +720,7 @@ host shadowing and arbitrary relative overrides are rejected before any push.

## Closed compiler artifact and remaining release gaps

The build-only collector now emits compiler artifact schema version 14 from the
The build-only collector now emits compiler artifact schema version 15 from the
final post-generator Roslyn `Compilation`. It seals the feature-selected claim
manifest and, for each selected callable, either a typed lowering failure or
portable whole-body CFG/IR with bound contract clauses, canonical variables,
Expand Down
6 changes: 3 additions & 3 deletions SEMANTICS.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ manifest claims while sharing the effective combined constraint and evidence.
Each effect claim is `Proven` only when a complete compiler-produced effect
summary establishes its contract. The compiler can record a structured
`DefiniteViolation` candidate for a simple unconditional direct operation.
Compiler artifact schema 14 carries an independently replayable event only for
Compiler artifact schema 15 carries an independently replayable event only for
a definite managed object or array allocation whose operands are already
known to complete and whose allocation is not static-initialization-sensitive.
The worker derives `Allocates` from that event rather than trusting the
Expand Down Expand Up @@ -209,7 +209,7 @@ identity-mismatched pack never contributes a fact.

Every summary call seals its origin, SHA-256 evidence, pack identity when
applicable, and the canonical transitive provenance of every composed
dependency. Compiler artifact schema 14, relational-summary schema version 2,
dependency. Compiler artifact schema 15, relational-summary schema version 2,
and specification-pack schema version 1 validate that closure before backend
creation.
Unsupported or incomplete calls remain `Unknown`; neither a convenient method
Expand Down Expand Up @@ -376,7 +376,7 @@ its outcome is not combined with the containing callable. Unavailable captured
facts remain unknown. An expression-tree lambda is quoted code and is not
treated as an executing call site.

The packaged verifier consumes compiler artifact schema version 14 produced
The packaged verifier consumes compiler artifact schema version 15 produced
from the final post-generator compilation. The artifact contains the sealed
feature-selected manifest and, for every selected callable, either a typed
lowering failure or portable whole-body CFG/IR with bound clauses, canonical
Expand Down
149 changes: 139 additions & 10 deletions SharpProof.Analyzer.Core/AnalyzerFeaturePipeline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,7 @@ internal static void AnalyzeMemberInitializer(
{
context.CancellationToken.ThrowIfCancellationRequested();
if (context.Node is not EqualsValueClauseSyntax initializer ||
initializer.Parent is not VariableDeclaratorSyntax and not PropertyDeclarationSyntax ||
AnalyzerGeneratedCodePolicy.IsGenerated(
initializer.SyntaxTree, context.Compilation, context.CancellationToken))
initializer.Parent is not VariableDeclaratorSyntax and not PropertyDeclarationSyntax)
{
return;
}
Expand All @@ -431,31 +429,79 @@ initializer.Parent is not VariableDeclaratorSyntax and not PropertyDeclarationSy
property, context.CancellationToken),
_ => null
};
if (symbol is not IFieldSymbol and not IPropertySymbol ||
if (symbol is not IFieldSymbol and
not IPropertySymbol and
not IEventSymbol ||
symbol.ContainingType is not { } type)
{
return;
}
var isStatic = symbol.IsStatic;
var constructor = (isStatic
var constructors = (isStatic
? type.StaticConstructors
: type.InstanceConstructors)
.OrderBy(static candidate => candidate.DeclaringSyntaxReferences
.FirstOrDefault()?.SyntaxTree.FilePath, StringComparer.Ordinal)
.ThenBy(static candidate => candidate.DeclaringSyntaxReferences
.FirstOrDefault()?.Span.Start ?? int.MaxValue)
.FirstOrDefault();
.Where(candidate =>
!AnalyzerGeneratedCodePolicy.IsGenerated(
candidate,
candidate.DeclaringSyntaxReferences.FirstOrDefault()?.SyntaxTree ??
initializer.SyntaxTree,
context.Compilation,
context.CancellationToken))
.ToArray();
var root = context.SemanticModel.GetOperation(
initializer.Value, context.CancellationToken);
if (constructor == null || root == null)
if (constructors.Length == 0 || root == null ||
AnalyzerGeneratedCodePolicy.IsGenerated(
symbol,
initializer.SyntaxTree,
context.Compilation,
context.CancellationToken))
{
return;
}
var outcome = AnalyzerSemanticOutcome.NotApplicable;
foreach (var operation in root.DescendantsAndSelf())
IMethodSymbol? constructor = null;
foreach (var candidate in constructors)
{
if (operation is not IInvocationOperation and not IObjectCreationOperation)
if (SharpProofControlAttributePolicy.ValidateAndShouldSuppress(
candidate,
session,
context.ReportDiagnostic,
context.CancellationToken))
{
session.RecordSemanticOutcome(
candidate,
AnalyzerSemanticOutcome.Suppressed);
continue;
}
constructor = candidate;
break;
}
if (constructor == null)
{
return;
}
var outcome = AnalyzerSemanticOutcome.NotApplicable;
var operationFacts = new DefiniteOperationFacts(
context.Compilation,
context.CancellationToken);
if (!CanReachMemberInitializer(
initializer,
isStatic,
context.SemanticModel,
operationFacts,
context.CancellationToken))
{
return;
}
foreach (var operation in RequiresCallSiteDiscovery
.ExecutableUnflowedDescendantsAndSelf(
root,
operationFacts))
{
outcome = AnalyzerSemanticOutcomes.Combine(
outcome,
RequiresCallSiteAnalyzer.AnalyzeInitializerCall(
Expand All @@ -466,6 +512,89 @@ initializer.Parent is not VariableDeclaratorSyntax and not PropertyDeclarationSy
session.RecordSemanticOutcome(constructor, outcome);
}

private static bool CanReachMemberInitializer(
EqualsValueClauseSyntax target,
bool isStatic,
SemanticModel semanticModel,
DefiniteOperationFacts operationFacts,
CancellationToken cancellationToken)
{
var containingType = target.FirstAncestorOrSelf<TypeDeclarationSyntax>();
var targetMember = target.FirstAncestorOrSelf<MemberDeclarationSyntax>();
if (containingType == null || targetMember == null)
{
return true;
}

foreach (var member in containingType.Members)
{
foreach (var initializer in GetMemberInitializers(member))
{
if (initializer.SyntaxTree == target.SyntaxTree &&
initializer.Span == target.Span)
{
return true;
}
if (!HasMatchingInitializationKind(
initializer,
isStatic,
semanticModel,
cancellationToken))
{
continue;
}
var operation = semanticModel.GetOperation(
initializer.Value,
cancellationToken);
if (operation != null &&
!operationFacts.MayCompleteNormally(operation))
{
return false;
}
}
if (member.SyntaxTree == targetMember.SyntaxTree &&
member.Span == targetMember.Span)
{
return true;
}
}
return true;
}

private static IEnumerable<EqualsValueClauseSyntax> GetMemberInitializers(
MemberDeclarationSyntax member)
{
return member switch
{
BaseFieldDeclarationSyntax field => field.Declaration.Variables
.Select(static variable => variable.Initializer)
.OfType<EqualsValueClauseSyntax>(),
PropertyDeclarationSyntax { Initializer: { } initializer } =>
[initializer],
_ => []
};
}

private static bool HasMatchingInitializationKind(
EqualsValueClauseSyntax initializer,
bool isStatic,
SemanticModel semanticModel,
CancellationToken cancellationToken)
{
var symbol = initializer.Parent switch
{
VariableDeclaratorSyntax variable => semanticModel.GetDeclaredSymbol(
variable,
cancellationToken),
PropertyDeclarationSyntax property => semanticModel.GetDeclaredSymbol(
property,
cancellationToken),
_ => null
};
return symbol is IFieldSymbol or IPropertySymbol or IEventSymbol &&
symbol.IsStatic == isStatic;
}

private static bool ValidateContractClauses(
IMethodSymbol method,
AnalyzerSession session,
Expand Down
29 changes: 21 additions & 8 deletions SharpProof.Analyzer.Core/AnalyzerGeneratedCodePolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ internal static bool IsGenerated(
SyntaxTree tree,
Compilation compilation,
CancellationToken cancellationToken)
{
return IsGenerated(
(ISymbol)method,
tree,
compilation,
cancellationToken);
}

internal static bool IsGenerated(
ISymbol symbol,
SyntaxTree tree,
Compilation compilation,
CancellationToken cancellationToken)
{
if (IsGenerated(tree, compilation, cancellationToken))
{
Expand All @@ -27,7 +40,7 @@ internal static bool IsGenerated(
var generated = compilation.Options.SyntaxTreeOptionsProvider?
.IsGenerated(tree, cancellationToken) ?? GeneratedKind.Unknown;
return generated != GeneratedKind.NotGenerated &&
HasGeneratedCodeAttribute(method, compilation);
HasGeneratedCodeAttribute(symbol, compilation);
}

internal static bool IsGenerated(
Expand Down Expand Up @@ -94,7 +107,7 @@ private static bool IsExactGeneratedHeader(string comment)
}

private static bool HasGeneratedCodeAttribute(
IMethodSymbol method,
ISymbol symbol,
Compilation compilation)
{
var generatedCode = compilation.GetTypeByMetadataName(
Expand All @@ -104,21 +117,21 @@ private static bool HasGeneratedCodeAttribute(
return false;
}

var scopes = new List<ISymbol> { method };
if (method.AssociatedSymbol != null)
var scopes = new List<ISymbol> { symbol };
if (symbol is IMethodSymbol { AssociatedSymbol: { } associated })
{
scopes.Add(method.AssociatedSymbol);
scopes.Add(associated);
}
for (var type = method.ContainingType;
for (var type = symbol.ContainingType;
type != null;
type = type.ContainingType)
{
scopes.Add(type);
}

foreach (var symbol in scopes)
foreach (var scope in scopes)
{
if (symbol.GetAttributes().Any(attribute =>
if (scope.GetAttributes().Any(attribute =>
SymbolEqualityComparer.Default.Equals(
attribute.AttributeClass?.OriginalDefinition,
generatedCode.OriginalDefinition)))
Expand Down
Loading