UNPKG

@informalsystems/quint

Version:

Core tool for the Quint specification language

33 lines (32 loc) 1.05 kB
import { QuintType } from '../ir/quintTypes'; export type Constraint = { kind: 'eq'; types: [QuintType, QuintType]; sourceId: bigint; } | { kind: 'conjunction'; constraints: Constraint[]; sourceId: bigint; } | { kind: 'isDefined'; type: QuintType; sourceId: bigint; } | { kind: 'empty'; }; export interface QuantifiedVariables { typeVariables: Set<string>; rowVariables: Set<string>; } export type TypeScheme = { type: QuintType; } & QuantifiedVariables; export type Signature = (_arity: number) => TypeScheme; export declare function toScheme(type: QuintType): TypeScheme; /** compares two constraints based on the order of generality of their kind * * @returns a negative value if the kind of the first constraint is more general than the second, * a positive value if the kind of the first constraint is more specific than the second, * and 0 if the two constraints are the same kind. */ export declare function compareConstraints(a: Constraint, b: Constraint): number;