State in C-132 that a mut-param write made before an err is visible to the caller - #117
Merged
Merged
Conversation
…o the caller, and pin it with a mut_param_err_write_visible fixture Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
What
Carries the ruling on almide/almide#2917 (#1871 option (B), "write visible") into the judge.
C-132: the #1576 part said the err arm carries no buffer and that a
!site propagates before any write-back, so the caller keeps its pre-call value. That is withdrawn. Its "Boundary … stays walled" sentence is dropped. It is replaced by an AMENDED paragraph:mutparam before it errs is visible to the caller, as with native&mut.err(..), a guard, everyx!/x?.??,match, bound Result,let _ =) writes back, then yields ok/err.!call writes back, then propagates.The exclusion of a declared-Result effect fn whose err type is not
Stringis kept.C-226: it no longer describes the value-returning mut-param effect fn as "the documented C-132 exclusion". It points at C-132's ok and err arms.
New fixture
spec/wasm_cross/mut_param_err_write_visible.almd:!;??,match, bound Result,let _ =, and a!forwarded one level up;The header comment of
mut_param_effect_can_err.almdno longer states the old order.The reference evaluator already copies
mutfinals out on every exit (call_fn_muts), so the ref needs no change. On the new fixture,als-ref runand native almide 0.64.0 print identical stdout, exit 0. The wasm legs wall on it today; almide/almide#2917 implements it.ALS-M13's prose is general ("written back at every call position") and does not contradict this, so it is left unamended. Amending it would need a fresh review stamp in
proofs/als-validation.toml.Author / verifier record
Ratchets loosened in this PR (ceiling up / floor down): none.