You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 07bb106
Browse filesBrowse the repository at this point in the historyBrowse files
P-037 A2.2-4R2: F-PARAMS-ELEMENT repaired; an expanded params element is classified with its element conversion
A2.2-4's completeness oracle found (formal note §10.6.10, F-PARAMS-ELEMENT,
§10.1 case 1) that an expanded params argument was classified from its bare
syntax. Roslyn attaches no argument operation to such an argument — the
ParamArray argument carries the call's own syntax — so the span-containment
match found nothing and the fallback classified `model.GetOperation` of the
element alone: under parentheses or the null-forgiving `!` there is no
operation of the element's own and the handle was lost (the call not
relevant, no fact); a struct handle boxed into `params object[]` or a handle
passed through op_Implicit into `params Box[]` classified as the unconverted
local and yielded an opaque-and-relevant slot although nothing of the handle
reaches the callee. Pinned RED on the pairwise cases whose binding is params
and whose value-flow shape is parens, bang, boxing or user_implicit.
The repair, in EmitCall.ValueOf: when no argument operation is attached to
the argument's span, look the element up in the ParamArray argument's array
initializer (the IArrayCreationOperation element whose syntax the argument
contains) before falling back to the bare expression. The element carries
its own conversion, so the existing walker decides it with no new rule:
`(r)` and `r!` yield the local reference (a handle; the params slot stays
opaque and the call relevant), a boxed element yields a boxing conversion
and a user-converted element a user-defined one (not a handle, no fact).
The collapsed form, an array passed whole, matched by span before and still
does. Nothing else in the binding or the walker moves.
Measured on this tree: the 52 census shapes read byte-identical; the probe's
oracle reading is unchanged (RED 1, F-MEMBER); the affected pairwise cases
read green by the generic design (the pinning block leaves the generator);
every other pinned RED stays as pinned (F-MEMBER, F-CONDITIONAL-RECEIVER,
F-VOCAB); the inertness control and the local rehearsal against the T
before-takes are unchanged on both engines. The ledger moves
F-PARAMS-ELEMENT to `closed`; spec/OwnIR.md §5.2 states the element rule;
§10.6.9 and §10.6.11 record the landing. Same instrument, no new T/R.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QfeUtLRm6KFRWcTGQZxQQb
Copy file name to clipboardExpand all lines: corpus/p037-relevance/oracle_findings.json
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -9,13 +9,6 @@
9
9
"status": "open: a census finding; carrying these members in the orphan carrier is a production change to be classified on its own",
10
10
"red": "occurrence_not_captured"
11
11
},
12
-
"F-PARAMS-ELEMENT": {
13
-
"class": "case 1",
14
-
"title": "an expanded params element is classified from its bare syntax",
15
-
"evidence": "For an expanded params argument the argument operation carries the call's own syntax, so the span-containment match finds nothing and the fallback classifies `model.GetOperation(expression)` of the element alone. A transparent wrapper (parentheses, the null-forgiving `!`) has no operation of its own, so the handle under it is lost and the call is not relevant; a boxing or user-defined element conversion sits on the array element, not on the expression, so a struct handle boxed into `params object[]` or a handle passed through op_Implicit into `params Box[]` yields an opaque-and-relevant slot although nothing of the handle reaches the callee. Witnessed by the hostile cases whose binding is `params` and whose value-flow shape is parens, bang, boxing or user_implicit; casts, `as` and the may-value forms have operations of their own and are classified correctly.",
16
-
"status": "open: an implementation defect in the A2 classifier, to be repaired as its own classified change",
"title": "a reduced extension receiver under `?.` is not bound to ordinal 0",
@@ -47,6 +40,13 @@
47
40
"evidence": "BuildGuardedFacts receives the legacy candidate NAMES and tests `handles.Contains(lr.Local.Name)`; the candidate collector descends into lambda bodies. Two locals spelled alike in sibling scopes, or a lambda-local creation beside an unrelated local of the same spelling, produce a var fact on a symbol that is no candidate: a false raw fact. Witnessed by three hostile cases.",
48
41
"status": "closed: A2.2-4R1. BuildGuardedFacts takes symbol sets (SymbolEqualityComparer.Default) recorded at the legacy admission points beside the names; the legacy name-based structures are untouched. The three shadow witnesses are designed green; the oracle's fact_binds_other_symbol check stays armed.",
49
42
"red": "fact_binds_other_symbol"
43
+
},
44
+
"F-PARAMS-ELEMENT": {
45
+
"class": "case 1",
46
+
"title": "an expanded params element is classified from its bare syntax",
47
+
"evidence": "For an expanded params argument the argument operation carries the call's own syntax, so the span-containment match finds nothing and the fallback classifies `model.GetOperation(expression)` of the element alone. A transparent wrapper (parentheses, the null-forgiving `!`) has no operation of its own, so the handle under it is lost and the call is not relevant; a boxing or user-defined element conversion sits on the array element, not on the expression, so a struct handle boxed into `params object[]` or a handle passed through op_Implicit into `params Box[]` yields an opaque-and-relevant slot although nothing of the handle reaches the callee. Witnessed by the hostile cases whose binding is `params` and whose value-flow shape is parens, bang, boxing or user_implicit; casts, `as` and the may-value forms have operations of their own and are classified correctly.",
48
+
"status": "closed: A2.2-4R2. ValueOf classifies an expanded params element from the ParamArray argument's array initializer element (its conversion included) instead of the bare syntax; the affected pairwise cases are designed green by the generic rule.",
Copy file name to clipboardExpand all lines: docs/notes/p037-formal-kernel.md
+22-2Lines changed: 22 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1166,7 +1166,12 @@ causes of FACT-DIFF. Tracked in #364 with its own acceptance.
1166
1166
line: the sidecar's handle and owned-parameter sets are symbol sets recorded
1167
1167
at the legacy admission points beside the names, the legacy name-based
1168
1168
structures untouched; the three shadowing witnesses read green, every other
1169
-
pinned RED stays, the 52 shapes and the probe are byte-identical;
1169
+
pinned RED stays, the 52 shapes and the probe are byte-identical. R2
1170
+
landed in the commit carrying this line: an expanded params element is
1171
+
classified from the ParamArray argument's array-initializer element, its
1172
+
element conversion included, so a handle under parentheses or `!` is no
1173
+
longer lost and a boxed or user-converted element no longer yields a false
1174
+
slot; the affected pairwise cases read green by the generic design;
1170
1175
-**A2.2-5** mutation campaign: remove the handle, add parentheses, perturb the
1171
1176
binding, distinguish nested calls;
1172
1177
-**A2.2-S** cumulative A2 after-evidence on M1 against the existing R with
@@ -1223,7 +1228,7 @@ does a pinned RED that silently disappears):
1223
1228
|---|---|---|---|
1224
1229
| F-MEMBER | 3 | expression-bodied members, struct and record methods, property accessors are outside the legacy admission *and* the orphan carrier (the gates sit inside the class / block-body loop) | probe `Box.op_Implicit`; hostile `member-*`|
1225
1230
| F-SHADOW | 1 | the guarded-fact handle set was keyed by spelling (`handles.Contains(lr.Local.Name)`) and the candidate collector descends into lambdas: a same-spelled non-candidate in a sibling scope, or beside a lambda-local creation, got a false `var` fact. **Repaired in A2.2-4R1** (10.6.11) | hostile `shadow-*`, now green |
1226
-
| F-PARAMS-ELEMENT | 1 | an expanded params element is classified from its bare syntax: under parentheses or `!` the handle is lost (no operation of its own); under a boxing or user-defined element conversion a false opaque-and-relevant slot is emitted| hostile `pw-*-params-*` with parens / bang / boxing / user_implicit |
1231
+
| F-PARAMS-ELEMENT | 1 | an expanded params element was classified from its bare syntax: under parentheses or `!` the handle was lost (no operation of its own); under a boxing or user-defined element conversion a false opaque-and-relevant slot was emitted. **Repaired in A2.2-4R2** (10.6.11) | hostile `pw-*-params-*` with parens / bang / boxing / user_implicit, now green|
1227
1232
| F-CONDITIONAL-RECEIVER | 1 |`r?.Ext(...)` invokes through a member binding, the receiver is read from `MemberAccessExpressionSyntax` only, and ordinal 0 is dropped | hostile `ext-conditional-access`|
1228
1233
| F-VOCAB | 3 | four argument shapes the frozen list has no name for: a tested operand, an interpolation hole, an indexer argument, a constructor-initializer argument; production correctly emits nothing, the sentence demands a name | hostile `vocab-*`|
1229
1234
@@ -1279,3 +1284,18 @@ nested-function gap.
1279
1284
facts are byte-identical; the three shadowing witnesses read green
1280
1285
(`shadow-lambda-local` now has no fact and no carrier, the truth); every
1281
1286
other pinned RED stays; inertness and the local rehearsal unchanged.
1287
+
-**R2, F-PARAMS-ELEMENT.** In `EmitCall.ValueOf`, when no argument operation
1288
+
is attached to the argument's span, the expanded params element is looked
1289
+
up in the ParamArray argument's `IArrayCreationOperation` initializer (the
1290
+
element whose syntax the argument contains) before falling back to
1291
+
`GetOperation` on the bare expression. The element carries its own
1292
+
conversion, so the existing walker decides it: `(r)` and `r!` yield the
1293
+
local reference (a handle, `opaque` in the params slot, relevant), a struct
1294
+
handle into `params object[]` yields a boxing conversion (not a handle) and
1295
+
a handle into `params Box[]` a user-defined one (not a handle). The
1296
+
collapsed form (an array passed whole) matched by span before and still
1297
+
does. Measured: the 52 shapes and the probe byte-identical; the four
1298
+
affected pairwise compositions (parens, bang, boxing, user_implicit under an
1299
+
expanded params binding, across site forms and carriers) read green by the
1300
+
generic design; every other pinned RED stays; inertness and the local
0 commit comments