Skip to main content

run

Function run 

Source
pub fn run(
    bounds: &Bounds,
    formula: &Formula,
    options: &Options,
) -> Result<Outcome, Vec<Error>>
Expand description

Looks for an instance of formula within bounds; with changing relations, a trace of at most options.steps states.

use elinvar_engine::logic::{Bounds, Expr, Relation, Universe};
use elinvar_engine::{Options, Verdict, run};

let u = Universe::new(["A", "B"]).unwrap();
let s = Relation::unary("S");
let mut b = Bounds::new(&u);
b.bound_upper(&s, u.all(1).unwrap()).unwrap();

let out = run(&b, &Expr::relation(&s).one(), &Options::default()).unwrap();
assert_eq!(out.verdict, Verdict::Found);