Home / Docs / Diagnostics
U5003: Solver missing or version mismatch
Release v0.4.0
U5003 says that the solver could not run, and its message says why.
Why Una rejects it
Tier 1 runs the Z3 solver built into una, at the exact version that verification.lock pins, so that every proof can be reproduced (spec/12 §5, ADR 0003, ADR 0124). una never looks for a z3 program on the path: each query runs in a confined child process of una itself.
When the solver could not run, una check stops before discharging any obligation that the proof cache does not hold, and points at the solver_version of the lock. una check --tier 0 checks everything else without a solver.
How to fix it
The repair depends on the reason the message gives:
- Another version. "verification.lock pins z3 4.8.12, and this una (0.4.0) has z3 5.1.0 built in": set
solver_versionto the version thisunahas, whichuna --versionprints, or use aunawhose built-in Z3 is the pinned one. - No solver built in. "this development build has no solver built in": the
unawas built from source without the Z3 library. Runeval "$(scripts/z3-library.sh --export)"in the checkout, which setsUNA_Z3_LIB, then buildunaagain (compiler/testing.md §3). - Not confined. "the solver could not be confined", followed by the reason, such as "the solver must not run as root": run
unaas an ordinary user, in a container too (docker run --user 1000:1000 ...). - No handshake. The child could not be started, broke its confinement, or did not answer as this
una.
The repair at a glance
verification.lock
encoding_version = "una-smt-1"
solver = "z3"
- solver_version = "4.8.12"
+ solver_version = "5.1.0"
logic = "QF_UFLIA"
step_budget = 5000000
random_seed = 0Failing example
verification.lock
encoding_version = "una-smt-1"
solver = "z3"
solver_version = "4.8.12"
logic = "QF_UFLIA"
step_budget = 5000000
random_seed = 0src/demo.una
module demo
pub kind Seats = Int in 0..5000
pub book(seats: Seats) -> Int = seats
pub first() -> Int = book(1)Fixed example
verification.lock
encoding_version = "una-smt-1"
solver = "z3"
solver_version = "5.1.0"
logic = "QF_UFLIA"
step_budget = 5000000
random_seed = 0src/demo.una
module demo
pub kind Seats = Int in 0..5000
pub book(seats: Seats) -> Int = seats
pub first() -> Int = book(1)