(bv1: BV, bv2: BV)
Makes two BVs equal in length through sign extension.
Makes two BVs equal in length through sign extension.
Makes two BVs equal in length through sign extension .
def make_bv_sizes_equal(bv1: BV, bv2: BV) -> Tuple[BV, BV]:
    """
    Makes two BVs equal in length through sign extension.
    """
    if bv1.size() < bv2.size():
        return (bv1.sign_extend(bv2.size() - bv1.size()), bv2)
    elif bv1.size() > bv2.size():
        return (bv1, bv2.sign_extend(bv1.size() - bv2.size()))
    else:
        return (bv1, bv2)
def make_bv_sizes_equal ( bv1 : BV , bv2 : BV ) -> Tuple [ BV , BV ] : if bv1 . size ( ) < bv2 . size ( ) : return ( bv1 . sign_extend ( bv2 . size ( ) - bv1 . size ( ) ) , bv2 ) elif bv1 . size ( ) > bv2 . size ( ) : return ( bv1 , bv2 . sign_extend ( bv1 . size ( ) - bv2 . size ( ) ) ) else : return ( bv1 , bv2 )