Skip to content

[TS] Add private assume for source semantic models - #534

Open
CaelmBleidd wants to merge 2 commits into
caelmbleidd/isolate-source-model-resolutionfrom
caelmbleidd/private-source-model-assume
Open

CaelmBleidd wants to merge 2 commits into
caelmbleidd/isolate-source-model-resolutionfrom
caelmbleidd/private-source-model-assume

Conversation

@CaelmBleidd

Copy link
Copy Markdown
Member

Adds a private TsModelPrimitives.assume(condition: boolean): void intrinsic for source-model artifacts. It accepts only a same-artifact, unnamespaced helper call from a private source-model caller while that artifact has an active dispatcher-owned frame. Ordinary application declarations remain unknown calls. Model authors select the existing catalog dependency ts.model.assume; there is no public application API or new model framework.

The positive Boolean guard is the only continuation. False/inconsistent assumptions prune the state without FRESH completion, unsupported-prefix reporting or engine failure. The dispatcher now treats a model relation with no feasible successor as pruning instead of throwing. Existing fork machinery refreshes cached solver models. Evaluating a TypeScript short-circuit argument can still branch before the helper call; this bridge does not rewrite arbitrary source expressions.

Validation: six focused assumption tests plus five existing stopped-prefix tests pass, including constant true/false, symbolic guard, deliberately incompatible cached models, application spoofing, namespace ownership and absent active frame. Positive numeric witnesses replay against the original identity-call contract in Node. Strict usvm-ts detektMain/detektTest passed. Namespace and inactive-frame ownership checks deliberately exercise the low-level dispatcher contract; the assumption execution tests use ordinary TypeScript source calls. No new production model is made approximate or domain-restricted by this PR.

Depends on #528 for the source artifact ownership boundary; its review diff is based on that branch. The no-survivor dispatcher hunk is separate from the Date residual-receiver preservation work and from #530's per-helper fallback policy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant