pyk.kcfg.tui module

class BehaviorView(kcfg: KCFG, kprint: KPrint, minimize: bool = True, node_printer: NodePrinter | None = None, id: str = '')[source]

Bases: ScrollableContainer

class Selected[source]

Bases: Message

bubble: ClassVar[bool] = True
handler_name: ClassVar[str] = 'on_behavior_view_selected'

Name of the default message handler.

no_dispatch: ClassVar[bool] = False
time
verbose: ClassVar[bool] = False
can_focus: bool = True

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

compose() ComposeResult[source]
on_click(click: Click) None[source]
class Constraint[source]

Bases: NavWidget

can_focus: bool = True

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

on_click(click: Click) None[source]
class Custom[source]

Bases: NavWidget

can_focus: bool = True

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

on_click(click: Click) None[source]
class GraphChunk(id: str, node_text: Iterable[str] = ())[source]

Bases: Static

class Selected(chunk_id: str)[source]

Bases: Message

bubble: ClassVar[bool] = True
chunk_id: str
handler_name: ClassVar[str] = 'on_graph_chunk_selected'

Name of the default message handler.

no_dispatch: ClassVar[bool] = False
time
verbose: ClassVar[bool] = False
can_focus: bool = False

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

on_click(click: Click) None[source]
on_enter() None[source]
on_leave() None[source]
class Info[source]

Bases: Widget

can_focus: bool = False

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

compose() ComposeResult[source]
text: reactive[str]

Create a reactive attribute.

Args:

default: A default value or callable that returns a default. layout: Perform a layout on change. repaint: Perform a repaint on change. init: Call watchers on initialize (post mount). always_update: Call watchers even when the new value equals the old value.

update(text: str) None[source]
watch_text() None[source]
class KCFGViewer(kcfg: KCFG, kprint: KPrint, node_printer: NodePrinter | None = None, custom_view: Callable[[KCFGElem], Iterable[str]] | None = None, minimize: bool = True)[source]

Bases: App

BINDINGS: ClassVar[list[BindingType]] = [('h', 'keystroke("h")', 'Hide selected node.'), ('H', 'keystroke("H")', 'Unhide all nodes.'), ('t', 'keystroke("term")', 'Toggle term.'), ('c', 'keystroke("constraint")', 'Toggle constraint.'), ('m', 'keystroke("minimize")', 'Toggle minimization.'), ('s', 'keystroke("status")', 'Toggle status.'), Binding(key='q', action='quit', description='', show=True, key_display=None, priority=True)]
CSS_PATH: ClassVar[CSSPathType | None] = PosixPath('/home/runner/work/pyk/pyk/src/pyk/kcfg/style.css')

File paths to load CSS from.

action_keystroke(key: str) None[source]
compose() ComposeResult[source]
on_graph_chunk_selected(message: Selected) None[source]
class NavWidget(id: str)[source]

Bases: ScrollableContainer

BINDINGS: ClassVar[list[BindingType]] = [('g', 'scroll_home', 'Go to vert start'), ('G', 'scroll_end', 'Go to vert end')]

Keyboard bindings for scrollable containers.

Key(s) | Description |
:- | :- |
up | Scroll up, if vertical scrolling is available. |
down | Scroll down, if vertical scrolling is available. |
left | Scroll left, if horizontal scrolling is available. |
right | Scroll right, if horizontal scrolling is available. |
home | Scroll to the home position, if scrolling is available. |
end | Scroll to the end position, if scrolling is available. |
pageup | Scroll up one page, if vertical scrolling is available. |
pagedown | Scroll down one page, if vertical scrolling is available. |
class Selected[source]

Bases: Message

bubble: ClassVar[bool] = True
handler_name: ClassVar[str] = 'on_nav_widget_selected'

Name of the default message handler.

no_dispatch: ClassVar[bool] = False
time
verbose: ClassVar[bool] = False
can_focus: bool = True

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

compose() ComposeResult[source]
text: reactive[str]

Create a reactive attribute.

Args:

default: A default value or callable that returns a default. layout: Perform a layout on change. repaint: Perform a repaint on change. init: Call watchers on initialize (post mount). always_update: Call watchers even when the new value equals the old value.

update(text: str) None[source]
watch_text() None[source]
class NodeView(kprint: KPrint, id: str = '', minimize: bool = True, term_on: bool = True, constraint_on: bool = True, custom_on: bool = False, status_on: bool = True, custom_view: Callable[[KCFGElem], Iterable[str]] | None = None, proof_status: str = '', proof_id: str = '', exec_time: float = 0)[source]

Bases: Widget

can_focus: bool = False

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

compose() ComposeResult[source]
on_behavior_view_selected() None[source]
on_constraint_selected() None[source]
on_custom_selected() None[source]
on_mount() None[source]
on_status_selected() None[source]
on_term_selected() None[source]
toggle_option(field: str) bool[source]
toggle_view(field: str) None[source]
update(element: Node | Successor) None[source]
class Status[source]

Bases: NavWidget

can_focus: bool = True

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

on_click(click: Click) None[source]
class Term[source]

Bases: NavWidget

can_focus: bool = True

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

on_click(click: Click) None[source]