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

Method implies_not

src/analysis/memory/symbolic_value.rs:898–909  ·  view source on GitHub ↗

Returns true if "self => !other" is known at compile time to be true. Returning false does not imply the implication is false, just that we do not know.

(&self, other: &Rc<SymbolicValue>)

Source from the content-addressed store, hash-verified

896 /// Returns true if "self => !other" is known at compile time to be true.
897 /// Returning false does not imply the implication is false, just that we do not know.
898 fn implies_not(&self, other: &Rc<SymbolicValue>) -> bool {
899 // x => !false, is always true
900 // false => !x, is always true
901 if !other.as_bool_if_known().unwrap_or(true) || !self.as_bool_if_known().unwrap_or(true) {
902 return true;
903 };
904 // !x => !x
905 if let Expression::LogicalNot { ref operand } = self.expression {
906 return (**operand).eq(other);
907 }
908 false
909 }
910
911 /// Returns true if "!self => other" is known at compile time to be true.
912 /// Returning false does not imply the implication is false, just that we do not know.

Callers 2

inverse_implies_notMethod · 0.80
refine_withMethod · 0.80

Calls 2

as_bool_if_knownMethod · 0.45
eqMethod · 0.45

Tested by

no test coverage detected