UNPKG

@informalsystems/quint

Version:

Core tool for the Quint specification language

77 lines (76 loc) 3.06 kB
import { SourceMap } from './parsing/quintParserFrontend'; import { ErrorMessage } from './ErrorMessage'; import { Either } from '@sweet-monads/either'; import { QuintEx } from './ir/quintIr'; import { QuintError } from './quintError'; import { CompiledStage, TypecheckedStage } from './cliCommands'; import { ApalacheConfig } from './apalache'; export declare function mkErrorMessage(sourceMap: SourceMap): (_: QuintError) => ErrorMessage; export declare function toExpr(prev: TypecheckedStage, input: string): Either<QuintError, QuintEx>; export declare function guessMainModule(stage: TypecheckedStage): string; /** * Process invariants from arguments and return the combined invariant string * and individual invariants list. * * @param args The arguments containing invariant and invariants options. * @returns A tuple [invariantString, individualInvariants]. */ export declare function getInvariants(args: { invariant?: string; invariants?: string[]; }): [string, string[]]; export declare function addItfHeader(source: string, status: string, traceInJson: any): any; export declare function loadApalacheConfig(stage: CompiledStage, apalacheConfig: string | undefined): ApalacheConfig; /** * Does a definition name match the expected test criteria. * * @param tests an optional array of test names * @param name the name of a definition to match * @returns whether the name matches the tests, if tests are not undefined, * or name ends with 'Test' * */ export declare function isMatchingTest(match: string | undefined, name: string): boolean; export declare function deriveVerbosity(args: { out: string | undefined; verbosity: number; }): number; export declare const PLACEHOLDERS: { test: string; seq: string; }; /** * Expand the output template with the name of the test and the index of the trace. * * Possible placeholders: * - {test} is replaced with the name of the test * - {seq} is replaced with the index of the trace * * If {seq} is not present and `options.autoAppend` is true, * the index is appended to the filename, before the extension. * * @param template the output template * @param name the name of the test * @param index the index of the trace * @param options An object of the form `{ autoAppend: boolean }` * @returns the expanded output template */ export declare function expandNamedOutputTemplate(template: string, name: string, index: number, options: { autoAppend: boolean; }): string; /** * Expand the output template with the index of the trace. * * The {seq} placeholder is replaced with the index of the trace. * * If {seq} is not present and `options.autoAppend` is true, * the index is appended to the filename, before the extension. * * @param template the output template * @param index the index of the trace * @param options An object of the form `{ autoAppend: boolean }` * @returns the expanded output template */ export declare function expandOutputTemplate(template: string, index: number, options: { autoAppend: boolean; }): string;