UNPKG

@informalsystems/quint

Version:

Core tool for the Quint specification language

45 lines (44 loc) 1.77 kB
/** * A wrapper around the Rust evaluator for Quint. * * @author Gabriela Moreira * * @module */ import { QuintEx, QuintModule } from './ir/quintIr'; import { Outcome } from './simulation'; import { TraceHook } from './cliReporting'; import { LookupTable } from './names/base'; export type ParsedQuint = { modules: QuintModule[]; table: LookupTable; main: string; init: QuintEx; step: QuintEx; invariant: QuintEx; }; export declare class QuintRustWrapper { private verbosityLevel; /** * Constructor for QuintRustWrapper. * @param {number} verbosityLevel - The level of verbosity for logging. */ constructor(verbosityLevel: number); /** * Simulate the parsed Quint model using the Rust evaluator * * @param {ParsedQuint} parsed - The parsed Quint model. * @param {string} source - The source code of the Quint model. * @param {QuintEx[]} witnesses - The witnesses for the simulation. * @param {number} nruns - The number of runs for the simulation. * @param {number} nsteps - The number of steps per run. * @param {number} ntraces - The number of traces to store. * @param {number} nthreads - The number of threads to use. * @param {bigint} [seed] - Optional seed for reproducibility. * @param {TraceHook} onTrace - A callback function to be called with trace information for each simulation run. * * @returns {Outcome} The outcome of the simulation. * @throws Will throw an error if the Rust evaluator fails to launch or returns an error. */ simulate(parsed: ParsedQuint, source: string, witnesses: QuintEx[], nruns: number, nsteps: number, ntraces: number, nthreads: number, seed?: bigint, onTrace?: TraceHook): Promise<Outcome>; }