polytracker.parsing
parsing classes
ImmutableParseTree
MutableParseTree
NonGeneralizedParseTree
- class polytracker.parsing.NonGeneralizedParseTree(value: Start | TraceEvent | Terminal, children: Iterable[G] = ())
Bases:
MutableParseTree
[Start
|TraceEvent
|Terminal
]- __init__(value: Start | TraceEvent | Terminal, children: Iterable[G] = ())
- add_child(new_child: MPT)
- best_partition(right_sibling: NonGeneralizedParseTree) int | None
- best_subset(parent: NonGeneralizedParseTree) Tuple[int, int]
- bottom_up_pass()
- clone() IPT
- deconflict_parent(parent: NonGeneralizedParseTree)
- deconflict_sibling(right_sibling: NonGeneralizedParseTree)
- simplify()
- top_down_pass()
- value: V
- verify_bounds(check_overlap=True, check_coverage=True, check_missing_children=True)
ParseTree
Start
Terminal
parsing functions
escape_byte
highlight_offset
trace_to_non_generalized_tree
- polytracker.parsing.trace_to_non_generalized_tree(trace: ProgramTrace) NonGeneralizedParseTree
trace_to_tree
- polytracker.parsing.trace_to_tree(trace: ProgramTrace, node_type: Type[N] = polytracker.parsing.ParseTree[typing.Union[polytracker.parsing.Start, polytracker.tracing.TraceEvent, polytracker.parsing.Terminal]], include_terminals: bool = True) N