@informalsystems/quint
Version:
Core tool for the Quint specification language
32 lines (31 loc) • 1.38 kB
TypeScript
import { IRVisitor } from '../ir/IRVisitor';
import { QuintError } from '../quintError';
import { OpQualifier, QuintDeclaration, QuintInstance, QuintOpDef } from '../ir/quintIr';
import { EffectScheme } from './base';
export type ModeCheckingResult = [Map<bigint, QuintError>, Map<bigint, OpQualifier>];
export declare class ModeChecker implements IRVisitor {
/**
* Constructs a new instance of ModeChecker with optional suggestions.
*
* @constructor
* @param suggestions - Optional map of suggestions for annotations that could
* be more strict. To be used as a starting point
*/
constructor(suggestions?: Map<bigint, OpQualifier>);
/**
* Matches annotated modes for each declaration with its inferred effect. Returns
* errors for incorrect annotations and suggestions for annotations that could
* be more strict.
*
* @param decls: the list of declarations to be checked
* @param effects: the map from expression ids to their inferred effects
*
* @returns The mode errors, if any is found. Otherwise, a map with potential suggestions.
*/
checkModes(decls: QuintDeclaration[], effects: Map<bigint, EffectScheme>): ModeCheckingResult;
private errors;
private suggestions;
private effects;
exitOpDef(def: QuintOpDef): void;
exitInstance(def: QuintInstance): void;
}