# Path: omelette/compiler/logging.py
# def getLogger(name):
#     def __init__(self):
#     def info(self, msg, object=None):
#     def warning(self, msg, object=None):
#     def error(self, msg, object=None):
#     def critical(self, msg, object=None):
#     def flush(self):
#     def is_empty(self):
#     def get_events(self, levels="INFO WARNING ERROR CRITICAL"):
#     def has(self, level):
#     def __init__(self, msg, level, object):
#     def __str__(self):
# class Logger:
# class Event:


from omelette.compiler import logging
import collections
                # Delete all leaves, and update reference count of their parents
                for object in map(lambda key: self.__uml_objects[key], leaves):
                    if not object.parent is None:
                        if object.parent in ref_count:
                            ref_count[object.parent] -= 1
                    del ref_count[object.name]

        return ref_count.keys()

    def resolve(self):
        circular_refs = self.__find_circular_refs()

        if circular_refs:
            message = "circular references: " + ", ".join(circular_refs)
            uml_object = self.__uml_objects[circular_refs[0]]
            logging.getLogger("compiler").error(message, object=uml_object)
            return

        for uml_object in self.__uml_objects.values():
            self.__resolve_object(uml_object)

    def __resolve_object(self, uml_object):
        if uml_object.type != None: return

        if uml_object.parent == None:
            uml_object.type = uml_object.name
        else:
            if uml_object.parent in self.__uml_objects:
                parent = self.__uml_objects[uml_object.parent]
            else:

# Path: omelette/compiler/logging.py
# def getLogger(name):
#     def __init__(self):
#     def info(self, msg, object=None):
#     def warning(self, msg, object=None):
#     def error(self, msg, object=None):
#     def critical(self, msg, object=None):
#     def flush(self):
#     def is_empty(self):
#     def get_events(self, levels="INFO WARNING ERROR CRITICAL"):
#     def has(self, level):
#     def __init__(self, msg, level, object):
#     def __str__(self):
# class Logger:
# class Event:


# Path: omelette/compiler/resolver.py
from omelette.compiler import logging
import collections

                # Delete all leaves, and update reference count of their parents
                for object in map(lambda key: self.__uml_objects[key], leaves):
                    if not object.parent is None:
                        if object.parent in ref_count:
                            ref_count[object.parent] -= 1
                    del ref_count[object.name]

        return ref_count.keys()

    def resolve(self):
        circular_refs = self.__find_circular_refs()

        if circular_refs:
            message = "circular references: " + ", ".join(circular_refs)
            uml_object = self.__uml_objects[circular_refs[0]]
            logging.getLogger("compiler").error(message, object=uml_object)
            return

        for uml_object in self.__uml_objects.values():
            self.__resolve_object(uml_object)

    def __resolve_object(self, uml_object):
        if uml_object.type != None: return

        if uml_object.parent == None:
            uml_object.type = uml_object.name
        else:
            if uml_object.parent in self.__uml_objects:
                parent = self.__uml_objects[uml_object.parent]
            else:

                logger = logging.getLogger("compiler")