docs: private static ImmutableList<ReasonerQueryImpl> queryPlan(ReasonerQueryImpl query){
          ResolutionPlan resolutionPlan = query.resolutionPlan();
  
          ImmutableList<Atom> plan = resolutionPlan.plan();
          TransactionOLTP tx = query.tx();
          LinkedList<Atom> atoms = new LinkedList<>(plan);
          List<ReasonerQueryImpl> queries = new LinkedList<>();
  
          List<Atom> nonResolvableAtoms = new ArrayList<>();
          while (!atoms.isEmpty()) {
              Atom top = atoms.remove();
              if (top.isRuleResolvable()) {
                  if (!nonResolvableAtoms.isEmpty()) {
                      queries.add(ReasonerQueries.create(nonResolvableAtoms, tx));
                      nonResolvableAtoms.clear();
                  }
                  queries.add(ReasonerQueries.atomic(top));
              } else {
                  nonResolvableAtoms.add(top);
                  if (atoms.isEmpty()) queries.add(ReasonerQueries.create(nonResolvableAtoms, tx));
              }
          }
  
          boolean refine = plan.size() != queries.size() && !query.requiresSchema();
          return refine? refine(queries) : ImmutableList.copyOf(queries);
      }