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:

The repair at a glance

verification.lockdiff
  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      = 0

Failing example

verification.locktoml
encoding_version = "una-smt-1"
solver           = "z3"
solver_version   = "4.8.12"
logic            = "QF_UFLIA"
step_budget      = 5000000
random_seed      = 0
src/demo.unauna
module demo

pub kind Seats = Int in 0..5000

pub book(seats: Seats) -> Int = seats

pub first() -> Int = book(1)

Fixed example

verification.locktoml
encoding_version = "una-smt-1"
solver           = "z3"
solver_version   = "5.1.0"
logic            = "QF_UFLIA"
step_budget      = 5000000
random_seed      = 0
src/demo.unauna
module demo

pub kind Seats = Int in 0..5000

pub book(seats: Seats) -> Int = seats

pub first() -> Int = book(1)