src/HOL/Tools/Sledgehammer/MaSh/src/dictionaries.py
changeset 50619 b958a94cf811
parent 50388 a5b666e0c3c2
child 50827 aba769dc82e9
equal deleted inserted replaced
50617:9df2f825422b 50619:b958a94cf811
    33         self.accessibleDict = {}
    33         self.accessibleDict = {}
    34         self.expandedAccessibles = {}
    34         self.expandedAccessibles = {}
    35         self.changed = True
    35         self.changed = True
    36 
    36 
    37     """
    37     """
    38     Init functions. Side Effect: nameIdDict, idNameDict, featureIdDict get filled!
    38     Init functions. Side Effect: nameIdDict, idNameDict, featureIdDict, articleDict get filled!
    39     """
    39     """
    40     def init_featureDict(self,featureFile):
    40     def init_featureDict(self,featureFile):
    41         self.featureDict,self.maxNameId,self.maxFeatureId = create_feature_dict(self.nameIdDict,self.idNameDict,self.maxNameId,self.featureIdDict,\
    41         self.featureDict,self.maxNameId,self.maxFeatureId = create_feature_dict(self.nameIdDict,self.idNameDict,self.maxNameId,self.featureIdDict,\
    42                                                                                 self.maxFeatureId,featureFile)
    42                                                                                 self.maxFeatureId,featureFile)
    43     def init_dependenciesDict(self,depFile):
    43     def init_dependenciesDict(self,depFile):
   173             if not self.expandedAccessibles.has_key(accId):
   173             if not self.expandedAccessibles.has_key(accId):
   174                 accIdAcc = self.accessibleDict[accId]
   174                 accIdAcc = self.accessibleDict[accId]
   175                 self.expandedAccessibles[accId] = self.expand_accessibles(accIdAcc)
   175                 self.expandedAccessibles[accId] = self.expand_accessibles(accIdAcc)
   176                 self.changed = True
   176                 self.changed = True
   177         accessibles = self.expand_accessibles(unExpAcc)
   177         accessibles = self.expand_accessibles(unExpAcc)
   178 #        # Feature Ids
       
   179 #        featureNames = [f.strip() for f in line[1].split()]
       
   180 #        for fn in featureNames:
       
   181 #            self.add_feature(fn)
       
   182 #        features = [self.featureIdDict[fn] for fn in featureNames]
       
   183         features = self.get_features(line)
   178         features = self.get_features(line)
       
   179 
   184         return name,features,accessibles
   180         return name,features,accessibles
   185 
   181 
   186     def save(self,fileName):
   182     def save(self,fileName):
   187         if self.changed:
   183         if self.changed:
   188             dictsStream = open(fileName, 'wb')
   184             dictsStream = open(fileName, 'wb')