Repository navigation
[TS] Preserve sparse array slots in source mutation models - #477
Merged
Merged
Conversation
CaelmBleidd
force-pushed
the
caelmbleidd/fix-main-sparse-array-dispatch
branch
from
October 13, 2026 21:38
c8f3cc4 to
ff9d354
Compare
CaelmBleidd
added a commit
that referenced
this pull request
Oct 13, 2026
Apply the sparse array model and regression changes from PR #477 (6e68f69). The PR #418 head still inherited the two failing SparseArrayIteratorSourceTest cases. Validation: full usvm-ts, usvm-ts-dataflow, and usvm-ts-calls checks passed on JDK 11 with the native TypeScript frontend. Main/test Detekt and git diff --check passed.
This was referenced Oct 13, 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.
The
reverseandunshiftsource models rejected arrays with known holes, stopping previously supported sparse-array programs. Extend their accepted receivers to arrays with known own-element presence or a dense-array proof. The TypeScript bodies now preserve missing elements through ordinary indexed writes and deletes; model-ownedprepareOwnSlotsandhasOwnSlotprimitives provide the required metadata.All calls continue through normal model selection, application events, and residual fallback. The generic call resolver and dispatcher have no special sparse-array handling. The models retain their length/result limit of 16 and the existing unshift arity bound of three arguments.
Regressions cover asymmetric holes, aliases, boxed values, conditional deletion, zero/multiple unshift arguments, disabled models, and Node.js replay. They explicitly require
ModelAppliedevents. Three of the six sparse regression tests fail on the previous PR head because its resolver bypass does not apply the source models.Validation on the final implementation:
:usvm-ts:check :usvm-ts-dataflow:check :usvm-ts-calls:checkpassed locally: 1510 passed, 175 skipped, zero failures/errors.ETS_IR_PROVIDER=ts-frontend, sequential execution; MockK JVM self-attach enabled locally.git diff --checkpassed.Remote CI must validate the published head before merging.