@informalsystems/quint
Version:
Core tool for the Quint specification language
35 lines (34 loc) • 1.29 kB
TypeScript
/**
* Constraint solving for Quint's type system by unifying equality constraints
*
* @author Gabriela Moreira
*
* @module
*/
import { Either } from '@sweet-monads/either';
import { ErrorTree } from '../errorTree';
import { QuintType, Row } from '../ir/quintTypes';
import { Constraint } from './base';
import { Substitutions } from './substitutions';
import { LookupTable } from '../names/base';
export declare function solveConstraint(table: LookupTable, constraint: Constraint): Either<Map<bigint, ErrorTree>, Substitutions>;
/**
* Unifies two Quint types
*
* @param t1 a type to be unified
* @param t2 the type to be unified with
*
* @returns an array of substitutions that unifies both types, when possible.
* Otherwise, an error tree with an error message and its trace.
*/
export declare function unify(table: LookupTable, t1: QuintType, t2: QuintType): Either<ErrorTree, Substitutions>;
/**
* Unifies two Quint rows
*
* @param r1 a row to be unified
* @param r2 the row to be unified with
*
* @returns an array of substitutions that unifies both rows, when possible.
* Otherwise, an error tree with an error message and its trace.
*/
export declare function unifyRows(table: LookupTable, r1: Row, r2: Row): Either<ErrorTree, Substitutions>;