code: @Override
  	public DatalogProgram translate(IQ initialQuery) {
  
  		IQ orderLiftedQuery = liftOrderBy(initialQuery);
  		Optional<MutableQueryModifiers> optionalModifiers =  extractTopQueryModifiers(orderLiftedQuery);
  
  		// Mutable
          DatalogProgram dProgram;
  		if (optionalModifiers.isPresent()){
  			MutableQueryModifiers mutableModifiers = optionalModifiers.get();
  
              dProgram = datalogFactory.getDatalogProgram(mutableModifiers);
  		}
          else {
              dProgram = datalogFactory.getDatalogProgram();
          }
  
  		normalizeIQ(orderLiftedQuery)
  				.forEach(q -> translate(q,  dProgram));
  
          // CQIEs are mutable
          dProgram.getRules().forEach(q -> unfoldJoinTrees(q.getBody()));
  
          return dProgram;
  	}
docs: Translate an intermediate query tree into a Datalog program.
  
  Each (strict) subquery will be translated as a rule with head Pred(var_1, .., var_n),
  where the string for Pred is of the form SUBQUERY_PRED_PREFIX + y,
  with y > subqueryCounter.