Path: blob/main/cranelift/isle/veri/veri_engine/src/lib.rs
1693 views
use easy_smt::SExpr;12pub mod annotations;3pub mod interp;4pub mod solver;5pub mod termname;6pub mod type_inference;7pub mod verify;89pub const REG_WIDTH: usize = 64;1011// Use a distinct with as the maximum width any value should have within type inference12pub const MAX_WIDTH: usize = 2 * REG_WIDTH;1314pub const FLAGS_WIDTH: usize = 4;1516pub const WIDTHS: [usize; 4] = [8, 16, 32, 64];1718// Closure arguments: SMT context, arguments to the term, lhs, rhs19type CustomCondition = dyn Fn(&easy_smt::Context, Vec<SExpr>, SExpr, SExpr) -> SExpr;2021// Closure arguments: SMT context, arguments to the term22type CustomAssumption = dyn Fn(&easy_smt::Context, Vec<SExpr>) -> SExpr;2324pub struct Config {25pub term: String,26pub names: Option<Vec<String>>,27pub distinct_check: bool,2829pub custom_verification_condition: Option<Box<CustomCondition>>,30pub custom_assumptions: Option<Box<CustomAssumption>>,31}3233impl Config {34pub fn with_term_and_name(term: &str, name: &str) -> Self {35Config {36term: term.to_string(),37distinct_check: true,38custom_verification_condition: None,39custom_assumptions: None,40names: Some(vec![name.to_string()]),41}42}43}444546