(self, value, width=None)
Returns a constant of type BitVector interpreting the sign.

        If the specified value is an integer, it is converted in the
        2-complement representation of the given number, otherwise the
        behavior is the same as BV().
Returns a constant of type BitVector interpreting the sign.
Returns a constant of type BitVector interpreting the sign .
def SBV(self, value, width=None):
        """Returns a constant of type BitVector interpreting the sign.

        If the specified value is an integer, it is converted in the
        2-complement representation of the given number, otherwise the
        behavior is the same as BV().
        """
        if is_python_integer(value):
            if width is None:
                raise PysmtValueError("Need to specify a width for the constant")

            min_val = -(2**(width-1))
            max_val = (2**(width-1)) - 1
            if value < min_val:
                raise PysmtValueError("Cannot represent a value (%d) lower " \
                                      "than %d in %d bits" % (value, min_val,
                                                              width))
            if value > max_val:
                raise PysmtValueError("Cannot represent a value (%d) greater " \
                                      "than %d in %d bits" % (value, max_val,
                                                              width))

            if value >= 0:
                return self.BV(value, width)
            else:
                comp_value = (2**width) + value # value is negative!
                return self.BV(comp_value, width)
        else:
            return self.BV(value, width=width)
def SBV ( self , value , width = None ) : if is_python_integer ( value ) : if width is None : raise PysmtValueError ( "Need to specify a width for the constant" ) min_val = - ( 2 ** ( width - 1 ) ) max_val = ( 2 ** ( width - 1 ) ) - 1 if value < min_val : raise PysmtValueError ( "Cannot represent a value (%d) lower " "than %d in %d bits" % ( value , min_val , width ) ) if value > max_val : raise PysmtValueError ( "Cannot represent a value (%d) greater " "than %d in %d bits" % ( value , max_val , width ) ) if value >= 0 : return self . BV ( value , width ) else : comp_value = ( 2 ** width ) + value # value is negative! return self . BV ( comp_value , width ) else : return self . BV ( value , width = width )