Skip to content

tests: the tests of ifs in a row prove their contracts with z3 - #4578

Closed
hiraditya wants to merge 1 commit into
mainfrom
tests-ifs-use-z3
Closed

hiraditya wants to merge 1 commit into
mainfrom
tests-ifs-use-z3

Conversation

@hiraditya

Copy link
Copy Markdown
Collaborator

Part of #4574.

What changes

#4473 added tests/integration_test/compile_time_of_ifs_in_a_row.rs, and #4557 made the solver written in Vx the default one hour later. Each PR passed CI alone. Together, four of the five tests fail on main, so CI fails on each PR.

The solver written in Vx does not prove the contracts of these programs within its step limit, and vxc reports E8001. Each t + 1 of an i64 is a wrap by 2^64. Only an integer search shows that a sum does not wrap. The solver does that search again for each set of values of the 30 conditions. z3 proves each contract in less than a second.

These tests measure the facts that the type checker gives the prover, so they now choose z3 with VX_SOLVER=z3. #4574 stays open for the solver written in Vx. The fix there is to find the bounds that follow through the rows of the simplex, such as q = 0 for each wrap. That is the part of #4392 that is not done.

Tests

The five tests of compile_time_of_ifs_in_a_row.rs pass. Without VX_SOLVER=z3, four of them fail, as in the CI of #4565, #4568, #4485 and #4564.

#4473 added tests/integration_test/compile_time_of_ifs_in_a_row.rs, and
#4557 made the solver written in Vx the default one hour later. Each PR
passed CI alone. Together, four of the tests fail on main, so CI fails
on each PR.

The solver written in Vx does not prove the contracts of these programs
within its step limit. Each `t + 1` of an i64 is a wrap by 2^64, and
only an integer search shows that a sum does not wrap. z3 proves each
contract in less than a second.

The tests measure the facts that the type checker gives the prover, so
they now choose z3 with VX_SOLVER=z3. #4574 stays open for the solver
written in Vx.

Part of #4574
@hiraditya

Copy link
Copy Markdown
Collaborator Author

Closed: #4579 merged the same change, VX_SOLVER=z3 in the tests of compile_time_of_ifs_in_a_row.rs. The fix in the solver written in Vx goes to #4567.

@hiraditya hiraditya closed this Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant