UNPKG

@informalsystems/quint

Version:

Core tool for the Quint specification language

33 lines (32 loc) 1.15 kB
/** * Checking for the misuse of 'nondet', 'oneOf', and 'apalache::generate'. * Necessary to ensure they are compatible with the exists operator from TLA+. * * @author Gabriela Moreira * * @module */ import { IRVisitor } from '../ir/IRVisitor'; import { QuintApp, QuintDeclaration, QuintLet, QuintOpDef } from '../ir/quintIr'; import { LookupTable } from '../names/base'; import { QuintError } from '../quintError'; import { TypeScheme } from '../types/base'; export declare class NondetChecker implements IRVisitor { private table; private types; private lastDefQualifier; private errors; constructor(table: LookupTable); /** * Checks declarations for misuse of 'nondet', 'oneOf', and 'apalache::generate'. * * @param types - the types of the declarations * @param declarations - the declarations to check * * @returns a list of errors (empty if no errors are found) */ checkNondets(types: Map<bigint, TypeScheme>, declarations: QuintDeclaration[]): QuintError[]; enterOpDef(def: QuintOpDef): void; enterApp(app: QuintApp): void; enterLet(expr: QuintLet): void; }