Repository navigation
Prepare for EigenScript's boolean type (EigenScript#1637) - #122
Merged
Merged
Conversation
Under EigenScript#1637 has_key/contains/write_text/rm and every comparison return a bool, and `bool == num` raises. Each site now tests truthiness, which behaves identically on v0.44.0 (1/0) and on the bool-typed runtime. Patterns: - `(P of ..) ==|!= 0|1` -> `(P of ..)` / `not (P of ..)` (24 lines) - lib/bench.eigs:1470,1472,1483 `wrote != 1`, `wrote == 1`, `removed == 1` (write_text / rm results) -> `not wrote`, `wrote`, `removed` - tests/test_solver.eigs:650,661,867 `assert_eq of [label, X, 1]` -> `assert_true of [label, X]` where X is a bool (found by an instrumented assert_eq that reports bool-vs-num instead of raising) - tests/test_active_learnts.eigs:83,88 `require_* != 0` -> `require_*` (a caller passes `compact_mode != "lazy"`) Changed hunks (file: start lines): - lib/bench.eigs 452,757,1470,1472,1483,1499 - lib/dimacs.eigs 63 - lib/solver.eigs 881,883,885,1192,1196,1200,1204,1206,1210,1214,1218,1222,1226,1230,1234,1249,1258,1262,1268 - tests/test_active_learnts.eigs 83,88 - tests/test_solver.eigs 650,661,810,867 Before: on the bool binary (PR #1647, 79e800aa) run_smoke.sh, run_proof_check.sh and the proof-shape benchmark failed (first at lib/solver.eigs:1192, has_key != 0). After: all four CI steps exit 0 on v0.44.0 and on the bool binary. Output differs only in timings and in the informational bench line, which prints wrote=true removed=true instead of wrote=1 removed=1 (no golden pins it). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KC99CmwatKssQYggkBCgwF
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins. |
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.
Prepare for EigenScript's boolean type (EigenScript#1637)
Under EigenScript#1637 has_key/contains/write_text/rm and every
comparison return a bool, and
bool == numraises. Each site nowtests truthiness, which behaves identically on v0.44.0 (1/0) and on
the bool-typed runtime.
Patterns:
(P of ..) ==|!= 0|1->(P of ..)/not (P of ..)(24 lines)wrote != 1,wrote == 1,removed == 1(write_text / rm results) ->
not wrote,wrote,removedassert_eq of [label, X, 1]->assert_true of [label, X]where X is a bool (found by aninstrumented assert_eq that reports bool-vs-num instead of raising)
require_* != 0->require_*(a caller passes
compact_mode != "lazy")Changed hunks (file: start lines):
Before: on the bool binary (PR #1647, 79e800aa) run_smoke.sh,
run_proof_check.sh and the proof-shape benchmark failed (first at
lib/solver.eigs:1192, has_key != 0). After: all four CI steps exit 0
on v0.44.0 and on the bool binary. Output differs only in timings and
in the informational bench line, which prints wrote=true removed=true
instead of wrote=1 removed=1 (no golden pins it).
Claude-Session: https://claude.ai/code/session_01KC99CmwatKssQYggkBCgwF
Prepares this repo for the boolean type in EigenScript#1637 (PR EigenScript#1647). Every edit is dual-compatible: this repo's real CI command was run on both the v0.44.0 release binary and the PR#1647 binary, with matching results except for the bump-phase golden items listed in EigenScript#1637's consumer report. This PR lands on the current v0.44.0 pin; the golden/C-API changes land with the later pin bump.
🤖 Generated with Claude Code
https://claude.ai/code/session_01KC99CmwatKssQYggkBCgwF