1use easy_smt::SExpr;
2
3pub mod annotations;
4pub mod interp;
5pub mod solver;
6pub mod termname;
7pub mod type_inference;
8pub mod verify;
9
10pub const REG_WIDTH: usize = 64;
11
12pub const MAX_WIDTH: usize = 2 * REG_WIDTH;
14
15pub const FLAGS_WIDTH: usize = 4;
16
17pub const WIDTHS: [usize; 4] = [8, 16, 32, 64];
18
19type CustomCondition = dyn Fn(&easy_smt::Context, Vec<SExpr>, SExpr, SExpr) -> SExpr;
21
22type CustomAssumption = dyn Fn(&easy_smt::Context, Vec<SExpr>) -> SExpr;
24
25pub struct Config {
26 pub term: String,
27 pub names: Option<Vec<String>>,
28 pub distinct_check: bool,
29
30 pub custom_verification_condition: Option<Box<CustomCondition>>,
31 pub custom_assumptions: Option<Box<CustomAssumption>>,
32}
33
34impl Config {
35 pub fn with_term_and_name(term: &str, name: &str) -> Self {
36 Config {
37 term: term.to_string(),
38 distinct_check: true,
39 custom_verification_condition: None,
40 custom_assumptions: None,
41 names: Some(vec![name.to_string()]),
42 }
43 }
44}