-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Hi and thanks for this helpful library.
I figured out how to do partial evaluation by substituting Terminals, but I don't know how to simplify an expression assuming some other expression is true.
Assuming it's always in SOP form, I could compare recursively until I find my "assumption" and substitute it with a constant, but it would be so fragile that even a different order of either expression would fail to match.
Ideally, what I'd like to do:
let x = Expr::Terminal(0);
let y = Expr::Terminal(1);
let z = Expr::Terminal(2);
let expr = x.clone() & y.clone() & z.clone();
let assumption = x.clone() & y.clone();
assert_eq!(black_box(expr, assumption), z);Is this possible, or would I need to reach for some kind of SMT solver to be able to express this?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels