private void init(
      PathPatternNode<Void, PathPatternNode.VoidSerializer> node,
      Map<String, IFATransition> transitionMap,
      IFAState curState,
      AtomicInteger stateIndexGenerator) {
    IFATransition transition = transitionMap.get(node.getName());
    int stateIndex = curState.getIndex();
    int transitionIndex = transition.getIndex();
    DFAState newState = (DFAState) getFromDfaTransitionTable(stateIndex, transitionIndex);
    if (newState == null) {
      newState = new DFAState(stateIndexGenerator.incrementAndGet());
      dfaStateList.add(newState);
      updateDfaTransitionTable(stateIndex, transitionIndex, newState);
    }
    if (node.isPathPattern()) {
      newState.setFinal(true);
    }
    for (PathPatternNode<Void, PathPatternNode.VoidSerializer> child :
        node.getChildren().values()) {
      init(child, transitionMap, newState, stateIndexGenerator);
    }
  }
DFA graph for given path pattern. State 0 is initial state. Run PatternDFATest#printFASketch for
more detail.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/path/fa/dfa/graph/DFAGraph.java