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