Beispiel #1
0
    def __init__(self, name, depth=None):
        '''
        Constructor
        '''
        self.module_set = None

        self.module_name = ''

        self.hierarchy_name = ''
        """set of all imported module names """
        self.imports = set([])
        """ set of all parent module names"""
        self.parents = None
        self.ancestors = None

        self.clif_file_name = ''
        """Location of the clif input file that has undergone preprocessing"""
        self.clif_processed_file_name = ''

        self.p9_file_name = None

        self.tptp_file_name = None

        # the distinction between nonlogical_symbols and nonlogical_variables assumes that a single symbol is not used as both in different sentences
        self.nonlogical_symbols = set([])
        self.import_closure_nonlogical_symbols = None

        self.properly_defined_symbols = None
        #self.parents_nonlogical_symbols = set([])

        # stores the depth of the import hierarchy
        self.depth = depth

        self.set_module_name(name)
        logging.getLogger(__name__).info('processing module: ' +
                                         self.module_name)
        # remove any obsolete URL ending as specified in the configuration file
        if self.module_name.endswith(filemgt.read_config('cl', 'ending')):
            self.module_name = os.path.normpath(
                self.module_name.replace(filemgt.read_config('cl', 'ending'),
                                         ''))

        self.hierarchy_name = filemgt.get_hierarchy_name(self.module_name)

        self.preprocess_clif_file()
Beispiel #2
0
 def get_hierarchy(self):
     return filemgt.get_hierarchy_name(self.module_name)