use dive_model::Model;
use dive_sim::{Options, Report};
mod bounds;
mod cdot;
mod ownership;
mod print;
mod random_init;
mod runtime;
fn simulate(model: &Model, options: &Options) -> Report {
simulate_in(model, options, &dive_sim::Runtime::new(options.clone()))
}
fn simulate_in(model: &Model, options: &Options, runtime: &dive_sim::Runtime) -> Report {
if let Some(outcome) = dive_sim::preflight(model, options) {
return super::preflight_report(outcome);
}
match super::Native::prepare(model, &dive_runtime::budget::Budget::unlimited()) {
Ok(mut native) => native.simulate(model, options, runtime, &|| false),
Err(error) => super::preflight_report(error.simulation()),
}
}