import { QuintEx, QuintModule } from './ir/quintIr'; import { ExecutionFrame } from './runtime/trace'; import { Outcome } from './simulation'; import { CLIProcedure, ErrResult, ErrorData, ParsedStage, ProcedureStage, TestedStage, TracingStage } from './cliCommands'; import { DebugMessage } from './itf'; import { Either } from '@sweet-monads/either'; import { ApalacheResult } from './apalache'; import { TlcError } from './tlc'; import { LookupTable } from './names/base'; import { TestResult } from './runtime/testing'; export type TraceHook = (index: number, status: string, vars: string[], states: QuintEx[], name?: string) => void; /** * Print a counterexample if the appropriate verbosity is set. * * @param verbosityLevel The verbosity level. * @param states The states of the counterexample. * @param frames The execution frames (optional). * @param hideVars Variables to hide in the output (optional). */ export declare function maybePrintCounterExample(verbosityLevel: number, states: QuintEx[], diagnostics: DebugMessage[][], frames?: ExecutionFrame[], hideVars?: string[], pendingDiagnostics?: DebugMessage[]): void; /** * Print witnesses if the appropriate verbosity is set. * * @param verbosityLevel The verbosity level. * @param outcome The simulation outcome. * @param witnesses The list of witnesses. */ export declare function maybePrintWitnesses(verbosityLevel: number, outcome: Outcome, witnesses: string[]): void; /** * Print violated invariants using indices provided by the Rust backend. * * @param violatedIndices The indices of invariants that were violated. * @param invariants The list of invariant names/expressions. */ export declare function printViolatedInvariantsByIndex(violatedIndices: number[], invariants: string[]): void; /** * Print violated invariants in the final state. * * @param state The final state. * @param invariants The list of invariants. * @param prev The previous stage context. */ export declare function printViolatedInvariants(state: QuintEx, invariants: string[], prev: any): void; /** * Process verification result from TLC. */ export declare function processTlcResult(res: Either, startMs: number, verbosityLevel: number, stage: TracingStage): CLIProcedure; /** * Process the result of a verification call. * * @param res The result of the verification. * @param startMs The start time in milliseconds. * @param verbosityLevel The verbosity level. * @param stage The current tracing stage. * @param invariantsList The list of invariants. * @param invariantExprs Optional parsed invariant expressions for Rust-based evaluation. * @param table Optional lookup table for Rust-based evaluation. * @returns The processed result. */ export declare function processApalacheResult(res: ApalacheResult, startMs: number, verbosityLevel: number, stage: TracingStage, invariantsList: string[], invariantExprs?: QuintEx[], table?: LookupTable): Promise>; export declare function outputJson(stage: ProcedureStage): string; export declare function writeOutputToJson(filename: string, stage: ProcedureStage): void; export declare function jsonStringOfOutputStage(json: any): string; /** * Write json to a file. * * @param filename name of the file to write to * @param json is an object tree to write */ export declare function writeToJson(filename: string, json: any): void; export declare function cliErr(msg: string, stage: ErrorData): Either; /** * Find the main module by name. */ export declare function findMainModule(prev: ParsedStage, mainName: string): QuintModule | undefined; /** * Handle errors when the main module is not found. */ export declare function handleMainModuleError(prev: ParsedStage, mainName: string): CLIProcedure; export declare function prepareOnTrace(source: string, outputTemplate: string | undefined, nTraces: number, metadata: boolean): TraceHook; /** * Output test results. */ export declare function outputTestResults(results: TestResult[], verbosityLevel: number, elapsedMs: number): void; export declare function outputTestErrors(prev: ParsedStage, verbosityLevel: number, failed: TestResult[]): void; export declare function printInductiveInvariantProgress(verbosityLevel: number, args: any, phase: number, nPhases: number, invariantsString?: string): void;