class RecommendationScopeProcessor {

  public static void process(ASTQueryContainer ast)
  throws VisitorException {
    final ScopedVariables scopedVariables = new ScopedVariables();
    final POFConnected scope = new POFConnected();

    // Initialize the seed
    scopedVariables.newConnectedVars.add(Hash.get(SyntaxTreeBuilder.PointOfFocus));
    // Define the recommendation scope
    do {
      scopedVariables.updateVars();
      scope.visit(ast, scopedVariables);
    } while (!scopedVariables.newConnectedVars.isEmpty());
    // Prune disconnected parts of the AST
    pruneToScope(ast);
  }

  private  RecommendationScopeProcessor();

}