eta.plan.PlanNode
- class PlanNode(step)[source]
Bases:
object
A node in the doubly linked list that represents the system’s plan.
- Parameters:
step (PlanStep) – The plan step contained within this node.
Methods
Add the given schema to each plan step in the subplan headed by this node.
Add the step of a given plan node as a superstep of each node within the subplan headed by this node.
Given a subplan bounded between a given start and end node, add each as a superstep of this node.
Bind the given variable symbol to the given value throughout the entire plan structure.
Get all root plan steps (i.e., the most abstract steps) reachable from the current plan.
Get all schemas of this plan.
Format a string representing the subtrees of the plan structure reachable from each root step.
Format a string representing the subtree of the plan structure reachable from this node.
Format the plan structure as a status string showing the current, past, and future surface steps.
Convert a plan structure to a standard graph object, i.e., a list of vertices and edges.
Unbind the given variable symbol throughout the entire plan structure.
- add_superstep_to_subplan(node)[source]
Add the step of a given plan node as a superstep of each node within the subplan headed by this node.
- Parameters:
node (PlanNode) – The node whose step should be added as a superstep.
- add_supersteps(start_node, end_node)[source]
Given a subplan bounded between a given start and end node, add each as a superstep of this node.
- add_schema_to_subplan(schema)[source]
Add the given schema to each plan step in the subplan headed by this node.
- Parameters:
schema (Schema) – The schema object to add to the schema lists for each plan step.
- get_all_roots()[source]
Get all root plan steps (i.e., the most abstract steps) reachable from the current plan.
- bind(var, val)[source]
Bind the given variable symbol to the given value throughout the entire plan structure.
- status(before=3, after=5, schemas=False)[source]
Format the plan structure as a status string showing the current, past, and future surface steps.
- serialize_subtree(schemas=False)[source]
Format a string representing the subtree of the plan structure reachable from this node.
- serialize_from_roots(schemas=False)[source]
Format a string representing the subtrees of the plan structure reachable from each root step.
- to_graph(before=3, after=5, schemas=False)[source]
Convert a plan structure to a standard graph object, i.e., a list of vertices and edges.
- Parameters:
- Returns:
nodes (list[tuple[str, str]]) – A list of vertices/nodes in the resulting graph, where each node is an
(<id>, <label>)
tuple.edges (list[tuple[str, str]]) – A list of edges in the resulting graph, where each edge is an
(<id1>, <id2>)
tuple.