Implement EquationSystem.runQuery.