pyk.ktool.kprint module
- class KAstInput(value)[source]
Bases:
EnumAn enumeration.
- BINARY = 'binary'
- JSON = 'json'
- KAST = 'kast'
- KORE = 'kore'
- PROGRAM = 'program'
- RULE = 'rule'
- class KAstOutput(value)[source]
Bases:
EnumAn enumeration.
- BINARY = 'binary'
- JSON = 'json'
- KAST = 'kast'
- KORE = 'kore'
- LATEX = 'latex'
- NONE = 'none'
- PRETTY = 'pretty'
- PROGRAM = 'program'
- class KPrint(definition_dir: Path, use_directory: Path | None = None, bug_report: BugReport | None = None, extra_unparsing_modules: Iterable[KFlatModule] = (), patch_symbol_table: Callable[[SymbolTable], None] | None = None)[source]
Bases:
object- property all_rules: dict[str, str]
col).
Parsed from allRules.txt in the kompiled definition directory. Keyed by the first 12 hex characters of each rule’s SHA-256 hash.
- Type:
Map from 12-char rule hash prefix to source location (file
- Type:
line
- backend: str
- property definition: KDefinition
- definition_dir: Path
- property definition_hash: str
- main_module: str
- pretty_print(kast: KAst, *, in_module: str | None = None, unalias: bool = True, sort_collections: bool = False) str[source]
- use_directory: Path | None