(self, term, args)
return res
The TAG UNKNOWN is used to represent msat functions.

        This includes, Constants, Symbols and UFs.
The TAG UNKNOWN is used to represent msat functions.
The TAG UNKNOWN is used to represent msat functions .
def _back_tag_unknown(self, term, args):
        """The TAG UNKNOWN is used to represent msat functions.

        This includes, Constants, Symbols and UFs.
        """
        if mathsat.msat_term_is_number(self.msat_env(), term):
            ty = mathsat.msat_term_get_type(term)
            if mathsat.msat_is_integer_type(self.msat_env(), ty):
                res = self.mgr.Int(int(mathsat.msat_term_repr(term)))
            elif mathsat.msat_is_rational_type(self.msat_env(), ty):
                res = self.mgr.Real(Fraction(mathsat.msat_term_repr(term)))
            else:
                assert "_" in str(term), "Unsupported type for '%s'" % str(term)
                val, width = str(term).split("_")
                val = int(val)
                width = int(width)
                res = self.mgr.BV(val, width)
        elif mathsat.msat_term_is_constant(self.msat_env(), term):
            rep = mathsat.msat_term_repr(term)
            ty = mathsat.msat_term_get_type(term)
            if mathsat.msat_term_is_boolean_constant(self.msat_env(), term):
                res = self.mgr.Symbol(rep, types.BOOL)
            elif mathsat.msat_is_rational_type(self.msat_env(), ty):
                res = self.mgr.Symbol(rep, types.REAL)
            elif mathsat.msat_is_integer_type(self.msat_env(), ty):
                res = self.mgr.Symbol(rep, types.INT)
            else:
                check_arr, idx_type, val_type = mathsat.msat_is_array_type(self.msat_env(), ty)
                if check_arr:
                    i = self._msat_type_to_type(idx_type)
                    e = self._msat_type_to_type(val_type)
                    res = self.mgr.Symbol(rep, types.ArrayType(i, e))
                else:
                    _, width = mathsat.msat_is_bv_type(self.msat_env(), ty)
                    assert width is not None, "Unsupported variable type for '%s'"%str(term)
                    res = self.mgr.Symbol(rep, types.BVType(width))

        elif mathsat.msat_term_is_uf(self.msat_env(), term):
            d = mathsat.msat_term_get_decl(term)
            fun = self.get_symbol_from_declaration(d)
            res = self.mgr.Function(fun, args)
        else:
            raise ConvertExpressionError("Unsupported expression:",
                                         mathsat.msat_term_repr(term))
        return res
def _back_tag_unknown ( self , term , args ) : if mathsat . msat_term_is_number ( self . msat_env ( ) , term ) : ty = mathsat . msat_term_get_type ( term ) if mathsat . msat_is_integer_type ( self . msat_env ( ) , ty ) : res = self . mgr . Int ( int ( mathsat . msat_term_repr ( term ) ) ) elif mathsat . msat_is_rational_type ( self . msat_env ( ) , ty ) : res = self . mgr . Real ( Fraction ( mathsat . msat_term_repr ( term ) ) ) else : assert "_" in str ( term ) , "Unsupported type for '%s'" % str ( term ) val , width = str ( term ) . split ( "_" ) val = int ( val ) width = int ( width ) res = self . mgr . BV ( val , width ) elif mathsat . msat_term_is_constant ( self . msat_env ( ) , term ) : rep = mathsat . msat_term_repr ( term ) ty = mathsat . msat_term_get_type ( term ) if mathsat . msat_term_is_boolean_constant ( self . msat_env ( ) , term ) : res = self . mgr . Symbol ( rep , types . BOOL ) elif mathsat . msat_is_rational_type ( self . msat_env ( ) , ty ) : res = self . mgr . Symbol ( rep , types . REAL ) elif mathsat . msat_is_integer_type ( self . msat_env ( ) , ty ) : res = self . mgr . Symbol ( rep , types . INT ) else : check_arr , idx_type , val_type = mathsat . msat_is_array_type ( self . msat_env ( ) , ty ) if check_arr : i = self . _msat_type_to_type ( idx_type ) e = self . _msat_type_to_type ( val_type ) res = self . mgr . Symbol ( rep , types . ArrayType ( i , e ) ) else : _ , width = mathsat . msat_is_bv_type ( self . msat_env ( ) , ty ) assert width is not None , "Unsupported variable type for '%s'" % str ( term ) res = self . mgr . Symbol ( rep , types . BVType ( width ) ) elif mathsat . msat_term_is_uf ( self . msat_env ( ) , term ) : d = mathsat . msat_term_get_decl ( term ) fun = self . get_symbol_from_declaration ( d ) res = self . mgr . Function ( fun , args ) else : raise ConvertExpressionError ( "Unsupported expression:" , mathsat . msat_term_repr ( term ) ) return res