Function variables

Source
pub fn variables(
    formula: EncodedFormula,
    f: &FormulaFactory,
) -> Arc<BTreeSet<Variable>>
Expand description

Returns a set with all variables in this formula.

ยงExample

Basic usage:

let f = FormulaFactory::new();

let a = f.var("a");
let b = f.var("b");
let c = f.var("c");
let formula = "(a => b) & c".to_formula(&f);

let expected = BTreeSet::from_iter(vec![a, b, c].into_iter());
assert_eq!(variables(formula, &f).as_ref(), &expected);