Run generated properties through the compiled backend - #974
Merged
Conversation
onatozmenn
force-pushed
the
compiled-properties
branch
3 times, most recently
from
August 12, 2026 13:19
c584f77 to
b5b00c4
Compare
onatozmenn
force-pushed
the
compiled-properties
branch
from
August 12, 2026 13:49
b5b00c4 to
c587118
Compare
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 this changes
deed test --compiledstopped after written test blocks, while the interpreted command also ran seven properties generated from contracts. The corpus therefore reported 111 compiled passes against 138 interpreted results.The compiled path now runs those generated properties too. The corpus reports 118 compiled passes, and the existing six backend skip records remain named separately.
Why this way
The generator, precondition filtering and contract evaluation stay in
deed-interp; there is still one implementation ofensures. Each accepted generated value is encoded into the compiled module's own memory from its MIR layout, the export is called, and the answer is decoded and compared structurally with the interpreter's answer.This covers numbers, booleans, unit, text, lists, records, choices and
Result, including nested values. The codegen oracle exposes one prepared-call boundary rather than duplicating the module's layout or allocator in the CLI.What it still does not do
This does not add postcondition checks to ordinary compiled calls. It runs contract-generated tests through the compiled backend while keeping the interpreter as the contract oracle. It also does not make the backend lower the six existing skip records.
Checks
cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo nextest run --workspace --profile ci --no-fail-fast(2486 passed)cargo test --doc --workspacecargo run -q -p deed-lang -- test --compiled examples(118 passed, 6 named skips)assert refusesclassification.AI assistance: GitHub Copilot implemented and verified this change.