(self, tp)
Converts a MathSAT type into a PySMT type.
Converts a MathSAT type into a PySMT type.
Converts a MathSAT type into a PySMT type .
def _msat_type_to_type(self, tp):
        """Converts a MathSAT type into a PySMT type."""
        if mathsat.msat_is_bool_type(self.msat_env(), tp):
            return types.BOOL
        elif mathsat.msat_is_rational_type(self.msat_env(), tp):
            return types.REAL
        elif mathsat.msat_is_integer_type(self.msat_env(), tp):
            return types.INT
        else:
            check_arr, idx_type, val_type = \
                    mathsat.msat_is_array_type(self.msat_env(), tp)
            if check_arr != 0:
                i = self._msat_type_to_type(idx_type)
                e = self._msat_type_to_type(val_type)
                return types.ArrayType(i, e)

            check_bv, bv_width = mathsat.msat_is_bv_type(self.msat_env(), tp)
            if check_bv != 0:
                return types.BVType(bv_width)

            # It must be a function type, currently unsupported
            raise NotImplementedError("Function types are unsupported")
def _msat_type_to_type ( self , tp ) : if mathsat . msat_is_bool_type ( self . msat_env ( ) , tp ) : return types . BOOL elif mathsat . msat_is_rational_type ( self . msat_env ( ) , tp ) : return types . REAL elif mathsat . msat_is_integer_type ( self . msat_env ( ) , tp ) : return types . INT else : check_arr , idx_type , val_type = mathsat . msat_is_array_type ( self . msat_env ( ) , tp ) if check_arr != 0 : i = self . _msat_type_to_type ( idx_type ) e = self . _msat_type_to_type ( val_type ) return types . ArrayType ( i , e ) check_bv , bv_width = mathsat . msat_is_bv_type ( self . msat_env ( ) , tp ) if check_bv != 0 : return types . BVType ( bv_width ) # It must be a function type, currently unsupported raise NotImplementedError ( "Function types are unsupported" )