Repository navigation
steins-infer: the value relation judges null, arrays, closures and native tops as PHP does (#951, #941, #952, #1051 S1) - #1060
Merged
Conversation
2 tasks
zonuexe
force-pushed
the
claude/ta-s1-value-relation
branch
from
October 11, 2026 09:19
cffef3c to
1a4064e
Compare
zonuexe
added a commit
that referenced
this pull request
Oct 11, 2026
…uard table, private, protected and __set writes, and an alias of an engine class (#1060)
zonuexe
force-pushed
the
claude/ta-s1-value-relation
branch
from
October 11, 2026 09:55
1a4064e to
cbef422
Compare
zonuexe
added a commit
that referenced
this pull request
Oct 11, 2026
…uard table, private, protected and __set writes, and an alias of an engine class (#1060)
zonuexe
added a commit
that referenced
this pull request
Oct 11, 2026
…set, read by name so a trait's counts (#1060)
zonuexe
added a commit
that referenced
this pull request
Oct 11, 2026
…ested value, is_callable's syntax_only binding, and traits without __set (#1060)
zonuexe
added a commit
that referenced
this pull request
Oct 11, 2026
…stays undecided, since PHP 7.4 and 8.0+ answer it differently, and every other predicate decided on a proven value is pinned as answering alike from 7.4 up (#1060)
zonuexe
added a commit
that referenced
this pull request
Oct 11, 2026
…lue only where PHP 7.4 through 8.5 agree, naming is_numeric's trailing whitespace (#1060)
…set, read by name so a trait's counts (#1060)
…ested value, is_callable's syntax_only binding, and traits without __set (#1060)
…stays undecided, since PHP 7.4 and 8.0+ answer it differently, and every other predicate decided on a proven value is pinned as answering alike from 7.4 up (#1060)
…lue only where PHP 7.4 through 8.5 agree, naming is_numeric's trailing whitespace (#1060)
zonuexe
force-pushed
the
claude/ta-s1-value-relation
branch
from
October 11, 2026 10:51
e42ecde to
ffa00a3
Compare
zonuexe
marked this pull request as ready for review
October 11, 2026 10:57
zonuexe
added a commit
that referenced
this pull request
Oct 11, 2026
…uard table, private, protected and __set writes, and an alias of an engine class (#1060)
zonuexe
added a commit
that referenced
this pull request
Oct 11, 2026
…set, read by name so a trait's counts (#1060)
zonuexe
added a commit
that referenced
this pull request
Oct 11, 2026
…ested value, is_callable's syntax_only binding, and traits without __set (#1060)
zonuexe
added a commit
that referenced
this pull request
Oct 11, 2026
…stays undecided, since PHP 7.4 and 8.0+ answer it differently, and every other predicate decided on a proven value is pinned as answering alike from 7.4 up (#1060)
This was referenced Oct 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slice S1 of the type/arity reproduction run (#1051). It opens the native value relation's deliberate silences for #951 a–f, #941 a/b and #952 l1, following the PHP 8.5.11 table in #1051 §C5.
What changed
steins-syntax: a parameter now records a native top (array,object,iterableorcallable, optionally nullable) asParam.top. Before,lower_hintdropped it.crates/steins-infer/src/value_tops.rs(new):top_is_type_error, the closure certainty check, and the builtin null rejection.is_type_error:= nulldefault and the builtin scalar coercive carve-out still accept it.Closureclass.newor enum case reaches the typed-property seam.absence.rshandle this.Validation
arrayand class/null exceptions are gone.value_relation_openings.rshas 69 tests. 36 fail on base; the controls and declines pass on both.-D warnings.Declined (pinned)
["stdClass","nope"]andnew stdClasstocallable. Under the ADR rules a reflected class never convicts.self::orparent::strings.stringin coercive mode.type.return-mismatchdoes not read the enforced top:function f(): array { return 'x'; }reports nothing while A2 silently drops the exit #727; about 100 grid cells per mode stay silent.Measurement (ten public packages)
tests/end-to-end/logging/_files/TypeErrorTest.php:22, atype.property-mismatchfornew DateTimeinto aDateTimeImmutableproperty. It is a deliberate TypeError fixture, a true positive, and is pinned inexpected_proof_findings.toml.effect-diff: identical.Not measured
Review outcome
Adversarial review: four rounds, now approved.
is_callableguard did not vouch for the name it tests.isset,is_countableandis_aover a proven null went unmodelled.__set.is_callabledid not vouch, and the trait decline was too broad. Fixes:syntax_onlyargument binds by position or by name.__setis looked up through traitusechains.is_numericwas decided with PHP 8 rules under a PHP 7.4 pin. A type test is now decided on a proven value only where every PHP from 7.4 up agrees. That was checked on 18 predicates × 24 values on 7.4.33, 8.0.28 and 8.5.11. The only version-dependent cells areis_numericon a numeric string with trailing whitespace, which stays undecided.if (T) { return; }, where T is a test the walk cannot decide (for examplectype_*ormethod_exists), the tested value stays forgotten, because the surviving side may be the only live one. This loses 4 witness reports that master made. It is the sound direction.