You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Four compile_time_of_ifs_in_a_row tests fail on main: the Vx solver cannot prove their ensures #4567
cargo test --test integration_test compile_time_of_ifs_in_a_row (debug build):
vxc failed on 30 one-sided if statements in a row:
Warning at /tmp/.tmppEoXos/prog.vx:36:3: SMT solver error: the solver written in Vx found neither a proof nor a counterexample. It may have reached its limit of 10000 steps
Error[E8001] at /tmp/.tmppEoXos/prog.vx:36:3: Function 'step' cannot prove postcondition (ensures) at compile time
#4473 added these tests at 3242769, and its checks used z3. #4557 (0b8dc58) then made the solver written in Vx the default. So the tests now use that solver, and it cannot prove the ensures of step. PR #4565 reports the same failures. It also says that the Vx solver takes about 10 s on these programs in a debug build, and z3 takes 0.4 s.
Three of the four tests fail with E8001 at the step limit, not on time. The solver written in Vx refuses a correct program:
Warning at prog.vx:36:3: SMT solver error: the solver written in Vx found neither a proof nor a counterexample. It may have reached its limit of 10000 steps
Error[E8001] at prog.vx:36:3: Function 'step' cannot prove postcondition (ensures) at compile time
vxc prog.vx -j 1 --action print-ast, with a debug vxc on main 9acbab8 and libvx_solver.so from scripts/build_solver_library.sh:
Test program
Solver written in Vx
z3 (VX_SOLVER=z3)
30 if/else statements
E8001 at the step limit, 9.8 s
proved, 0.4 s
30 one-sided if statements
E8001 at the step limit, 2.6 s
proved, 0.3 s
30 if/else statements on a struct field
E8001 at the step limit, 14.1 s
proved, 0.6 s
12 four-arm match statements
no result after 120 s (stopped)
proved, 0.7 s
The test file builds each program. Its time limit is 5 s.
#4584 makes the solver written in Vx prove the 4 programs of this issue within 10000 steps. For each mod and div by a constant, q is 0 when the sum is in range, and the simplex checks the atoms during the search for each query. It also fixes #4488.
The tests of compile_time_of_ifs_in_a_row.rs still choose z3 after #4584. With the runtime of a debug build, each program takes about 2 s alone, and 2 of them went past the 5 s limit under the load of the test suite. #4583 has the cause: the runtime work around each drop at opt-level 0. A PR stacked on #4584 builds that runtime with optimization in debug builds, and removes VX_SOLVER=z3 from these tests. That PR fixes this issue.
#4585, stacked on #4584, fixes this issue: it builds the runtime at opt-level 3 in debug builds, and removes VX_SOLVER=z3 from compile_time_of_ifs_in_a_row.rs. In its commit hook, the five tests passed with the solver written in Vx, under the load of the whole suite.
Activity
hiraditya commentedon Dec 4, 2026
More data, from #4574, which repeats this issue:
ifstatements in a row from doubling the prover's facts #4473 added the tests one hour before hir: the solver written in Vx is the default, and VX_SOLVER=z3 chooses z3 #4557 merged. The CI run of hir: the solver written in Vx is the default, and VX_SOLVER=z3 chooses z3 #4557 used amainwithout these tests, so each PR passed alone.vxc prog.vx -j 1 --action print-ast, with a debug vxc on main 9acbab8 andlibvx_solver.sofromscripts/build_solver_library.sh:VX_SOLVER=z3)ifstatementsmatchstatementsThe test file builds each program. Its time limit is 5 s.
Generated With Claude Code
tests: the compile-time tests of if statements in a row use z3 (#4579)
hiraditya commentedon Dec 4, 2026
#4584 makes the solver written in Vx prove the 4 programs of this issue within 10000 steps. For each
modanddivby a constant,qis 0 when the sum is in range, and the simplex checks the atoms during the search for each query. It also fixes #4488.The tests of
compile_time_of_ifs_in_a_row.rsstill choose z3 after #4584. With the runtime of a debug build, each program takes about 2 s alone, and 2 of them went past the 5 s limit under the load of the test suite. #4583 has the cause: the runtime work around eachdropat opt-level 0. A PR stacked on #4584 builds that runtime with optimization in debug builds, and removesVX_SOLVER=z3from these tests. That PR fixes this issue.hiraditya commentedon Dec 4, 2026
#4585, stacked on #4584, fixes this issue: it builds the runtime at opt-level 3 in debug builds, and removes
VX_SOLVER=z3fromcompile_time_of_ifs_in_a_row.rs. In its commit hook, the five tests passed with the solver written in Vx, under the load of the whole suite.std::algo::smt: a wrap of a sum that stays in range is that sum, and …
build: optimize the runtime in debug builds, so the tests of ifs in a…