1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! # cvc5-sys
//!
//! Low-level FFI bindings for the [cvc5](https://cvc5.github.io/) SMT solver.
//!
//! This crate provides raw C API bindings generated by `bindgen` from the
//! cvc5 C header (`cvc5/c/cvc5.h`). For a safe, idiomatic Rust API, see the
//! higher-level `cvc5` crate.
//!
//! # Build
//!
//! cvc5 must be built from source first. Point `CVC5_DIR` to the cvc5 source
//! root (containing `include/` and `build/`), or place a built cvc5 checkout
//! as a sibling `cvc5/` directory.
//!
//! ```text
//! CVC5_DIR=/path/to/cvc5 cargo build
//! ```
//!
//! # Example
//!
//! ```no_run
//! use cvc5_sys::*;
//!
//! unsafe {
//! let tm = term_manager_new();
//! let slv = new(tm);
//!
//! set_logic(slv, c"QF_LIA".as_ptr());
//! set_option(slv, c"produce-models".as_ptr(), c"true".as_ptr());
//!
//! let int_sort = get_integer_sort(tm);
//! let x = mk_const(tm, int_sort, c"x".as_ptr());
//! let zero = mk_integer_int64(tm, 0);
//!
//! let gt = mk_term(tm, Kind::Gt, 2, [x, zero].as_ptr());
//! assert_formula(slv, gt);
//!
//! let result = check_sat(slv);
//! assert!(result_is_sat(result));
//!
//! delete(slv);
//! term_manager_delete(tm);
//! }
//! ```
include!;