Source code for claripy.frontend_mixins.solve_block_mixin

[docs] class SolveBlockMixin:
[docs] def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.can_solve = True
def _blank_copy(self, c): super()._blank_copy(c) c.can_solve = True def _copy(self, c): super()._copy(c) c.can_solve = self.can_solve def __getstate__(self): return self.can_solve, super().__getstate__() def __setstate__(self, s): self.can_solve, base_state = s super().__setstate__(base_state)
[docs] def eval(self, *args, **kwargs): assert self.can_solve return super().eval(*args, **kwargs)
[docs] def batch_eval(self, *args, **kwargs): assert self.can_solve return super().batch_eval(*args, **kwargs)
[docs] def min(self, *args, **kwargs): assert self.can_solve return super().min(*args, **kwargs)
[docs] def max(self, *args, **kwargs): assert self.can_solve return super().max(*args, **kwargs)
[docs] def satisfiable(self, *args, **kwargs): assert self.can_solve return super().satisfiable(*args, **kwargs)
[docs] def solution(self, *args, **kwargs): assert self.can_solve return super().solution(*args, **kwargs)