yaxpeax_core/analyses/evaluators/
const_evaluator.rs1use yaxpeax_arch::Arch;
2use analyses::static_single_assignment::{SSA, SSAValues};
3use memory::MemoryRange;
4
5pub trait Domain {
6 type Modifier;
8 type Value;
9
10 fn join(l: Option<Self::Value>, r: Option<Self::Value>) -> Option<Self::Value>;
11}
12
13pub trait ConstEvaluator<A: Arch + SSAValues, Ctxs, D: Domain> {
14 fn evaluate_instruction<U: MemoryRange<A>>(instr: &A::Instruction, addr: A::Address, dfg: &SSA<A>, contexts: &Ctxs, data: &U);
15 fn apply_transient(from: A::Address, to: A::Address, location: Option<A::Location>, exprs: &Vec<D::Modifier>, dfg: &SSA<A>, contexts: &Ctxs);
16}