(self, btor_formula, signed=False)
BTOR requires that many operands have width that is a power of 2
BTOR requires that many operands have width that is a power of 2
BTOR requires that many operands have width that is a power of 2
def _extend_bv_pow2(self, btor_formula, signed=False):
        """BTOR requires that many operands have width that is a power of 2"""
        w = btor_formula.width
        target_w = 2**int(ceil(log(w, 2)))
        # Skip if width is ok
        if target_w == w:
            return btor_formula
        if signed:
            return self._btor.Sext(btor_formula, (target_w-w))
        else:
            return self._btor.Uext(btor_formula, (target_w-w))
def _extend_bv_pow2 ( self , btor_formula , signed = False ) : w = btor_formula . width target_w = 2 ** int ( ceil ( log ( w , 2 ) ) ) # Skip if width is ok if target_w == w : return btor_formula if signed : return self . _btor . Sext ( btor_formula , ( target_w - w ) ) else : return self . _btor . Uext ( btor_formula , ( target_w - w ) )