def solve(agent, predString, argList): imp = agent.getImp(Symbol(predString)) b, z = optBZ(argList) solutions = [] for solved in imp.solutions(agent, b, z): if solved: solutions.append([termEvalEnd(agent, b, zi) for zi in z]) return tuple(solutions)
def termsEvalEnd(agent, bindings, zexprs): return List([termEvalEnd(agent, bindings, zexpr) for zexpr in zexprs])