ast_toolbox.mcts.tree_plot module

ast_toolbox.mcts.tree_plot.add_children(s, s_node, tree, graph, d)[source]

Add successors of s into the graph.

Parameters:
ast_toolbox.mcts.tree_plot.get_root(tree)[source]

Get the root node of the tree.

Parameters:tree (dict) – The tree.
Returns:s (ast_toolbox.mcts.AdaptiveStressTesting.ASTState) – The root state.
ast_toolbox.mcts.tree_plot.plot_tree(tree, d, path, format='svg')[source]

Plot the tree.

Parameters:
  • tree (dict) – The tree.
  • d (int) – The depth.
  • path (str) – The plotting path.
  • format (str) – The plotting format.
ast_toolbox.mcts.tree_plot.s2node(s, tree)[source]

Transfer the AST state to pydot node.

Parameters:
Returns:

node (pydot.Node) – The pydot node.