UNPKG

@informalsystems/quint

Version:

Core tool for the Quint specification language

38 lines (37 loc) 1.32 kB
import { LookupTable } from '../names/base'; import { QuintType, Row } from '../ir/quintTypes'; import { Constraint } from './base'; export type Substitutions = Substitution[]; type Substitution = { kind: 'type'; name: string; value: QuintType; } | { kind: 'row'; name: string; value: Row; }; export declare function compose(table: LookupTable, s1: Substitutions, s2: Substitutions): Substitutions; /** * Applies substitutions to a type, replacing all type variables with their * substitution values when they are defined. * * @param subs the substitutions to be applied * @param t the type to be transformed * * @returns the type resulting from the substitutions' application on the * given type */ export declare function applySubstitution(table: LookupTable, subs: Substitutions, t: QuintType): QuintType; /** * Applies substitutions to a constraint, by applying the substitutions to all * types occurring in that constraint * * @param subs the substitutions to be applied * @param c the constraint to be transformed * * @returns the constraint resulting from the substitutions' application on the * given constraint */ export declare function applySubstitutionToConstraint(table: LookupTable, subs: Substitutions, c: Constraint): Constraint; export {};