docs: public synchronized void addRule(final RuleImpl rule) throws InvalidPatternException {
          final List<TerminalNode> terminals = this.ruleBuilder.addRule( rule,
                                                                         this.kBase );
  
          BaseNode[] nodes = terminals.toArray( new BaseNode[terminals.size()] );
          this.rules.put( rule.getFullyQualifiedName(), nodes );
          if (rule.isQuery()) {
              this.queries.put( rule.getName(), nodes );
          }
      }