-
src/SMTLib.jlcontains the mainSMTLibmodule and public API. -
test/runtests.jlholds the test suite driven by Julia’sTeststdlib. -
Project.tomldefines package metadata and dependencies. -
README.mddocuments features, usage, and solver prerequisites.
-
julia --project=. -e 'using Pkg; Pkg.instantiate()'installs dependencies for this project environment. -
julia --project=. -e 'using Pkg; Pkg.precompile()'precompiles for faster local runs. -
julia --project=. -e 'using Pkg; Pkg.test()'runs the test suite.
This package is pure Julia, so there is no separate build step beyond precompilation.
-
Prefer
find_solver(:z3)orfind_solver(:cvc5)when you need a specific backend. -
SMTContextacceptssolver,logic, andtimeout_ms(milliseconds). -
check_sat(ctx; get_model=false)skips model parsing when you only need status. -
The
@smtmacro mirrorsSMTContextoptions:@smt solver=:z3 logic=:QF_LRA timeout=10000 begin ... end.
-
Follow Julia conventions: 4-space indentation, CamelCase for types (
SMTContext), lowercase with underscores for functions (available_solvers), and!suffix for mutating functions (reset!,assert!). -
Keep public API exported from
src/SMTLib.jland add docstrings for new public functions. -
Prefer explicit types for public structs and use
Symbolfor SMT identifiers.
-
Tests live in
test/runtests.jland useTest.@testsetblocks. -
Add new tests near related functionality and keep them deterministic.
-
Solver-dependent tests should gracefully skip when no SMT solver is installed.
-
CI should install at least one solver and ensure it is on
PATH(e.g.,apt-get install z3on Ubuntu runners). -
Expect solver-backed tests to skip or return
:unknownif no solver is detected; document this in CI logs or PR notes. -
For a solver matrix, run separate CI jobs with only one solver on
PATHto validate backend-specific behavior. -
If adding a new solver, extend
available_solvers()and keepREADME.mdand this guide in sync.
-
Current history is minimal; use clear, imperative commit subjects (e.g., “Add model parsing for bitvectors”).
-
PRs should describe the change, list commands run (e.g.,
Pkg.test()), and note solver prerequisites when relevant. -
If behavior changes are user-visible, update
README.mdexamples or API descriptions.