pyk.kcfg.show module
- class KCFGShow(kprint: KPrint, node_printer: NodePrinter | None = None)[source]
Bases:
object
- static make_unique_segments(segments: Iterable[tuple[str, Iterable[str]]]) Iterable[tuple[str, Iterable[str]]] [source]
- node_printer: NodePrinter
- pretty_segments(kcfg: KCFG, minimize: bool = True) Iterable[tuple[str, Iterable[str]]] [source]
Return a pretty version of the KCFG in segments.
Each segment is a tuple of an identifier and a list of lines to be printed for that segment (Tuple[str, Iterable[str]). The identifier tells you whether that segment is for a given node, edge, or just pretty spacing (‘unknown’). This is useful for applications which want to pretty print in chunks, so that they can know which printed region corresponds to each node/edge.
- show(cfg: KCFG, nodes: Iterable[NodeIdLike] = (), node_deltas: Iterable[tuple[NodeIdLike, NodeIdLike]] = (), to_module: bool = False, minimize: bool = True, sort_collections: bool = False, omit_cells: Iterable[str] = (), module_name: str | None = None) list[str] [source]
- to_module(cfg: KCFG, module_name: str | None = None, omit_cells: Iterable[str] = (), parseable_output: bool = True) KFlatModule [source]