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

Method logical_not

src/analysis/memory/constant_value.rs:330–344  ·  view source on GitHub ↗

Returns a constant that is "!self" where self is a bool.

(&self)

Source from the content-addressed store, hash-verified

328
329 /// Returns a constant that is "!self" where self is a bool.
330 pub fn logical_not(&self) -> Self {
331 match self {
332 ConstantValue::Int(val) => {
333 if *val == 1 {
334 ConstantValue::Int(Integer::from(0))
335 } else if *val == 0 {
336 ConstantValue::Int(Integer::from(1))
337 } else {
338 ConstantValue::Bottom
339 }
340 }
341 ConstantValue::Top => ConstantValue::Top,
342 _ => ConstantValue::Bottom,
343 }
344 }
345
346 /// Returns a constant that is "self % other".
347 pub fn rem(&self, other: &Self) -> Self {

Callers 5

try_symbolic_rvalueMethod · 0.45
visit_switch_intMethod · 0.45
visit_assertMethod · 0.45
visit_unary_opMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected