code: private static boolean[][] getChart(int n, VarConfig vc) {
          boolean[][] chart = new boolean[n][n+1];
          int count = 0;
          for (Var v : vc.getVars()) {
              SpanVar span = (SpanVar) v;
              chart[span.getStart()][span.getEnd()] = (vc.getState(span) == SpanVar.TRUE);
              count++;
          }
          if (count != (n*(n+1)/2)) {
              // We didn't see a span variable for every chart cell.
              return null;
          }
          return chart;
      }
docs: Creates a boolean chart representing the set of spans which are "on", or
  null if the number of span variables in the assignment is invalid.