def _handle_sub(self, state): op0, op1 = self._get_args(state) c = Not(BVSubNoUnderflow(op0, op1, False)) # Check satisfiable model = self._try_constraints(state.mstate.constraints, [c]) if model is None: return annotation = OverUnderflowAnnotation(state, "subtraction", c) op0.annotate(annotation)
def _handle_add(self, state): stack = state.mstate.stack op0, op1 = ( self._make_bitvec_if_not(stack, -1), self._make_bitvec_if_not(stack, -2), ) c = Not(BVAddNoOverflow(op0, op1, False)) # Check satisfiable model = self._try_constraints(state.node.constraints, [c]) if model is None: return annotation = OverUnderflowAnnotation(state, "addition", c) op0.annotate(annotation)
def _handle_mul(self, state): op0, op1 = self._get_args(state) c = Not(BVMulNoOverflow(op0, op1, False)) annotation = OverUnderflowAnnotation(state, "multiplication", c) op0.annotate(annotation)
def _handle_sub(self, state): op0, op1 = self._get_args(state) c = Not(BVSubNoUnderflow(op0, op1, False)) annotation = OverUnderflowAnnotation(state, "subtraction", c) op0.annotate(annotation)
def _handle_add(self, state): op0, op1 = self._get_args(state) c = Not(BVAddNoOverflow(op0, op1, False)) annotation = OverUnderflowAnnotation(state, "addition", c) op0.annotate(annotation)