def validate_bytes(self, data, old_node, default_info): new_bitmap, _ = self.execute(data, default_info) # handle non-det inputs if new_bitmap is None: return False old_bits = old_node["new_bytes"].copy() return GlobalBitmap.all_new_bits_still_set(old_bits, new_bitmap)
def check_trim_still_valid(old_node, old_res, new_res): # non-det input if not new_res: return False if not new_res.is_lut_applied(): new_res.apply_lut() trim_simple = False if trim_simple: assert False # todo fixme wrt to bitmaps, == doesnt work on bitmap_wrapper return old_res == new_res else: old_bits = old_node["new_bytes"].copy() old_bits.update(old_node["new_bits"]) return GlobalBitmap.all_new_bits_still_set(old_bits, new_res)
def apply_lut(self): assert not self.lut_applied GlobalBitmap.apply_lut(self) assert self.lut_applied return self