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
Z3 /api/verify rejects valid SMT-LIB queries: treats user input as proof obligation #10
POST /api/verify with a straightforward SMT-LIB satisfiability query returns valid:false even when Z3 would report sat directly. This blocks use of echidna as a general SMT-LIB dispatcher (e.g., as the backend for nesy-solver.dev).
Reproduce
With echidna running via echidna server --port 8090:
curl -X POST http://localhost:8090/api/verify \
-H "Content-Type: application/json" \
-d '{"prover":"Z3","content":"(declare-const x Int) (assert (> x 0)) (check-sat)"}'
Same query sent directly to Z3 (z3 -in) returns sat.
Root cause
src/rust/server.rs:279 (verify_handler) calls prover.verify_proof(&state), which for Z3 (src/rust/provers/z3.rs:300) does:
Takes ProofState produced by parse_smt_file (goals + assertions)
Asserts negation of each goal
Runs (check-sat)
Returns true iff unsat (goal is provable)
So echidna treats the submitted SMT-LIB as proof obligations to discharge, not as a query to evaluate. The distinction is invisible in the endpoint name and documentation.
/api/eval (new) runs the SMT-LIB verbatim and returns {sat|unsat|unknown, model?}
Option B — documentation fix: make the proof-obligation semantics explicit in the API docs and the VerifyResponse type. Downstream clients will wrap their SMT accordingly.
Option C — prover-aware routing: when prover=Z3 (or CVC5), detect whether input contains a (check-sat) and route to passthrough evaluation rather than obligation-negation.
Impact
The nesy-solver.dev playground (Phase E3 deploy) forwards user-submitted SMT-LIB to /api/verify expecting evaluation semantics. All Z3 submissions return valid:false regardless of satisfiability. The pipeline is technically working (requests land, attempts record in verisimdb), but the verdict column is meaningless for non-obligation input.
Fixed in fbad8e6. now detects SMT query payloads for Z3/CVC5 (presence of ) and routes them through raw solver evaluation instead of proof-obligation negation semantics. Response now includes and () when that path is used.
Activity
hyperpolymath commentedon Apr 7, 2026
Fixed in fbad8e6. now detects SMT query payloads for Z3/CVC5 (presence of ) and routes them through raw solver evaluation instead of proof-obligation negation semantics. Response now includes and () when that path is used.
hyperpolymath commentedon Apr 7, 2026
Resolution details (clean copy):
fbad8e6./api/verifynow detects SMT query payloads for Z3/CVC5 when input contains(check-sat).mode: "smt-query"smt_status: "sat" | "unsat" | "unknown"(when available)