svoid philosophyBot_processUnclearIfs(PhilosophyBot1 bot) { S var = "$" + aGlobalID(); new Set phrases; for (PhilosophyBot1.LogicRule rule : bot.logicRules) { S cond = optCast S(bot.leftmostCondition(rule.lhs)), continue if null; S phrase = mapGet(bot.zipIt_deBracket("unclear if " + var, cond), var), continue if null; if (phrases.add(phrase)) print("Got unclear if: " + phrase); } if (empty(phrases)) ret; for (PhilosophyBot1.LogicRule rule : bot.allLogicRulesWithoutLHSVars()) { S cond = optCast S(bot.leftmostCondition(rule)), continue if null; continue unless any(phrases, pat -> bot.zipIt(pat, cond) != null); continue if bot.hasFact(cond); bot.addFact("unclear if " + optRound(cond)); } }