Repository navigation
[TS] Add private assume for source semantic models - #534
Open
CaelmBleidd wants to merge 2 commits into
Open
CaelmBleidd wants to merge 2 commits into
CaelmBleidd wants to merge 2 commits into
Conversation
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.
Adds a private
TsModelPrimitives.assume(condition: boolean): voidintrinsic 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 dependencyts.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.