UNPKG

@informalsystems/quint

Version:

Core tool for the Quint specification language

39 lines (38 loc) 1.7 kB
import { Doc } from './prettierimp'; import { QuintDeclaration, QuintEx } from './ir/quintIr'; import { ExecutionFrame } from './runtime/trace'; import { QuintType } from './ir/quintTypes'; import { TypeScheme } from './types/base'; /** * An abstraction of a Console of bounded text width. */ export interface ConsoleBox { width: number; out: (s: string) => void; } /** * Find out the terminal width for text formatting. * Since this number may change while running, it is a function. * Also, when the output is redirected, the number of columns is undefined. */ export declare const terminalWidth: () => number; export declare function prettyQuintEx(ex: QuintEx): Doc; export declare function prettyQuintDeclaration(decl: QuintDeclaration, includeBody?: boolean, type?: TypeScheme): Doc; export declare function prettyTypeScheme(scheme: TypeScheme): Doc; export declare function prettyQuintType(type: QuintType): Doc; /** * Print an execution frame and its children recursively. * Since this function is printing a tree, we need precise text alignment. * Using a tree here with an optional line break would produce incorrect output. * * @param box the box to print in * @param frame the frame to print * @param isLast the array of booleans, one per ancestor, that indicates whether * an ancestor does not have siblings to the right, the last index * corresponds to the direct parent. */ export declare function printExecutionFrameRec(box: ConsoleBox, frame: ExecutionFrame, isLast: boolean[]): void; /** * Print a trace with chalk. */ export declare function printTrace(console: ConsoleBox, states: QuintEx[], frames: ExecutionFrame[], hideVars?: string[]): void;