@informalsystems/quint
Version:
Core tool for the Quint specification language
27 lines (26 loc) • 1.17 kB
TypeScript
/**
* Convert init definitions to predicates to be compatible with TLA+.
* Returns errors if some action is re-used between init and step, as that would require generating new actions.
* We ask for user intervention in such edge cases.
*
* @author Gabriela Moreira
*
* @module
*/
import { Either } from '@sweet-monads/either';
import { LookupTable } from '../names/base';
import { QuintError } from '../quintError';
import { OpQualifier, QuintModule } from './quintIr';
/**
* Converts the action named as "q::init" and all its dependencies to
* predicates (transforming assignments into equalities). If one of the
* converted dependencies is also used outside of init, this produces an error
* as that case would be more complicated to handle.
*
* @param module: the module with the init definition and its dependencies
* @param lookupTable: the lookup table for the module
* @param modes: the result of mode checking the module
*
* @returns The converted module, or errors instructing manual fix.
*/
export declare function convertInit(module: QuintModule, lookupTable: LookupTable, modes: Map<bigint, OpQualifier>): Either<QuintError[], QuintModule>;