(self, name, arity=0)
return td
Creates a new Type Declaration (sort declaration).

        This is equivalent to the SMT-LIB command "declare-sort".  For
        sorts of arity 0, we return a PySMTType, all other sorts need to
        be instantiated.

        See class _Type.
Creates a new Type Declaration (sort declaration).
Creates a new Type Declaration ( sort declaration ) .
def Type(self, name, arity=0):
        """Creates a new Type Declaration (sort declaration).

        This is equivalent to the SMT-LIB command "declare-sort".  For
        sorts of arity 0, we return a PySMTType, all other sorts need to
        be instantiated.

        See class _Type.
        """

        try:
            td = self._custom_types_decl[name]
            if td.arity != arity:
                raise PysmtValueError("Type %s previously declared with arity "\
                                      " %d." % (name, td.arity))
        except KeyError:
            td = _TypeDecl(name, arity)
            td.set_custom_type_flag()
            self._custom_types_decl[name] = td

        if td.arity == 0:
            # Automatically instantiate 0-arity types
            return self.get_type_instance(td)
        return td
def Type ( self , name , arity = 0 ) : try : td = self . _custom_types_decl [ name ] if td . arity != arity : raise PysmtValueError ( "Type %s previously declared with arity " " %d." % ( name , td . arity ) ) except KeyError : td = _TypeDecl ( name , arity ) td . set_custom_type_flag ( ) self . _custom_types_decl [ name ] = td if td . arity == 0 : # Automatically instantiate 0-arity types return self . get_type_instance ( td ) return td