This guide explains how to install Z3 and CVC5 SMT solvers for use with the Cure compiler's dependent type verification system.
---
# Install from official repositories (Ubuntu 20.04+)
sudo apt-get update
sudo apt-get install z3
# Verify installation
z3 --version
# Expected output: Z3 version 4.8.x or later
# Install dependencies
sudo apt-get install python3 git cmake build-essential
# Clone and build
git clone https://github.com/Z3Prover/z3.git
cd z3
python3 scripts/mk_make.py
cd build
make
sudo make install
# Verify
z3 --version
Create a test file test.smt2:
(set-logic QF_LIA)
(declare-const x Int)
(declare-const y Int)
(assert (> x y))
(assert (> y 0))
(check-sat)
(get-model)
Run:
z3 -smt2 test.smt2
# Expected output:
# sat
# (model
# (define-fun y () Int 1)
# (define-fun x () Int 2)
# )
---
# Download latest release
wget https://github.com/cvc5/cvc5/releases/download/cvc5-1.0.8/cvc5-Linux
chmod +x cvc5-Linux
sudo mv cvc5-Linux /usr/local/bin/cvc5
# Verify installation
cvc5 --version
# Install dependencies
sudo apt-get install cmake libgmp-dev
# Clone and build
git clone https://github.com/cvc5/cvc5.git
cd cvc5
./configure.sh
cd build
make
sudo make install
# Verify
cvc5 --version
Using the same test.smt2:
cvc5 --lang smt2 test.smt2
# Expected similar output to Z3
---
The SMT solver is available at the Erlang API level and can be used programmatically:
% Start solver
{ok, Pid} = cure_smt_process:start_solver(z3, 5000).
% Check constraint
Result = cure_smt_solver:check_constraint(Constraint, Env).
% Stop solver
cure_smt_process:stop_solver(Pid).
The following options are documented for future implementation:
# Planned (not yet available):
./cure --smt-solver z3 examples/dependent_types.cure
./cure --no-smt examples/dependent_types.cure
./cure --smt-timeout 10000 examples/dependent_types.cure
Current CLI Options: See cure --help for currently available options.
---
which z3 or which cvc5--smt-timeout 30000z3 -smt2 -in (interactive mode)chmod +x /usr/local/bin/z3echo $PATH---
---
Older versions may work but are untested.
---
---
Last Updated: October 31, 2025