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()) { O leftmost = bot.leftmostCondition(rule.lhs); S cond = optCast S(leftmost), continue if null; if (!any(phrases, pat -> bot.zipIt(pat, cond) != null)) continue with print("unclearIf not requested: " + cond); if (bot.hasFact(cond)) continue with print("unclearIf has fact: " + cond); bot.addFact(print("unclearIf adding", "unclear if " + optRound(cond))); } }