code: protected static String DIMACSfromList(ArrayList<ArrayList<String>> formula) {
          StringBuilder dimacs = new StringBuilder("");
          for (List<String> conjClause : formula) {
              for (String disjClause : conjClause) {
                  dimacs.append(disjClause).append(" ");
              }
              dimacs.append(" 0\n");
          }
          return dimacs.toString();
      }
docs: Converts parsed formula into DIMACS format.
  
  @param formula parsed formula
  @return formula in DIMACS format