def filterNoise(self, posExps, fInfos): fIdToFInfosMap = util.getFIdToInfoMap(fInfos) newPosExps = [] failedSeqs = util.readFromFile(util.failedExpsFile) for posExp in posExps: posExp = posExp.rstrip("\n") isRpcNoise = False posExpFIds = posExp.split(" ") for fId in posExpFIds: fIdFInf = fIdToFInfosMap[fId] if util.isRpcNoise(fIdFInf): isRpcNoise = True break if isRpcNoise: #print "yes...rpc noise...posExp is " + posExp continue l = len(posExpFIds) pfx = " ".join(posExpFIds[0:l-1]) if pfx not in failedSeqs: newPosExps.append(posExp) return newPosExps
def shortCutForGettingEqvCls(self): fIdToFInfosMap = util.getFIdToInfoMap(self.fInfos) failedFIdSeqs = util.getFIdSeqsThatFailed() expsConsidered = [] for fIdsSeq in self.allFIdsMap.keys(): if fIdsSeq != "": fstFId = (fIdsSeq.split(" "))[0] fstFInf = fIdToFInfosMap[fstFId] if (not util.isRpcNoise(fstFInf)) and (fstFId not in failedFIdSeqs) : self.getResSetOfFIdsInExec(fIdsSeq) expsConsidered.append(fstFId) self.writeInjFIds(expsConsidered, self.fInfos)
def getFIdsNotToBeIncluded(fInfos, write, fName): fIdsToWr = [] for fInfo in fInfos: if util.isRpcNoise(fInfo): fIdsToWr.append(fInfo.fId + "\n") if util.isNoiseForRFIds(fInfo): fIdsToWr.append(fInfo.fId + "\n") ioType = (fInfo.ioType).rstrip("\n") if ioType.find("WRITE") == -1: fIdsToWr.append(fInfo.fId + "\n") if fInfo.isBefore != True: fIdsToWr.append(fInfo.fId + "\n") fIdsToWr = list(set(fIdsToWr)) if write: f = open(fName, "w") f.writelines(fIdsToWr) f.close() fIdsNotToBeIncl = [] for fId in fIdsToWr: fIdsNotToBeIncl.append(fId.strip("\n")) return fIdsNotToBeIncl