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>)
| 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. |
no test coverage detected