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

Method inverse_implies

src/analysis/memory/symbolic_value.rs:913–926  ·  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

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.
913 fn inverse_implies(&self, other: &Rc<SymbolicValue>) -> bool {
914 if let Expression::LogicalNot { operand } = &self.expression {
915 return operand.implies(other);
916 }
917 if let Expression::LogicalNot { operand } = &other.expression {
918 return self.inverse_implies_not(operand);
919 }
920 // x => true, is always true
921 // false => x, is always true
922 if other.as_bool_if_known().unwrap_or(false) || self.as_bool_if_known().unwrap_or(false) {
923 return true;
924 }
925 false
926 }
927
928 /// Returns true if "!self => !other" is known at compile time to be true.
929 /// Returning false does not imply the implication is false, just that we do not know.

Callers 1

orMethod · 0.80

Calls 3

impliesMethod · 0.80
inverse_implies_notMethod · 0.80
as_bool_if_knownMethod · 0.45

Tested by

no test coverage detected