@informalsystems/quint
Version:
Core tool for the Quint specification language
21 lines (20 loc) • 1.3 kB
TypeScript
import { IdGenerator } from '../idGenerator';
import { QuintModule } from '../ir/quintIr';
import { LookupTable } from '../names/base';
import { SourceMap } from '../parsing/quintParserFrontend';
import { AnalysisOutput } from '../quintAnalyzer';
/**
* Flattens instances from a module, creating a new module for each instance, updating names, and replacing the instance
* declaration with an import. Assumes that the module doesn't have any imports and exports (that is, those were already
* flattened).
*
* @param quintModule The module with instances to flatten
* @param modulesByName The referenced modules, by name
* @param lookupTable The lookup table for the module and its dependencies
* @param idGenerator The id generator to be used for generating fresh ids for the new modules
* @param sourceMap The source map for the module and its dependencies
* @param analysisOutput The analysis output for the module and its dependencies
*
* @returns The new modules, including the given module (with modifications) and the new modules for the instances
*/
export declare function flattenInstances(quintModule: QuintModule, modulesByName: Map<string, QuintModule>, lookupTable: LookupTable, idGenerator: IdGenerator, sourceMap: SourceMap, analysisOutput: AnalysisOutput): QuintModule[];