Repository navigation
fix: bind indexed some callbacks in Dafny - #233
DevChiniwala wants to merge 2 commits into
Conversation
Reject extra Array.some callback parameters instead of allowing their uses to capture outer variables in the element-only existential. Keep unary callbacks and captured variables unchanged, document the boundary, and cover the unsupported callback forms with regressions.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
CI update for Could a maintainer restart that setup job? My fork-contributor permissions do not allow cancelling or rerunning upstream Actions. I also applied #233 and #234 together locally: build, both typechecks, and all 326 unit tests pass. |
|
Is there a way we could support rather than reject? |
Range over valid positions and bind the element, index and source array without capturing receiver names. Cover empty arrays and retain proof obligations for both valid results and the original false postcondition.
|
Implemented support in |
Dafny's element-only
somelowering can silently resolve an index or source-array callback parameter to a same-named outer variable. That can verify a false JavaScript postcondition. Support two- and three-parameter inline callbacks by ranging over valid positions, evaluating the receiver once, and binding the element, index and source array in the callback's scope.Fresh internal names preserve receiver and captured-variable scope. A typed receiver binding handles empty arrays, and an explicit receiver-access trigger supports strict Dafny verification. The operation table documents indexed callbacks.
Validation:
Prepared with Codex assistance; the JavaScript behavior, generated output, positive proofs and negative verification check were executed locally.