def convert(self, expr):
        """
        Override Backend.convert() to add fast paths for BVVs and BoolVs.
        """
        if type(expr) is BV:
            if expr.op == "BVV":
                cached_obj = self._object_cache.get(expr._cache_key, None)
                if cached_obj is None:
                    cached_obj = self.BVV(*expr.args)
                    self._object_cache[expr._cache_key] = cached_obj
                return cached_obj
        if type(expr) is Bool and expr.op == "BoolV":
            return expr.args[0]
        return super().convert(expr)
def convert ( self , expr ) : if type ( expr ) is BV : if expr . op == "BVV" : cached_obj = self . _object_cache . get ( expr . _cache_key , None ) if cached_obj is None : cached_obj = self . BVV ( * expr . args ) self . _object_cache [ expr . _cache_key ] = cached_obj return cached_obj if type ( expr ) is Bool and expr . op == "BoolV" : return expr . args [ 0 ] return super ( ) . convert ( expr )
Override Backend.convert() to add fast paths for BVVs and BoolVs.