def getProgsAndUnkSortWithUniqueNames(self, progs): res = [] for prog in progs: assert (not ASTUtils.isOpen(prog)) unkSortMap = {} if ASTUtils.hasUnk(prog): prog = self._giveUniqueNamesToUnks(prog) unkSortMap = ASTUtils.getUnkNameSortMap(prog) res.append((prog, unkSortMap)) return res
def hasUnk(self, st: PPTerm) -> bool: return ASTUtils.hasUnk(st)