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
[TS] Preserve fake values in symbolic reference-array reads #379
Typed-array override cells and fake-aware reads retain primitive payloads behind symbolic reference-array reads. The original input-reference-array reproduction now reaches the numeric result 44. Implementation: usvm #448, usvm #449.
Validation: A temporary source-level regression for inputAnyPreservesNumber passed through discoverProperties; a concrete numeric witness returned 44 in Node. Existing mixed-kind/alias/array-model regressions also passed.
Original report and acceptance context, retained for traceability
Problem
Symbolic reference-array reads can lose the fake-value representation when the address region contains a fake wrapper behind a symbolic array read.
A fake value must keep its boolean, number, and reference payloads together with the corresponding discriminators until its runtime kind is proven. Treating the resulting address expression as a plain reference drops the boolean/number alternatives.
This expression is not a concrete fake-wrapper heap reference, so isFakeObject() returns false. Consumers then treat it as a plain reference and can no longer access the boolean/FP64 payloads or discriminator constraints.
Root cause
Reference-element arrays are normalized to the unknown[] storage descriptor.
A fake wrapper can be written to that address region.
Reading the symbolic address region may return a conditional expression containing the wrapper rather than the concrete wrapper itself.
Current fake-value recognition and extraction handle only a concrete synthetic wrapper reference.
Required behavior
Implement a fake-aware symbolic array read that preserves all supported representations and discriminator constraints, including alias consistency for already materialized fake values.
Until this is implemented, semantic models must not claim symbolic/input reference arrays as a supported domain.
Regression test
PR #377 will include a disabled end-to-end regression test linked to this issue.
Activity