'Returns a list of attributes defined on a compound model, including
all of its parameters.'

def __dir__(cls):

    try:
        basedir = super(_CompoundModelMeta, cls).__dir__()
    except AttributeError:
        basedir = list(set((dir(type(cls)) + list(cls.__dict__))))
    if (cls._tree is not None):
        for name in cls.param_names:
            basedir.append(name)
        basedir.sort()
    return basedir
