Add executable loop-return and integer-division oracles and correct the rounded-division documentation - #31
Draft
Leitwolf11 wants to merge 8 commits into
Draft
Leitwolf11 wants to merge 8 commits into
Leitwolf11 wants to merge 8 commits into
Conversation
…he rounded-division documentation Execute more of the language through CorePrep, Xpp, Xmm and LLVM with both native optimizer settings and compare with values computed independently: - return from inside a for body, from a while nested in a for body, and from a do/while body before its trailing test; - rounded division: the specification examples and every sign combination of small operands against a formula written without the compiler's own; - remainder for every sign combination. All of these already behaved correctly; no implementation changes. The rounded division operator was described as floor division in four IR headers, the Haskell Core model and two documents, one of which claimed mathematical floor semantics for negative operands. The specification, the three Haskell constant evaluators and the LLVM backend all round to the nearest integer with exact halves away from zero, so 7 // 2 is 4 and 1 // 2 is 1. The descriptions now say so; the FloorDivide enumerator keeps its historical name.
Keeps both new LLVM backend test files in the suite: the arithmetic execution tests from this branch and the conditional execution tests from main.
…t/execution-oracles
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 changed
More of the language is executed through CorePrep, Xpp, Xmm and LLVM with both native optimizer settings and compared
with independently computed values:
returnfrom inside aforbody, from awhilenested in aforbody, and from ado/whilebody;//: the specification examples and every sign combination of small operands;%for every sign combination.All of these already behaved correctly. There is no implementation change.
Documentation correction
//was described as floor division in four IR headers, the Haskell Core model and two documents; one documentclaimed mathematical floor semantics for negative operands. The specification, the three Haskell constant evaluators
and the LLVM backend all round to the nearest integer with exact halves away from zero (
7 // 2is4,1 // 2is1). The descriptions now match. TheFloorDivideenumerator keeps its historical name.Verification
go run ./helpers/cmd/develop test: all 21 native suites passed (Windows); the new cases add 3 loop tests and5184 arithmetic assertions.
verify-docs, Haskell Core build and clang-format: PASS.macOS and Linux were not run locally.