MCPcopy Create free account
hub / github.com/Rust-API/Rust-API-Bypass-Checker / make_binary

Method make_binary

src/analysis/memory/symbolic_value.rs:122–135  ·  view source on GitHub ↗

Creates an abstract value from a binary expression and keeps track of the size.

(
        left: Rc<SymbolicValue>,
        right: Rc<SymbolicValue>,
        operation: fn(Rc<SymbolicValue>, Rc<SymbolicValue>) -> Expression,
    )

Source from the content-addressed store, hash-verified

120
121 /// Creates an abstract value from a binary expression and keeps track of the size.
122 fn make_binary(
123 left: Rc<SymbolicValue>,
124 right: Rc<SymbolicValue>,
125 operation: fn(Rc<SymbolicValue>, Rc<SymbolicValue>) -> Expression,
126 ) -> Rc<SymbolicValue> {
127 if left.is_top() || left.is_bottom() {
128 return left;
129 }
130 if right.is_top() || right.is_bottom() {
131 return right;
132 }
133 let expression_size = left.expression_size.saturating_add(right.expression_size);
134 Self::make_from(operation(left, right), expression_size)
135 }
136
137 /// Creates an abstract value from a typed unary expression and keeps track of the size.
138 fn make_typed_unary(

Callers

nothing calls this directly

Calls 2

is_topMethod · 0.45
is_bottomMethod · 0.45

Tested by

no test coverage detected