diff --git a/quint/io-cli-tests.md b/quint/io-cli-tests.md index bf42a6a23..90a20702c 100644 --- a/quint/io-cli-tests.md +++ b/quint/io-cli-tests.md @@ -76,7 +76,7 @@ error: parsing failed ``` quint parse --out parse-out-example.json ../examples/language-features/tuples.qnt -jq '.modules[0].name, .table."7".reference' < parse-out-example.json +jq '.modules[0].name, .table."7".id' < parse-out-example.json rm parse-out-example.json ``` diff --git a/quint/src/docs.ts b/quint/src/docs.ts index 6ad5c3aad..739038843 100644 --- a/quint/src/docs.ts +++ b/quint/src/docs.ts @@ -13,9 +13,8 @@ * @module */ -import { compact } from 'lodash' -import { definitionToString } from './ir/IRprinting' -import { QuintModule } from './ir/quintIr' +import { declarationToString } from './ir/IRprinting' +import { QuintModule, isDef } from './ir/quintIr' /** * A documentation entry for a definition, compatible with LSP responses for signature help @@ -34,15 +33,11 @@ export interface DocumentationEntry { * @returns a map of definition names to their documentation */ export function produceDocs(quintModule: QuintModule): Map { - const entries = quintModule.defs.map(def => { - if (def.kind === 'instance' || def.kind === 'import' || def.kind === 'export') { - return undefined - } - + const entries = quintModule.declarations.filter(isDef).map(def => { const entry: [string, DocumentationEntry] = [ def.name, { - label: definitionToString(def, false), + label: declarationToString(def, false), documentation: def.doc, }, ] @@ -50,7 +45,7 @@ export function produceDocs(quintModule: QuintModule): Map(compact(entries)) + return new Map(entries) } /** @@ -60,15 +55,11 @@ export function produceDocs(quintModule: QuintModule): Map { - const entries = quintModule.defs.map(def => { - if (def.kind === 'instance' || def.kind === 'import' || def.kind === 'export') { - return undefined - } - + const entries = quintModule.declarations.filter(isDef).map(def => { const entry: [bigint, DocumentationEntry] = [ def.id, { - label: definitionToString(def, false), + label: declarationToString(def, false), documentation: def.doc, }, ] @@ -76,7 +67,7 @@ export function produceDocsById(quintModule: QuintModule): Map { - walkDefinition(this, def) + inferEffects(declarations: QuintDeclaration[]): EffectInferenceResult { + declarations.forEach(decl => { + walkDeclaration(this, decl) }) return [this.errors, this.effects] } @@ -346,7 +346,7 @@ export class EffectInferrer implements IRVisitor { return right(this.newInstance(signature)) } else { const def = this.lookupTable.get(nameId) - const id = def?.reference + const id = def?.id if (!def || !id) { return left(buildErrorLeaf(this.location, `Signature not found for name: ${name}`)) } diff --git a/quint/src/effects/modeChecker.ts b/quint/src/effects/modeChecker.ts index 30847e9b7..7c77c4a4d 100644 --- a/quint/src/effects/modeChecker.ts +++ b/quint/src/effects/modeChecker.ts @@ -15,9 +15,9 @@ import isEqual from 'lodash.isequal' import { qualifierToString } from '../ir/IRprinting' -import { IRVisitor, walkDefinition } from '../ir/IRVisitor' +import { IRVisitor, walkDeclaration } from '../ir/IRVisitor' import { QuintError } from '../quintError' -import { OpQualifier, QuintDef, QuintInstance, QuintOpDef } from '../ir/quintIr' +import { OpQualifier, QuintDeclaration, QuintInstance, QuintOpDef } from '../ir/quintIr' import { unreachable } from '../util' import { ArrowEffect, ComponentKind, EffectScheme, Entity, entityNames, stateVariables } from './base' import { effectToString, entityToString } from './printing' @@ -39,18 +39,18 @@ export class ModeChecker implements IRVisitor { } /** - * Matches annotated modes for each definition with its inferred effect. Returns + * Matches annotated modes for each declaration with its inferred effect. Returns * errors for incorrect annotations and suggestions for annotations that could * be more strict. * - * @param defs: the list of definitions to be checked + * @param decls: the list of declarations to be checked * @param effects: the map from expression ids to their inferred effects * * @returns The mode errors, if any is found. Otherwise, a map with potential suggestions. */ - checkModes(defs: QuintDef[], effects: Map): ModeCheckingResult { + checkModes(decls: QuintDeclaration[], effects: Map): ModeCheckingResult { this.effects = effects - defs.forEach(def => walkDefinition(this, def)) + decls.forEach(decl => walkDeclaration(this, decl)) return [this.errors, this.suggestions] } diff --git a/quint/src/flattening.ts b/quint/src/flattening.ts index 877ba771f..62e3acb0b 100644 --- a/quint/src/flattening.ts +++ b/quint/src/flattening.ts @@ -15,18 +15,18 @@ import { IdGenerator } from './idGenerator' import { LookupTable, builtinNames } from './names/base' import { - FlatDef, FlatModule, + QuintDeclaration, QuintDef, QuintExport, QuintImport, QuintInstance, QuintModule, - isFlat, + isDef, } from './ir/quintIr' -import { definitionToString, moduleToString } from './ir/IRprinting' +import { moduleToString } from './ir/IRprinting' import { Loc, parsePhase3importAndNameResolution } from './parsing/quintParserFrontend' -import { compact, uniqBy } from 'lodash' +import { uniqBy } from 'lodash' import { AnalysisOutput } from './quintAnalyzer' import { inlineAliasesInDef, inlineAnalysisOutput, inlineTypeAliases } from './types/aliasInliner' import { addNamespaceToDefinition } from './ir/namespacer' @@ -119,10 +119,10 @@ export function addDefToFlatModule( sourceMap: Map, analysisOutput: AnalysisOutput, module: FlatModule, - def: QuintDef + def: QuintDeclaration ): { flattenedModule: FlatModule - flattenedDefs: FlatDef[] + flattenedDefs: QuintDef[] flattenedTable: LookupTable flattenedAnalysis: AnalysisOutput } { @@ -132,8 +132,8 @@ export function addDefToFlatModule( const flattenedDefs = flattener .flattenDef(def) // Inline type aliases in new defs - .map(d => inlineAliasesInDef(d, table) as FlatDef) - const flattenedModule: FlatModule = { ...module, defs: [...module.defs, ...flattenedDefs] } + .map(d => inlineAliasesInDef(d, table)) + const flattenedModule: FlatModule = { ...module, declarations: [...module.declarations, ...flattenedDefs] } return { flattenedModule, @@ -166,7 +166,7 @@ class Flatenner { // builtin names ...builtinNames, // names from the current module - ...compact(module.defs.map(d => (isFlat(d) ? d.name : undefined))), + ...module.declarations.filter(isDef).map(d => d.name), ]) this.importedModules = importedModules @@ -176,8 +176,8 @@ class Flatenner { this.analysisOutput = analysisOutput } - flattenDef(def: QuintDef): FlatDef[] { - if (isFlat(def)) { + flattenDef(def: QuintDeclaration): QuintDef[] { + if (isDef(def)) { // Not an instance, import or export, keep the same def return [def] } @@ -190,17 +190,20 @@ class Flatenner { } flattenModule(): FlatModule { - const newDefs = this.module.defs.flatMap(def => this.flattenDef(def)) + const newDefs = this.module.declarations.flatMap(def => this.flattenDef(def)) - return { ...this.module, defs: uniqBy(newDefs, 'name') } + return { ...this.module, declarations: uniqBy(newDefs, 'name') } } - private flattenInstance(def: QuintInstance): FlatDef[] { + private flattenInstance(def: QuintInstance): QuintDef[] { // Build pure val definitions from overrides to replace the constants in the // instance. Index them by name to make it easier to replace the corresponding constants. - const overrides: Map = new Map( + const overrides: Map = new Map( def.overrides.map(([param, expr]) => { const constDef = this.table.get(param.id)! + if (constDef.kind !== 'const') { + throw new Error(`Impossible: ${constDef} should be a const`) + } return [ param.name, @@ -219,8 +222,8 @@ class Flatenner { const protoModule = this.importedModules.get(def.protoName)! // Overrides replace the original constant definitions, in the same position as they appear originally - const newProtoDefs = protoModule.defs.map(d => { - if (isFlat(d) && overrides.has(d.name)) { + const newProtoDefs = protoModule.declarations.filter(isDef).map(d => { + if (overrides.has(d.name)) { return overrides.get(d.name)! } @@ -229,13 +232,13 @@ class Flatenner { // Add the new defs to the modules table under the instance name if (def.qualifiedName) { - this.importedModules.set(def.qualifiedName, { ...protoModule, defs: newProtoDefs }) + this.importedModules.set(def.qualifiedName, { ...protoModule, declarations: newProtoDefs }) } return newProtoDefs.map(protoDef => this.copyDef(protoDef, def.qualifiedName)) } - private flattenImportOrExport(def: QuintImport | QuintExport): FlatDef[] { + private flattenImportOrExport(def: QuintImport | QuintExport): QuintDef[] { const qualifiedName = def.defName ? undefined : def.qualifiedName ?? def.protoName const protoModule = this.importedModules.get(def.protoName) @@ -249,24 +252,15 @@ class Flatenner { this.importedModules.set(qualifiedName, { ...protoModule, name: qualifiedName }) } - const defsToFlatten = filterDefs(protoModule.defs, def.defName) + const defsToFlatten = filterDefs(protoModule.declarations.filter(isDef), def.defName) return defsToFlatten.map(protoDef => this.copyDef(protoDef, qualifiedName)) } - private copyDef(def: QuintDef, qualifier: string | undefined): FlatDef { - if (!isFlat(def)) { - throw new Error(`Impossible: ${definitionToString(def)} should have been flattened already`) - } - + private copyDef(def: QuintDef, qualifier: string | undefined): QuintDef { const defWithQualifier = qualifier ? addNamespaceToDefinition(def, qualifier, this.currentModuleNames) : def const defWithNewId = generateFreshIds(defWithQualifier, this.idGenerator, this.sourceMap, this.analysisOutput) - if (!isFlat(defWithNewId)) { - // safe cast - throw new Error(`Impossible: updating definitions cannot unflatten a def: ${definitionToString(defWithNewId)}`) - } - return defWithNewId } } @@ -276,7 +270,7 @@ function filterDefs(defs: QuintDef[], name: string | undefined): QuintDef[] { return defs } - return defs.filter(def => isFlat(def) && def.name === name) + return defs.filter(def => def.name === name) } function resolveNamesOrThrow(currentTable: LookupTable, sourceMap: Map, module: QuintModule): LookupTable { diff --git a/quint/src/generated/.antlr/Quint.interp b/quint/src/generated/.antlr/Quint.interp index 47fa30f50..3b0201ff8 100644 --- a/quint/src/generated/.antlr/Quint.interp +++ b/quint/src/generated/.antlr/Quint.interp @@ -7,9 +7,10 @@ null ':' 'var' 'assume' -'type' ',' ';' +'type' +'|' 'nondet' 'val' 'def' @@ -29,7 +30,6 @@ null 'int' 'str' 'bool' -'|' '^' '\'' 'all' @@ -38,6 +38,7 @@ null 'else' '_' '...' +'::' null null null @@ -68,7 +69,6 @@ null null null null -null token symbolic names: null @@ -110,6 +110,7 @@ null null null null +null STRING BOOL INT @@ -136,7 +137,6 @@ ASGN LPAREN RPAREN IDENTIFIER -SIMPLE_IDENTIFIER DOCCOMMENT LINE_COMMENT COMMENT @@ -145,9 +145,11 @@ WS rule names: modules module -documentedUnit -unit +documentedDeclaration +declaration operDef +typeDef +typeSumVariant nondetOperDef qualifier importMod @@ -160,8 +162,9 @@ fromSource type typeUnionRecOne row +rowLabel expr -unitOrExpr +declarationOrExpr lambda identOrHole parameter @@ -172,7 +175,9 @@ normalCallName nameAfterDot operator literal +qualId +simpleId atn: -[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 71, 663, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 3, 2, 6, 2, 62, 10, 2, 13, 2, 14, 2, 63, 3, 2, 3, 2, 3, 3, 7, 3, 69, 10, 3, 12, 3, 14, 3, 72, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 78, 10, 3, 12, 3, 14, 3, 81, 11, 3, 3, 3, 3, 3, 3, 4, 7, 4, 86, 10, 4, 12, 4, 14, 4, 89, 11, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 5, 5, 116, 10, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 7, 6, 124, 10, 6, 12, 6, 14, 6, 127, 11, 6, 5, 6, 129, 10, 6, 3, 6, 3, 6, 3, 6, 5, 6, 134, 10, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 7, 6, 147, 10, 6, 12, 6, 14, 6, 150, 11, 6, 3, 6, 3, 6, 3, 6, 3, 6, 5, 6, 156, 10, 6, 3, 6, 3, 6, 5, 6, 160, 10, 6, 3, 6, 5, 6, 163, 10, 6, 3, 7, 3, 7, 3, 7, 3, 7, 5, 7, 169, 10, 7, 3, 7, 3, 7, 3, 7, 5, 7, 174, 10, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 5, 8, 185, 10, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 5, 9, 193, 10, 9, 3, 9, 3, 9, 3, 9, 3, 9, 5, 9, 199, 10, 9, 3, 9, 3, 9, 5, 9, 203, 10, 9, 5, 9, 205, 10, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 5, 10, 216, 10, 10, 5, 10, 218, 10, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 7, 11, 231, 10, 11, 12, 11, 14, 11, 234, 11, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 5, 11, 241, 10, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 7, 11, 254, 10, 11, 12, 11, 14, 11, 257, 11, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 5, 11, 264, 10, 11, 5, 11, 266, 10, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 7, 16, 281, 10, 16, 12, 16, 14, 16, 284, 11, 16, 5, 16, 286, 10, 16, 3, 16, 5, 16, 289, 10, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 7, 16, 310, 10, 16, 12, 16, 14, 16, 313, 11, 16, 3, 16, 5, 16, 316, 10, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 6, 16, 325, 10, 16, 13, 16, 14, 16, 326, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 5, 16, 337, 10, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 7, 16, 345, 10, 16, 12, 16, 14, 16, 348, 11, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 5, 17, 357, 10, 17, 3, 17, 5, 17, 360, 10, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 7, 18, 370, 10, 18, 12, 18, 14, 18, 373, 11, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 5, 18, 382, 10, 18, 5, 18, 384, 10, 18, 3, 18, 3, 18, 5, 18, 388, 10, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 5, 19, 395, 10, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 7, 19, 410, 10, 19, 12, 19, 14, 19, 413, 11, 19, 3, 19, 5, 19, 416, 10, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 7, 19, 425, 10, 19, 12, 19, 14, 19, 428, 11, 19, 3, 19, 5, 19, 431, 10, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 7, 19, 440, 10, 19, 12, 19, 14, 19, 443, 11, 19, 3, 19, 5, 19, 446, 10, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 7, 19, 455, 10, 19, 12, 19, 14, 19, 458, 11, 19, 3, 19, 5, 19, 461, 10, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 7, 19, 472, 10, 19, 12, 19, 14, 19, 475, 11, 19, 3, 19, 5, 19, 478, 10, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 7, 19, 486, 10, 19, 12, 19, 14, 19, 489, 11, 19, 3, 19, 5, 19, 492, 10, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 7, 19, 500, 10, 19, 12, 19, 14, 19, 503, 11, 19, 5, 19, 505, 10, 19, 3, 19, 5, 19, 508, 10, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 5, 19, 533, 10, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 5, 19, 572, 10, 19, 3, 19, 5, 19, 575, 10, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 6, 19, 591, 10, 19, 13, 19, 14, 19, 592, 7, 19, 595, 10, 19, 12, 19, 14, 19, 598, 11, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 5, 20, 609, 10, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 7, 21, 619, 10, 21, 12, 21, 14, 21, 622, 11, 21, 3, 21, 3, 21, 3, 21, 3, 21, 5, 21, 628, 10, 21, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 7, 25, 639, 10, 25, 12, 25, 14, 25, 642, 11, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 5, 26, 649, 10, 26, 3, 27, 3, 27, 5, 27, 653, 10, 27, 3, 28, 3, 28, 5, 28, 657, 10, 28, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 2, 4, 30, 36, 31, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 2, 12, 4, 2, 41, 43, 66, 66, 3, 2, 54, 56, 3, 2, 52, 53, 3, 2, 57, 62, 4, 2, 39, 39, 66, 66, 4, 2, 54, 54, 66, 66, 3, 2, 44, 50, 3, 2, 44, 47, 5, 2, 33, 33, 44, 47, 52, 62, 3, 2, 41, 43, 2, 756, 2, 61, 3, 2, 2, 2, 4, 70, 3, 2, 2, 2, 6, 87, 3, 2, 2, 2, 8, 115, 3, 2, 2, 2, 10, 117, 3, 2, 2, 2, 12, 164, 3, 2, 2, 2, 14, 184, 3, 2, 2, 2, 16, 204, 3, 2, 2, 2, 18, 217, 3, 2, 2, 2, 20, 265, 3, 2, 2, 2, 22, 267, 3, 2, 2, 2, 24, 269, 3, 2, 2, 2, 26, 271, 3, 2, 2, 2, 28, 273, 3, 2, 2, 2, 30, 336, 3, 2, 2, 2, 32, 349, 3, 2, 2, 2, 34, 387, 3, 2, 2, 2, 36, 532, 3, 2, 2, 2, 38, 608, 3, 2, 2, 2, 40, 627, 3, 2, 2, 2, 42, 629, 3, 2, 2, 2, 44, 631, 3, 2, 2, 2, 46, 633, 3, 2, 2, 2, 48, 635, 3, 2, 2, 2, 50, 648, 3, 2, 2, 2, 52, 652, 3, 2, 2, 2, 54, 656, 3, 2, 2, 2, 56, 658, 3, 2, 2, 2, 58, 660, 3, 2, 2, 2, 60, 62, 5, 4, 3, 2, 61, 60, 3, 2, 2, 2, 62, 63, 3, 2, 2, 2, 63, 61, 3, 2, 2, 2, 63, 64, 3, 2, 2, 2, 64, 65, 3, 2, 2, 2, 65, 66, 7, 2, 2, 3, 66, 3, 3, 2, 2, 2, 67, 69, 7, 68, 2, 2, 68, 67, 3, 2, 2, 2, 69, 72, 3, 2, 2, 2, 70, 68, 3, 2, 2, 2, 70, 71, 3, 2, 2, 2, 71, 73, 3, 2, 2, 2, 72, 70, 3, 2, 2, 2, 73, 74, 7, 3, 2, 2, 74, 75, 7, 66, 2, 2, 75, 79, 7, 4, 2, 2, 76, 78, 5, 6, 4, 2, 77, 76, 3, 2, 2, 2, 78, 81, 3, 2, 2, 2, 79, 77, 3, 2, 2, 2, 79, 80, 3, 2, 2, 2, 80, 82, 3, 2, 2, 2, 81, 79, 3, 2, 2, 2, 82, 83, 7, 5, 2, 2, 83, 5, 3, 2, 2, 2, 84, 86, 7, 68, 2, 2, 85, 84, 3, 2, 2, 2, 86, 89, 3, 2, 2, 2, 87, 85, 3, 2, 2, 2, 87, 88, 3, 2, 2, 2, 88, 90, 3, 2, 2, 2, 89, 87, 3, 2, 2, 2, 90, 91, 5, 8, 5, 2, 91, 7, 3, 2, 2, 2, 92, 93, 7, 6, 2, 2, 93, 94, 7, 66, 2, 2, 94, 95, 7, 7, 2, 2, 95, 116, 5, 30, 16, 2, 96, 97, 7, 8, 2, 2, 97, 98, 7, 66, 2, 2, 98, 99, 7, 7, 2, 2, 99, 116, 5, 30, 16, 2, 100, 101, 7, 9, 2, 2, 101, 102, 5, 42, 22, 2, 102, 103, 7, 63, 2, 2, 103, 104, 5, 36, 19, 2, 104, 116, 3, 2, 2, 2, 105, 116, 5, 20, 11, 2, 106, 116, 5, 10, 6, 2, 107, 108, 7, 10, 2, 2, 108, 116, 7, 66, 2, 2, 109, 110, 7, 10, 2, 2, 110, 111, 7, 66, 2, 2, 111, 112, 7, 63, 2, 2, 112, 116, 5, 30, 16, 2, 113, 116, 5, 16, 9, 2, 114, 116, 5, 18, 10, 2, 115, 92, 3, 2, 2, 2, 115, 96, 3, 2, 2, 2, 115, 100, 3, 2, 2, 2, 115, 105, 3, 2, 2, 2, 115, 106, 3, 2, 2, 2, 115, 107, 3, 2, 2, 2, 115, 109, 3, 2, 2, 2, 115, 113, 3, 2, 2, 2, 115, 114, 3, 2, 2, 2, 116, 9, 3, 2, 2, 2, 117, 118, 5, 14, 8, 2, 118, 155, 5, 52, 27, 2, 119, 128, 7, 64, 2, 2, 120, 125, 5, 44, 23, 2, 121, 122, 7, 11, 2, 2, 122, 124, 5, 44, 23, 2, 123, 121, 3, 2, 2, 2, 124, 127, 3, 2, 2, 2, 125, 123, 3, 2, 2, 2, 125, 126, 3, 2, 2, 2, 126, 129, 3, 2, 2, 2, 127, 125, 3, 2, 2, 2, 128, 120, 3, 2, 2, 2, 128, 129, 3, 2, 2, 2, 129, 130, 3, 2, 2, 2, 130, 133, 7, 65, 2, 2, 131, 132, 7, 7, 2, 2, 132, 134, 5, 30, 16, 2, 133, 131, 3, 2, 2, 2, 133, 134, 3, 2, 2, 2, 134, 156, 3, 2, 2, 2, 135, 136, 7, 7, 2, 2, 136, 156, 5, 30, 16, 2, 137, 138, 7, 64, 2, 2, 138, 139, 5, 44, 23, 2, 139, 140, 7, 7, 2, 2, 140, 148, 5, 30, 16, 2, 141, 142, 7, 11, 2, 2, 142, 143, 5, 44, 23, 2, 143, 144, 7, 7, 2, 2, 144, 145, 5, 30, 16, 2, 145, 147, 3, 2, 2, 2, 146, 141, 3, 2, 2, 2, 147, 150, 3, 2, 2, 2, 148, 146, 3, 2, 2, 2, 148, 149, 3, 2, 2, 2, 149, 151, 3, 2, 2, 2, 150, 148, 3, 2, 2, 2, 151, 152, 7, 65, 2, 2, 152, 153, 7, 7, 2, 2, 153, 154, 5, 30, 16, 2, 154, 156, 3, 2, 2, 2, 155, 119, 3, 2, 2, 2, 155, 135, 3, 2, 2, 2, 155, 137, 3, 2, 2, 2, 155, 156, 3, 2, 2, 2, 156, 159, 3, 2, 2, 2, 157, 158, 7, 63, 2, 2, 158, 160, 5, 36, 19, 2, 159, 157, 3, 2, 2, 2, 159, 160, 3, 2, 2, 2, 160, 162, 3, 2, 2, 2, 161, 163, 7, 12, 2, 2, 162, 161, 3, 2, 2, 2, 162, 163, 3, 2, 2, 2, 163, 11, 3, 2, 2, 2, 164, 165, 7, 13, 2, 2, 165, 168, 7, 66, 2, 2, 166, 167, 7, 7, 2, 2, 167, 169, 5, 30, 16, 2, 168, 166, 3, 2, 2, 2, 168, 169, 3, 2, 2, 2, 169, 170, 3, 2, 2, 2, 170, 171, 7, 63, 2, 2, 171, 173, 5, 36, 19, 2, 172, 174, 7, 12, 2, 2, 173, 172, 3, 2, 2, 2, 173, 174, 3, 2, 2, 2, 174, 13, 3, 2, 2, 2, 175, 185, 7, 14, 2, 2, 176, 185, 7, 15, 2, 2, 177, 178, 7, 16, 2, 2, 178, 185, 7, 14, 2, 2, 179, 180, 7, 16, 2, 2, 180, 185, 7, 15, 2, 2, 181, 185, 7, 17, 2, 2, 182, 185, 7, 18, 2, 2, 183, 185, 7, 19, 2, 2, 184, 175, 3, 2, 2, 2, 184, 176, 3, 2, 2, 2, 184, 177, 3, 2, 2, 2, 184, 179, 3, 2, 2, 2, 184, 181, 3, 2, 2, 2, 184, 182, 3, 2, 2, 2, 184, 183, 3, 2, 2, 2, 185, 15, 3, 2, 2, 2, 186, 187, 7, 20, 2, 2, 187, 188, 5, 24, 13, 2, 188, 189, 7, 21, 2, 2, 189, 192, 5, 46, 24, 2, 190, 191, 7, 22, 2, 2, 191, 193, 5, 28, 15, 2, 192, 190, 3, 2, 2, 2, 192, 193, 3, 2, 2, 2, 193, 205, 3, 2, 2, 2, 194, 195, 7, 20, 2, 2, 195, 198, 5, 24, 13, 2, 196, 197, 7, 23, 2, 2, 197, 199, 5, 24, 13, 2, 198, 196, 3, 2, 2, 2, 198, 199, 3, 2, 2, 2, 199, 202, 3, 2, 2, 2, 200, 201, 7, 22, 2, 2, 201, 203, 5, 28, 15, 2, 202, 200, 3, 2, 2, 2, 202, 203, 3, 2, 2, 2, 203, 205, 3, 2, 2, 2, 204, 186, 3, 2, 2, 2, 204, 194, 3, 2, 2, 2, 205, 17, 3, 2, 2, 2, 206, 207, 7, 24, 2, 2, 207, 208, 5, 24, 13, 2, 208, 209, 7, 21, 2, 2, 209, 210, 5, 46, 24, 2, 210, 218, 3, 2, 2, 2, 211, 212, 7, 24, 2, 2, 212, 215, 5, 24, 13, 2, 213, 214, 7, 23, 2, 2, 214, 216, 5, 24, 13, 2, 215, 213, 3, 2, 2, 2, 215, 216, 3, 2, 2, 2, 216, 218, 3, 2, 2, 2, 217, 206, 3, 2, 2, 2, 217, 211, 3, 2, 2, 2, 218, 19, 3, 2, 2, 2, 219, 220, 7, 20, 2, 2, 220, 221, 5, 22, 12, 2, 221, 222, 7, 64, 2, 2, 222, 223, 5, 24, 13, 2, 223, 224, 7, 63, 2, 2, 224, 232, 5, 36, 19, 2, 225, 226, 7, 11, 2, 2, 226, 227, 5, 24, 13, 2, 227, 228, 7, 63, 2, 2, 228, 229, 5, 36, 19, 2, 229, 231, 3, 2, 2, 2, 230, 225, 3, 2, 2, 2, 231, 234, 3, 2, 2, 2, 232, 230, 3, 2, 2, 2, 232, 233, 3, 2, 2, 2, 233, 235, 3, 2, 2, 2, 234, 232, 3, 2, 2, 2, 235, 236, 7, 65, 2, 2, 236, 237, 7, 21, 2, 2, 237, 240, 7, 54, 2, 2, 238, 239, 7, 22, 2, 2, 239, 241, 5, 28, 15, 2, 240, 238, 3, 2, 2, 2, 240, 241, 3, 2, 2, 2, 241, 266, 3, 2, 2, 2, 242, 243, 7, 20, 2, 2, 243, 244, 5, 22, 12, 2, 244, 245, 7, 64, 2, 2, 245, 246, 5, 24, 13, 2, 246, 247, 7, 63, 2, 2, 247, 255, 5, 36, 19, 2, 248, 249, 7, 11, 2, 2, 249, 250, 5, 24, 13, 2, 250, 251, 7, 63, 2, 2, 251, 252, 5, 36, 19, 2, 252, 254, 3, 2, 2, 2, 253, 248, 3, 2, 2, 2, 254, 257, 3, 2, 2, 2, 255, 253, 3, 2, 2, 2, 255, 256, 3, 2, 2, 2, 256, 258, 3, 2, 2, 2, 257, 255, 3, 2, 2, 2, 258, 259, 7, 65, 2, 2, 259, 260, 7, 23, 2, 2, 260, 263, 5, 26, 14, 2, 261, 262, 7, 22, 2, 2, 262, 264, 5, 28, 15, 2, 263, 261, 3, 2, 2, 2, 263, 264, 3, 2, 2, 2, 264, 266, 3, 2, 2, 2, 265, 219, 3, 2, 2, 2, 265, 242, 3, 2, 2, 2, 266, 21, 3, 2, 2, 2, 267, 268, 7, 66, 2, 2, 268, 23, 3, 2, 2, 2, 269, 270, 7, 66, 2, 2, 270, 25, 3, 2, 2, 2, 271, 272, 7, 66, 2, 2, 272, 27, 3, 2, 2, 2, 273, 274, 7, 41, 2, 2, 274, 29, 3, 2, 2, 2, 275, 276, 8, 16, 1, 2, 276, 285, 7, 64, 2, 2, 277, 282, 5, 30, 16, 2, 278, 279, 7, 11, 2, 2, 279, 281, 5, 30, 16, 2, 280, 278, 3, 2, 2, 2, 281, 284, 3, 2, 2, 2, 282, 280, 3, 2, 2, 2, 282, 283, 3, 2, 2, 2, 283, 286, 3, 2, 2, 2, 284, 282, 3, 2, 2, 2, 285, 277, 3, 2, 2, 2, 285, 286, 3, 2, 2, 2, 286, 288, 3, 2, 2, 2, 287, 289, 7, 11, 2, 2, 288, 287, 3, 2, 2, 2, 288, 289, 3, 2, 2, 2, 289, 290, 3, 2, 2, 2, 290, 291, 7, 65, 2, 2, 291, 292, 7, 26, 2, 2, 292, 337, 5, 30, 16, 13, 293, 294, 7, 48, 2, 2, 294, 295, 7, 27, 2, 2, 295, 296, 5, 30, 16, 2, 296, 297, 7, 28, 2, 2, 297, 337, 3, 2, 2, 2, 298, 299, 7, 49, 2, 2, 299, 300, 7, 27, 2, 2, 300, 301, 5, 30, 16, 2, 301, 302, 7, 28, 2, 2, 302, 337, 3, 2, 2, 2, 303, 304, 7, 64, 2, 2, 304, 305, 5, 30, 16, 2, 305, 306, 7, 11, 2, 2, 306, 311, 5, 30, 16, 2, 307, 308, 7, 11, 2, 2, 308, 310, 5, 30, 16, 2, 309, 307, 3, 2, 2, 2, 310, 313, 3, 2, 2, 2, 311, 309, 3, 2, 2, 2, 311, 312, 3, 2, 2, 2, 312, 315, 3, 2, 2, 2, 313, 311, 3, 2, 2, 2, 314, 316, 7, 11, 2, 2, 315, 314, 3, 2, 2, 2, 315, 316, 3, 2, 2, 2, 316, 317, 3, 2, 2, 2, 317, 318, 7, 65, 2, 2, 318, 337, 3, 2, 2, 2, 319, 320, 7, 4, 2, 2, 320, 321, 5, 34, 18, 2, 321, 322, 7, 5, 2, 2, 322, 337, 3, 2, 2, 2, 323, 325, 5, 32, 17, 2, 324, 323, 3, 2, 2, 2, 325, 326, 3, 2, 2, 2, 326, 324, 3, 2, 2, 2, 326, 327, 3, 2, 2, 2, 327, 337, 3, 2, 2, 2, 328, 337, 7, 29, 2, 2, 329, 337, 7, 30, 2, 2, 330, 337, 7, 31, 2, 2, 331, 337, 7, 66, 2, 2, 332, 333, 7, 64, 2, 2, 333, 334, 5, 30, 16, 2, 334, 335, 7, 65, 2, 2, 335, 337, 3, 2, 2, 2, 336, 275, 3, 2, 2, 2, 336, 293, 3, 2, 2, 2, 336, 298, 3, 2, 2, 2, 336, 303, 3, 2, 2, 2, 336, 319, 3, 2, 2, 2, 336, 324, 3, 2, 2, 2, 336, 328, 3, 2, 2, 2, 336, 329, 3, 2, 2, 2, 336, 330, 3, 2, 2, 2, 336, 331, 3, 2, 2, 2, 336, 332, 3, 2, 2, 2, 337, 346, 3, 2, 2, 2, 338, 339, 12, 15, 2, 2, 339, 340, 7, 25, 2, 2, 340, 345, 5, 30, 16, 15, 341, 342, 12, 14, 2, 2, 342, 343, 7, 26, 2, 2, 343, 345, 5, 30, 16, 14, 344, 338, 3, 2, 2, 2, 344, 341, 3, 2, 2, 2, 345, 348, 3, 2, 2, 2, 346, 344, 3, 2, 2, 2, 346, 347, 3, 2, 2, 2, 347, 31, 3, 2, 2, 2, 348, 346, 3, 2, 2, 2, 349, 350, 7, 32, 2, 2, 350, 351, 7, 4, 2, 2, 351, 352, 7, 66, 2, 2, 352, 353, 7, 7, 2, 2, 353, 356, 7, 41, 2, 2, 354, 355, 7, 11, 2, 2, 355, 357, 5, 34, 18, 2, 356, 354, 3, 2, 2, 2, 356, 357, 3, 2, 2, 2, 357, 359, 3, 2, 2, 2, 358, 360, 7, 11, 2, 2, 359, 358, 3, 2, 2, 2, 359, 360, 3, 2, 2, 2, 360, 361, 3, 2, 2, 2, 361, 362, 7, 5, 2, 2, 362, 33, 3, 2, 2, 2, 363, 388, 3, 2, 2, 2, 364, 365, 7, 66, 2, 2, 365, 366, 7, 7, 2, 2, 366, 367, 5, 30, 16, 2, 367, 368, 7, 11, 2, 2, 368, 370, 3, 2, 2, 2, 369, 364, 3, 2, 2, 2, 370, 373, 3, 2, 2, 2, 371, 369, 3, 2, 2, 2, 371, 372, 3, 2, 2, 2, 372, 383, 3, 2, 2, 2, 373, 371, 3, 2, 2, 2, 374, 375, 7, 66, 2, 2, 375, 376, 7, 7, 2, 2, 376, 377, 5, 30, 16, 2, 377, 381, 3, 2, 2, 2, 378, 382, 7, 11, 2, 2, 379, 380, 7, 32, 2, 2, 380, 382, 7, 66, 2, 2, 381, 378, 3, 2, 2, 2, 381, 379, 3, 2, 2, 2, 381, 382, 3, 2, 2, 2, 382, 384, 3, 2, 2, 2, 383, 374, 3, 2, 2, 2, 383, 384, 3, 2, 2, 2, 384, 388, 3, 2, 2, 2, 385, 386, 7, 32, 2, 2, 386, 388, 7, 66, 2, 2, 387, 363, 3, 2, 2, 2, 387, 371, 3, 2, 2, 2, 387, 385, 3, 2, 2, 2, 388, 35, 3, 2, 2, 2, 389, 390, 8, 19, 1, 2, 390, 533, 5, 40, 21, 2, 391, 392, 5, 52, 27, 2, 392, 394, 7, 64, 2, 2, 393, 395, 5, 48, 25, 2, 394, 393, 3, 2, 2, 2, 394, 395, 3, 2, 2, 2, 395, 396, 3, 2, 2, 2, 396, 397, 7, 65, 2, 2, 397, 533, 3, 2, 2, 2, 398, 399, 7, 53, 2, 2, 399, 533, 5, 36, 19, 27, 400, 401, 7, 66, 2, 2, 401, 402, 7, 34, 2, 2, 402, 403, 7, 63, 2, 2, 403, 533, 5, 36, 19, 23, 404, 405, 7, 44, 2, 2, 405, 406, 7, 4, 2, 2, 406, 411, 5, 36, 19, 2, 407, 408, 7, 11, 2, 2, 408, 410, 5, 36, 19, 2, 409, 407, 3, 2, 2, 2, 410, 413, 3, 2, 2, 2, 411, 409, 3, 2, 2, 2, 411, 412, 3, 2, 2, 2, 412, 415, 3, 2, 2, 2, 413, 411, 3, 2, 2, 2, 414, 416, 7, 11, 2, 2, 415, 414, 3, 2, 2, 2, 415, 416, 3, 2, 2, 2, 416, 417, 3, 2, 2, 2, 417, 418, 7, 5, 2, 2, 418, 533, 3, 2, 2, 2, 419, 420, 7, 45, 2, 2, 420, 421, 7, 4, 2, 2, 421, 426, 5, 36, 19, 2, 422, 423, 7, 11, 2, 2, 423, 425, 5, 36, 19, 2, 424, 422, 3, 2, 2, 2, 425, 428, 3, 2, 2, 2, 426, 424, 3, 2, 2, 2, 426, 427, 3, 2, 2, 2, 427, 430, 3, 2, 2, 2, 428, 426, 3, 2, 2, 2, 429, 431, 7, 11, 2, 2, 430, 429, 3, 2, 2, 2, 430, 431, 3, 2, 2, 2, 431, 432, 3, 2, 2, 2, 432, 433, 7, 5, 2, 2, 433, 533, 3, 2, 2, 2, 434, 435, 7, 35, 2, 2, 435, 436, 7, 4, 2, 2, 436, 441, 5, 36, 19, 2, 437, 438, 7, 11, 2, 2, 438, 440, 5, 36, 19, 2, 439, 437, 3, 2, 2, 2, 440, 443, 3, 2, 2, 2, 441, 439, 3, 2, 2, 2, 441, 442, 3, 2, 2, 2, 442, 445, 3, 2, 2, 2, 443, 441, 3, 2, 2, 2, 444, 446, 7, 11, 2, 2, 445, 444, 3, 2, 2, 2, 445, 446, 3, 2, 2, 2, 446, 447, 3, 2, 2, 2, 447, 448, 7, 5, 2, 2, 448, 533, 3, 2, 2, 2, 449, 450, 7, 36, 2, 2, 450, 451, 7, 4, 2, 2, 451, 456, 5, 36, 19, 2, 452, 453, 7, 11, 2, 2, 453, 455, 5, 36, 19, 2, 454, 452, 3, 2, 2, 2, 455, 458, 3, 2, 2, 2, 456, 454, 3, 2, 2, 2, 456, 457, 3, 2, 2, 2, 457, 460, 3, 2, 2, 2, 458, 456, 3, 2, 2, 2, 459, 461, 7, 11, 2, 2, 460, 459, 3, 2, 2, 2, 460, 461, 3, 2, 2, 2, 461, 462, 3, 2, 2, 2, 462, 463, 7, 5, 2, 2, 463, 533, 3, 2, 2, 2, 464, 533, 9, 2, 2, 2, 465, 466, 7, 64, 2, 2, 466, 467, 5, 36, 19, 2, 467, 468, 7, 11, 2, 2, 468, 473, 5, 36, 19, 2, 469, 470, 7, 11, 2, 2, 470, 472, 5, 36, 19, 2, 471, 469, 3, 2, 2, 2, 472, 475, 3, 2, 2, 2, 473, 471, 3, 2, 2, 2, 473, 474, 3, 2, 2, 2, 474, 477, 3, 2, 2, 2, 475, 473, 3, 2, 2, 2, 476, 478, 7, 11, 2, 2, 477, 476, 3, 2, 2, 2, 477, 478, 3, 2, 2, 2, 478, 479, 3, 2, 2, 2, 479, 480, 7, 65, 2, 2, 480, 533, 3, 2, 2, 2, 481, 482, 7, 4, 2, 2, 482, 487, 5, 50, 26, 2, 483, 484, 7, 11, 2, 2, 484, 486, 5, 50, 26, 2, 485, 483, 3, 2, 2, 2, 486, 489, 3, 2, 2, 2, 487, 485, 3, 2, 2, 2, 487, 488, 3, 2, 2, 2, 488, 491, 3, 2, 2, 2, 489, 487, 3, 2, 2, 2, 490, 492, 7, 11, 2, 2, 491, 490, 3, 2, 2, 2, 491, 492, 3, 2, 2, 2, 492, 493, 3, 2, 2, 2, 493, 494, 7, 5, 2, 2, 494, 533, 3, 2, 2, 2, 495, 504, 7, 27, 2, 2, 496, 501, 5, 36, 19, 2, 497, 498, 7, 11, 2, 2, 498, 500, 5, 36, 19, 2, 499, 497, 3, 2, 2, 2, 500, 503, 3, 2, 2, 2, 501, 499, 3, 2, 2, 2, 501, 502, 3, 2, 2, 2, 502, 505, 3, 2, 2, 2, 503, 501, 3, 2, 2, 2, 504, 496, 3, 2, 2, 2, 504, 505, 3, 2, 2, 2, 505, 507, 3, 2, 2, 2, 506, 508, 7, 11, 2, 2, 507, 506, 3, 2, 2, 2, 507, 508, 3, 2, 2, 2, 508, 509, 3, 2, 2, 2, 509, 533, 7, 28, 2, 2, 510, 511, 7, 37, 2, 2, 511, 512, 7, 64, 2, 2, 512, 513, 5, 36, 19, 2, 513, 514, 7, 65, 2, 2, 514, 515, 5, 36, 19, 2, 515, 516, 7, 38, 2, 2, 516, 517, 5, 36, 19, 7, 517, 533, 3, 2, 2, 2, 518, 519, 5, 10, 6, 2, 519, 520, 5, 36, 19, 6, 520, 533, 3, 2, 2, 2, 521, 522, 5, 12, 7, 2, 522, 523, 5, 36, 19, 5, 523, 533, 3, 2, 2, 2, 524, 525, 7, 64, 2, 2, 525, 526, 5, 36, 19, 2, 526, 527, 7, 65, 2, 2, 527, 533, 3, 2, 2, 2, 528, 529, 7, 4, 2, 2, 529, 530, 5, 36, 19, 2, 530, 531, 7, 5, 2, 2, 531, 533, 3, 2, 2, 2, 532, 389, 3, 2, 2, 2, 532, 391, 3, 2, 2, 2, 532, 398, 3, 2, 2, 2, 532, 400, 3, 2, 2, 2, 532, 404, 3, 2, 2, 2, 532, 419, 3, 2, 2, 2, 532, 434, 3, 2, 2, 2, 532, 449, 3, 2, 2, 2, 532, 464, 3, 2, 2, 2, 532, 465, 3, 2, 2, 2, 532, 481, 3, 2, 2, 2, 532, 495, 3, 2, 2, 2, 532, 510, 3, 2, 2, 2, 532, 518, 3, 2, 2, 2, 532, 521, 3, 2, 2, 2, 532, 524, 3, 2, 2, 2, 532, 528, 3, 2, 2, 2, 533, 596, 3, 2, 2, 2, 534, 535, 12, 28, 2, 2, 535, 536, 7, 33, 2, 2, 536, 595, 5, 36, 19, 28, 537, 538, 12, 26, 2, 2, 538, 539, 9, 3, 2, 2, 539, 595, 5, 36, 19, 27, 540, 541, 12, 25, 2, 2, 541, 542, 9, 4, 2, 2, 542, 595, 5, 36, 19, 26, 543, 544, 12, 24, 2, 2, 544, 545, 9, 5, 2, 2, 545, 595, 5, 36, 19, 25, 546, 547, 12, 22, 2, 2, 547, 548, 7, 63, 2, 2, 548, 549, 5, 36, 19, 23, 549, 550, 8, 19, 1, 2, 550, 595, 3, 2, 2, 2, 551, 552, 12, 20, 2, 2, 552, 553, 7, 44, 2, 2, 553, 595, 5, 36, 19, 21, 554, 555, 12, 18, 2, 2, 555, 556, 7, 45, 2, 2, 556, 595, 5, 36, 19, 19, 557, 558, 12, 17, 2, 2, 558, 559, 7, 46, 2, 2, 559, 595, 5, 36, 19, 18, 560, 561, 12, 16, 2, 2, 561, 562, 7, 47, 2, 2, 562, 595, 5, 36, 19, 17, 563, 564, 12, 10, 2, 2, 564, 565, 7, 25, 2, 2, 565, 595, 5, 36, 19, 11, 566, 567, 12, 32, 2, 2, 567, 568, 7, 21, 2, 2, 568, 574, 5, 54, 28, 2, 569, 571, 7, 64, 2, 2, 570, 572, 5, 48, 25, 2, 571, 570, 3, 2, 2, 2, 571, 572, 3, 2, 2, 2, 572, 573, 3, 2, 2, 2, 573, 575, 7, 65, 2, 2, 574, 569, 3, 2, 2, 2, 574, 575, 3, 2, 2, 2, 575, 595, 3, 2, 2, 2, 576, 577, 12, 29, 2, 2, 577, 578, 7, 27, 2, 2, 578, 579, 5, 36, 19, 2, 579, 580, 7, 28, 2, 2, 580, 595, 3, 2, 2, 2, 581, 582, 12, 15, 2, 2, 582, 590, 7, 51, 2, 2, 583, 584, 7, 32, 2, 2, 584, 585, 7, 41, 2, 2, 585, 586, 7, 7, 2, 2, 586, 587, 5, 44, 23, 2, 587, 588, 7, 26, 2, 2, 588, 589, 5, 36, 19, 2, 589, 591, 3, 2, 2, 2, 590, 583, 3, 2, 2, 2, 591, 592, 3, 2, 2, 2, 592, 590, 3, 2, 2, 2, 592, 593, 3, 2, 2, 2, 593, 595, 3, 2, 2, 2, 594, 534, 3, 2, 2, 2, 594, 537, 3, 2, 2, 2, 594, 540, 3, 2, 2, 2, 594, 543, 3, 2, 2, 2, 594, 546, 3, 2, 2, 2, 594, 551, 3, 2, 2, 2, 594, 554, 3, 2, 2, 2, 594, 557, 3, 2, 2, 2, 594, 560, 3, 2, 2, 2, 594, 563, 3, 2, 2, 2, 594, 566, 3, 2, 2, 2, 594, 576, 3, 2, 2, 2, 594, 581, 3, 2, 2, 2, 595, 598, 3, 2, 2, 2, 596, 594, 3, 2, 2, 2, 596, 597, 3, 2, 2, 2, 597, 37, 3, 2, 2, 2, 598, 596, 3, 2, 2, 2, 599, 600, 5, 8, 5, 2, 600, 601, 7, 2, 2, 3, 601, 609, 3, 2, 2, 2, 602, 603, 5, 36, 19, 2, 603, 604, 7, 2, 2, 3, 604, 609, 3, 2, 2, 2, 605, 606, 7, 68, 2, 2, 606, 609, 7, 2, 2, 3, 607, 609, 7, 2, 2, 3, 608, 599, 3, 2, 2, 2, 608, 602, 3, 2, 2, 2, 608, 605, 3, 2, 2, 2, 608, 607, 3, 2, 2, 2, 609, 39, 3, 2, 2, 2, 610, 611, 5, 44, 23, 2, 611, 612, 7, 26, 2, 2, 612, 613, 5, 36, 19, 2, 613, 628, 3, 2, 2, 2, 614, 615, 7, 64, 2, 2, 615, 620, 5, 44, 23, 2, 616, 617, 7, 11, 2, 2, 617, 619, 5, 44, 23, 2, 618, 616, 3, 2, 2, 2, 619, 622, 3, 2, 2, 2, 620, 618, 3, 2, 2, 2, 620, 621, 3, 2, 2, 2, 621, 623, 3, 2, 2, 2, 622, 620, 3, 2, 2, 2, 623, 624, 7, 65, 2, 2, 624, 625, 7, 26, 2, 2, 625, 626, 5, 36, 19, 2, 626, 628, 3, 2, 2, 2, 627, 610, 3, 2, 2, 2, 627, 614, 3, 2, 2, 2, 628, 41, 3, 2, 2, 2, 629, 630, 9, 6, 2, 2, 630, 43, 3, 2, 2, 2, 631, 632, 5, 42, 22, 2, 632, 45, 3, 2, 2, 2, 633, 634, 9, 7, 2, 2, 634, 47, 3, 2, 2, 2, 635, 640, 5, 36, 19, 2, 636, 637, 7, 11, 2, 2, 637, 639, 5, 36, 19, 2, 638, 636, 3, 2, 2, 2, 639, 642, 3, 2, 2, 2, 640, 638, 3, 2, 2, 2, 640, 641, 3, 2, 2, 2, 641, 49, 3, 2, 2, 2, 642, 640, 3, 2, 2, 2, 643, 644, 7, 66, 2, 2, 644, 645, 7, 7, 2, 2, 645, 649, 5, 36, 19, 2, 646, 647, 7, 40, 2, 2, 647, 649, 5, 36, 19, 2, 648, 643, 3, 2, 2, 2, 648, 646, 3, 2, 2, 2, 649, 51, 3, 2, 2, 2, 650, 653, 7, 66, 2, 2, 651, 653, 9, 8, 2, 2, 652, 650, 3, 2, 2, 2, 652, 651, 3, 2, 2, 2, 653, 53, 3, 2, 2, 2, 654, 657, 7, 66, 2, 2, 655, 657, 9, 9, 2, 2, 656, 654, 3, 2, 2, 2, 656, 655, 3, 2, 2, 2, 657, 55, 3, 2, 2, 2, 658, 659, 9, 10, 2, 2, 659, 57, 3, 2, 2, 2, 660, 661, 9, 11, 2, 2, 661, 59, 3, 2, 2, 2, 72, 63, 70, 79, 87, 115, 125, 128, 133, 148, 155, 159, 162, 168, 173, 184, 192, 198, 202, 204, 215, 217, 232, 240, 255, 263, 265, 282, 285, 288, 311, 315, 326, 336, 344, 346, 356, 359, 371, 381, 383, 387, 394, 411, 415, 426, 430, 441, 445, 456, 460, 473, 477, 487, 491, 501, 504, 507, 532, 571, 574, 592, 594, 596, 608, 620, 627, 640, 648, 652, 656] \ No newline at end of file +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 71, 726, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 3, 2, 6, 2, 72, 10, 2, 13, 2, 14, 2, 73, 3, 2, 3, 2, 3, 3, 7, 3, 79, 10, 3, 12, 3, 14, 3, 82, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 88, 10, 3, 12, 3, 14, 3, 91, 11, 3, 3, 3, 3, 3, 3, 4, 7, 4, 96, 10, 4, 12, 4, 14, 4, 99, 11, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 5, 5, 123, 10, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 7, 6, 131, 10, 6, 12, 6, 14, 6, 134, 11, 6, 5, 6, 136, 10, 6, 3, 6, 3, 6, 3, 6, 5, 6, 141, 10, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 7, 6, 154, 10, 6, 12, 6, 14, 6, 157, 11, 6, 3, 6, 3, 6, 3, 6, 3, 6, 5, 6, 163, 10, 6, 3, 6, 3, 6, 5, 6, 167, 10, 6, 3, 6, 5, 6, 170, 10, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 5, 7, 183, 10, 7, 3, 7, 3, 7, 3, 7, 7, 7, 188, 10, 7, 12, 7, 14, 7, 191, 11, 7, 5, 7, 193, 10, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 5, 8, 200, 10, 8, 3, 9, 3, 9, 3, 9, 3, 9, 5, 9, 206, 10, 9, 3, 9, 3, 9, 3, 9, 5, 9, 211, 10, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 5, 10, 222, 10, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 5, 11, 230, 10, 11, 3, 11, 3, 11, 3, 11, 3, 11, 5, 11, 236, 10, 11, 3, 11, 3, 11, 5, 11, 240, 10, 11, 5, 11, 242, 10, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 5, 12, 253, 10, 12, 5, 12, 255, 10, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 7, 13, 268, 10, 13, 12, 13, 14, 13, 271, 11, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 278, 10, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 7, 13, 291, 10, 13, 12, 13, 14, 13, 294, 11, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 301, 10, 13, 5, 13, 303, 10, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 7, 18, 318, 10, 18, 12, 18, 14, 18, 321, 11, 18, 5, 18, 323, 10, 18, 3, 18, 5, 18, 326, 10, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 7, 18, 347, 10, 18, 12, 18, 14, 18, 350, 11, 18, 3, 18, 5, 18, 353, 10, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 6, 18, 362, 10, 18, 13, 18, 14, 18, 363, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 5, 18, 374, 10, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 7, 18, 382, 10, 18, 12, 18, 14, 18, 385, 11, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 5, 19, 394, 10, 19, 3, 19, 5, 19, 397, 10, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 7, 20, 406, 10, 20, 12, 20, 14, 20, 409, 11, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 5, 20, 418, 10, 20, 5, 20, 420, 10, 20, 3, 20, 3, 20, 5, 20, 424, 10, 20, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 5, 22, 433, 10, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 7, 22, 449, 10, 22, 12, 22, 14, 22, 452, 11, 22, 3, 22, 5, 22, 455, 10, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 7, 22, 464, 10, 22, 12, 22, 14, 22, 467, 11, 22, 3, 22, 5, 22, 470, 10, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 7, 22, 479, 10, 22, 12, 22, 14, 22, 482, 11, 22, 3, 22, 5, 22, 485, 10, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 7, 22, 494, 10, 22, 12, 22, 14, 22, 497, 11, 22, 3, 22, 5, 22, 500, 10, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 5, 22, 508, 10, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 7, 22, 516, 10, 22, 12, 22, 14, 22, 519, 11, 22, 3, 22, 5, 22, 522, 10, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 7, 22, 530, 10, 22, 12, 22, 14, 22, 533, 11, 22, 3, 22, 5, 22, 536, 10, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 7, 22, 544, 10, 22, 12, 22, 14, 22, 547, 11, 22, 5, 22, 549, 10, 22, 3, 22, 5, 22, 552, 10, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 5, 22, 577, 10, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 5, 22, 616, 10, 22, 3, 22, 5, 22, 619, 10, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 6, 22, 635, 10, 22, 13, 22, 14, 22, 636, 7, 22, 639, 10, 22, 12, 22, 14, 22, 642, 11, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 5, 23, 653, 10, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 7, 24, 663, 10, 24, 12, 24, 14, 24, 666, 11, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, 24, 672, 10, 24, 3, 25, 3, 25, 5, 25, 676, 10, 25, 3, 26, 3, 26, 3, 27, 3, 27, 5, 27, 682, 10, 27, 3, 28, 3, 28, 3, 28, 7, 28, 687, 10, 28, 12, 28, 14, 28, 690, 11, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 5, 29, 698, 10, 29, 3, 30, 3, 30, 5, 30, 702, 10, 30, 3, 31, 3, 31, 5, 31, 706, 10, 31, 3, 32, 3, 32, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 7, 34, 715, 10, 34, 12, 34, 14, 34, 718, 11, 34, 3, 35, 3, 35, 3, 35, 3, 35, 5, 35, 724, 10, 35, 3, 35, 2, 4, 34, 42, 36, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 2, 9, 3, 2, 55, 57, 3, 2, 53, 54, 3, 2, 58, 63, 3, 2, 45, 51, 3, 2, 45, 48, 5, 2, 33, 33, 45, 48, 53, 63, 3, 2, 42, 44, 2, 824, 2, 71, 3, 2, 2, 2, 4, 80, 3, 2, 2, 2, 6, 97, 3, 2, 2, 2, 8, 122, 3, 2, 2, 2, 10, 124, 3, 2, 2, 2, 12, 192, 3, 2, 2, 2, 14, 194, 3, 2, 2, 2, 16, 201, 3, 2, 2, 2, 18, 221, 3, 2, 2, 2, 20, 241, 3, 2, 2, 2, 22, 254, 3, 2, 2, 2, 24, 302, 3, 2, 2, 2, 26, 304, 3, 2, 2, 2, 28, 306, 3, 2, 2, 2, 30, 308, 3, 2, 2, 2, 32, 310, 3, 2, 2, 2, 34, 373, 3, 2, 2, 2, 36, 386, 3, 2, 2, 2, 38, 423, 3, 2, 2, 2, 40, 425, 3, 2, 2, 2, 42, 576, 3, 2, 2, 2, 44, 652, 3, 2, 2, 2, 46, 671, 3, 2, 2, 2, 48, 675, 3, 2, 2, 2, 50, 677, 3, 2, 2, 2, 52, 681, 3, 2, 2, 2, 54, 683, 3, 2, 2, 2, 56, 697, 3, 2, 2, 2, 58, 701, 3, 2, 2, 2, 60, 705, 3, 2, 2, 2, 62, 707, 3, 2, 2, 2, 64, 709, 3, 2, 2, 2, 66, 711, 3, 2, 2, 2, 68, 723, 3, 2, 2, 2, 70, 72, 5, 4, 3, 2, 71, 70, 3, 2, 2, 2, 72, 73, 3, 2, 2, 2, 73, 71, 3, 2, 2, 2, 73, 74, 3, 2, 2, 2, 74, 75, 3, 2, 2, 2, 75, 76, 7, 2, 2, 3, 76, 3, 3, 2, 2, 2, 77, 79, 7, 68, 2, 2, 78, 77, 3, 2, 2, 2, 79, 82, 3, 2, 2, 2, 80, 78, 3, 2, 2, 2, 80, 81, 3, 2, 2, 2, 81, 83, 3, 2, 2, 2, 82, 80, 3, 2, 2, 2, 83, 84, 7, 3, 2, 2, 84, 85, 5, 66, 34, 2, 85, 89, 7, 4, 2, 2, 86, 88, 5, 6, 4, 2, 87, 86, 3, 2, 2, 2, 88, 91, 3, 2, 2, 2, 89, 87, 3, 2, 2, 2, 89, 90, 3, 2, 2, 2, 90, 92, 3, 2, 2, 2, 91, 89, 3, 2, 2, 2, 92, 93, 7, 5, 2, 2, 93, 5, 3, 2, 2, 2, 94, 96, 7, 68, 2, 2, 95, 94, 3, 2, 2, 2, 96, 99, 3, 2, 2, 2, 97, 95, 3, 2, 2, 2, 97, 98, 3, 2, 2, 2, 98, 100, 3, 2, 2, 2, 99, 97, 3, 2, 2, 2, 100, 101, 5, 8, 5, 2, 101, 7, 3, 2, 2, 2, 102, 103, 7, 6, 2, 2, 103, 104, 5, 66, 34, 2, 104, 105, 7, 7, 2, 2, 105, 106, 5, 34, 18, 2, 106, 123, 3, 2, 2, 2, 107, 108, 7, 8, 2, 2, 108, 109, 5, 66, 34, 2, 109, 110, 7, 7, 2, 2, 110, 111, 5, 34, 18, 2, 111, 123, 3, 2, 2, 2, 112, 113, 7, 9, 2, 2, 113, 114, 5, 48, 25, 2, 114, 115, 7, 64, 2, 2, 115, 116, 5, 42, 22, 2, 116, 123, 3, 2, 2, 2, 117, 123, 5, 24, 13, 2, 118, 123, 5, 10, 6, 2, 119, 123, 5, 12, 7, 2, 120, 123, 5, 20, 11, 2, 121, 123, 5, 22, 12, 2, 122, 102, 3, 2, 2, 2, 122, 107, 3, 2, 2, 2, 122, 112, 3, 2, 2, 2, 122, 117, 3, 2, 2, 2, 122, 118, 3, 2, 2, 2, 122, 119, 3, 2, 2, 2, 122, 120, 3, 2, 2, 2, 122, 121, 3, 2, 2, 2, 123, 9, 3, 2, 2, 2, 124, 125, 5, 18, 10, 2, 125, 162, 5, 58, 30, 2, 126, 135, 7, 65, 2, 2, 127, 132, 5, 50, 26, 2, 128, 129, 7, 10, 2, 2, 129, 131, 5, 50, 26, 2, 130, 128, 3, 2, 2, 2, 131, 134, 3, 2, 2, 2, 132, 130, 3, 2, 2, 2, 132, 133, 3, 2, 2, 2, 133, 136, 3, 2, 2, 2, 134, 132, 3, 2, 2, 2, 135, 127, 3, 2, 2, 2, 135, 136, 3, 2, 2, 2, 136, 137, 3, 2, 2, 2, 137, 140, 7, 66, 2, 2, 138, 139, 7, 7, 2, 2, 139, 141, 5, 34, 18, 2, 140, 138, 3, 2, 2, 2, 140, 141, 3, 2, 2, 2, 141, 163, 3, 2, 2, 2, 142, 143, 7, 7, 2, 2, 143, 163, 5, 34, 18, 2, 144, 145, 7, 65, 2, 2, 145, 146, 5, 50, 26, 2, 146, 147, 7, 7, 2, 2, 147, 155, 5, 34, 18, 2, 148, 149, 7, 10, 2, 2, 149, 150, 5, 50, 26, 2, 150, 151, 7, 7, 2, 2, 151, 152, 5, 34, 18, 2, 152, 154, 3, 2, 2, 2, 153, 148, 3, 2, 2, 2, 154, 157, 3, 2, 2, 2, 155, 153, 3, 2, 2, 2, 155, 156, 3, 2, 2, 2, 156, 158, 3, 2, 2, 2, 157, 155, 3, 2, 2, 2, 158, 159, 7, 66, 2, 2, 159, 160, 7, 7, 2, 2, 160, 161, 5, 34, 18, 2, 161, 163, 3, 2, 2, 2, 162, 126, 3, 2, 2, 2, 162, 142, 3, 2, 2, 2, 162, 144, 3, 2, 2, 2, 162, 163, 3, 2, 2, 2, 163, 166, 3, 2, 2, 2, 164, 165, 7, 64, 2, 2, 165, 167, 5, 42, 22, 2, 166, 164, 3, 2, 2, 2, 166, 167, 3, 2, 2, 2, 167, 169, 3, 2, 2, 2, 168, 170, 7, 11, 2, 2, 169, 168, 3, 2, 2, 2, 169, 170, 3, 2, 2, 2, 170, 11, 3, 2, 2, 2, 171, 172, 7, 12, 2, 2, 172, 193, 5, 66, 34, 2, 173, 174, 7, 12, 2, 2, 174, 175, 5, 66, 34, 2, 175, 176, 7, 64, 2, 2, 176, 177, 5, 34, 18, 2, 177, 193, 3, 2, 2, 2, 178, 179, 7, 12, 2, 2, 179, 180, 5, 66, 34, 2, 180, 182, 7, 64, 2, 2, 181, 183, 7, 13, 2, 2, 182, 181, 3, 2, 2, 2, 182, 183, 3, 2, 2, 2, 183, 184, 3, 2, 2, 2, 184, 189, 5, 14, 8, 2, 185, 186, 7, 13, 2, 2, 186, 188, 5, 14, 8, 2, 187, 185, 3, 2, 2, 2, 188, 191, 3, 2, 2, 2, 189, 187, 3, 2, 2, 2, 189, 190, 3, 2, 2, 2, 190, 193, 3, 2, 2, 2, 191, 189, 3, 2, 2, 2, 192, 171, 3, 2, 2, 2, 192, 173, 3, 2, 2, 2, 192, 178, 3, 2, 2, 2, 193, 13, 3, 2, 2, 2, 194, 199, 5, 68, 35, 2, 195, 196, 7, 65, 2, 2, 196, 197, 5, 34, 18, 2, 197, 198, 7, 66, 2, 2, 198, 200, 3, 2, 2, 2, 199, 195, 3, 2, 2, 2, 199, 200, 3, 2, 2, 2, 200, 15, 3, 2, 2, 2, 201, 202, 7, 14, 2, 2, 202, 205, 5, 66, 34, 2, 203, 204, 7, 7, 2, 2, 204, 206, 5, 34, 18, 2, 205, 203, 3, 2, 2, 2, 205, 206, 3, 2, 2, 2, 206, 207, 3, 2, 2, 2, 207, 208, 7, 64, 2, 2, 208, 210, 5, 42, 22, 2, 209, 211, 7, 11, 2, 2, 210, 209, 3, 2, 2, 2, 210, 211, 3, 2, 2, 2, 211, 17, 3, 2, 2, 2, 212, 222, 7, 15, 2, 2, 213, 222, 7, 16, 2, 2, 214, 215, 7, 17, 2, 2, 215, 222, 7, 15, 2, 2, 216, 217, 7, 17, 2, 2, 217, 222, 7, 16, 2, 2, 218, 222, 7, 18, 2, 2, 219, 222, 7, 19, 2, 2, 220, 222, 7, 20, 2, 2, 221, 212, 3, 2, 2, 2, 221, 213, 3, 2, 2, 2, 221, 214, 3, 2, 2, 2, 221, 216, 3, 2, 2, 2, 221, 218, 3, 2, 2, 2, 221, 219, 3, 2, 2, 2, 221, 220, 3, 2, 2, 2, 222, 19, 3, 2, 2, 2, 223, 224, 7, 21, 2, 2, 224, 225, 5, 28, 15, 2, 225, 226, 7, 22, 2, 2, 226, 229, 5, 52, 27, 2, 227, 228, 7, 23, 2, 2, 228, 230, 5, 32, 17, 2, 229, 227, 3, 2, 2, 2, 229, 230, 3, 2, 2, 2, 230, 242, 3, 2, 2, 2, 231, 232, 7, 21, 2, 2, 232, 235, 5, 28, 15, 2, 233, 234, 7, 24, 2, 2, 234, 236, 5, 28, 15, 2, 235, 233, 3, 2, 2, 2, 235, 236, 3, 2, 2, 2, 236, 239, 3, 2, 2, 2, 237, 238, 7, 23, 2, 2, 238, 240, 5, 32, 17, 2, 239, 237, 3, 2, 2, 2, 239, 240, 3, 2, 2, 2, 240, 242, 3, 2, 2, 2, 241, 223, 3, 2, 2, 2, 241, 231, 3, 2, 2, 2, 242, 21, 3, 2, 2, 2, 243, 244, 7, 25, 2, 2, 244, 245, 5, 28, 15, 2, 245, 246, 7, 22, 2, 2, 246, 247, 5, 52, 27, 2, 247, 255, 3, 2, 2, 2, 248, 249, 7, 25, 2, 2, 249, 252, 5, 28, 15, 2, 250, 251, 7, 24, 2, 2, 251, 253, 5, 28, 15, 2, 252, 250, 3, 2, 2, 2, 252, 253, 3, 2, 2, 2, 253, 255, 3, 2, 2, 2, 254, 243, 3, 2, 2, 2, 254, 248, 3, 2, 2, 2, 255, 23, 3, 2, 2, 2, 256, 257, 7, 21, 2, 2, 257, 258, 5, 26, 14, 2, 258, 259, 7, 65, 2, 2, 259, 260, 5, 28, 15, 2, 260, 261, 7, 64, 2, 2, 261, 269, 5, 42, 22, 2, 262, 263, 7, 10, 2, 2, 263, 264, 5, 28, 15, 2, 264, 265, 7, 64, 2, 2, 265, 266, 5, 42, 22, 2, 266, 268, 3, 2, 2, 2, 267, 262, 3, 2, 2, 2, 268, 271, 3, 2, 2, 2, 269, 267, 3, 2, 2, 2, 269, 270, 3, 2, 2, 2, 270, 272, 3, 2, 2, 2, 271, 269, 3, 2, 2, 2, 272, 273, 7, 66, 2, 2, 273, 274, 7, 22, 2, 2, 274, 277, 7, 55, 2, 2, 275, 276, 7, 23, 2, 2, 276, 278, 5, 32, 17, 2, 277, 275, 3, 2, 2, 2, 277, 278, 3, 2, 2, 2, 278, 303, 3, 2, 2, 2, 279, 280, 7, 21, 2, 2, 280, 281, 5, 26, 14, 2, 281, 282, 7, 65, 2, 2, 282, 283, 5, 28, 15, 2, 283, 284, 7, 64, 2, 2, 284, 292, 5, 42, 22, 2, 285, 286, 7, 10, 2, 2, 286, 287, 5, 28, 15, 2, 287, 288, 7, 64, 2, 2, 288, 289, 5, 42, 22, 2, 289, 291, 3, 2, 2, 2, 290, 285, 3, 2, 2, 2, 291, 294, 3, 2, 2, 2, 292, 290, 3, 2, 2, 2, 292, 293, 3, 2, 2, 2, 293, 295, 3, 2, 2, 2, 294, 292, 3, 2, 2, 2, 295, 296, 7, 66, 2, 2, 296, 297, 7, 24, 2, 2, 297, 300, 5, 30, 16, 2, 298, 299, 7, 23, 2, 2, 299, 301, 5, 32, 17, 2, 300, 298, 3, 2, 2, 2, 300, 301, 3, 2, 2, 2, 301, 303, 3, 2, 2, 2, 302, 256, 3, 2, 2, 2, 302, 279, 3, 2, 2, 2, 303, 25, 3, 2, 2, 2, 304, 305, 5, 66, 34, 2, 305, 27, 3, 2, 2, 2, 306, 307, 5, 66, 34, 2, 307, 29, 3, 2, 2, 2, 308, 309, 5, 66, 34, 2, 309, 31, 3, 2, 2, 2, 310, 311, 7, 42, 2, 2, 311, 33, 3, 2, 2, 2, 312, 313, 8, 18, 1, 2, 313, 322, 7, 65, 2, 2, 314, 319, 5, 34, 18, 2, 315, 316, 7, 10, 2, 2, 316, 318, 5, 34, 18, 2, 317, 315, 3, 2, 2, 2, 318, 321, 3, 2, 2, 2, 319, 317, 3, 2, 2, 2, 319, 320, 3, 2, 2, 2, 320, 323, 3, 2, 2, 2, 321, 319, 3, 2, 2, 2, 322, 314, 3, 2, 2, 2, 322, 323, 3, 2, 2, 2, 323, 325, 3, 2, 2, 2, 324, 326, 7, 10, 2, 2, 325, 324, 3, 2, 2, 2, 325, 326, 3, 2, 2, 2, 326, 327, 3, 2, 2, 2, 327, 328, 7, 66, 2, 2, 328, 329, 7, 27, 2, 2, 329, 374, 5, 34, 18, 13, 330, 331, 7, 49, 2, 2, 331, 332, 7, 28, 2, 2, 332, 333, 5, 34, 18, 2, 333, 334, 7, 29, 2, 2, 334, 374, 3, 2, 2, 2, 335, 336, 7, 50, 2, 2, 336, 337, 7, 28, 2, 2, 337, 338, 5, 34, 18, 2, 338, 339, 7, 29, 2, 2, 339, 374, 3, 2, 2, 2, 340, 341, 7, 65, 2, 2, 341, 342, 5, 34, 18, 2, 342, 343, 7, 10, 2, 2, 343, 348, 5, 34, 18, 2, 344, 345, 7, 10, 2, 2, 345, 347, 5, 34, 18, 2, 346, 344, 3, 2, 2, 2, 347, 350, 3, 2, 2, 2, 348, 346, 3, 2, 2, 2, 348, 349, 3, 2, 2, 2, 349, 352, 3, 2, 2, 2, 350, 348, 3, 2, 2, 2, 351, 353, 7, 10, 2, 2, 352, 351, 3, 2, 2, 2, 352, 353, 3, 2, 2, 2, 353, 354, 3, 2, 2, 2, 354, 355, 7, 66, 2, 2, 355, 374, 3, 2, 2, 2, 356, 357, 7, 4, 2, 2, 357, 358, 5, 38, 20, 2, 358, 359, 7, 5, 2, 2, 359, 374, 3, 2, 2, 2, 360, 362, 5, 36, 19, 2, 361, 360, 3, 2, 2, 2, 362, 363, 3, 2, 2, 2, 363, 361, 3, 2, 2, 2, 363, 364, 3, 2, 2, 2, 364, 374, 3, 2, 2, 2, 365, 374, 7, 30, 2, 2, 366, 374, 7, 31, 2, 2, 367, 374, 7, 32, 2, 2, 368, 374, 5, 66, 34, 2, 369, 370, 7, 65, 2, 2, 370, 371, 5, 34, 18, 2, 371, 372, 7, 66, 2, 2, 372, 374, 3, 2, 2, 2, 373, 312, 3, 2, 2, 2, 373, 330, 3, 2, 2, 2, 373, 335, 3, 2, 2, 2, 373, 340, 3, 2, 2, 2, 373, 356, 3, 2, 2, 2, 373, 361, 3, 2, 2, 2, 373, 365, 3, 2, 2, 2, 373, 366, 3, 2, 2, 2, 373, 367, 3, 2, 2, 2, 373, 368, 3, 2, 2, 2, 373, 369, 3, 2, 2, 2, 374, 383, 3, 2, 2, 2, 375, 376, 12, 15, 2, 2, 376, 377, 7, 26, 2, 2, 377, 382, 5, 34, 18, 15, 378, 379, 12, 14, 2, 2, 379, 380, 7, 27, 2, 2, 380, 382, 5, 34, 18, 14, 381, 375, 3, 2, 2, 2, 381, 378, 3, 2, 2, 2, 382, 385, 3, 2, 2, 2, 383, 381, 3, 2, 2, 2, 383, 384, 3, 2, 2, 2, 384, 35, 3, 2, 2, 2, 385, 383, 3, 2, 2, 2, 386, 387, 7, 13, 2, 2, 387, 388, 7, 4, 2, 2, 388, 389, 5, 66, 34, 2, 389, 390, 7, 7, 2, 2, 390, 393, 7, 42, 2, 2, 391, 392, 7, 10, 2, 2, 392, 394, 5, 38, 20, 2, 393, 391, 3, 2, 2, 2, 393, 394, 3, 2, 2, 2, 394, 396, 3, 2, 2, 2, 395, 397, 7, 10, 2, 2, 396, 395, 3, 2, 2, 2, 396, 397, 3, 2, 2, 2, 397, 398, 3, 2, 2, 2, 398, 399, 7, 5, 2, 2, 399, 37, 3, 2, 2, 2, 400, 401, 5, 40, 21, 2, 401, 402, 7, 7, 2, 2, 402, 403, 5, 34, 18, 2, 403, 404, 7, 10, 2, 2, 404, 406, 3, 2, 2, 2, 405, 400, 3, 2, 2, 2, 406, 409, 3, 2, 2, 2, 407, 405, 3, 2, 2, 2, 407, 408, 3, 2, 2, 2, 408, 419, 3, 2, 2, 2, 409, 407, 3, 2, 2, 2, 410, 411, 5, 40, 21, 2, 411, 412, 7, 7, 2, 2, 412, 413, 5, 34, 18, 2, 413, 417, 3, 2, 2, 2, 414, 418, 7, 10, 2, 2, 415, 416, 7, 13, 2, 2, 416, 418, 7, 67, 2, 2, 417, 414, 3, 2, 2, 2, 417, 415, 3, 2, 2, 2, 417, 418, 3, 2, 2, 2, 418, 420, 3, 2, 2, 2, 419, 410, 3, 2, 2, 2, 419, 420, 3, 2, 2, 2, 420, 424, 3, 2, 2, 2, 421, 422, 7, 13, 2, 2, 422, 424, 7, 67, 2, 2, 423, 407, 3, 2, 2, 2, 423, 421, 3, 2, 2, 2, 424, 39, 3, 2, 2, 2, 425, 426, 5, 68, 35, 2, 426, 41, 3, 2, 2, 2, 427, 428, 8, 22, 1, 2, 428, 577, 5, 46, 24, 2, 429, 430, 5, 58, 30, 2, 430, 432, 7, 65, 2, 2, 431, 433, 5, 54, 28, 2, 432, 431, 3, 2, 2, 2, 432, 433, 3, 2, 2, 2, 433, 434, 3, 2, 2, 2, 434, 435, 7, 66, 2, 2, 435, 577, 3, 2, 2, 2, 436, 437, 7, 54, 2, 2, 437, 577, 5, 42, 22, 27, 438, 439, 5, 66, 34, 2, 439, 440, 7, 34, 2, 2, 440, 441, 7, 64, 2, 2, 441, 442, 5, 42, 22, 23, 442, 577, 3, 2, 2, 2, 443, 444, 7, 45, 2, 2, 444, 445, 7, 4, 2, 2, 445, 450, 5, 42, 22, 2, 446, 447, 7, 10, 2, 2, 447, 449, 5, 42, 22, 2, 448, 446, 3, 2, 2, 2, 449, 452, 3, 2, 2, 2, 450, 448, 3, 2, 2, 2, 450, 451, 3, 2, 2, 2, 451, 454, 3, 2, 2, 2, 452, 450, 3, 2, 2, 2, 453, 455, 7, 10, 2, 2, 454, 453, 3, 2, 2, 2, 454, 455, 3, 2, 2, 2, 455, 456, 3, 2, 2, 2, 456, 457, 7, 5, 2, 2, 457, 577, 3, 2, 2, 2, 458, 459, 7, 46, 2, 2, 459, 460, 7, 4, 2, 2, 460, 465, 5, 42, 22, 2, 461, 462, 7, 10, 2, 2, 462, 464, 5, 42, 22, 2, 463, 461, 3, 2, 2, 2, 464, 467, 3, 2, 2, 2, 465, 463, 3, 2, 2, 2, 465, 466, 3, 2, 2, 2, 466, 469, 3, 2, 2, 2, 467, 465, 3, 2, 2, 2, 468, 470, 7, 10, 2, 2, 469, 468, 3, 2, 2, 2, 469, 470, 3, 2, 2, 2, 470, 471, 3, 2, 2, 2, 471, 472, 7, 5, 2, 2, 472, 577, 3, 2, 2, 2, 473, 474, 7, 35, 2, 2, 474, 475, 7, 4, 2, 2, 475, 480, 5, 42, 22, 2, 476, 477, 7, 10, 2, 2, 477, 479, 5, 42, 22, 2, 478, 476, 3, 2, 2, 2, 479, 482, 3, 2, 2, 2, 480, 478, 3, 2, 2, 2, 480, 481, 3, 2, 2, 2, 481, 484, 3, 2, 2, 2, 482, 480, 3, 2, 2, 2, 483, 485, 7, 10, 2, 2, 484, 483, 3, 2, 2, 2, 484, 485, 3, 2, 2, 2, 485, 486, 3, 2, 2, 2, 486, 487, 7, 5, 2, 2, 487, 577, 3, 2, 2, 2, 488, 489, 7, 36, 2, 2, 489, 490, 7, 4, 2, 2, 490, 495, 5, 42, 22, 2, 491, 492, 7, 10, 2, 2, 492, 494, 5, 42, 22, 2, 493, 491, 3, 2, 2, 2, 494, 497, 3, 2, 2, 2, 495, 493, 3, 2, 2, 2, 495, 496, 3, 2, 2, 2, 496, 499, 3, 2, 2, 2, 497, 495, 3, 2, 2, 2, 498, 500, 7, 10, 2, 2, 499, 498, 3, 2, 2, 2, 499, 500, 3, 2, 2, 2, 500, 501, 3, 2, 2, 2, 501, 502, 7, 5, 2, 2, 502, 577, 3, 2, 2, 2, 503, 508, 5, 66, 34, 2, 504, 508, 7, 44, 2, 2, 505, 508, 7, 43, 2, 2, 506, 508, 7, 42, 2, 2, 507, 503, 3, 2, 2, 2, 507, 504, 3, 2, 2, 2, 507, 505, 3, 2, 2, 2, 507, 506, 3, 2, 2, 2, 508, 577, 3, 2, 2, 2, 509, 510, 7, 65, 2, 2, 510, 511, 5, 42, 22, 2, 511, 512, 7, 10, 2, 2, 512, 517, 5, 42, 22, 2, 513, 514, 7, 10, 2, 2, 514, 516, 5, 42, 22, 2, 515, 513, 3, 2, 2, 2, 516, 519, 3, 2, 2, 2, 517, 515, 3, 2, 2, 2, 517, 518, 3, 2, 2, 2, 518, 521, 3, 2, 2, 2, 519, 517, 3, 2, 2, 2, 520, 522, 7, 10, 2, 2, 521, 520, 3, 2, 2, 2, 521, 522, 3, 2, 2, 2, 522, 523, 3, 2, 2, 2, 523, 524, 7, 66, 2, 2, 524, 577, 3, 2, 2, 2, 525, 526, 7, 4, 2, 2, 526, 531, 5, 56, 29, 2, 527, 528, 7, 10, 2, 2, 528, 530, 5, 56, 29, 2, 529, 527, 3, 2, 2, 2, 530, 533, 3, 2, 2, 2, 531, 529, 3, 2, 2, 2, 531, 532, 3, 2, 2, 2, 532, 535, 3, 2, 2, 2, 533, 531, 3, 2, 2, 2, 534, 536, 7, 10, 2, 2, 535, 534, 3, 2, 2, 2, 535, 536, 3, 2, 2, 2, 536, 537, 3, 2, 2, 2, 537, 538, 7, 5, 2, 2, 538, 577, 3, 2, 2, 2, 539, 548, 7, 28, 2, 2, 540, 545, 5, 42, 22, 2, 541, 542, 7, 10, 2, 2, 542, 544, 5, 42, 22, 2, 543, 541, 3, 2, 2, 2, 544, 547, 3, 2, 2, 2, 545, 543, 3, 2, 2, 2, 545, 546, 3, 2, 2, 2, 546, 549, 3, 2, 2, 2, 547, 545, 3, 2, 2, 2, 548, 540, 3, 2, 2, 2, 548, 549, 3, 2, 2, 2, 549, 551, 3, 2, 2, 2, 550, 552, 7, 10, 2, 2, 551, 550, 3, 2, 2, 2, 551, 552, 3, 2, 2, 2, 552, 553, 3, 2, 2, 2, 553, 577, 7, 29, 2, 2, 554, 555, 7, 37, 2, 2, 555, 556, 7, 65, 2, 2, 556, 557, 5, 42, 22, 2, 557, 558, 7, 66, 2, 2, 558, 559, 5, 42, 22, 2, 559, 560, 7, 38, 2, 2, 560, 561, 5, 42, 22, 7, 561, 577, 3, 2, 2, 2, 562, 563, 5, 10, 6, 2, 563, 564, 5, 42, 22, 6, 564, 577, 3, 2, 2, 2, 565, 566, 5, 16, 9, 2, 566, 567, 5, 42, 22, 5, 567, 577, 3, 2, 2, 2, 568, 569, 7, 65, 2, 2, 569, 570, 5, 42, 22, 2, 570, 571, 7, 66, 2, 2, 571, 577, 3, 2, 2, 2, 572, 573, 7, 4, 2, 2, 573, 574, 5, 42, 22, 2, 574, 575, 7, 5, 2, 2, 575, 577, 3, 2, 2, 2, 576, 427, 3, 2, 2, 2, 576, 429, 3, 2, 2, 2, 576, 436, 3, 2, 2, 2, 576, 438, 3, 2, 2, 2, 576, 443, 3, 2, 2, 2, 576, 458, 3, 2, 2, 2, 576, 473, 3, 2, 2, 2, 576, 488, 3, 2, 2, 2, 576, 507, 3, 2, 2, 2, 576, 509, 3, 2, 2, 2, 576, 525, 3, 2, 2, 2, 576, 539, 3, 2, 2, 2, 576, 554, 3, 2, 2, 2, 576, 562, 3, 2, 2, 2, 576, 565, 3, 2, 2, 2, 576, 568, 3, 2, 2, 2, 576, 572, 3, 2, 2, 2, 577, 640, 3, 2, 2, 2, 578, 579, 12, 28, 2, 2, 579, 580, 7, 33, 2, 2, 580, 639, 5, 42, 22, 28, 581, 582, 12, 26, 2, 2, 582, 583, 9, 2, 2, 2, 583, 639, 5, 42, 22, 27, 584, 585, 12, 25, 2, 2, 585, 586, 9, 3, 2, 2, 586, 639, 5, 42, 22, 26, 587, 588, 12, 24, 2, 2, 588, 589, 9, 4, 2, 2, 589, 639, 5, 42, 22, 25, 590, 591, 12, 22, 2, 2, 591, 592, 7, 64, 2, 2, 592, 593, 5, 42, 22, 23, 593, 594, 8, 22, 1, 2, 594, 639, 3, 2, 2, 2, 595, 596, 12, 20, 2, 2, 596, 597, 7, 45, 2, 2, 597, 639, 5, 42, 22, 21, 598, 599, 12, 18, 2, 2, 599, 600, 7, 46, 2, 2, 600, 639, 5, 42, 22, 19, 601, 602, 12, 17, 2, 2, 602, 603, 7, 47, 2, 2, 603, 639, 5, 42, 22, 18, 604, 605, 12, 16, 2, 2, 605, 606, 7, 48, 2, 2, 606, 639, 5, 42, 22, 17, 607, 608, 12, 10, 2, 2, 608, 609, 7, 26, 2, 2, 609, 639, 5, 42, 22, 11, 610, 611, 12, 32, 2, 2, 611, 612, 7, 22, 2, 2, 612, 618, 5, 60, 31, 2, 613, 615, 7, 65, 2, 2, 614, 616, 5, 54, 28, 2, 615, 614, 3, 2, 2, 2, 615, 616, 3, 2, 2, 2, 616, 617, 3, 2, 2, 2, 617, 619, 7, 66, 2, 2, 618, 613, 3, 2, 2, 2, 618, 619, 3, 2, 2, 2, 619, 639, 3, 2, 2, 2, 620, 621, 12, 29, 2, 2, 621, 622, 7, 28, 2, 2, 622, 623, 5, 42, 22, 2, 623, 624, 7, 29, 2, 2, 624, 639, 3, 2, 2, 2, 625, 626, 12, 15, 2, 2, 626, 634, 7, 52, 2, 2, 627, 628, 7, 13, 2, 2, 628, 629, 7, 42, 2, 2, 629, 630, 7, 7, 2, 2, 630, 631, 5, 50, 26, 2, 631, 632, 7, 27, 2, 2, 632, 633, 5, 42, 22, 2, 633, 635, 3, 2, 2, 2, 634, 627, 3, 2, 2, 2, 635, 636, 3, 2, 2, 2, 636, 634, 3, 2, 2, 2, 636, 637, 3, 2, 2, 2, 637, 639, 3, 2, 2, 2, 638, 578, 3, 2, 2, 2, 638, 581, 3, 2, 2, 2, 638, 584, 3, 2, 2, 2, 638, 587, 3, 2, 2, 2, 638, 590, 3, 2, 2, 2, 638, 595, 3, 2, 2, 2, 638, 598, 3, 2, 2, 2, 638, 601, 3, 2, 2, 2, 638, 604, 3, 2, 2, 2, 638, 607, 3, 2, 2, 2, 638, 610, 3, 2, 2, 2, 638, 620, 3, 2, 2, 2, 638, 625, 3, 2, 2, 2, 639, 642, 3, 2, 2, 2, 640, 638, 3, 2, 2, 2, 640, 641, 3, 2, 2, 2, 641, 43, 3, 2, 2, 2, 642, 640, 3, 2, 2, 2, 643, 644, 5, 8, 5, 2, 644, 645, 7, 2, 2, 3, 645, 653, 3, 2, 2, 2, 646, 647, 5, 42, 22, 2, 647, 648, 7, 2, 2, 3, 648, 653, 3, 2, 2, 2, 649, 650, 7, 68, 2, 2, 650, 653, 7, 2, 2, 3, 651, 653, 7, 2, 2, 3, 652, 643, 3, 2, 2, 2, 652, 646, 3, 2, 2, 2, 652, 649, 3, 2, 2, 2, 652, 651, 3, 2, 2, 2, 653, 45, 3, 2, 2, 2, 654, 655, 5, 50, 26, 2, 655, 656, 7, 27, 2, 2, 656, 657, 5, 42, 22, 2, 657, 672, 3, 2, 2, 2, 658, 659, 7, 65, 2, 2, 659, 664, 5, 50, 26, 2, 660, 661, 7, 10, 2, 2, 661, 663, 5, 50, 26, 2, 662, 660, 3, 2, 2, 2, 663, 666, 3, 2, 2, 2, 664, 662, 3, 2, 2, 2, 664, 665, 3, 2, 2, 2, 665, 667, 3, 2, 2, 2, 666, 664, 3, 2, 2, 2, 667, 668, 7, 66, 2, 2, 668, 669, 7, 27, 2, 2, 669, 670, 5, 42, 22, 2, 670, 672, 3, 2, 2, 2, 671, 654, 3, 2, 2, 2, 671, 658, 3, 2, 2, 2, 672, 47, 3, 2, 2, 2, 673, 676, 7, 39, 2, 2, 674, 676, 5, 66, 34, 2, 675, 673, 3, 2, 2, 2, 675, 674, 3, 2, 2, 2, 676, 49, 3, 2, 2, 2, 677, 678, 5, 48, 25, 2, 678, 51, 3, 2, 2, 2, 679, 682, 7, 55, 2, 2, 680, 682, 5, 66, 34, 2, 681, 679, 3, 2, 2, 2, 681, 680, 3, 2, 2, 2, 682, 53, 3, 2, 2, 2, 683, 688, 5, 42, 22, 2, 684, 685, 7, 10, 2, 2, 685, 687, 5, 42, 22, 2, 686, 684, 3, 2, 2, 2, 687, 690, 3, 2, 2, 2, 688, 686, 3, 2, 2, 2, 688, 689, 3, 2, 2, 2, 689, 55, 3, 2, 2, 2, 690, 688, 3, 2, 2, 2, 691, 692, 5, 68, 35, 2, 692, 693, 7, 7, 2, 2, 693, 694, 5, 42, 22, 2, 694, 698, 3, 2, 2, 2, 695, 696, 7, 40, 2, 2, 696, 698, 5, 42, 22, 2, 697, 691, 3, 2, 2, 2, 697, 695, 3, 2, 2, 2, 698, 57, 3, 2, 2, 2, 699, 702, 5, 66, 34, 2, 700, 702, 9, 5, 2, 2, 701, 699, 3, 2, 2, 2, 701, 700, 3, 2, 2, 2, 702, 59, 3, 2, 2, 2, 703, 706, 5, 66, 34, 2, 704, 706, 9, 6, 2, 2, 705, 703, 3, 2, 2, 2, 705, 704, 3, 2, 2, 2, 706, 61, 3, 2, 2, 2, 707, 708, 9, 7, 2, 2, 708, 63, 3, 2, 2, 2, 709, 710, 9, 8, 2, 2, 710, 65, 3, 2, 2, 2, 711, 716, 7, 67, 2, 2, 712, 713, 7, 41, 2, 2, 713, 715, 7, 67, 2, 2, 714, 712, 3, 2, 2, 2, 715, 718, 3, 2, 2, 2, 716, 714, 3, 2, 2, 2, 716, 717, 3, 2, 2, 2, 717, 67, 3, 2, 2, 2, 718, 716, 3, 2, 2, 2, 719, 724, 7, 67, 2, 2, 720, 721, 5, 66, 34, 2, 721, 722, 8, 35, 1, 2, 722, 724, 3, 2, 2, 2, 723, 719, 3, 2, 2, 2, 723, 720, 3, 2, 2, 2, 724, 69, 3, 2, 2, 2, 81, 73, 80, 89, 97, 122, 132, 135, 140, 155, 162, 166, 169, 182, 189, 192, 199, 205, 210, 221, 229, 235, 239, 241, 252, 254, 269, 277, 292, 300, 302, 319, 322, 325, 348, 352, 363, 373, 381, 383, 393, 396, 407, 417, 419, 423, 432, 450, 454, 465, 469, 480, 484, 495, 499, 507, 517, 521, 531, 535, 545, 548, 551, 576, 615, 618, 636, 638, 640, 652, 664, 671, 675, 681, 688, 697, 701, 705, 716, 723] \ No newline at end of file diff --git a/quint/src/generated/.antlr/Quint.tokens b/quint/src/generated/.antlr/Quint.tokens index 5f70a87a4..427758cd2 100644 --- a/quint/src/generated/.antlr/Quint.tokens +++ b/quint/src/generated/.antlr/Quint.tokens @@ -36,33 +36,33 @@ T__34=35 T__35=36 T__36=37 T__37=38 -STRING=39 -BOOL=40 -INT=41 -AND=42 -OR=43 -IFF=44 -IMPLIES=45 -SET=46 -LIST=47 -MAP=48 -MATCH=49 -PLUS=50 -MINUS=51 -MUL=52 -DIV=53 -MOD=54 -GT=55 -LT=56 -GE=57 -LE=58 -NE=59 -EQ=60 -ASGN=61 -LPAREN=62 -RPAREN=63 -IDENTIFIER=64 -SIMPLE_IDENTIFIER=65 +T__38=39 +STRING=40 +BOOL=41 +INT=42 +AND=43 +OR=44 +IFF=45 +IMPLIES=46 +SET=47 +LIST=48 +MAP=49 +MATCH=50 +PLUS=51 +MINUS=52 +MUL=53 +DIV=54 +MOD=55 +GT=56 +LT=57 +GE=58 +LE=59 +NE=60 +EQ=61 +ASGN=62 +LPAREN=63 +RPAREN=64 +IDENTIFIER=65 DOCCOMMENT=66 LINE_COMMENT=67 COMMENT=68 @@ -74,29 +74,29 @@ WS=69 ':'=5 'var'=6 'assume'=7 -'type'=8 -','=9 -';'=10 -'nondet'=11 -'val'=12 -'def'=13 -'pure'=14 -'action'=15 -'run'=16 -'temporal'=17 -'import'=18 -'.'=19 -'from'=20 -'as'=21 -'export'=22 -'->'=23 -'=>'=24 -'['=25 -']'=26 -'int'=27 -'str'=28 -'bool'=29 -'|'=30 +','=8 +';'=9 +'type'=10 +'|'=11 +'nondet'=12 +'val'=13 +'def'=14 +'pure'=15 +'action'=16 +'run'=17 +'temporal'=18 +'import'=19 +'.'=20 +'from'=21 +'as'=22 +'export'=23 +'->'=24 +'=>'=25 +'['=26 +']'=27 +'int'=28 +'str'=29 +'bool'=30 '^'=31 '\''=32 'all'=33 @@ -105,25 +105,26 @@ WS=69 'else'=36 '_'=37 '...'=38 -'and'=42 -'or'=43 -'iff'=44 -'implies'=45 -'Set'=46 -'List'=47 -'Map'=48 -'match'=49 -'+'=50 -'-'=51 -'*'=52 -'/'=53 -'%'=54 -'>'=55 -'<'=56 -'>='=57 -'<='=58 -'!='=59 -'=='=60 -'='=61 -'('=62 -')'=63 +'::'=39 +'and'=43 +'or'=44 +'iff'=45 +'implies'=46 +'Set'=47 +'List'=48 +'Map'=49 +'match'=50 +'+'=51 +'-'=52 +'*'=53 +'/'=54 +'%'=55 +'>'=56 +'<'=57 +'>='=58 +'<='=59 +'!='=60 +'=='=61 +'='=62 +'('=63 +')'=64 diff --git a/quint/src/generated/.antlr/QuintLexer.interp b/quint/src/generated/.antlr/QuintLexer.interp index cc04c2004..d1a55b360 100644 --- a/quint/src/generated/.antlr/QuintLexer.interp +++ b/quint/src/generated/.antlr/QuintLexer.interp @@ -7,9 +7,10 @@ null ':' 'var' 'assume' -'type' ',' ';' +'type' +'|' 'nondet' 'val' 'def' @@ -29,7 +30,6 @@ null 'int' 'str' 'bool' -'|' '^' '\'' 'all' @@ -38,6 +38,7 @@ null 'else' '_' '...' +'::' null null null @@ -68,7 +69,6 @@ null null null null -null token symbolic names: null @@ -110,6 +110,7 @@ null null null null +null STRING BOOL INT @@ -136,7 +137,6 @@ ASGN LPAREN RPAREN IDENTIFIER -SIMPLE_IDENTIFIER DOCCOMMENT LINE_COMMENT COMMENT @@ -181,6 +181,7 @@ T__34 T__35 T__36 T__37 +T__38 STRING BOOL INT @@ -207,7 +208,6 @@ ASGN LPAREN RPAREN IDENTIFIER -SIMPLE_IDENTIFIER DOCCOMMENT LINE_COMMENT COMMENT @@ -221,4 +221,4 @@ mode names: DEFAULT_MODE atn: -[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 71, 479, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 32, 3, 32, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 7, 40, 298, 10, 40, 12, 40, 14, 40, 301, 11, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 5, 41, 314, 10, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 7, 42, 321, 10, 42, 12, 42, 14, 42, 324, 11, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 7, 42, 333, 10, 42, 12, 42, 14, 42, 336, 11, 42, 5, 42, 338, 10, 42, 3, 43, 3, 43, 3, 43, 3, 43, 3, 44, 3, 44, 3, 44, 3, 45, 3, 45, 3, 45, 3, 45, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 3, 52, 3, 52, 3, 53, 3, 53, 3, 54, 3, 54, 3, 55, 3, 55, 3, 56, 3, 56, 3, 57, 3, 57, 3, 58, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, 3, 61, 3, 61, 3, 61, 3, 62, 3, 62, 3, 63, 3, 63, 3, 64, 3, 64, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 5, 65, 417, 10, 65, 3, 66, 3, 66, 7, 66, 421, 10, 66, 12, 66, 14, 66, 424, 11, 66, 3, 66, 3, 66, 6, 66, 428, 10, 66, 13, 66, 14, 66, 429, 5, 66, 432, 10, 66, 3, 67, 3, 67, 3, 67, 3, 67, 3, 67, 7, 67, 439, 10, 67, 12, 67, 14, 67, 442, 11, 67, 3, 67, 3, 67, 3, 68, 3, 68, 3, 68, 3, 68, 7, 68, 450, 10, 68, 12, 68, 14, 68, 453, 11, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 69, 3, 69, 3, 69, 3, 69, 7, 69, 463, 10, 69, 12, 69, 14, 69, 466, 11, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 70, 6, 70, 474, 10, 70, 13, 70, 14, 70, 475, 3, 70, 3, 70, 6, 299, 440, 451, 464, 2, 71, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, 75, 39, 77, 40, 79, 41, 81, 42, 83, 43, 85, 44, 87, 45, 89, 46, 91, 47, 93, 48, 95, 49, 97, 50, 99, 51, 101, 52, 103, 53, 105, 54, 107, 55, 109, 56, 111, 57, 113, 58, 115, 59, 117, 60, 119, 61, 121, 62, 123, 63, 125, 64, 127, 65, 129, 66, 131, 67, 133, 68, 135, 69, 137, 70, 139, 71, 3, 2, 9, 3, 2, 51, 59, 3, 2, 50, 59, 5, 2, 50, 59, 67, 72, 99, 104, 4, 2, 67, 92, 99, 124, 6, 2, 50, 59, 67, 92, 97, 97, 99, 124, 3, 2, 97, 97, 5, 2, 11, 12, 15, 15, 34, 34, 2, 494, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, 2, 111, 3, 2, 2, 2, 2, 113, 3, 2, 2, 2, 2, 115, 3, 2, 2, 2, 2, 117, 3, 2, 2, 2, 2, 119, 3, 2, 2, 2, 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 2, 125, 3, 2, 2, 2, 2, 127, 3, 2, 2, 2, 2, 129, 3, 2, 2, 2, 2, 131, 3, 2, 2, 2, 2, 133, 3, 2, 2, 2, 2, 135, 3, 2, 2, 2, 2, 137, 3, 2, 2, 2, 2, 139, 3, 2, 2, 2, 3, 141, 3, 2, 2, 2, 5, 148, 3, 2, 2, 2, 7, 150, 3, 2, 2, 2, 9, 152, 3, 2, 2, 2, 11, 158, 3, 2, 2, 2, 13, 160, 3, 2, 2, 2, 15, 164, 3, 2, 2, 2, 17, 171, 3, 2, 2, 2, 19, 176, 3, 2, 2, 2, 21, 178, 3, 2, 2, 2, 23, 180, 3, 2, 2, 2, 25, 187, 3, 2, 2, 2, 27, 191, 3, 2, 2, 2, 29, 195, 3, 2, 2, 2, 31, 200, 3, 2, 2, 2, 33, 207, 3, 2, 2, 2, 35, 211, 3, 2, 2, 2, 37, 220, 3, 2, 2, 2, 39, 227, 3, 2, 2, 2, 41, 229, 3, 2, 2, 2, 43, 234, 3, 2, 2, 2, 45, 237, 3, 2, 2, 2, 47, 244, 3, 2, 2, 2, 49, 247, 3, 2, 2, 2, 51, 250, 3, 2, 2, 2, 53, 252, 3, 2, 2, 2, 55, 254, 3, 2, 2, 2, 57, 258, 3, 2, 2, 2, 59, 262, 3, 2, 2, 2, 61, 267, 3, 2, 2, 2, 63, 269, 3, 2, 2, 2, 65, 271, 3, 2, 2, 2, 67, 273, 3, 2, 2, 2, 69, 277, 3, 2, 2, 2, 71, 281, 3, 2, 2, 2, 73, 284, 3, 2, 2, 2, 75, 289, 3, 2, 2, 2, 77, 291, 3, 2, 2, 2, 79, 295, 3, 2, 2, 2, 81, 313, 3, 2, 2, 2, 83, 337, 3, 2, 2, 2, 85, 339, 3, 2, 2, 2, 87, 343, 3, 2, 2, 2, 89, 346, 3, 2, 2, 2, 91, 350, 3, 2, 2, 2, 93, 358, 3, 2, 2, 2, 95, 362, 3, 2, 2, 2, 97, 367, 3, 2, 2, 2, 99, 371, 3, 2, 2, 2, 101, 377, 3, 2, 2, 2, 103, 379, 3, 2, 2, 2, 105, 381, 3, 2, 2, 2, 107, 383, 3, 2, 2, 2, 109, 385, 3, 2, 2, 2, 111, 387, 3, 2, 2, 2, 113, 389, 3, 2, 2, 2, 115, 391, 3, 2, 2, 2, 117, 394, 3, 2, 2, 2, 119, 397, 3, 2, 2, 2, 121, 400, 3, 2, 2, 2, 123, 403, 3, 2, 2, 2, 125, 405, 3, 2, 2, 2, 127, 407, 3, 2, 2, 2, 129, 416, 3, 2, 2, 2, 131, 431, 3, 2, 2, 2, 133, 433, 3, 2, 2, 2, 135, 445, 3, 2, 2, 2, 137, 458, 3, 2, 2, 2, 139, 473, 3, 2, 2, 2, 141, 142, 7, 111, 2, 2, 142, 143, 7, 113, 2, 2, 143, 144, 7, 102, 2, 2, 144, 145, 7, 119, 2, 2, 145, 146, 7, 110, 2, 2, 146, 147, 7, 103, 2, 2, 147, 4, 3, 2, 2, 2, 148, 149, 7, 125, 2, 2, 149, 6, 3, 2, 2, 2, 150, 151, 7, 127, 2, 2, 151, 8, 3, 2, 2, 2, 152, 153, 7, 101, 2, 2, 153, 154, 7, 113, 2, 2, 154, 155, 7, 112, 2, 2, 155, 156, 7, 117, 2, 2, 156, 157, 7, 118, 2, 2, 157, 10, 3, 2, 2, 2, 158, 159, 7, 60, 2, 2, 159, 12, 3, 2, 2, 2, 160, 161, 7, 120, 2, 2, 161, 162, 7, 99, 2, 2, 162, 163, 7, 116, 2, 2, 163, 14, 3, 2, 2, 2, 164, 165, 7, 99, 2, 2, 165, 166, 7, 117, 2, 2, 166, 167, 7, 117, 2, 2, 167, 168, 7, 119, 2, 2, 168, 169, 7, 111, 2, 2, 169, 170, 7, 103, 2, 2, 170, 16, 3, 2, 2, 2, 171, 172, 7, 118, 2, 2, 172, 173, 7, 123, 2, 2, 173, 174, 7, 114, 2, 2, 174, 175, 7, 103, 2, 2, 175, 18, 3, 2, 2, 2, 176, 177, 7, 46, 2, 2, 177, 20, 3, 2, 2, 2, 178, 179, 7, 61, 2, 2, 179, 22, 3, 2, 2, 2, 180, 181, 7, 112, 2, 2, 181, 182, 7, 113, 2, 2, 182, 183, 7, 112, 2, 2, 183, 184, 7, 102, 2, 2, 184, 185, 7, 103, 2, 2, 185, 186, 7, 118, 2, 2, 186, 24, 3, 2, 2, 2, 187, 188, 7, 120, 2, 2, 188, 189, 7, 99, 2, 2, 189, 190, 7, 110, 2, 2, 190, 26, 3, 2, 2, 2, 191, 192, 7, 102, 2, 2, 192, 193, 7, 103, 2, 2, 193, 194, 7, 104, 2, 2, 194, 28, 3, 2, 2, 2, 195, 196, 7, 114, 2, 2, 196, 197, 7, 119, 2, 2, 197, 198, 7, 116, 2, 2, 198, 199, 7, 103, 2, 2, 199, 30, 3, 2, 2, 2, 200, 201, 7, 99, 2, 2, 201, 202, 7, 101, 2, 2, 202, 203, 7, 118, 2, 2, 203, 204, 7, 107, 2, 2, 204, 205, 7, 113, 2, 2, 205, 206, 7, 112, 2, 2, 206, 32, 3, 2, 2, 2, 207, 208, 7, 116, 2, 2, 208, 209, 7, 119, 2, 2, 209, 210, 7, 112, 2, 2, 210, 34, 3, 2, 2, 2, 211, 212, 7, 118, 2, 2, 212, 213, 7, 103, 2, 2, 213, 214, 7, 111, 2, 2, 214, 215, 7, 114, 2, 2, 215, 216, 7, 113, 2, 2, 216, 217, 7, 116, 2, 2, 217, 218, 7, 99, 2, 2, 218, 219, 7, 110, 2, 2, 219, 36, 3, 2, 2, 2, 220, 221, 7, 107, 2, 2, 221, 222, 7, 111, 2, 2, 222, 223, 7, 114, 2, 2, 223, 224, 7, 113, 2, 2, 224, 225, 7, 116, 2, 2, 225, 226, 7, 118, 2, 2, 226, 38, 3, 2, 2, 2, 227, 228, 7, 48, 2, 2, 228, 40, 3, 2, 2, 2, 229, 230, 7, 104, 2, 2, 230, 231, 7, 116, 2, 2, 231, 232, 7, 113, 2, 2, 232, 233, 7, 111, 2, 2, 233, 42, 3, 2, 2, 2, 234, 235, 7, 99, 2, 2, 235, 236, 7, 117, 2, 2, 236, 44, 3, 2, 2, 2, 237, 238, 7, 103, 2, 2, 238, 239, 7, 122, 2, 2, 239, 240, 7, 114, 2, 2, 240, 241, 7, 113, 2, 2, 241, 242, 7, 116, 2, 2, 242, 243, 7, 118, 2, 2, 243, 46, 3, 2, 2, 2, 244, 245, 7, 47, 2, 2, 245, 246, 7, 64, 2, 2, 246, 48, 3, 2, 2, 2, 247, 248, 7, 63, 2, 2, 248, 249, 7, 64, 2, 2, 249, 50, 3, 2, 2, 2, 250, 251, 7, 93, 2, 2, 251, 52, 3, 2, 2, 2, 252, 253, 7, 95, 2, 2, 253, 54, 3, 2, 2, 2, 254, 255, 7, 107, 2, 2, 255, 256, 7, 112, 2, 2, 256, 257, 7, 118, 2, 2, 257, 56, 3, 2, 2, 2, 258, 259, 7, 117, 2, 2, 259, 260, 7, 118, 2, 2, 260, 261, 7, 116, 2, 2, 261, 58, 3, 2, 2, 2, 262, 263, 7, 100, 2, 2, 263, 264, 7, 113, 2, 2, 264, 265, 7, 113, 2, 2, 265, 266, 7, 110, 2, 2, 266, 60, 3, 2, 2, 2, 267, 268, 7, 126, 2, 2, 268, 62, 3, 2, 2, 2, 269, 270, 7, 96, 2, 2, 270, 64, 3, 2, 2, 2, 271, 272, 7, 41, 2, 2, 272, 66, 3, 2, 2, 2, 273, 274, 7, 99, 2, 2, 274, 275, 7, 110, 2, 2, 275, 276, 7, 110, 2, 2, 276, 68, 3, 2, 2, 2, 277, 278, 7, 99, 2, 2, 278, 279, 7, 112, 2, 2, 279, 280, 7, 123, 2, 2, 280, 70, 3, 2, 2, 2, 281, 282, 7, 107, 2, 2, 282, 283, 7, 104, 2, 2, 283, 72, 3, 2, 2, 2, 284, 285, 7, 103, 2, 2, 285, 286, 7, 110, 2, 2, 286, 287, 7, 117, 2, 2, 287, 288, 7, 103, 2, 2, 288, 74, 3, 2, 2, 2, 289, 290, 7, 97, 2, 2, 290, 76, 3, 2, 2, 2, 291, 292, 7, 48, 2, 2, 292, 293, 7, 48, 2, 2, 293, 294, 7, 48, 2, 2, 294, 78, 3, 2, 2, 2, 295, 299, 7, 36, 2, 2, 296, 298, 11, 2, 2, 2, 297, 296, 3, 2, 2, 2, 298, 301, 3, 2, 2, 2, 299, 300, 3, 2, 2, 2, 299, 297, 3, 2, 2, 2, 300, 302, 3, 2, 2, 2, 301, 299, 3, 2, 2, 2, 302, 303, 7, 36, 2, 2, 303, 80, 3, 2, 2, 2, 304, 305, 7, 104, 2, 2, 305, 306, 7, 99, 2, 2, 306, 307, 7, 110, 2, 2, 307, 308, 7, 117, 2, 2, 308, 314, 7, 103, 2, 2, 309, 310, 7, 118, 2, 2, 310, 311, 7, 116, 2, 2, 311, 312, 7, 119, 2, 2, 312, 314, 7, 103, 2, 2, 313, 304, 3, 2, 2, 2, 313, 309, 3, 2, 2, 2, 314, 82, 3, 2, 2, 2, 315, 338, 7, 50, 2, 2, 316, 322, 9, 2, 2, 2, 317, 321, 9, 3, 2, 2, 318, 319, 7, 97, 2, 2, 319, 321, 9, 3, 2, 2, 320, 317, 3, 2, 2, 2, 320, 318, 3, 2, 2, 2, 321, 324, 3, 2, 2, 2, 322, 320, 3, 2, 2, 2, 322, 323, 3, 2, 2, 2, 323, 338, 3, 2, 2, 2, 324, 322, 3, 2, 2, 2, 325, 326, 7, 50, 2, 2, 326, 327, 7, 122, 2, 2, 327, 328, 3, 2, 2, 2, 328, 334, 9, 4, 2, 2, 329, 333, 9, 4, 2, 2, 330, 331, 7, 97, 2, 2, 331, 333, 9, 4, 2, 2, 332, 329, 3, 2, 2, 2, 332, 330, 3, 2, 2, 2, 333, 336, 3, 2, 2, 2, 334, 332, 3, 2, 2, 2, 334, 335, 3, 2, 2, 2, 335, 338, 3, 2, 2, 2, 336, 334, 3, 2, 2, 2, 337, 315, 3, 2, 2, 2, 337, 316, 3, 2, 2, 2, 337, 325, 3, 2, 2, 2, 338, 84, 3, 2, 2, 2, 339, 340, 7, 99, 2, 2, 340, 341, 7, 112, 2, 2, 341, 342, 7, 102, 2, 2, 342, 86, 3, 2, 2, 2, 343, 344, 7, 113, 2, 2, 344, 345, 7, 116, 2, 2, 345, 88, 3, 2, 2, 2, 346, 347, 7, 107, 2, 2, 347, 348, 7, 104, 2, 2, 348, 349, 7, 104, 2, 2, 349, 90, 3, 2, 2, 2, 350, 351, 7, 107, 2, 2, 351, 352, 7, 111, 2, 2, 352, 353, 7, 114, 2, 2, 353, 354, 7, 110, 2, 2, 354, 355, 7, 107, 2, 2, 355, 356, 7, 103, 2, 2, 356, 357, 7, 117, 2, 2, 357, 92, 3, 2, 2, 2, 358, 359, 7, 85, 2, 2, 359, 360, 7, 103, 2, 2, 360, 361, 7, 118, 2, 2, 361, 94, 3, 2, 2, 2, 362, 363, 7, 78, 2, 2, 363, 364, 7, 107, 2, 2, 364, 365, 7, 117, 2, 2, 365, 366, 7, 118, 2, 2, 366, 96, 3, 2, 2, 2, 367, 368, 7, 79, 2, 2, 368, 369, 7, 99, 2, 2, 369, 370, 7, 114, 2, 2, 370, 98, 3, 2, 2, 2, 371, 372, 7, 111, 2, 2, 372, 373, 7, 99, 2, 2, 373, 374, 7, 118, 2, 2, 374, 375, 7, 101, 2, 2, 375, 376, 7, 106, 2, 2, 376, 100, 3, 2, 2, 2, 377, 378, 7, 45, 2, 2, 378, 102, 3, 2, 2, 2, 379, 380, 7, 47, 2, 2, 380, 104, 3, 2, 2, 2, 381, 382, 7, 44, 2, 2, 382, 106, 3, 2, 2, 2, 383, 384, 7, 49, 2, 2, 384, 108, 3, 2, 2, 2, 385, 386, 7, 39, 2, 2, 386, 110, 3, 2, 2, 2, 387, 388, 7, 64, 2, 2, 388, 112, 3, 2, 2, 2, 389, 390, 7, 62, 2, 2, 390, 114, 3, 2, 2, 2, 391, 392, 7, 64, 2, 2, 392, 393, 7, 63, 2, 2, 393, 116, 3, 2, 2, 2, 394, 395, 7, 62, 2, 2, 395, 396, 7, 63, 2, 2, 396, 118, 3, 2, 2, 2, 397, 398, 7, 35, 2, 2, 398, 399, 7, 63, 2, 2, 399, 120, 3, 2, 2, 2, 400, 401, 7, 63, 2, 2, 401, 402, 7, 63, 2, 2, 402, 122, 3, 2, 2, 2, 403, 404, 7, 63, 2, 2, 404, 124, 3, 2, 2, 2, 405, 406, 7, 42, 2, 2, 406, 126, 3, 2, 2, 2, 407, 408, 7, 43, 2, 2, 408, 128, 3, 2, 2, 2, 409, 417, 5, 131, 66, 2, 410, 411, 5, 131, 66, 2, 411, 412, 7, 60, 2, 2, 412, 413, 7, 60, 2, 2, 413, 414, 3, 2, 2, 2, 414, 415, 5, 129, 65, 2, 415, 417, 3, 2, 2, 2, 416, 409, 3, 2, 2, 2, 416, 410, 3, 2, 2, 2, 417, 130, 3, 2, 2, 2, 418, 422, 9, 5, 2, 2, 419, 421, 9, 6, 2, 2, 420, 419, 3, 2, 2, 2, 421, 424, 3, 2, 2, 2, 422, 420, 3, 2, 2, 2, 422, 423, 3, 2, 2, 2, 423, 432, 3, 2, 2, 2, 424, 422, 3, 2, 2, 2, 425, 427, 9, 7, 2, 2, 426, 428, 9, 6, 2, 2, 427, 426, 3, 2, 2, 2, 428, 429, 3, 2, 2, 2, 429, 427, 3, 2, 2, 2, 429, 430, 3, 2, 2, 2, 430, 432, 3, 2, 2, 2, 431, 418, 3, 2, 2, 2, 431, 425, 3, 2, 2, 2, 432, 132, 3, 2, 2, 2, 433, 434, 7, 49, 2, 2, 434, 435, 7, 49, 2, 2, 435, 436, 7, 49, 2, 2, 436, 440, 3, 2, 2, 2, 437, 439, 11, 2, 2, 2, 438, 437, 3, 2, 2, 2, 439, 442, 3, 2, 2, 2, 440, 441, 3, 2, 2, 2, 440, 438, 3, 2, 2, 2, 441, 443, 3, 2, 2, 2, 442, 440, 3, 2, 2, 2, 443, 444, 7, 12, 2, 2, 444, 134, 3, 2, 2, 2, 445, 446, 7, 49, 2, 2, 446, 447, 7, 49, 2, 2, 447, 451, 3, 2, 2, 2, 448, 450, 11, 2, 2, 2, 449, 448, 3, 2, 2, 2, 450, 453, 3, 2, 2, 2, 451, 452, 3, 2, 2, 2, 451, 449, 3, 2, 2, 2, 452, 454, 3, 2, 2, 2, 453, 451, 3, 2, 2, 2, 454, 455, 7, 12, 2, 2, 455, 456, 3, 2, 2, 2, 456, 457, 8, 68, 2, 2, 457, 136, 3, 2, 2, 2, 458, 459, 7, 49, 2, 2, 459, 460, 7, 44, 2, 2, 460, 464, 3, 2, 2, 2, 461, 463, 11, 2, 2, 2, 462, 461, 3, 2, 2, 2, 463, 466, 3, 2, 2, 2, 464, 465, 3, 2, 2, 2, 464, 462, 3, 2, 2, 2, 465, 467, 3, 2, 2, 2, 466, 464, 3, 2, 2, 2, 467, 468, 7, 44, 2, 2, 468, 469, 7, 49, 2, 2, 469, 470, 3, 2, 2, 2, 470, 471, 8, 69, 2, 2, 471, 138, 3, 2, 2, 2, 472, 474, 9, 8, 2, 2, 473, 472, 3, 2, 2, 2, 474, 475, 3, 2, 2, 2, 475, 473, 3, 2, 2, 2, 475, 476, 3, 2, 2, 2, 476, 477, 3, 2, 2, 2, 477, 478, 8, 70, 2, 2, 478, 140, 3, 2, 2, 2, 18, 2, 299, 313, 320, 322, 332, 334, 337, 416, 422, 429, 431, 440, 451, 464, 475, 3, 8, 2, 2] \ No newline at end of file +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 71, 473, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 7, 41, 301, 10, 41, 12, 41, 14, 41, 304, 11, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 5, 42, 317, 10, 42, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 7, 43, 324, 10, 43, 12, 43, 14, 43, 327, 11, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 7, 43, 336, 10, 43, 12, 43, 14, 43, 339, 11, 43, 5, 43, 341, 10, 43, 3, 44, 3, 44, 3, 44, 3, 44, 3, 45, 3, 45, 3, 45, 3, 46, 3, 46, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 52, 3, 52, 3, 53, 3, 53, 3, 54, 3, 54, 3, 55, 3, 55, 3, 56, 3, 56, 3, 57, 3, 57, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, 3, 61, 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, 63, 3, 63, 3, 64, 3, 64, 3, 65, 3, 65, 3, 66, 3, 66, 7, 66, 415, 10, 66, 12, 66, 14, 66, 418, 11, 66, 3, 66, 3, 66, 6, 66, 422, 10, 66, 13, 66, 14, 66, 423, 5, 66, 426, 10, 66, 3, 67, 3, 67, 3, 67, 3, 67, 3, 67, 7, 67, 433, 10, 67, 12, 67, 14, 67, 436, 11, 67, 3, 67, 3, 67, 3, 68, 3, 68, 3, 68, 3, 68, 7, 68, 444, 10, 68, 12, 68, 14, 68, 447, 11, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 69, 3, 69, 3, 69, 3, 69, 7, 69, 457, 10, 69, 12, 69, 14, 69, 460, 11, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 70, 6, 70, 468, 10, 70, 13, 70, 14, 70, 469, 3, 70, 3, 70, 6, 302, 434, 445, 458, 2, 71, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, 75, 39, 77, 40, 79, 41, 81, 42, 83, 43, 85, 44, 87, 45, 89, 46, 91, 47, 93, 48, 95, 49, 97, 50, 99, 51, 101, 52, 103, 53, 105, 54, 107, 55, 109, 56, 111, 57, 113, 58, 115, 59, 117, 60, 119, 61, 121, 62, 123, 63, 125, 64, 127, 65, 129, 66, 131, 67, 133, 68, 135, 69, 137, 70, 139, 71, 3, 2, 9, 3, 2, 51, 59, 3, 2, 50, 59, 5, 2, 50, 59, 67, 72, 99, 104, 4, 2, 67, 92, 99, 124, 6, 2, 50, 59, 67, 92, 97, 97, 99, 124, 3, 2, 97, 97, 5, 2, 11, 12, 15, 15, 34, 34, 2, 487, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, 2, 111, 3, 2, 2, 2, 2, 113, 3, 2, 2, 2, 2, 115, 3, 2, 2, 2, 2, 117, 3, 2, 2, 2, 2, 119, 3, 2, 2, 2, 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 2, 125, 3, 2, 2, 2, 2, 127, 3, 2, 2, 2, 2, 129, 3, 2, 2, 2, 2, 131, 3, 2, 2, 2, 2, 133, 3, 2, 2, 2, 2, 135, 3, 2, 2, 2, 2, 137, 3, 2, 2, 2, 2, 139, 3, 2, 2, 2, 3, 141, 3, 2, 2, 2, 5, 148, 3, 2, 2, 2, 7, 150, 3, 2, 2, 2, 9, 152, 3, 2, 2, 2, 11, 158, 3, 2, 2, 2, 13, 160, 3, 2, 2, 2, 15, 164, 3, 2, 2, 2, 17, 171, 3, 2, 2, 2, 19, 173, 3, 2, 2, 2, 21, 175, 3, 2, 2, 2, 23, 180, 3, 2, 2, 2, 25, 182, 3, 2, 2, 2, 27, 189, 3, 2, 2, 2, 29, 193, 3, 2, 2, 2, 31, 197, 3, 2, 2, 2, 33, 202, 3, 2, 2, 2, 35, 209, 3, 2, 2, 2, 37, 213, 3, 2, 2, 2, 39, 222, 3, 2, 2, 2, 41, 229, 3, 2, 2, 2, 43, 231, 3, 2, 2, 2, 45, 236, 3, 2, 2, 2, 47, 239, 3, 2, 2, 2, 49, 246, 3, 2, 2, 2, 51, 249, 3, 2, 2, 2, 53, 252, 3, 2, 2, 2, 55, 254, 3, 2, 2, 2, 57, 256, 3, 2, 2, 2, 59, 260, 3, 2, 2, 2, 61, 264, 3, 2, 2, 2, 63, 269, 3, 2, 2, 2, 65, 271, 3, 2, 2, 2, 67, 273, 3, 2, 2, 2, 69, 277, 3, 2, 2, 2, 71, 281, 3, 2, 2, 2, 73, 284, 3, 2, 2, 2, 75, 289, 3, 2, 2, 2, 77, 291, 3, 2, 2, 2, 79, 295, 3, 2, 2, 2, 81, 298, 3, 2, 2, 2, 83, 316, 3, 2, 2, 2, 85, 340, 3, 2, 2, 2, 87, 342, 3, 2, 2, 2, 89, 346, 3, 2, 2, 2, 91, 349, 3, 2, 2, 2, 93, 353, 3, 2, 2, 2, 95, 361, 3, 2, 2, 2, 97, 365, 3, 2, 2, 2, 99, 370, 3, 2, 2, 2, 101, 374, 3, 2, 2, 2, 103, 380, 3, 2, 2, 2, 105, 382, 3, 2, 2, 2, 107, 384, 3, 2, 2, 2, 109, 386, 3, 2, 2, 2, 111, 388, 3, 2, 2, 2, 113, 390, 3, 2, 2, 2, 115, 392, 3, 2, 2, 2, 117, 394, 3, 2, 2, 2, 119, 397, 3, 2, 2, 2, 121, 400, 3, 2, 2, 2, 123, 403, 3, 2, 2, 2, 125, 406, 3, 2, 2, 2, 127, 408, 3, 2, 2, 2, 129, 410, 3, 2, 2, 2, 131, 425, 3, 2, 2, 2, 133, 427, 3, 2, 2, 2, 135, 439, 3, 2, 2, 2, 137, 452, 3, 2, 2, 2, 139, 467, 3, 2, 2, 2, 141, 142, 7, 111, 2, 2, 142, 143, 7, 113, 2, 2, 143, 144, 7, 102, 2, 2, 144, 145, 7, 119, 2, 2, 145, 146, 7, 110, 2, 2, 146, 147, 7, 103, 2, 2, 147, 4, 3, 2, 2, 2, 148, 149, 7, 125, 2, 2, 149, 6, 3, 2, 2, 2, 150, 151, 7, 127, 2, 2, 151, 8, 3, 2, 2, 2, 152, 153, 7, 101, 2, 2, 153, 154, 7, 113, 2, 2, 154, 155, 7, 112, 2, 2, 155, 156, 7, 117, 2, 2, 156, 157, 7, 118, 2, 2, 157, 10, 3, 2, 2, 2, 158, 159, 7, 60, 2, 2, 159, 12, 3, 2, 2, 2, 160, 161, 7, 120, 2, 2, 161, 162, 7, 99, 2, 2, 162, 163, 7, 116, 2, 2, 163, 14, 3, 2, 2, 2, 164, 165, 7, 99, 2, 2, 165, 166, 7, 117, 2, 2, 166, 167, 7, 117, 2, 2, 167, 168, 7, 119, 2, 2, 168, 169, 7, 111, 2, 2, 169, 170, 7, 103, 2, 2, 170, 16, 3, 2, 2, 2, 171, 172, 7, 46, 2, 2, 172, 18, 3, 2, 2, 2, 173, 174, 7, 61, 2, 2, 174, 20, 3, 2, 2, 2, 175, 176, 7, 118, 2, 2, 176, 177, 7, 123, 2, 2, 177, 178, 7, 114, 2, 2, 178, 179, 7, 103, 2, 2, 179, 22, 3, 2, 2, 2, 180, 181, 7, 126, 2, 2, 181, 24, 3, 2, 2, 2, 182, 183, 7, 112, 2, 2, 183, 184, 7, 113, 2, 2, 184, 185, 7, 112, 2, 2, 185, 186, 7, 102, 2, 2, 186, 187, 7, 103, 2, 2, 187, 188, 7, 118, 2, 2, 188, 26, 3, 2, 2, 2, 189, 190, 7, 120, 2, 2, 190, 191, 7, 99, 2, 2, 191, 192, 7, 110, 2, 2, 192, 28, 3, 2, 2, 2, 193, 194, 7, 102, 2, 2, 194, 195, 7, 103, 2, 2, 195, 196, 7, 104, 2, 2, 196, 30, 3, 2, 2, 2, 197, 198, 7, 114, 2, 2, 198, 199, 7, 119, 2, 2, 199, 200, 7, 116, 2, 2, 200, 201, 7, 103, 2, 2, 201, 32, 3, 2, 2, 2, 202, 203, 7, 99, 2, 2, 203, 204, 7, 101, 2, 2, 204, 205, 7, 118, 2, 2, 205, 206, 7, 107, 2, 2, 206, 207, 7, 113, 2, 2, 207, 208, 7, 112, 2, 2, 208, 34, 3, 2, 2, 2, 209, 210, 7, 116, 2, 2, 210, 211, 7, 119, 2, 2, 211, 212, 7, 112, 2, 2, 212, 36, 3, 2, 2, 2, 213, 214, 7, 118, 2, 2, 214, 215, 7, 103, 2, 2, 215, 216, 7, 111, 2, 2, 216, 217, 7, 114, 2, 2, 217, 218, 7, 113, 2, 2, 218, 219, 7, 116, 2, 2, 219, 220, 7, 99, 2, 2, 220, 221, 7, 110, 2, 2, 221, 38, 3, 2, 2, 2, 222, 223, 7, 107, 2, 2, 223, 224, 7, 111, 2, 2, 224, 225, 7, 114, 2, 2, 225, 226, 7, 113, 2, 2, 226, 227, 7, 116, 2, 2, 227, 228, 7, 118, 2, 2, 228, 40, 3, 2, 2, 2, 229, 230, 7, 48, 2, 2, 230, 42, 3, 2, 2, 2, 231, 232, 7, 104, 2, 2, 232, 233, 7, 116, 2, 2, 233, 234, 7, 113, 2, 2, 234, 235, 7, 111, 2, 2, 235, 44, 3, 2, 2, 2, 236, 237, 7, 99, 2, 2, 237, 238, 7, 117, 2, 2, 238, 46, 3, 2, 2, 2, 239, 240, 7, 103, 2, 2, 240, 241, 7, 122, 2, 2, 241, 242, 7, 114, 2, 2, 242, 243, 7, 113, 2, 2, 243, 244, 7, 116, 2, 2, 244, 245, 7, 118, 2, 2, 245, 48, 3, 2, 2, 2, 246, 247, 7, 47, 2, 2, 247, 248, 7, 64, 2, 2, 248, 50, 3, 2, 2, 2, 249, 250, 7, 63, 2, 2, 250, 251, 7, 64, 2, 2, 251, 52, 3, 2, 2, 2, 252, 253, 7, 93, 2, 2, 253, 54, 3, 2, 2, 2, 254, 255, 7, 95, 2, 2, 255, 56, 3, 2, 2, 2, 256, 257, 7, 107, 2, 2, 257, 258, 7, 112, 2, 2, 258, 259, 7, 118, 2, 2, 259, 58, 3, 2, 2, 2, 260, 261, 7, 117, 2, 2, 261, 262, 7, 118, 2, 2, 262, 263, 7, 116, 2, 2, 263, 60, 3, 2, 2, 2, 264, 265, 7, 100, 2, 2, 265, 266, 7, 113, 2, 2, 266, 267, 7, 113, 2, 2, 267, 268, 7, 110, 2, 2, 268, 62, 3, 2, 2, 2, 269, 270, 7, 96, 2, 2, 270, 64, 3, 2, 2, 2, 271, 272, 7, 41, 2, 2, 272, 66, 3, 2, 2, 2, 273, 274, 7, 99, 2, 2, 274, 275, 7, 110, 2, 2, 275, 276, 7, 110, 2, 2, 276, 68, 3, 2, 2, 2, 277, 278, 7, 99, 2, 2, 278, 279, 7, 112, 2, 2, 279, 280, 7, 123, 2, 2, 280, 70, 3, 2, 2, 2, 281, 282, 7, 107, 2, 2, 282, 283, 7, 104, 2, 2, 283, 72, 3, 2, 2, 2, 284, 285, 7, 103, 2, 2, 285, 286, 7, 110, 2, 2, 286, 287, 7, 117, 2, 2, 287, 288, 7, 103, 2, 2, 288, 74, 3, 2, 2, 2, 289, 290, 7, 97, 2, 2, 290, 76, 3, 2, 2, 2, 291, 292, 7, 48, 2, 2, 292, 293, 7, 48, 2, 2, 293, 294, 7, 48, 2, 2, 294, 78, 3, 2, 2, 2, 295, 296, 7, 60, 2, 2, 296, 297, 7, 60, 2, 2, 297, 80, 3, 2, 2, 2, 298, 302, 7, 36, 2, 2, 299, 301, 11, 2, 2, 2, 300, 299, 3, 2, 2, 2, 301, 304, 3, 2, 2, 2, 302, 303, 3, 2, 2, 2, 302, 300, 3, 2, 2, 2, 303, 305, 3, 2, 2, 2, 304, 302, 3, 2, 2, 2, 305, 306, 7, 36, 2, 2, 306, 82, 3, 2, 2, 2, 307, 308, 7, 104, 2, 2, 308, 309, 7, 99, 2, 2, 309, 310, 7, 110, 2, 2, 310, 311, 7, 117, 2, 2, 311, 317, 7, 103, 2, 2, 312, 313, 7, 118, 2, 2, 313, 314, 7, 116, 2, 2, 314, 315, 7, 119, 2, 2, 315, 317, 7, 103, 2, 2, 316, 307, 3, 2, 2, 2, 316, 312, 3, 2, 2, 2, 317, 84, 3, 2, 2, 2, 318, 341, 7, 50, 2, 2, 319, 325, 9, 2, 2, 2, 320, 324, 9, 3, 2, 2, 321, 322, 7, 97, 2, 2, 322, 324, 9, 3, 2, 2, 323, 320, 3, 2, 2, 2, 323, 321, 3, 2, 2, 2, 324, 327, 3, 2, 2, 2, 325, 323, 3, 2, 2, 2, 325, 326, 3, 2, 2, 2, 326, 341, 3, 2, 2, 2, 327, 325, 3, 2, 2, 2, 328, 329, 7, 50, 2, 2, 329, 330, 7, 122, 2, 2, 330, 331, 3, 2, 2, 2, 331, 337, 9, 4, 2, 2, 332, 336, 9, 4, 2, 2, 333, 334, 7, 97, 2, 2, 334, 336, 9, 4, 2, 2, 335, 332, 3, 2, 2, 2, 335, 333, 3, 2, 2, 2, 336, 339, 3, 2, 2, 2, 337, 335, 3, 2, 2, 2, 337, 338, 3, 2, 2, 2, 338, 341, 3, 2, 2, 2, 339, 337, 3, 2, 2, 2, 340, 318, 3, 2, 2, 2, 340, 319, 3, 2, 2, 2, 340, 328, 3, 2, 2, 2, 341, 86, 3, 2, 2, 2, 342, 343, 7, 99, 2, 2, 343, 344, 7, 112, 2, 2, 344, 345, 7, 102, 2, 2, 345, 88, 3, 2, 2, 2, 346, 347, 7, 113, 2, 2, 347, 348, 7, 116, 2, 2, 348, 90, 3, 2, 2, 2, 349, 350, 7, 107, 2, 2, 350, 351, 7, 104, 2, 2, 351, 352, 7, 104, 2, 2, 352, 92, 3, 2, 2, 2, 353, 354, 7, 107, 2, 2, 354, 355, 7, 111, 2, 2, 355, 356, 7, 114, 2, 2, 356, 357, 7, 110, 2, 2, 357, 358, 7, 107, 2, 2, 358, 359, 7, 103, 2, 2, 359, 360, 7, 117, 2, 2, 360, 94, 3, 2, 2, 2, 361, 362, 7, 85, 2, 2, 362, 363, 7, 103, 2, 2, 363, 364, 7, 118, 2, 2, 364, 96, 3, 2, 2, 2, 365, 366, 7, 78, 2, 2, 366, 367, 7, 107, 2, 2, 367, 368, 7, 117, 2, 2, 368, 369, 7, 118, 2, 2, 369, 98, 3, 2, 2, 2, 370, 371, 7, 79, 2, 2, 371, 372, 7, 99, 2, 2, 372, 373, 7, 114, 2, 2, 373, 100, 3, 2, 2, 2, 374, 375, 7, 111, 2, 2, 375, 376, 7, 99, 2, 2, 376, 377, 7, 118, 2, 2, 377, 378, 7, 101, 2, 2, 378, 379, 7, 106, 2, 2, 379, 102, 3, 2, 2, 2, 380, 381, 7, 45, 2, 2, 381, 104, 3, 2, 2, 2, 382, 383, 7, 47, 2, 2, 383, 106, 3, 2, 2, 2, 384, 385, 7, 44, 2, 2, 385, 108, 3, 2, 2, 2, 386, 387, 7, 49, 2, 2, 387, 110, 3, 2, 2, 2, 388, 389, 7, 39, 2, 2, 389, 112, 3, 2, 2, 2, 390, 391, 7, 64, 2, 2, 391, 114, 3, 2, 2, 2, 392, 393, 7, 62, 2, 2, 393, 116, 3, 2, 2, 2, 394, 395, 7, 64, 2, 2, 395, 396, 7, 63, 2, 2, 396, 118, 3, 2, 2, 2, 397, 398, 7, 62, 2, 2, 398, 399, 7, 63, 2, 2, 399, 120, 3, 2, 2, 2, 400, 401, 7, 35, 2, 2, 401, 402, 7, 63, 2, 2, 402, 122, 3, 2, 2, 2, 403, 404, 7, 63, 2, 2, 404, 405, 7, 63, 2, 2, 405, 124, 3, 2, 2, 2, 406, 407, 7, 63, 2, 2, 407, 126, 3, 2, 2, 2, 408, 409, 7, 42, 2, 2, 409, 128, 3, 2, 2, 2, 410, 411, 7, 43, 2, 2, 411, 130, 3, 2, 2, 2, 412, 416, 9, 5, 2, 2, 413, 415, 9, 6, 2, 2, 414, 413, 3, 2, 2, 2, 415, 418, 3, 2, 2, 2, 416, 414, 3, 2, 2, 2, 416, 417, 3, 2, 2, 2, 417, 426, 3, 2, 2, 2, 418, 416, 3, 2, 2, 2, 419, 421, 9, 7, 2, 2, 420, 422, 9, 6, 2, 2, 421, 420, 3, 2, 2, 2, 422, 423, 3, 2, 2, 2, 423, 421, 3, 2, 2, 2, 423, 424, 3, 2, 2, 2, 424, 426, 3, 2, 2, 2, 425, 412, 3, 2, 2, 2, 425, 419, 3, 2, 2, 2, 426, 132, 3, 2, 2, 2, 427, 428, 7, 49, 2, 2, 428, 429, 7, 49, 2, 2, 429, 430, 7, 49, 2, 2, 430, 434, 3, 2, 2, 2, 431, 433, 11, 2, 2, 2, 432, 431, 3, 2, 2, 2, 433, 436, 3, 2, 2, 2, 434, 435, 3, 2, 2, 2, 434, 432, 3, 2, 2, 2, 435, 437, 3, 2, 2, 2, 436, 434, 3, 2, 2, 2, 437, 438, 7, 12, 2, 2, 438, 134, 3, 2, 2, 2, 439, 440, 7, 49, 2, 2, 440, 441, 7, 49, 2, 2, 441, 445, 3, 2, 2, 2, 442, 444, 11, 2, 2, 2, 443, 442, 3, 2, 2, 2, 444, 447, 3, 2, 2, 2, 445, 446, 3, 2, 2, 2, 445, 443, 3, 2, 2, 2, 446, 448, 3, 2, 2, 2, 447, 445, 3, 2, 2, 2, 448, 449, 7, 12, 2, 2, 449, 450, 3, 2, 2, 2, 450, 451, 8, 68, 2, 2, 451, 136, 3, 2, 2, 2, 452, 453, 7, 49, 2, 2, 453, 454, 7, 44, 2, 2, 454, 458, 3, 2, 2, 2, 455, 457, 11, 2, 2, 2, 456, 455, 3, 2, 2, 2, 457, 460, 3, 2, 2, 2, 458, 459, 3, 2, 2, 2, 458, 456, 3, 2, 2, 2, 459, 461, 3, 2, 2, 2, 460, 458, 3, 2, 2, 2, 461, 462, 7, 44, 2, 2, 462, 463, 7, 49, 2, 2, 463, 464, 3, 2, 2, 2, 464, 465, 8, 69, 2, 2, 465, 138, 3, 2, 2, 2, 466, 468, 9, 8, 2, 2, 467, 466, 3, 2, 2, 2, 468, 469, 3, 2, 2, 2, 469, 467, 3, 2, 2, 2, 469, 470, 3, 2, 2, 2, 470, 471, 3, 2, 2, 2, 471, 472, 8, 70, 2, 2, 472, 140, 3, 2, 2, 2, 17, 2, 302, 316, 323, 325, 335, 337, 340, 416, 423, 425, 434, 445, 458, 469, 3, 8, 2, 2] \ No newline at end of file diff --git a/quint/src/generated/.antlr/QuintLexer.java b/quint/src/generated/.antlr/QuintLexer.java index e615f616f..922490a63 100644 --- a/quint/src/generated/.antlr/QuintLexer.java +++ b/quint/src/generated/.antlr/QuintLexer.java @@ -1,4 +1,10 @@ // Generated from /home/gabriela/projects/quint/quint/src/generated/Quint.g4 by ANTLR 4.9.2 + + +// Used for forming errors +import { quintErrorToString } from '../quintError' + + import org.antlr.v4.runtime.Lexer; import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.Token; @@ -21,10 +27,10 @@ public class QuintLexer extends Lexer { T__17=18, T__18=19, T__19=20, T__20=21, T__21=22, T__22=23, T__23=24, T__24=25, T__25=26, T__26=27, T__27=28, T__28=29, T__29=30, T__30=31, T__31=32, T__32=33, T__33=34, T__34=35, T__35=36, T__36=37, T__37=38, - STRING=39, BOOL=40, INT=41, AND=42, OR=43, IFF=44, IMPLIES=45, SET=46, - LIST=47, MAP=48, MATCH=49, PLUS=50, MINUS=51, MUL=52, DIV=53, MOD=54, - GT=55, LT=56, GE=57, LE=58, NE=59, EQ=60, ASGN=61, LPAREN=62, RPAREN=63, - IDENTIFIER=64, SIMPLE_IDENTIFIER=65, DOCCOMMENT=66, LINE_COMMENT=67, COMMENT=68, + T__38=39, STRING=40, BOOL=41, INT=42, AND=43, OR=44, IFF=45, IMPLIES=46, + SET=47, LIST=48, MAP=49, MATCH=50, PLUS=51, MINUS=52, MUL=53, DIV=54, + MOD=55, GT=56, LT=57, GE=58, LE=59, NE=60, EQ=61, ASGN=62, LPAREN=63, + RPAREN=64, IDENTIFIER=65, DOCCOMMENT=66, LINE_COMMENT=67, COMMENT=68, WS=69; public static String[] channelNames = { "DEFAULT_TOKEN_CHANNEL", "HIDDEN" @@ -40,11 +46,11 @@ private static String[] makeRuleNames() { "T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "T__16", "T__17", "T__18", "T__19", "T__20", "T__21", "T__22", "T__23", "T__24", "T__25", "T__26", "T__27", "T__28", "T__29", "T__30", "T__31", "T__32", - "T__33", "T__34", "T__35", "T__36", "T__37", "STRING", "BOOL", "INT", - "AND", "OR", "IFF", "IMPLIES", "SET", "LIST", "MAP", "MATCH", "PLUS", - "MINUS", "MUL", "DIV", "MOD", "GT", "LT", "GE", "LE", "NE", "EQ", "ASGN", - "LPAREN", "RPAREN", "IDENTIFIER", "SIMPLE_IDENTIFIER", "DOCCOMMENT", - "LINE_COMMENT", "COMMENT", "WS" + "T__33", "T__34", "T__35", "T__36", "T__37", "T__38", "STRING", "BOOL", + "INT", "AND", "OR", "IFF", "IMPLIES", "SET", "LIST", "MAP", "MATCH", + "PLUS", "MINUS", "MUL", "DIV", "MOD", "GT", "LT", "GE", "LE", "NE", "EQ", + "ASGN", "LPAREN", "RPAREN", "IDENTIFIER", "DOCCOMMENT", "LINE_COMMENT", + "COMMENT", "WS" }; } public static final String[] ruleNames = makeRuleNames(); @@ -52,13 +58,13 @@ private static String[] makeRuleNames() { private static String[] makeLiteralNames() { return new String[] { null, "'module'", "'{'", "'}'", "'const'", "':'", "'var'", "'assume'", - "'type'", "','", "';'", "'nondet'", "'val'", "'def'", "'pure'", "'action'", - "'run'", "'temporal'", "'import'", "'.'", "'from'", "'as'", "'export'", - "'->'", "'=>'", "'['", "']'", "'int'", "'str'", "'bool'", "'|'", "'^'", - "'''", "'all'", "'any'", "'if'", "'else'", "'_'", "'...'", null, null, - null, "'and'", "'or'", "'iff'", "'implies'", "'Set'", "'List'", "'Map'", - "'match'", "'+'", "'-'", "'*'", "'/'", "'%'", "'>'", "'<'", "'>='", "'<='", - "'!='", "'=='", "'='", "'('", "')'" + "','", "';'", "'type'", "'|'", "'nondet'", "'val'", "'def'", "'pure'", + "'action'", "'run'", "'temporal'", "'import'", "'.'", "'from'", "'as'", + "'export'", "'->'", "'=>'", "'['", "']'", "'int'", "'str'", "'bool'", + "'^'", "'''", "'all'", "'any'", "'if'", "'else'", "'_'", "'...'", "'::'", + null, null, null, "'and'", "'or'", "'iff'", "'implies'", "'Set'", "'List'", + "'Map'", "'match'", "'+'", "'-'", "'*'", "'/'", "'%'", "'>'", "'<'", + "'>='", "'<='", "'!='", "'=='", "'='", "'('", "')'" }; } private static final String[] _LITERAL_NAMES = makeLiteralNames(); @@ -67,10 +73,10 @@ private static String[] makeSymbolicNames() { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, "STRING", "BOOL", "INT", "AND", "OR", "IFF", "IMPLIES", - "SET", "LIST", "MAP", "MATCH", "PLUS", "MINUS", "MUL", "DIV", "MOD", - "GT", "LT", "GE", "LE", "NE", "EQ", "ASGN", "LPAREN", "RPAREN", "IDENTIFIER", - "SIMPLE_IDENTIFIER", "DOCCOMMENT", "LINE_COMMENT", "COMMENT", "WS" + null, null, null, null, "STRING", "BOOL", "INT", "AND", "OR", "IFF", + "IMPLIES", "SET", "LIST", "MAP", "MATCH", "PLUS", "MINUS", "MUL", "DIV", + "MOD", "GT", "LT", "GE", "LE", "NE", "EQ", "ASGN", "LPAREN", "RPAREN", + "IDENTIFIER", "DOCCOMMENT", "LINE_COMMENT", "COMMENT", "WS" }; } private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); @@ -132,7 +138,7 @@ public QuintLexer(CharStream input) { public ATN getATN() { return _ATN; } public static final String _serializedATN = - "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2G\u01df\b\1\4\2\t"+ + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2G\u01d9\b\1\4\2\t"+ "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ @@ -142,154 +148,151 @@ public QuintLexer(CharStream input) { "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\3\2\3\2\3\2\3\2"+ "\3\2\3\2\3\2\3\3\3\3\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\5\3\6\3\6\3\7\3\7\3"+ - "\7\3\7\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\t\3\n\3\n\3\13\3"+ - "\13\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\16\3\16\3\16\3\16\3"+ - "\17\3\17\3\17\3\17\3\17\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\21\3\21\3"+ - "\21\3\21\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\23\3\23\3\23\3"+ - "\23\3\23\3\23\3\23\3\24\3\24\3\25\3\25\3\25\3\25\3\25\3\26\3\26\3\26\3"+ - "\27\3\27\3\27\3\27\3\27\3\27\3\27\3\30\3\30\3\30\3\31\3\31\3\31\3\32\3"+ - "\32\3\33\3\33\3\34\3\34\3\34\3\34\3\35\3\35\3\35\3\35\3\36\3\36\3\36\3"+ - "\36\3\36\3\37\3\37\3 \3 \3!\3!\3\"\3\"\3\"\3\"\3#\3#\3#\3#\3$\3$\3$\3"+ - "%\3%\3%\3%\3%\3&\3&\3\'\3\'\3\'\3\'\3(\3(\7(\u012a\n(\f(\16(\u012d\13"+ - "(\3(\3(\3)\3)\3)\3)\3)\3)\3)\3)\3)\5)\u013a\n)\3*\3*\3*\3*\3*\7*\u0141"+ - "\n*\f*\16*\u0144\13*\3*\3*\3*\3*\3*\3*\3*\7*\u014d\n*\f*\16*\u0150\13"+ - "*\5*\u0152\n*\3+\3+\3+\3+\3,\3,\3,\3-\3-\3-\3-\3.\3.\3.\3.\3.\3.\3.\3"+ - ".\3/\3/\3/\3/\3\60\3\60\3\60\3\60\3\60\3\61\3\61\3\61\3\61\3\62\3\62\3"+ - "\62\3\62\3\62\3\62\3\63\3\63\3\64\3\64\3\65\3\65\3\66\3\66\3\67\3\67\3"+ - "8\38\39\39\3:\3:\3:\3;\3;\3;\3<\3<\3<\3=\3=\3=\3>\3>\3?\3?\3@\3@\3A\3"+ - "A\3A\3A\3A\3A\3A\5A\u01a1\nA\3B\3B\7B\u01a5\nB\fB\16B\u01a8\13B\3B\3B"+ - "\6B\u01ac\nB\rB\16B\u01ad\5B\u01b0\nB\3C\3C\3C\3C\3C\7C\u01b7\nC\fC\16"+ - "C\u01ba\13C\3C\3C\3D\3D\3D\3D\7D\u01c2\nD\fD\16D\u01c5\13D\3D\3D\3D\3"+ - "D\3E\3E\3E\3E\7E\u01cf\nE\fE\16E\u01d2\13E\3E\3E\3E\3E\3E\3F\6F\u01da"+ - "\nF\rF\16F\u01db\3F\3F\6\u012b\u01b8\u01c3\u01d0\2G\3\3\5\4\7\5\t\6\13"+ - "\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'"+ - "\25)\26+\27-\30/\31\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G%I&K\'"+ - "M(O)Q*S+U,W-Y.[/]\60_\61a\62c\63e\64g\65i\66k\67m8o9q:s;u{?}@\177"+ - "A\u0081B\u0083C\u0085D\u0087E\u0089F\u008bG\3\2\t\3\2\63;\3\2\62;\5\2"+ - "\62;CHch\4\2C\\c|\6\2\62;C\\aac|\3\2aa\5\2\13\f\17\17\"\"\2\u01ee\2\3"+ - "\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2"+ - "\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31"+ - "\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2"+ - "\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2"+ - "\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2"+ - "\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2\2G\3\2\2\2\2"+ - "I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2U\3"+ - "\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2\2\2\2a\3\2\2"+ - "\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2i\3\2\2\2\2k\3\2\2\2\2m\3\2\2\2\2"+ - "o\3\2\2\2\2q\3\2\2\2\2s\3\2\2\2\2u\3\2\2\2\2w\3\2\2\2\2y\3\2\2\2\2{\3"+ - "\2\2\2\2}\3\2\2\2\2\177\3\2\2\2\2\u0081\3\2\2\2\2\u0083\3\2\2\2\2\u0085"+ - "\3\2\2\2\2\u0087\3\2\2\2\2\u0089\3\2\2\2\2\u008b\3\2\2\2\3\u008d\3\2\2"+ - "\2\5\u0094\3\2\2\2\7\u0096\3\2\2\2\t\u0098\3\2\2\2\13\u009e\3\2\2\2\r"+ - "\u00a0\3\2\2\2\17\u00a4\3\2\2\2\21\u00ab\3\2\2\2\23\u00b0\3\2\2\2\25\u00b2"+ - "\3\2\2\2\27\u00b4\3\2\2\2\31\u00bb\3\2\2\2\33\u00bf\3\2\2\2\35\u00c3\3"+ - "\2\2\2\37\u00c8\3\2\2\2!\u00cf\3\2\2\2#\u00d3\3\2\2\2%\u00dc\3\2\2\2\'"+ - "\u00e3\3\2\2\2)\u00e5\3\2\2\2+\u00ea\3\2\2\2-\u00ed\3\2\2\2/\u00f4\3\2"+ - "\2\2\61\u00f7\3\2\2\2\63\u00fa\3\2\2\2\65\u00fc\3\2\2\2\67\u00fe\3\2\2"+ - "\29\u0102\3\2\2\2;\u0106\3\2\2\2=\u010b\3\2\2\2?\u010d\3\2\2\2A\u010f"+ - "\3\2\2\2C\u0111\3\2\2\2E\u0115\3\2\2\2G\u0119\3\2\2\2I\u011c\3\2\2\2K"+ - "\u0121\3\2\2\2M\u0123\3\2\2\2O\u0127\3\2\2\2Q\u0139\3\2\2\2S\u0151\3\2"+ - "\2\2U\u0153\3\2\2\2W\u0157\3\2\2\2Y\u015a\3\2\2\2[\u015e\3\2\2\2]\u0166"+ - "\3\2\2\2_\u016a\3\2\2\2a\u016f\3\2\2\2c\u0173\3\2\2\2e\u0179\3\2\2\2g"+ - "\u017b\3\2\2\2i\u017d\3\2\2\2k\u017f\3\2\2\2m\u0181\3\2\2\2o\u0183\3\2"+ - "\2\2q\u0185\3\2\2\2s\u0187\3\2\2\2u\u018a\3\2\2\2w\u018d\3\2\2\2y\u0190"+ - "\3\2\2\2{\u0193\3\2\2\2}\u0195\3\2\2\2\177\u0197\3\2\2\2\u0081\u01a0\3"+ - "\2\2\2\u0083\u01af\3\2\2\2\u0085\u01b1\3\2\2\2\u0087\u01bd\3\2\2\2\u0089"+ - "\u01ca\3\2\2\2\u008b\u01d9\3\2\2\2\u008d\u008e\7o\2\2\u008e\u008f\7q\2"+ - "\2\u008f\u0090\7f\2\2\u0090\u0091\7w\2\2\u0091\u0092\7n\2\2\u0092\u0093"+ - "\7g\2\2\u0093\4\3\2\2\2\u0094\u0095\7}\2\2\u0095\6\3\2\2\2\u0096\u0097"+ - "\7\177\2\2\u0097\b\3\2\2\2\u0098\u0099\7e\2\2\u0099\u009a\7q\2\2\u009a"+ - "\u009b\7p\2\2\u009b\u009c\7u\2\2\u009c\u009d\7v\2\2\u009d\n\3\2\2\2\u009e"+ - "\u009f\7<\2\2\u009f\f\3\2\2\2\u00a0\u00a1\7x\2\2\u00a1\u00a2\7c\2\2\u00a2"+ - "\u00a3\7t\2\2\u00a3\16\3\2\2\2\u00a4\u00a5\7c\2\2\u00a5\u00a6\7u\2\2\u00a6"+ - "\u00a7\7u\2\2\u00a7\u00a8\7w\2\2\u00a8\u00a9\7o\2\2\u00a9\u00aa\7g\2\2"+ - "\u00aa\20\3\2\2\2\u00ab\u00ac\7v\2\2\u00ac\u00ad\7{\2\2\u00ad\u00ae\7"+ - "r\2\2\u00ae\u00af\7g\2\2\u00af\22\3\2\2\2\u00b0\u00b1\7.\2\2\u00b1\24"+ - "\3\2\2\2\u00b2\u00b3\7=\2\2\u00b3\26\3\2\2\2\u00b4\u00b5\7p\2\2\u00b5"+ - "\u00b6\7q\2\2\u00b6\u00b7\7p\2\2\u00b7\u00b8\7f\2\2\u00b8\u00b9\7g\2\2"+ - "\u00b9\u00ba\7v\2\2\u00ba\30\3\2\2\2\u00bb\u00bc\7x\2\2\u00bc\u00bd\7"+ - "c\2\2\u00bd\u00be\7n\2\2\u00be\32\3\2\2\2\u00bf\u00c0\7f\2\2\u00c0\u00c1"+ - "\7g\2\2\u00c1\u00c2\7h\2\2\u00c2\34\3\2\2\2\u00c3\u00c4\7r\2\2\u00c4\u00c5"+ - "\7w\2\2\u00c5\u00c6\7t\2\2\u00c6\u00c7\7g\2\2\u00c7\36\3\2\2\2\u00c8\u00c9"+ - "\7c\2\2\u00c9\u00ca\7e\2\2\u00ca\u00cb\7v\2\2\u00cb\u00cc\7k\2\2\u00cc"+ - "\u00cd\7q\2\2\u00cd\u00ce\7p\2\2\u00ce \3\2\2\2\u00cf\u00d0\7t\2\2\u00d0"+ - "\u00d1\7w\2\2\u00d1\u00d2\7p\2\2\u00d2\"\3\2\2\2\u00d3\u00d4\7v\2\2\u00d4"+ - "\u00d5\7g\2\2\u00d5\u00d6\7o\2\2\u00d6\u00d7\7r\2\2\u00d7\u00d8\7q\2\2"+ - "\u00d8\u00d9\7t\2\2\u00d9\u00da\7c\2\2\u00da\u00db\7n\2\2\u00db$\3\2\2"+ - "\2\u00dc\u00dd\7k\2\2\u00dd\u00de\7o\2\2\u00de\u00df\7r\2\2\u00df\u00e0"+ - "\7q\2\2\u00e0\u00e1\7t\2\2\u00e1\u00e2\7v\2\2\u00e2&\3\2\2\2\u00e3\u00e4"+ - "\7\60\2\2\u00e4(\3\2\2\2\u00e5\u00e6\7h\2\2\u00e6\u00e7\7t\2\2\u00e7\u00e8"+ - "\7q\2\2\u00e8\u00e9\7o\2\2\u00e9*\3\2\2\2\u00ea\u00eb\7c\2\2\u00eb\u00ec"+ - "\7u\2\2\u00ec,\3\2\2\2\u00ed\u00ee\7g\2\2\u00ee\u00ef\7z\2\2\u00ef\u00f0"+ - "\7r\2\2\u00f0\u00f1\7q\2\2\u00f1\u00f2\7t\2\2\u00f2\u00f3\7v\2\2\u00f3"+ - ".\3\2\2\2\u00f4\u00f5\7/\2\2\u00f5\u00f6\7@\2\2\u00f6\60\3\2\2\2\u00f7"+ - "\u00f8\7?\2\2\u00f8\u00f9\7@\2\2\u00f9\62\3\2\2\2\u00fa\u00fb\7]\2\2\u00fb"+ - "\64\3\2\2\2\u00fc\u00fd\7_\2\2\u00fd\66\3\2\2\2\u00fe\u00ff\7k\2\2\u00ff"+ - "\u0100\7p\2\2\u0100\u0101\7v\2\2\u01018\3\2\2\2\u0102\u0103\7u\2\2\u0103"+ - "\u0104\7v\2\2\u0104\u0105\7t\2\2\u0105:\3\2\2\2\u0106\u0107\7d\2\2\u0107"+ - "\u0108\7q\2\2\u0108\u0109\7q\2\2\u0109\u010a\7n\2\2\u010a<\3\2\2\2\u010b"+ - "\u010c\7~\2\2\u010c>\3\2\2\2\u010d\u010e\7`\2\2\u010e@\3\2\2\2\u010f\u0110"+ - "\7)\2\2\u0110B\3\2\2\2\u0111\u0112\7c\2\2\u0112\u0113\7n\2\2\u0113\u0114"+ - "\7n\2\2\u0114D\3\2\2\2\u0115\u0116\7c\2\2\u0116\u0117\7p\2\2\u0117\u0118"+ - "\7{\2\2\u0118F\3\2\2\2\u0119\u011a\7k\2\2\u011a\u011b\7h\2\2\u011bH\3"+ - "\2\2\2\u011c\u011d\7g\2\2\u011d\u011e\7n\2\2\u011e\u011f\7u\2\2\u011f"+ - "\u0120\7g\2\2\u0120J\3\2\2\2\u0121\u0122\7a\2\2\u0122L\3\2\2\2\u0123\u0124"+ - "\7\60\2\2\u0124\u0125\7\60\2\2\u0125\u0126\7\60\2\2\u0126N\3\2\2\2\u0127"+ - "\u012b\7$\2\2\u0128\u012a\13\2\2\2\u0129\u0128\3\2\2\2\u012a\u012d\3\2"+ - "\2\2\u012b\u012c\3\2\2\2\u012b\u0129\3\2\2\2\u012c\u012e\3\2\2\2\u012d"+ - "\u012b\3\2\2\2\u012e\u012f\7$\2\2\u012fP\3\2\2\2\u0130\u0131\7h\2\2\u0131"+ - "\u0132\7c\2\2\u0132\u0133\7n\2\2\u0133\u0134\7u\2\2\u0134\u013a\7g\2\2"+ - "\u0135\u0136\7v\2\2\u0136\u0137\7t\2\2\u0137\u0138\7w\2\2\u0138\u013a"+ - "\7g\2\2\u0139\u0130\3\2\2\2\u0139\u0135\3\2\2\2\u013aR\3\2\2\2\u013b\u0152"+ - "\7\62\2\2\u013c\u0142\t\2\2\2\u013d\u0141\t\3\2\2\u013e\u013f\7a\2\2\u013f"+ - "\u0141\t\3\2\2\u0140\u013d\3\2\2\2\u0140\u013e\3\2\2\2\u0141\u0144\3\2"+ - "\2\2\u0142\u0140\3\2\2\2\u0142\u0143\3\2\2\2\u0143\u0152\3\2\2\2\u0144"+ - "\u0142\3\2\2\2\u0145\u0146\7\62\2\2\u0146\u0147\7z\2\2\u0147\u0148\3\2"+ - "\2\2\u0148\u014e\t\4\2\2\u0149\u014d\t\4\2\2\u014a\u014b\7a\2\2\u014b"+ - "\u014d\t\4\2\2\u014c\u0149\3\2\2\2\u014c\u014a\3\2\2\2\u014d\u0150\3\2"+ - "\2\2\u014e\u014c\3\2\2\2\u014e\u014f\3\2\2\2\u014f\u0152\3\2\2\2\u0150"+ - "\u014e\3\2\2\2\u0151\u013b\3\2\2\2\u0151\u013c\3\2\2\2\u0151\u0145\3\2"+ - "\2\2\u0152T\3\2\2\2\u0153\u0154\7c\2\2\u0154\u0155\7p\2\2\u0155\u0156"+ - "\7f\2\2\u0156V\3\2\2\2\u0157\u0158\7q\2\2\u0158\u0159\7t\2\2\u0159X\3"+ - "\2\2\2\u015a\u015b\7k\2\2\u015b\u015c\7h\2\2\u015c\u015d\7h\2\2\u015d"+ - "Z\3\2\2\2\u015e\u015f\7k\2\2\u015f\u0160\7o\2\2\u0160\u0161\7r\2\2\u0161"+ - "\u0162\7n\2\2\u0162\u0163\7k\2\2\u0163\u0164\7g\2\2\u0164\u0165\7u\2\2"+ - "\u0165\\\3\2\2\2\u0166\u0167\7U\2\2\u0167\u0168\7g\2\2\u0168\u0169\7v"+ - "\2\2\u0169^\3\2\2\2\u016a\u016b\7N\2\2\u016b\u016c\7k\2\2\u016c\u016d"+ - "\7u\2\2\u016d\u016e\7v\2\2\u016e`\3\2\2\2\u016f\u0170\7O\2\2\u0170\u0171"+ - "\7c\2\2\u0171\u0172\7r\2\2\u0172b\3\2\2\2\u0173\u0174\7o\2\2\u0174\u0175"+ - "\7c\2\2\u0175\u0176\7v\2\2\u0176\u0177\7e\2\2\u0177\u0178\7j\2\2\u0178"+ - "d\3\2\2\2\u0179\u017a\7-\2\2\u017af\3\2\2\2\u017b\u017c\7/\2\2\u017ch"+ - "\3\2\2\2\u017d\u017e\7,\2\2\u017ej\3\2\2\2\u017f\u0180\7\61\2\2\u0180"+ - "l\3\2\2\2\u0181\u0182\7\'\2\2\u0182n\3\2\2\2\u0183\u0184\7@\2\2\u0184"+ - "p\3\2\2\2\u0185\u0186\7>\2\2\u0186r\3\2\2\2\u0187\u0188\7@\2\2\u0188\u0189"+ - "\7?\2\2\u0189t\3\2\2\2\u018a\u018b\7>\2\2\u018b\u018c\7?\2\2\u018cv\3"+ - "\2\2\2\u018d\u018e\7#\2\2\u018e\u018f\7?\2\2\u018fx\3\2\2\2\u0190\u0191"+ - "\7?\2\2\u0191\u0192\7?\2\2\u0192z\3\2\2\2\u0193\u0194\7?\2\2\u0194|\3"+ - "\2\2\2\u0195\u0196\7*\2\2\u0196~\3\2\2\2\u0197\u0198\7+\2\2\u0198\u0080"+ - "\3\2\2\2\u0199\u01a1\5\u0083B\2\u019a\u019b\5\u0083B\2\u019b\u019c\7<"+ - "\2\2\u019c\u019d\7<\2\2\u019d\u019e\3\2\2\2\u019e\u019f\5\u0081A\2\u019f"+ - "\u01a1\3\2\2\2\u01a0\u0199\3\2\2\2\u01a0\u019a\3\2\2\2\u01a1\u0082\3\2"+ - "\2\2\u01a2\u01a6\t\5\2\2\u01a3\u01a5\t\6\2\2\u01a4\u01a3\3\2\2\2\u01a5"+ - "\u01a8\3\2\2\2\u01a6\u01a4\3\2\2\2\u01a6\u01a7\3\2\2\2\u01a7\u01b0\3\2"+ - "\2\2\u01a8\u01a6\3\2\2\2\u01a9\u01ab\t\7\2\2\u01aa\u01ac\t\6\2\2\u01ab"+ - "\u01aa\3\2\2\2\u01ac\u01ad\3\2\2\2\u01ad\u01ab\3\2\2\2\u01ad\u01ae\3\2"+ - "\2\2\u01ae\u01b0\3\2\2\2\u01af\u01a2\3\2\2\2\u01af\u01a9\3\2\2\2\u01b0"+ - "\u0084\3\2\2\2\u01b1\u01b2\7\61\2\2\u01b2\u01b3\7\61\2\2\u01b3\u01b4\7"+ - "\61\2\2\u01b4\u01b8\3\2\2\2\u01b5\u01b7\13\2\2\2\u01b6\u01b5\3\2\2\2\u01b7"+ - "\u01ba\3\2\2\2\u01b8\u01b9\3\2\2\2\u01b8\u01b6\3\2\2\2\u01b9\u01bb\3\2"+ - "\2\2\u01ba\u01b8\3\2\2\2\u01bb\u01bc\7\f\2\2\u01bc\u0086\3\2\2\2\u01bd"+ - "\u01be\7\61\2\2\u01be\u01bf\7\61\2\2\u01bf\u01c3\3\2\2\2\u01c0\u01c2\13"+ - "\2\2\2\u01c1\u01c0\3\2\2\2\u01c2\u01c5\3\2\2\2\u01c3\u01c4\3\2\2\2\u01c3"+ - "\u01c1\3\2\2\2\u01c4\u01c6\3\2\2\2\u01c5\u01c3\3\2\2\2\u01c6\u01c7\7\f"+ - "\2\2\u01c7\u01c8\3\2\2\2\u01c8\u01c9\bD\2\2\u01c9\u0088\3\2\2\2\u01ca"+ - "\u01cb\7\61\2\2\u01cb\u01cc\7,\2\2\u01cc\u01d0\3\2\2\2\u01cd\u01cf\13"+ - "\2\2\2\u01ce\u01cd\3\2\2\2\u01cf\u01d2\3\2\2\2\u01d0\u01d1\3\2\2\2\u01d0"+ - "\u01ce\3\2\2\2\u01d1\u01d3\3\2\2\2\u01d2\u01d0\3\2\2\2\u01d3\u01d4\7,"+ - "\2\2\u01d4\u01d5\7\61\2\2\u01d5\u01d6\3\2\2\2\u01d6\u01d7\bE\2\2\u01d7"+ - "\u008a\3\2\2\2\u01d8\u01da\t\b\2\2\u01d9\u01d8\3\2\2\2\u01da\u01db\3\2"+ - "\2\2\u01db\u01d9\3\2\2\2\u01db\u01dc\3\2\2\2\u01dc\u01dd\3\2\2\2\u01dd"+ - "\u01de\bF\2\2\u01de\u008c\3\2\2\2\22\2\u012b\u0139\u0140\u0142\u014c\u014e"+ - "\u0151\u01a0\u01a6\u01ad\u01af\u01b8\u01c3\u01d0\u01db\3\b\2\2"; + "\7\3\7\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\t\3\t\3\n\3\n\3\13\3\13\3\13\3\13"+ + "\3\13\3\f\3\f\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\16\3\16\3\16\3\16\3\17\3\17"+ + "\3\17\3\17\3\20\3\20\3\20\3\20\3\20\3\21\3\21\3\21\3\21\3\21\3\21\3\21"+ + "\3\22\3\22\3\22\3\22\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\24"+ + "\3\24\3\24\3\24\3\24\3\24\3\24\3\25\3\25\3\26\3\26\3\26\3\26\3\26\3\27"+ + "\3\27\3\27\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\31\3\31\3\31\3\32\3\32"+ + "\3\32\3\33\3\33\3\34\3\34\3\35\3\35\3\35\3\35\3\36\3\36\3\36\3\36\3\37"+ + "\3\37\3\37\3\37\3\37\3 \3 \3!\3!\3\"\3\"\3\"\3\"\3#\3#\3#\3#\3$\3$\3$"+ + "\3%\3%\3%\3%\3%\3&\3&\3\'\3\'\3\'\3\'\3(\3(\3(\3)\3)\7)\u012d\n)\f)\16"+ + ")\u0130\13)\3)\3)\3*\3*\3*\3*\3*\3*\3*\3*\3*\5*\u013d\n*\3+\3+\3+\3+\3"+ + "+\7+\u0144\n+\f+\16+\u0147\13+\3+\3+\3+\3+\3+\3+\3+\7+\u0150\n+\f+\16"+ + "+\u0153\13+\5+\u0155\n+\3,\3,\3,\3,\3-\3-\3-\3.\3.\3.\3.\3/\3/\3/\3/\3"+ + "/\3/\3/\3/\3\60\3\60\3\60\3\60\3\61\3\61\3\61\3\61\3\61\3\62\3\62\3\62"+ + "\3\62\3\63\3\63\3\63\3\63\3\63\3\63\3\64\3\64\3\65\3\65\3\66\3\66\3\67"+ + "\3\67\38\38\39\39\3:\3:\3;\3;\3;\3<\3<\3<\3=\3=\3=\3>\3>\3>\3?\3?\3@\3"+ + "@\3A\3A\3B\3B\7B\u019f\nB\fB\16B\u01a2\13B\3B\3B\6B\u01a6\nB\rB\16B\u01a7"+ + "\5B\u01aa\nB\3C\3C\3C\3C\3C\7C\u01b1\nC\fC\16C\u01b4\13C\3C\3C\3D\3D\3"+ + "D\3D\7D\u01bc\nD\fD\16D\u01bf\13D\3D\3D\3D\3D\3E\3E\3E\3E\7E\u01c9\nE"+ + "\fE\16E\u01cc\13E\3E\3E\3E\3E\3E\3F\6F\u01d4\nF\rF\16F\u01d5\3F\3F\6\u012e"+ + "\u01b2\u01bd\u01ca\2G\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27"+ + "\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32\63\33"+ + "\65\34\67\359\36;\37= ?!A\"C#E$G%I&K\'M(O)Q*S+U,W-Y.[/]\60_\61a\62c\63"+ + "e\64g\65i\66k\67m8o9q:s;u{?}@\177A\u0081B\u0083C\u0085D\u0087E\u0089"+ + "F\u008bG\3\2\t\3\2\63;\3\2\62;\5\2\62;CHch\4\2C\\c|\6\2\62;C\\aac|\3\2"+ + "aa\5\2\13\f\17\17\"\"\2\u01e7\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t"+ + "\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2"+ + "\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2"+ + "\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2"+ + "+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2"+ + "\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2"+ + "C\3\2\2\2\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3"+ + "\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2"+ + "\2\2]\3\2\2\2\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2"+ + "i\3\2\2\2\2k\3\2\2\2\2m\3\2\2\2\2o\3\2\2\2\2q\3\2\2\2\2s\3\2\2\2\2u\3"+ + "\2\2\2\2w\3\2\2\2\2y\3\2\2\2\2{\3\2\2\2\2}\3\2\2\2\2\177\3\2\2\2\2\u0081"+ + "\3\2\2\2\2\u0083\3\2\2\2\2\u0085\3\2\2\2\2\u0087\3\2\2\2\2\u0089\3\2\2"+ + "\2\2\u008b\3\2\2\2\3\u008d\3\2\2\2\5\u0094\3\2\2\2\7\u0096\3\2\2\2\t\u0098"+ + "\3\2\2\2\13\u009e\3\2\2\2\r\u00a0\3\2\2\2\17\u00a4\3\2\2\2\21\u00ab\3"+ + "\2\2\2\23\u00ad\3\2\2\2\25\u00af\3\2\2\2\27\u00b4\3\2\2\2\31\u00b6\3\2"+ + "\2\2\33\u00bd\3\2\2\2\35\u00c1\3\2\2\2\37\u00c5\3\2\2\2!\u00ca\3\2\2\2"+ + "#\u00d1\3\2\2\2%\u00d5\3\2\2\2\'\u00de\3\2\2\2)\u00e5\3\2\2\2+\u00e7\3"+ + "\2\2\2-\u00ec\3\2\2\2/\u00ef\3\2\2\2\61\u00f6\3\2\2\2\63\u00f9\3\2\2\2"+ + "\65\u00fc\3\2\2\2\67\u00fe\3\2\2\29\u0100\3\2\2\2;\u0104\3\2\2\2=\u0108"+ + "\3\2\2\2?\u010d\3\2\2\2A\u010f\3\2\2\2C\u0111\3\2\2\2E\u0115\3\2\2\2G"+ + "\u0119\3\2\2\2I\u011c\3\2\2\2K\u0121\3\2\2\2M\u0123\3\2\2\2O\u0127\3\2"+ + "\2\2Q\u012a\3\2\2\2S\u013c\3\2\2\2U\u0154\3\2\2\2W\u0156\3\2\2\2Y\u015a"+ + "\3\2\2\2[\u015d\3\2\2\2]\u0161\3\2\2\2_\u0169\3\2\2\2a\u016d\3\2\2\2c"+ + "\u0172\3\2\2\2e\u0176\3\2\2\2g\u017c\3\2\2\2i\u017e\3\2\2\2k\u0180\3\2"+ + "\2\2m\u0182\3\2\2\2o\u0184\3\2\2\2q\u0186\3\2\2\2s\u0188\3\2\2\2u\u018a"+ + "\3\2\2\2w\u018d\3\2\2\2y\u0190\3\2\2\2{\u0193\3\2\2\2}\u0196\3\2\2\2\177"+ + "\u0198\3\2\2\2\u0081\u019a\3\2\2\2\u0083\u01a9\3\2\2\2\u0085\u01ab\3\2"+ + "\2\2\u0087\u01b7\3\2\2\2\u0089\u01c4\3\2\2\2\u008b\u01d3\3\2\2\2\u008d"+ + "\u008e\7o\2\2\u008e\u008f\7q\2\2\u008f\u0090\7f\2\2\u0090\u0091\7w\2\2"+ + "\u0091\u0092\7n\2\2\u0092\u0093\7g\2\2\u0093\4\3\2\2\2\u0094\u0095\7}"+ + "\2\2\u0095\6\3\2\2\2\u0096\u0097\7\177\2\2\u0097\b\3\2\2\2\u0098\u0099"+ + "\7e\2\2\u0099\u009a\7q\2\2\u009a\u009b\7p\2\2\u009b\u009c\7u\2\2\u009c"+ + "\u009d\7v\2\2\u009d\n\3\2\2\2\u009e\u009f\7<\2\2\u009f\f\3\2\2\2\u00a0"+ + "\u00a1\7x\2\2\u00a1\u00a2\7c\2\2\u00a2\u00a3\7t\2\2\u00a3\16\3\2\2\2\u00a4"+ + "\u00a5\7c\2\2\u00a5\u00a6\7u\2\2\u00a6\u00a7\7u\2\2\u00a7\u00a8\7w\2\2"+ + "\u00a8\u00a9\7o\2\2\u00a9\u00aa\7g\2\2\u00aa\20\3\2\2\2\u00ab\u00ac\7"+ + ".\2\2\u00ac\22\3\2\2\2\u00ad\u00ae\7=\2\2\u00ae\24\3\2\2\2\u00af\u00b0"+ + "\7v\2\2\u00b0\u00b1\7{\2\2\u00b1\u00b2\7r\2\2\u00b2\u00b3\7g\2\2\u00b3"+ + "\26\3\2\2\2\u00b4\u00b5\7~\2\2\u00b5\30\3\2\2\2\u00b6\u00b7\7p\2\2\u00b7"+ + "\u00b8\7q\2\2\u00b8\u00b9\7p\2\2\u00b9\u00ba\7f\2\2\u00ba\u00bb\7g\2\2"+ + "\u00bb\u00bc\7v\2\2\u00bc\32\3\2\2\2\u00bd\u00be\7x\2\2\u00be\u00bf\7"+ + "c\2\2\u00bf\u00c0\7n\2\2\u00c0\34\3\2\2\2\u00c1\u00c2\7f\2\2\u00c2\u00c3"+ + "\7g\2\2\u00c3\u00c4\7h\2\2\u00c4\36\3\2\2\2\u00c5\u00c6\7r\2\2\u00c6\u00c7"+ + "\7w\2\2\u00c7\u00c8\7t\2\2\u00c8\u00c9\7g\2\2\u00c9 \3\2\2\2\u00ca\u00cb"+ + "\7c\2\2\u00cb\u00cc\7e\2\2\u00cc\u00cd\7v\2\2\u00cd\u00ce\7k\2\2\u00ce"+ + "\u00cf\7q\2\2\u00cf\u00d0\7p\2\2\u00d0\"\3\2\2\2\u00d1\u00d2\7t\2\2\u00d2"+ + "\u00d3\7w\2\2\u00d3\u00d4\7p\2\2\u00d4$\3\2\2\2\u00d5\u00d6\7v\2\2\u00d6"+ + "\u00d7\7g\2\2\u00d7\u00d8\7o\2\2\u00d8\u00d9\7r\2\2\u00d9\u00da\7q\2\2"+ + "\u00da\u00db\7t\2\2\u00db\u00dc\7c\2\2\u00dc\u00dd\7n\2\2\u00dd&\3\2\2"+ + "\2\u00de\u00df\7k\2\2\u00df\u00e0\7o\2\2\u00e0\u00e1\7r\2\2\u00e1\u00e2"+ + "\7q\2\2\u00e2\u00e3\7t\2\2\u00e3\u00e4\7v\2\2\u00e4(\3\2\2\2\u00e5\u00e6"+ + "\7\60\2\2\u00e6*\3\2\2\2\u00e7\u00e8\7h\2\2\u00e8\u00e9\7t\2\2\u00e9\u00ea"+ + "\7q\2\2\u00ea\u00eb\7o\2\2\u00eb,\3\2\2\2\u00ec\u00ed\7c\2\2\u00ed\u00ee"+ + "\7u\2\2\u00ee.\3\2\2\2\u00ef\u00f0\7g\2\2\u00f0\u00f1\7z\2\2\u00f1\u00f2"+ + "\7r\2\2\u00f2\u00f3\7q\2\2\u00f3\u00f4\7t\2\2\u00f4\u00f5\7v\2\2\u00f5"+ + "\60\3\2\2\2\u00f6\u00f7\7/\2\2\u00f7\u00f8\7@\2\2\u00f8\62\3\2\2\2\u00f9"+ + "\u00fa\7?\2\2\u00fa\u00fb\7@\2\2\u00fb\64\3\2\2\2\u00fc\u00fd\7]\2\2\u00fd"+ + "\66\3\2\2\2\u00fe\u00ff\7_\2\2\u00ff8\3\2\2\2\u0100\u0101\7k\2\2\u0101"+ + "\u0102\7p\2\2\u0102\u0103\7v\2\2\u0103:\3\2\2\2\u0104\u0105\7u\2\2\u0105"+ + "\u0106\7v\2\2\u0106\u0107\7t\2\2\u0107<\3\2\2\2\u0108\u0109\7d\2\2\u0109"+ + "\u010a\7q\2\2\u010a\u010b\7q\2\2\u010b\u010c\7n\2\2\u010c>\3\2\2\2\u010d"+ + "\u010e\7`\2\2\u010e@\3\2\2\2\u010f\u0110\7)\2\2\u0110B\3\2\2\2\u0111\u0112"+ + "\7c\2\2\u0112\u0113\7n\2\2\u0113\u0114\7n\2\2\u0114D\3\2\2\2\u0115\u0116"+ + "\7c\2\2\u0116\u0117\7p\2\2\u0117\u0118\7{\2\2\u0118F\3\2\2\2\u0119\u011a"+ + "\7k\2\2\u011a\u011b\7h\2\2\u011bH\3\2\2\2\u011c\u011d\7g\2\2\u011d\u011e"+ + "\7n\2\2\u011e\u011f\7u\2\2\u011f\u0120\7g\2\2\u0120J\3\2\2\2\u0121\u0122"+ + "\7a\2\2\u0122L\3\2\2\2\u0123\u0124\7\60\2\2\u0124\u0125\7\60\2\2\u0125"+ + "\u0126\7\60\2\2\u0126N\3\2\2\2\u0127\u0128\7<\2\2\u0128\u0129\7<\2\2\u0129"+ + "P\3\2\2\2\u012a\u012e\7$\2\2\u012b\u012d\13\2\2\2\u012c\u012b\3\2\2\2"+ + "\u012d\u0130\3\2\2\2\u012e\u012f\3\2\2\2\u012e\u012c\3\2\2\2\u012f\u0131"+ + "\3\2\2\2\u0130\u012e\3\2\2\2\u0131\u0132\7$\2\2\u0132R\3\2\2\2\u0133\u0134"+ + "\7h\2\2\u0134\u0135\7c\2\2\u0135\u0136\7n\2\2\u0136\u0137\7u\2\2\u0137"+ + "\u013d\7g\2\2\u0138\u0139\7v\2\2\u0139\u013a\7t\2\2\u013a\u013b\7w\2\2"+ + "\u013b\u013d\7g\2\2\u013c\u0133\3\2\2\2\u013c\u0138\3\2\2\2\u013dT\3\2"+ + "\2\2\u013e\u0155\7\62\2\2\u013f\u0145\t\2\2\2\u0140\u0144\t\3\2\2\u0141"+ + "\u0142\7a\2\2\u0142\u0144\t\3\2\2\u0143\u0140\3\2\2\2\u0143\u0141\3\2"+ + "\2\2\u0144\u0147\3\2\2\2\u0145\u0143\3\2\2\2\u0145\u0146\3\2\2\2\u0146"+ + "\u0155\3\2\2\2\u0147\u0145\3\2\2\2\u0148\u0149\7\62\2\2\u0149\u014a\7"+ + "z\2\2\u014a\u014b\3\2\2\2\u014b\u0151\t\4\2\2\u014c\u0150\t\4\2\2\u014d"+ + "\u014e\7a\2\2\u014e\u0150\t\4\2\2\u014f\u014c\3\2\2\2\u014f\u014d\3\2"+ + "\2\2\u0150\u0153\3\2\2\2\u0151\u014f\3\2\2\2\u0151\u0152\3\2\2\2\u0152"+ + "\u0155\3\2\2\2\u0153\u0151\3\2\2\2\u0154\u013e\3\2\2\2\u0154\u013f\3\2"+ + "\2\2\u0154\u0148\3\2\2\2\u0155V\3\2\2\2\u0156\u0157\7c\2\2\u0157\u0158"+ + "\7p\2\2\u0158\u0159\7f\2\2\u0159X\3\2\2\2\u015a\u015b\7q\2\2\u015b\u015c"+ + "\7t\2\2\u015cZ\3\2\2\2\u015d\u015e\7k\2\2\u015e\u015f\7h\2\2\u015f\u0160"+ + "\7h\2\2\u0160\\\3\2\2\2\u0161\u0162\7k\2\2\u0162\u0163\7o\2\2\u0163\u0164"+ + "\7r\2\2\u0164\u0165\7n\2\2\u0165\u0166\7k\2\2\u0166\u0167\7g\2\2\u0167"+ + "\u0168\7u\2\2\u0168^\3\2\2\2\u0169\u016a\7U\2\2\u016a\u016b\7g\2\2\u016b"+ + "\u016c\7v\2\2\u016c`\3\2\2\2\u016d\u016e\7N\2\2\u016e\u016f\7k\2\2\u016f"+ + "\u0170\7u\2\2\u0170\u0171\7v\2\2\u0171b\3\2\2\2\u0172\u0173\7O\2\2\u0173"+ + "\u0174\7c\2\2\u0174\u0175\7r\2\2\u0175d\3\2\2\2\u0176\u0177\7o\2\2\u0177"+ + "\u0178\7c\2\2\u0178\u0179\7v\2\2\u0179\u017a\7e\2\2\u017a\u017b\7j\2\2"+ + "\u017bf\3\2\2\2\u017c\u017d\7-\2\2\u017dh\3\2\2\2\u017e\u017f\7/\2\2\u017f"+ + "j\3\2\2\2\u0180\u0181\7,\2\2\u0181l\3\2\2\2\u0182\u0183\7\61\2\2\u0183"+ + "n\3\2\2\2\u0184\u0185\7\'\2\2\u0185p\3\2\2\2\u0186\u0187\7@\2\2\u0187"+ + "r\3\2\2\2\u0188\u0189\7>\2\2\u0189t\3\2\2\2\u018a\u018b\7@\2\2\u018b\u018c"+ + "\7?\2\2\u018cv\3\2\2\2\u018d\u018e\7>\2\2\u018e\u018f\7?\2\2\u018fx\3"+ + "\2\2\2\u0190\u0191\7#\2\2\u0191\u0192\7?\2\2\u0192z\3\2\2\2\u0193\u0194"+ + "\7?\2\2\u0194\u0195\7?\2\2\u0195|\3\2\2\2\u0196\u0197\7?\2\2\u0197~\3"+ + "\2\2\2\u0198\u0199\7*\2\2\u0199\u0080\3\2\2\2\u019a\u019b\7+\2\2\u019b"+ + "\u0082\3\2\2\2\u019c\u01a0\t\5\2\2\u019d\u019f\t\6\2\2\u019e\u019d\3\2"+ + "\2\2\u019f\u01a2\3\2\2\2\u01a0\u019e\3\2\2\2\u01a0\u01a1\3\2\2\2\u01a1"+ + "\u01aa\3\2\2\2\u01a2\u01a0\3\2\2\2\u01a3\u01a5\t\7\2\2\u01a4\u01a6\t\6"+ + "\2\2\u01a5\u01a4\3\2\2\2\u01a6\u01a7\3\2\2\2\u01a7\u01a5\3\2\2\2\u01a7"+ + "\u01a8\3\2\2\2\u01a8\u01aa\3\2\2\2\u01a9\u019c\3\2\2\2\u01a9\u01a3\3\2"+ + "\2\2\u01aa\u0084\3\2\2\2\u01ab\u01ac\7\61\2\2\u01ac\u01ad\7\61\2\2\u01ad"+ + "\u01ae\7\61\2\2\u01ae\u01b2\3\2\2\2\u01af\u01b1\13\2\2\2\u01b0\u01af\3"+ + "\2\2\2\u01b1\u01b4\3\2\2\2\u01b2\u01b3\3\2\2\2\u01b2\u01b0\3\2\2\2\u01b3"+ + "\u01b5\3\2\2\2\u01b4\u01b2\3\2\2\2\u01b5\u01b6\7\f\2\2\u01b6\u0086\3\2"+ + "\2\2\u01b7\u01b8\7\61\2\2\u01b8\u01b9\7\61\2\2\u01b9\u01bd\3\2\2\2\u01ba"+ + "\u01bc\13\2\2\2\u01bb\u01ba\3\2\2\2\u01bc\u01bf\3\2\2\2\u01bd\u01be\3"+ + "\2\2\2\u01bd\u01bb\3\2\2\2\u01be\u01c0\3\2\2\2\u01bf\u01bd\3\2\2\2\u01c0"+ + "\u01c1\7\f\2\2\u01c1\u01c2\3\2\2\2\u01c2\u01c3\bD\2\2\u01c3\u0088\3\2"+ + "\2\2\u01c4\u01c5\7\61\2\2\u01c5\u01c6\7,\2\2\u01c6\u01ca\3\2\2\2\u01c7"+ + "\u01c9\13\2\2\2\u01c8\u01c7\3\2\2\2\u01c9\u01cc\3\2\2\2\u01ca\u01cb\3"+ + "\2\2\2\u01ca\u01c8\3\2\2\2\u01cb\u01cd\3\2\2\2\u01cc\u01ca\3\2\2\2\u01cd"+ + "\u01ce\7,\2\2\u01ce\u01cf\7\61\2\2\u01cf\u01d0\3\2\2\2\u01d0\u01d1\bE"+ + "\2\2\u01d1\u008a\3\2\2\2\u01d2\u01d4\t\b\2\2\u01d3\u01d2\3\2\2\2\u01d4"+ + "\u01d5\3\2\2\2\u01d5\u01d3\3\2\2\2\u01d5\u01d6\3\2\2\2\u01d6\u01d7\3\2"+ + "\2\2\u01d7\u01d8\bF\2\2\u01d8\u008c\3\2\2\2\21\2\u012e\u013c\u0143\u0145"+ + "\u014f\u0151\u0154\u01a0\u01a7\u01a9\u01b2\u01bd\u01ca\u01d5\3\b\2\2"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/quint/src/generated/.antlr/QuintLexer.tokens b/quint/src/generated/.antlr/QuintLexer.tokens index 5f70a87a4..427758cd2 100644 --- a/quint/src/generated/.antlr/QuintLexer.tokens +++ b/quint/src/generated/.antlr/QuintLexer.tokens @@ -36,33 +36,33 @@ T__34=35 T__35=36 T__36=37 T__37=38 -STRING=39 -BOOL=40 -INT=41 -AND=42 -OR=43 -IFF=44 -IMPLIES=45 -SET=46 -LIST=47 -MAP=48 -MATCH=49 -PLUS=50 -MINUS=51 -MUL=52 -DIV=53 -MOD=54 -GT=55 -LT=56 -GE=57 -LE=58 -NE=59 -EQ=60 -ASGN=61 -LPAREN=62 -RPAREN=63 -IDENTIFIER=64 -SIMPLE_IDENTIFIER=65 +T__38=39 +STRING=40 +BOOL=41 +INT=42 +AND=43 +OR=44 +IFF=45 +IMPLIES=46 +SET=47 +LIST=48 +MAP=49 +MATCH=50 +PLUS=51 +MINUS=52 +MUL=53 +DIV=54 +MOD=55 +GT=56 +LT=57 +GE=58 +LE=59 +NE=60 +EQ=61 +ASGN=62 +LPAREN=63 +RPAREN=64 +IDENTIFIER=65 DOCCOMMENT=66 LINE_COMMENT=67 COMMENT=68 @@ -74,29 +74,29 @@ WS=69 ':'=5 'var'=6 'assume'=7 -'type'=8 -','=9 -';'=10 -'nondet'=11 -'val'=12 -'def'=13 -'pure'=14 -'action'=15 -'run'=16 -'temporal'=17 -'import'=18 -'.'=19 -'from'=20 -'as'=21 -'export'=22 -'->'=23 -'=>'=24 -'['=25 -']'=26 -'int'=27 -'str'=28 -'bool'=29 -'|'=30 +','=8 +';'=9 +'type'=10 +'|'=11 +'nondet'=12 +'val'=13 +'def'=14 +'pure'=15 +'action'=16 +'run'=17 +'temporal'=18 +'import'=19 +'.'=20 +'from'=21 +'as'=22 +'export'=23 +'->'=24 +'=>'=25 +'['=26 +']'=27 +'int'=28 +'str'=29 +'bool'=30 '^'=31 '\''=32 'all'=33 @@ -105,25 +105,26 @@ WS=69 'else'=36 '_'=37 '...'=38 -'and'=42 -'or'=43 -'iff'=44 -'implies'=45 -'Set'=46 -'List'=47 -'Map'=48 -'match'=49 -'+'=50 -'-'=51 -'*'=52 -'/'=53 -'%'=54 -'>'=55 -'<'=56 -'>='=57 -'<='=58 -'!='=59 -'=='=60 -'='=61 -'('=62 -')'=63 +'::'=39 +'and'=43 +'or'=44 +'iff'=45 +'implies'=46 +'Set'=47 +'List'=48 +'Map'=49 +'match'=50 +'+'=51 +'-'=52 +'*'=53 +'/'=54 +'%'=55 +'>'=56 +'<'=57 +'>='=58 +'<='=59 +'!='=60 +'=='=61 +'='=62 +'('=63 +')'=64 diff --git a/quint/src/generated/.antlr/QuintParser.java b/quint/src/generated/.antlr/QuintParser.java index 44a6cd250..694c26c66 100644 --- a/quint/src/generated/.antlr/QuintParser.java +++ b/quint/src/generated/.antlr/QuintParser.java @@ -1,4 +1,10 @@ // Generated from /home/gabriela/projects/quint/quint/src/generated/Quint.g4 by ANTLR 4.9.2 + + +// Used for forming errors +import { quintErrorToString } from '../quintError' + + import org.antlr.v4.runtime.atn.*; import org.antlr.v4.runtime.dfa.DFA; import org.antlr.v4.runtime.*; @@ -21,27 +27,29 @@ public class QuintParser extends Parser { T__17=18, T__18=19, T__19=20, T__20=21, T__21=22, T__22=23, T__23=24, T__24=25, T__25=26, T__26=27, T__27=28, T__28=29, T__29=30, T__30=31, T__31=32, T__32=33, T__33=34, T__34=35, T__35=36, T__36=37, T__37=38, - STRING=39, BOOL=40, INT=41, AND=42, OR=43, IFF=44, IMPLIES=45, SET=46, - LIST=47, MAP=48, MATCH=49, PLUS=50, MINUS=51, MUL=52, DIV=53, MOD=54, - GT=55, LT=56, GE=57, LE=58, NE=59, EQ=60, ASGN=61, LPAREN=62, RPAREN=63, - IDENTIFIER=64, SIMPLE_IDENTIFIER=65, DOCCOMMENT=66, LINE_COMMENT=67, COMMENT=68, + T__38=39, STRING=40, BOOL=41, INT=42, AND=43, OR=44, IFF=45, IMPLIES=46, + SET=47, LIST=48, MAP=49, MATCH=50, PLUS=51, MINUS=52, MUL=53, DIV=54, + MOD=55, GT=56, LT=57, GE=58, LE=59, NE=60, EQ=61, ASGN=62, LPAREN=63, + RPAREN=64, IDENTIFIER=65, DOCCOMMENT=66, LINE_COMMENT=67, COMMENT=68, WS=69; public static final int - RULE_modules = 0, RULE_module = 1, RULE_documentedUnit = 2, RULE_unit = 3, - RULE_operDef = 4, RULE_nondetOperDef = 5, RULE_qualifier = 6, RULE_importMod = 7, - RULE_exportMod = 8, RULE_instanceMod = 9, RULE_moduleName = 10, RULE_name = 11, - RULE_qualifiedName = 12, RULE_fromSource = 13, RULE_type = 14, RULE_typeUnionRecOne = 15, - RULE_row = 16, RULE_expr = 17, RULE_unitOrExpr = 18, RULE_lambda = 19, - RULE_identOrHole = 20, RULE_parameter = 21, RULE_identOrStar = 22, RULE_argList = 23, - RULE_recElem = 24, RULE_normalCallName = 25, RULE_nameAfterDot = 26, RULE_operator = 27, - RULE_literal = 28; + RULE_modules = 0, RULE_module = 1, RULE_documentedDeclaration = 2, RULE_declaration = 3, + RULE_operDef = 4, RULE_typeDef = 5, RULE_typeSumVariant = 6, RULE_nondetOperDef = 7, + RULE_qualifier = 8, RULE_importMod = 9, RULE_exportMod = 10, RULE_instanceMod = 11, + RULE_moduleName = 12, RULE_name = 13, RULE_qualifiedName = 14, RULE_fromSource = 15, + RULE_type = 16, RULE_typeUnionRecOne = 17, RULE_row = 18, RULE_rowLabel = 19, + RULE_expr = 20, RULE_declarationOrExpr = 21, RULE_lambda = 22, RULE_identOrHole = 23, + RULE_parameter = 24, RULE_identOrStar = 25, RULE_argList = 26, RULE_recElem = 27, + RULE_normalCallName = 28, RULE_nameAfterDot = 29, RULE_operator = 30, + RULE_literal = 31, RULE_qualId = 32, RULE_simpleId = 33; private static String[] makeRuleNames() { return new String[] { - "modules", "module", "documentedUnit", "unit", "operDef", "nondetOperDef", - "qualifier", "importMod", "exportMod", "instanceMod", "moduleName", "name", - "qualifiedName", "fromSource", "type", "typeUnionRecOne", "row", "expr", - "unitOrExpr", "lambda", "identOrHole", "parameter", "identOrStar", "argList", - "recElem", "normalCallName", "nameAfterDot", "operator", "literal" + "modules", "module", "documentedDeclaration", "declaration", "operDef", + "typeDef", "typeSumVariant", "nondetOperDef", "qualifier", "importMod", + "exportMod", "instanceMod", "moduleName", "name", "qualifiedName", "fromSource", + "type", "typeUnionRecOne", "row", "rowLabel", "expr", "declarationOrExpr", + "lambda", "identOrHole", "parameter", "identOrStar", "argList", "recElem", + "normalCallName", "nameAfterDot", "operator", "literal", "qualId", "simpleId" }; } public static final String[] ruleNames = makeRuleNames(); @@ -49,13 +57,13 @@ private static String[] makeRuleNames() { private static String[] makeLiteralNames() { return new String[] { null, "'module'", "'{'", "'}'", "'const'", "':'", "'var'", "'assume'", - "'type'", "','", "';'", "'nondet'", "'val'", "'def'", "'pure'", "'action'", - "'run'", "'temporal'", "'import'", "'.'", "'from'", "'as'", "'export'", - "'->'", "'=>'", "'['", "']'", "'int'", "'str'", "'bool'", "'|'", "'^'", - "'''", "'all'", "'any'", "'if'", "'else'", "'_'", "'...'", null, null, - null, "'and'", "'or'", "'iff'", "'implies'", "'Set'", "'List'", "'Map'", - "'match'", "'+'", "'-'", "'*'", "'/'", "'%'", "'>'", "'<'", "'>='", "'<='", - "'!='", "'=='", "'='", "'('", "')'" + "','", "';'", "'type'", "'|'", "'nondet'", "'val'", "'def'", "'pure'", + "'action'", "'run'", "'temporal'", "'import'", "'.'", "'from'", "'as'", + "'export'", "'->'", "'=>'", "'['", "']'", "'int'", "'str'", "'bool'", + "'^'", "'''", "'all'", "'any'", "'if'", "'else'", "'_'", "'...'", "'::'", + null, null, null, "'and'", "'or'", "'iff'", "'implies'", "'Set'", "'List'", + "'Map'", "'match'", "'+'", "'-'", "'*'", "'/'", "'%'", "'>'", "'<'", + "'>='", "'<='", "'!='", "'=='", "'='", "'('", "')'" }; } private static final String[] _LITERAL_NAMES = makeLiteralNames(); @@ -64,10 +72,10 @@ private static String[] makeSymbolicNames() { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, "STRING", "BOOL", "INT", "AND", "OR", "IFF", "IMPLIES", - "SET", "LIST", "MAP", "MATCH", "PLUS", "MINUS", "MUL", "DIV", "MOD", - "GT", "LT", "GE", "LE", "NE", "EQ", "ASGN", "LPAREN", "RPAREN", "IDENTIFIER", - "SIMPLE_IDENTIFIER", "DOCCOMMENT", "LINE_COMMENT", "COMMENT", "WS" + null, null, null, null, "STRING", "BOOL", "INT", "AND", "OR", "IFF", + "IMPLIES", "SET", "LIST", "MAP", "MATCH", "PLUS", "MINUS", "MUL", "DIV", + "MOD", "GT", "LT", "GE", "LE", "NE", "EQ", "ASGN", "LPAREN", "RPAREN", + "IDENTIFIER", "DOCCOMMENT", "LINE_COMMENT", "COMMENT", "WS" }; } private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); @@ -142,21 +150,21 @@ public final ModulesContext modules() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(59); + setState(69); _errHandler.sync(this); _la = _input.LA(1); do { { { - setState(58); + setState(68); module(); } } - setState(61); + setState(71); _errHandler.sync(this); _la = _input.LA(1); } while ( _la==T__0 || _la==DOCCOMMENT ); - setState(63); + setState(73); match(EOF); } } @@ -172,16 +180,18 @@ public final ModulesContext modules() throws RecognitionException { } public static class ModuleContext extends ParserRuleContext { - public TerminalNode IDENTIFIER() { return getToken(QuintParser.IDENTIFIER, 0); } + public QualIdContext qualId() { + return getRuleContext(QualIdContext.class,0); + } public List DOCCOMMENT() { return getTokens(QuintParser.DOCCOMMENT); } public TerminalNode DOCCOMMENT(int i) { return getToken(QuintParser.DOCCOMMENT, i); } - public List documentedUnit() { - return getRuleContexts(DocumentedUnitContext.class); + public List documentedDeclaration() { + return getRuleContexts(DocumentedDeclarationContext.class); } - public DocumentedUnitContext documentedUnit(int i) { - return getRuleContext(DocumentedUnitContext.class,i); + public DocumentedDeclarationContext documentedDeclaration(int i) { + return getRuleContext(DocumentedDeclarationContext.class,i); } public ModuleContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); @@ -196,41 +206,41 @@ public final ModuleContext module() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(68); + setState(78); _errHandler.sync(this); _la = _input.LA(1); while (_la==DOCCOMMENT) { { { - setState(65); + setState(75); match(DOCCOMMENT); } } - setState(70); + setState(80); _errHandler.sync(this); _la = _input.LA(1); } - setState(71); + setState(81); match(T__0); - setState(72); - match(IDENTIFIER); - setState(73); + setState(82); + qualId(); + setState(83); match(T__1); - setState(77); + setState(87); _errHandler.sync(this); _la = _input.LA(1); - while (((((_la - 4)) & ~0x3f) == 0 && ((1L << (_la - 4)) & ((1L << (T__3 - 4)) | (1L << (T__5 - 4)) | (1L << (T__6 - 4)) | (1L << (T__7 - 4)) | (1L << (T__11 - 4)) | (1L << (T__12 - 4)) | (1L << (T__13 - 4)) | (1L << (T__14 - 4)) | (1L << (T__15 - 4)) | (1L << (T__16 - 4)) | (1L << (T__17 - 4)) | (1L << (T__21 - 4)) | (1L << (DOCCOMMENT - 4)))) != 0)) { + while (((((_la - 4)) & ~0x3f) == 0 && ((1L << (_la - 4)) & ((1L << (T__3 - 4)) | (1L << (T__5 - 4)) | (1L << (T__6 - 4)) | (1L << (T__9 - 4)) | (1L << (T__12 - 4)) | (1L << (T__13 - 4)) | (1L << (T__14 - 4)) | (1L << (T__15 - 4)) | (1L << (T__16 - 4)) | (1L << (T__17 - 4)) | (1L << (T__18 - 4)) | (1L << (T__22 - 4)) | (1L << (DOCCOMMENT - 4)))) != 0)) { { { - setState(74); - documentedUnit(); + setState(84); + documentedDeclaration(); } } - setState(79); + setState(89); _errHandler.sync(this); _la = _input.LA(1); } - setState(80); + setState(90); match(T__2); } } @@ -245,43 +255,43 @@ public final ModuleContext module() throws RecognitionException { return _localctx; } - public static class DocumentedUnitContext extends ParserRuleContext { - public UnitContext unit() { - return getRuleContext(UnitContext.class,0); + public static class DocumentedDeclarationContext extends ParserRuleContext { + public DeclarationContext declaration() { + return getRuleContext(DeclarationContext.class,0); } public List DOCCOMMENT() { return getTokens(QuintParser.DOCCOMMENT); } public TerminalNode DOCCOMMENT(int i) { return getToken(QuintParser.DOCCOMMENT, i); } - public DocumentedUnitContext(ParserRuleContext parent, int invokingState) { + public DocumentedDeclarationContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } - @Override public int getRuleIndex() { return RULE_documentedUnit; } + @Override public int getRuleIndex() { return RULE_documentedDeclaration; } } - public final DocumentedUnitContext documentedUnit() throws RecognitionException { - DocumentedUnitContext _localctx = new DocumentedUnitContext(_ctx, getState()); - enterRule(_localctx, 4, RULE_documentedUnit); + public final DocumentedDeclarationContext documentedDeclaration() throws RecognitionException { + DocumentedDeclarationContext _localctx = new DocumentedDeclarationContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_documentedDeclaration); int _la; try { enterOuterAlt(_localctx, 1); { - setState(85); + setState(95); _errHandler.sync(this); _la = _input.LA(1); while (_la==DOCCOMMENT) { { { - setState(82); + setState(92); match(DOCCOMMENT); } } - setState(87); + setState(97); _errHandler.sync(this); _la = _input.LA(1); } - setState(88); - unit(); + setState(98); + declaration(); } } catch (RecognitionException re) { @@ -295,50 +305,60 @@ public final DocumentedUnitContext documentedUnit() throws RecognitionException return _localctx; } - public static class UnitContext extends ParserRuleContext { - public UnitContext(ParserRuleContext parent, int invokingState) { + public static class DeclarationContext extends ParserRuleContext { + public DeclarationContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } - @Override public int getRuleIndex() { return RULE_unit; } + @Override public int getRuleIndex() { return RULE_declaration; } - public UnitContext() { } - public void copyFrom(UnitContext ctx) { + public DeclarationContext() { } + public void copyFrom(DeclarationContext ctx) { super.copyFrom(ctx); } } - public static class ImportDefContext extends UnitContext { + public static class TypeDefsContext extends DeclarationContext { + public TypeDefContext typeDef() { + return getRuleContext(TypeDefContext.class,0); + } + public TypeDefsContext(DeclarationContext ctx) { copyFrom(ctx); } + } + public static class ImportDefContext extends DeclarationContext { public ImportModContext importMod() { return getRuleContext(ImportModContext.class,0); } - public ImportDefContext(UnitContext ctx) { copyFrom(ctx); } + public ImportDefContext(DeclarationContext ctx) { copyFrom(ctx); } } - public static class InstanceContext extends UnitContext { + public static class InstanceContext extends DeclarationContext { public InstanceModContext instanceMod() { return getRuleContext(InstanceModContext.class,0); } - public InstanceContext(UnitContext ctx) { copyFrom(ctx); } + public InstanceContext(DeclarationContext ctx) { copyFrom(ctx); } } - public static class ConstContext extends UnitContext { - public TerminalNode IDENTIFIER() { return getToken(QuintParser.IDENTIFIER, 0); } + public static class ConstContext extends DeclarationContext { + public QualIdContext qualId() { + return getRuleContext(QualIdContext.class,0); + } public TypeContext type() { return getRuleContext(TypeContext.class,0); } - public ConstContext(UnitContext ctx) { copyFrom(ctx); } + public ConstContext(DeclarationContext ctx) { copyFrom(ctx); } } - public static class VarContext extends UnitContext { - public TerminalNode IDENTIFIER() { return getToken(QuintParser.IDENTIFIER, 0); } + public static class VarContext extends DeclarationContext { + public QualIdContext qualId() { + return getRuleContext(QualIdContext.class,0); + } public TypeContext type() { return getRuleContext(TypeContext.class,0); } - public VarContext(UnitContext ctx) { copyFrom(ctx); } + public VarContext(DeclarationContext ctx) { copyFrom(ctx); } } - public static class OperContext extends UnitContext { + public static class OperContext extends DeclarationContext { public OperDefContext operDef() { return getRuleContext(OperDefContext.class,0); } - public OperContext(UnitContext ctx) { copyFrom(ctx); } + public OperContext(DeclarationContext ctx) { copyFrom(ctx); } } - public static class AssumeContext extends UnitContext { + public static class AssumeContext extends DeclarationContext { public IdentOrHoleContext identOrHole() { return getRuleContext(IdentOrHoleContext.class,0); } @@ -346,41 +366,33 @@ public IdentOrHoleContext identOrHole() { public ExprContext expr() { return getRuleContext(ExprContext.class,0); } - public AssumeContext(UnitContext ctx) { copyFrom(ctx); } - } - public static class TypedefContext extends UnitContext { - public TerminalNode IDENTIFIER() { return getToken(QuintParser.IDENTIFIER, 0); } - public TerminalNode ASGN() { return getToken(QuintParser.ASGN, 0); } - public TypeContext type() { - return getRuleContext(TypeContext.class,0); - } - public TypedefContext(UnitContext ctx) { copyFrom(ctx); } + public AssumeContext(DeclarationContext ctx) { copyFrom(ctx); } } - public static class ExportDefContext extends UnitContext { + public static class ExportDefContext extends DeclarationContext { public ExportModContext exportMod() { return getRuleContext(ExportModContext.class,0); } - public ExportDefContext(UnitContext ctx) { copyFrom(ctx); } + public ExportDefContext(DeclarationContext ctx) { copyFrom(ctx); } } - public final UnitContext unit() throws RecognitionException { - UnitContext _localctx = new UnitContext(_ctx, getState()); - enterRule(_localctx, 6, RULE_unit); + public final DeclarationContext declaration() throws RecognitionException { + DeclarationContext _localctx = new DeclarationContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_declaration); try { - setState(113); + setState(120); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,4,_ctx) ) { case 1: _localctx = new ConstContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(90); + setState(100); match(T__3); - setState(91); - match(IDENTIFIER); - setState(92); + setState(101); + qualId(); + setState(102); match(T__4); - setState(93); + setState(103); type(0); } break; @@ -388,13 +400,13 @@ public final UnitContext unit() throws RecognitionException { _localctx = new VarContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(94); + setState(105); match(T__5); - setState(95); - match(IDENTIFIER); - setState(96); + setState(106); + qualId(); + setState(107); match(T__4); - setState(97); + setState(108); type(0); } break; @@ -402,13 +414,13 @@ public final UnitContext unit() throws RecognitionException { _localctx = new AssumeContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(98); + setState(110); match(T__6); - setState(99); + setState(111); identOrHole(); - setState(100); + setState(112); match(ASGN); - setState(101); + setState(113); expr(0); } break; @@ -416,7 +428,7 @@ public final UnitContext unit() throws RecognitionException { _localctx = new InstanceContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(103); + setState(115); instanceMod(); } break; @@ -424,47 +436,31 @@ public final UnitContext unit() throws RecognitionException { _localctx = new OperContext(_localctx); enterOuterAlt(_localctx, 5); { - setState(104); + setState(116); operDef(); } break; case 6: - _localctx = new TypedefContext(_localctx); + _localctx = new TypeDefsContext(_localctx); enterOuterAlt(_localctx, 6); { - setState(105); - match(T__7); - setState(106); - match(IDENTIFIER); + setState(117); + typeDef(); } break; case 7: - _localctx = new TypedefContext(_localctx); - enterOuterAlt(_localctx, 7); - { - setState(107); - match(T__7); - setState(108); - match(IDENTIFIER); - setState(109); - match(ASGN); - setState(110); - type(0); - } - break; - case 8: _localctx = new ImportDefContext(_localctx); - enterOuterAlt(_localctx, 8); + enterOuterAlt(_localctx, 7); { - setState(111); + setState(118); importMod(); } break; - case 9: + case 8: _localctx = new ExportDefContext(_localctx); - enterOuterAlt(_localctx, 9); + enterOuterAlt(_localctx, 8); { - setState(112); + setState(119); exportMod(); } break; @@ -519,53 +515,53 @@ public final OperDefContext operDef() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(115); + setState(122); qualifier(); - setState(116); + setState(123); normalCallName(); - setState(153); + setState(160); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,9,_ctx) ) { case 1: { - setState(117); + setState(124); match(LPAREN); - setState(126); + setState(133); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__36 || _la==IDENTIFIER) { { - setState(118); + setState(125); parameter(); - setState(123); + setState(130); _errHandler.sync(this); _la = _input.LA(1); - while (_la==T__8) { + while (_la==T__7) { { { - setState(119); - match(T__8); - setState(120); + setState(126); + match(T__7); + setState(127); parameter(); } } - setState(125); + setState(132); _errHandler.sync(this); _la = _input.LA(1); } } } - setState(128); + setState(135); match(RPAREN); - setState(131); + setState(138); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__4) { { - setState(129); + setState(136); match(T__4); - setState(130); + setState(137); type(0); } } @@ -574,72 +570,251 @@ public final OperDefContext operDef() throws RecognitionException { break; case 2: { - setState(133); + setState(140); match(T__4); - setState(134); + setState(141); type(0); } break; case 3: { - setState(135); + setState(142); match(LPAREN); { - setState(136); + setState(143); parameter(); - setState(137); + setState(144); match(T__4); - setState(138); + setState(145); type(0); - setState(146); + setState(153); _errHandler.sync(this); _la = _input.LA(1); - while (_la==T__8) { + while (_la==T__7) { { { - setState(139); - match(T__8); - setState(140); + setState(146); + match(T__7); + setState(147); parameter(); - setState(141); + setState(148); match(T__4); - setState(142); + setState(149); type(0); } } - setState(148); + setState(155); _errHandler.sync(this); _la = _input.LA(1); } } - setState(149); + setState(156); match(RPAREN); - setState(150); + setState(157); match(T__4); - setState(151); + setState(158); type(0); } break; } - setState(157); + setState(164); _errHandler.sync(this); _la = _input.LA(1); if (_la==ASGN) { { - setState(155); + setState(162); match(ASGN); - setState(156); + setState(163); expr(0); } } - setState(160); + setState(167); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__9) { + if (_la==T__8) { { - setState(159); + setState(166); + match(T__8); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeDefContext extends ParserRuleContext { + public TypeDefContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeDef; } + + public TypeDefContext() { } + public void copyFrom(TypeDefContext ctx) { + super.copyFrom(ctx); + } + } + public static class TypeAliasDefContext extends TypeDefContext { + public QualIdContext qualId() { + return getRuleContext(QualIdContext.class,0); + } + public TerminalNode ASGN() { return getToken(QuintParser.ASGN, 0); } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public TypeAliasDefContext(TypeDefContext ctx) { copyFrom(ctx); } + } + public static class TypeAbstractDefContext extends TypeDefContext { + public QualIdContext qualId() { + return getRuleContext(QualIdContext.class,0); + } + public TypeAbstractDefContext(TypeDefContext ctx) { copyFrom(ctx); } + } + public static class TypeSumDefContext extends TypeDefContext { + public QualIdContext typeName; + public TerminalNode ASGN() { return getToken(QuintParser.ASGN, 0); } + public List typeSumVariant() { + return getRuleContexts(TypeSumVariantContext.class); + } + public TypeSumVariantContext typeSumVariant(int i) { + return getRuleContext(TypeSumVariantContext.class,i); + } + public QualIdContext qualId() { + return getRuleContext(QualIdContext.class,0); + } + public TypeSumDefContext(TypeDefContext ctx) { copyFrom(ctx); } + } + + public final TypeDefContext typeDef() throws RecognitionException { + TypeDefContext _localctx = new TypeDefContext(_ctx, getState()); + enterRule(_localctx, 10, RULE_typeDef); + int _la; + try { + setState(190); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) { + case 1: + _localctx = new TypeAbstractDefContext(_localctx); + enterOuterAlt(_localctx, 1); + { + setState(169); + match(T__9); + setState(170); + qualId(); + } + break; + case 2: + _localctx = new TypeAliasDefContext(_localctx); + enterOuterAlt(_localctx, 2); + { + setState(171); match(T__9); + setState(172); + qualId(); + setState(173); + match(ASGN); + setState(174); + type(0); + } + break; + case 3: + _localctx = new TypeSumDefContext(_localctx); + enterOuterAlt(_localctx, 3); + { + setState(176); + match(T__9); + setState(177); + ((TypeSumDefContext)_localctx).typeName = qualId(); + setState(178); + match(ASGN); + setState(180); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==T__10) { + { + setState(179); + match(T__10); + } + } + + setState(182); + typeSumVariant(); + setState(187); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==T__10) { + { + { + setState(183); + match(T__10); + setState(184); + typeSumVariant(); + } + } + setState(189); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeSumVariantContext extends ParserRuleContext { + public SimpleIdContext sumLabel; + public SimpleIdContext simpleId() { + return getRuleContext(SimpleIdContext.class,0); + } + public TerminalNode LPAREN() { return getToken(QuintParser.LPAREN, 0); } + public TypeContext type() { + return getRuleContext(TypeContext.class,0); + } + public TerminalNode RPAREN() { return getToken(QuintParser.RPAREN, 0); } + public TypeSumVariantContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeSumVariant; } + } + + public final TypeSumVariantContext typeSumVariant() throws RecognitionException { + TypeSumVariantContext _localctx = new TypeSumVariantContext(_ctx, getState()); + enterRule(_localctx, 12, RULE_typeSumVariant); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(192); + ((TypeSumVariantContext)_localctx).sumLabel = simpleId("variant label"); + setState(197); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==LPAREN) { + { + setState(193); + match(LPAREN); + setState(194); + type(0); + setState(195); + match(RPAREN); } } @@ -657,7 +832,9 @@ public final OperDefContext operDef() throws RecognitionException { } public static class NondetOperDefContext extends ParserRuleContext { - public TerminalNode IDENTIFIER() { return getToken(QuintParser.IDENTIFIER, 0); } + public QualIdContext qualId() { + return getRuleContext(QualIdContext.class,0); + } public TerminalNode ASGN() { return getToken(QuintParser.ASGN, 0); } public ExprContext expr() { return getRuleContext(ExprContext.class,0); @@ -673,38 +850,38 @@ public NondetOperDefContext(ParserRuleContext parent, int invokingState) { public final NondetOperDefContext nondetOperDef() throws RecognitionException { NondetOperDefContext _localctx = new NondetOperDefContext(_ctx, getState()); - enterRule(_localctx, 10, RULE_nondetOperDef); + enterRule(_localctx, 14, RULE_nondetOperDef); int _la; try { enterOuterAlt(_localctx, 1); { - setState(162); - match(T__10); - setState(163); - match(IDENTIFIER); - setState(166); + setState(199); + match(T__11); + setState(200); + qualId(); + setState(203); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__4) { { - setState(164); + setState(201); match(T__4); - setState(165); + setState(202); type(0); } } - setState(168); + setState(205); match(ASGN); - setState(169); + setState(206); expr(0); - setState(171); + setState(208); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__9) { + if (_la==T__8) { { - setState(170); - match(T__9); + setState(207); + match(T__8); } } @@ -730,62 +907,62 @@ public QualifierContext(ParserRuleContext parent, int invokingState) { public final QualifierContext qualifier() throws RecognitionException { QualifierContext _localctx = new QualifierContext(_ctx, getState()); - enterRule(_localctx, 12, RULE_qualifier); + enterRule(_localctx, 16, RULE_qualifier); try { - setState(182); + setState(219); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,18,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(173); - match(T__11); + setState(210); + match(T__12); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(174); - match(T__12); + setState(211); + match(T__13); } break; case 3: enterOuterAlt(_localctx, 3); { - setState(175); - match(T__13); - setState(176); - match(T__11); + setState(212); + match(T__14); + setState(213); + match(T__12); } break; case 4: enterOuterAlt(_localctx, 4); { - setState(177); + setState(214); + match(T__14); + setState(215); match(T__13); - setState(178); - match(T__12); } break; case 5: enterOuterAlt(_localctx, 5); { - setState(179); - match(T__14); + setState(216); + match(T__15); } break; case 6: enterOuterAlt(_localctx, 6); { - setState(180); - match(T__15); + setState(217); + match(T__16); } break; case 7: enterOuterAlt(_localctx, 7); { - setState(181); - match(T__16); + setState(218); + match(T__17); } break; } @@ -822,31 +999,31 @@ public ImportModContext(ParserRuleContext parent, int invokingState) { public final ImportModContext importMod() throws RecognitionException { ImportModContext _localctx = new ImportModContext(_ctx, getState()); - enterRule(_localctx, 14, RULE_importMod); + enterRule(_localctx, 18, RULE_importMod); int _la; try { - setState(202); + setState(239); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,18,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,22,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(184); - match(T__17); - setState(185); - name(); - setState(186); + setState(221); match(T__18); - setState(187); + setState(222); + name(); + setState(223); + match(T__19); + setState(224); identOrStar(); - setState(190); + setState(227); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__19) { + if (_la==T__20) { { - setState(188); - match(T__19); - setState(189); + setState(225); + match(T__20); + setState(226); fromSource(); } } @@ -856,30 +1033,30 @@ public final ImportModContext importMod() throws RecognitionException { case 2: enterOuterAlt(_localctx, 2); { - setState(192); - match(T__17); - setState(193); + setState(229); + match(T__18); + setState(230); name(); - setState(196); + setState(233); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__20) { + if (_la==T__21) { { - setState(194); - match(T__20); - setState(195); + setState(231); + match(T__21); + setState(232); name(); } } - setState(200); + setState(237); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__19) { + if (_la==T__20) { { - setState(198); - match(T__19); - setState(199); + setState(235); + match(T__20); + setState(236); fromSource(); } } @@ -917,40 +1094,40 @@ public ExportModContext(ParserRuleContext parent, int invokingState) { public final ExportModContext exportMod() throws RecognitionException { ExportModContext _localctx = new ExportModContext(_ctx, getState()); - enterRule(_localctx, 16, RULE_exportMod); + enterRule(_localctx, 20, RULE_exportMod); int _la; try { - setState(215); + setState(252); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,20,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,24,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(204); - match(T__21); - setState(205); + setState(241); + match(T__22); + setState(242); name(); - setState(206); - match(T__18); - setState(207); + setState(243); + match(T__19); + setState(244); identOrStar(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(209); - match(T__21); - setState(210); + setState(246); + match(T__22); + setState(247); name(); - setState(213); + setState(250); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__20) { + if (_la==T__21) { { - setState(211); - match(T__20); - setState(212); + setState(248); + match(T__21); + setState(249); name(); } } @@ -1007,63 +1184,63 @@ public InstanceModContext(ParserRuleContext parent, int invokingState) { public final InstanceModContext instanceMod() throws RecognitionException { InstanceModContext _localctx = new InstanceModContext(_ctx, getState()); - enterRule(_localctx, 18, RULE_instanceMod); + enterRule(_localctx, 22, RULE_instanceMod); int _la; try { - setState(263); + setState(300); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,25,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,29,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(217); - match(T__17); - setState(218); + setState(254); + match(T__18); + setState(255); moduleName(); - setState(219); + setState(256); match(LPAREN); { - setState(220); + setState(257); name(); - setState(221); + setState(258); match(ASGN); - setState(222); + setState(259); expr(0); - setState(230); + setState(267); _errHandler.sync(this); _la = _input.LA(1); - while (_la==T__8) { + while (_la==T__7) { { { - setState(223); - match(T__8); - setState(224); + setState(260); + match(T__7); + setState(261); name(); - setState(225); + setState(262); match(ASGN); - setState(226); + setState(263); expr(0); } } - setState(232); + setState(269); _errHandler.sync(this); _la = _input.LA(1); } } - setState(233); + setState(270); match(RPAREN); - setState(234); - match(T__18); - setState(235); + setState(271); + match(T__19); + setState(272); match(MUL); - setState(238); + setState(275); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__19) { + if (_la==T__20) { { - setState(236); - match(T__19); - setState(237); + setState(273); + match(T__20); + setState(274); fromSource(); } } @@ -1073,54 +1250,54 @@ public final InstanceModContext instanceMod() throws RecognitionException { case 2: enterOuterAlt(_localctx, 2); { - setState(240); - match(T__17); - setState(241); + setState(277); + match(T__18); + setState(278); moduleName(); - setState(242); + setState(279); match(LPAREN); { - setState(243); + setState(280); name(); - setState(244); + setState(281); match(ASGN); - setState(245); + setState(282); expr(0); - setState(253); + setState(290); _errHandler.sync(this); _la = _input.LA(1); - while (_la==T__8) { + while (_la==T__7) { { { - setState(246); - match(T__8); - setState(247); + setState(283); + match(T__7); + setState(284); name(); - setState(248); + setState(285); match(ASGN); - setState(249); + setState(286); expr(0); } } - setState(255); + setState(292); _errHandler.sync(this); _la = _input.LA(1); } } - setState(256); + setState(293); match(RPAREN); - setState(257); - match(T__20); - setState(258); + setState(294); + match(T__21); + setState(295); qualifiedName(); - setState(261); + setState(298); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__19) { + if (_la==T__20) { { - setState(259); - match(T__19); - setState(260); + setState(296); + match(T__20); + setState(297); fromSource(); } } @@ -1141,7 +1318,9 @@ public final InstanceModContext instanceMod() throws RecognitionException { } public static class ModuleNameContext extends ParserRuleContext { - public TerminalNode IDENTIFIER() { return getToken(QuintParser.IDENTIFIER, 0); } + public QualIdContext qualId() { + return getRuleContext(QualIdContext.class,0); + } public ModuleNameContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -1150,12 +1329,12 @@ public ModuleNameContext(ParserRuleContext parent, int invokingState) { public final ModuleNameContext moduleName() throws RecognitionException { ModuleNameContext _localctx = new ModuleNameContext(_ctx, getState()); - enterRule(_localctx, 20, RULE_moduleName); + enterRule(_localctx, 24, RULE_moduleName); try { enterOuterAlt(_localctx, 1); { - setState(265); - match(IDENTIFIER); + setState(302); + qualId(); } } catch (RecognitionException re) { @@ -1170,7 +1349,9 @@ public final ModuleNameContext moduleName() throws RecognitionException { } public static class NameContext extends ParserRuleContext { - public TerminalNode IDENTIFIER() { return getToken(QuintParser.IDENTIFIER, 0); } + public QualIdContext qualId() { + return getRuleContext(QualIdContext.class,0); + } public NameContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -1179,12 +1360,12 @@ public NameContext(ParserRuleContext parent, int invokingState) { public final NameContext name() throws RecognitionException { NameContext _localctx = new NameContext(_ctx, getState()); - enterRule(_localctx, 22, RULE_name); + enterRule(_localctx, 26, RULE_name); try { enterOuterAlt(_localctx, 1); { - setState(267); - match(IDENTIFIER); + setState(304); + qualId(); } } catch (RecognitionException re) { @@ -1199,7 +1380,9 @@ public final NameContext name() throws RecognitionException { } public static class QualifiedNameContext extends ParserRuleContext { - public TerminalNode IDENTIFIER() { return getToken(QuintParser.IDENTIFIER, 0); } + public QualIdContext qualId() { + return getRuleContext(QualIdContext.class,0); + } public QualifiedNameContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -1208,12 +1391,12 @@ public QualifiedNameContext(ParserRuleContext parent, int invokingState) { public final QualifiedNameContext qualifiedName() throws RecognitionException { QualifiedNameContext _localctx = new QualifiedNameContext(_ctx, getState()); - enterRule(_localctx, 24, RULE_qualifiedName); + enterRule(_localctx, 28, RULE_qualifiedName); try { enterOuterAlt(_localctx, 1); { - setState(269); - match(IDENTIFIER); + setState(306); + qualId(); } } catch (RecognitionException re) { @@ -1237,11 +1420,11 @@ public FromSourceContext(ParserRuleContext parent, int invokingState) { public final FromSourceContext fromSource() throws RecognitionException { FromSourceContext _localctx = new FromSourceContext(_ctx, getState()); - enterRule(_localctx, 26, RULE_fromSource); + enterRule(_localctx, 30, RULE_fromSource); try { enterOuterAlt(_localctx, 1); { - setState(271); + setState(308); match(STRING); } } @@ -1318,7 +1501,9 @@ public TypeContext type(int i) { public TypeOperContext(TypeContext ctx) { copyFrom(ctx); } } public static class TypeConstOrVarContext extends TypeContext { - public TerminalNode IDENTIFIER() { return getToken(QuintParser.IDENTIFIER, 0); } + public QualIdContext qualId() { + return getRuleContext(QualIdContext.class,0); + } public TypeConstOrVarContext(TypeContext ctx) { copyFrom(ctx); } } public static class TypeParenContext extends TypeContext { @@ -1358,67 +1543,67 @@ private TypeContext type(int _p) throws RecognitionException { int _parentState = getState(); TypeContext _localctx = new TypeContext(_ctx, _parentState); TypeContext _prevctx = _localctx; - int _startState = 28; - enterRecursionRule(_localctx, 28, RULE_type, _p); + int _startState = 32; + enterRecursionRule(_localctx, 32, RULE_type, _p); int _la; try { int _alt; enterOuterAlt(_localctx, 1); { - setState(334); + setState(371); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,32,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) { case 1: { _localctx = new TypeOperContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(274); + setState(311); match(LPAREN); - setState(283); + setState(320); _errHandler.sync(this); _la = _input.LA(1); - if (((((_la - 2)) & ~0x3f) == 0 && ((1L << (_la - 2)) & ((1L << (T__1 - 2)) | (1L << (T__26 - 2)) | (1L << (T__27 - 2)) | (1L << (T__28 - 2)) | (1L << (T__29 - 2)) | (1L << (SET - 2)) | (1L << (LIST - 2)) | (1L << (LPAREN - 2)) | (1L << (IDENTIFIER - 2)))) != 0)) { + if (((((_la - 2)) & ~0x3f) == 0 && ((1L << (_la - 2)) & ((1L << (T__1 - 2)) | (1L << (T__10 - 2)) | (1L << (T__27 - 2)) | (1L << (T__28 - 2)) | (1L << (T__29 - 2)) | (1L << (SET - 2)) | (1L << (LIST - 2)) | (1L << (LPAREN - 2)) | (1L << (IDENTIFIER - 2)))) != 0)) { { - setState(275); + setState(312); type(0); - setState(280); + setState(317); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,26,_ctx); + _alt = getInterpreter().adaptivePredict(_input,30,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(276); - match(T__8); - setState(277); + setState(313); + match(T__7); + setState(314); type(0); } } } - setState(282); + setState(319); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,26,_ctx); + _alt = getInterpreter().adaptivePredict(_input,30,_ctx); } } } - setState(286); + setState(323); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__8) { + if (_la==T__7) { { - setState(285); - match(T__8); + setState(322); + match(T__7); } } - setState(288); + setState(325); match(RPAREN); - setState(289); - match(T__23); - setState(290); + setState(326); + match(T__24); + setState(327); type(11); } break; @@ -1427,14 +1612,14 @@ private TypeContext type(int _p) throws RecognitionException { _localctx = new TypeSetContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(291); + setState(328); match(SET); - setState(292); - match(T__24); - setState(293); - type(0); - setState(294); + setState(329); match(T__25); + setState(330); + type(0); + setState(331); + match(T__26); } break; case 3: @@ -1442,14 +1627,14 @@ private TypeContext type(int _p) throws RecognitionException { _localctx = new TypeListContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(296); + setState(333); match(LIST); - setState(297); - match(T__24); - setState(298); - type(0); - setState(299); + setState(334); match(T__25); + setState(335); + type(0); + setState(336); + match(T__26); } break; case 4: @@ -1457,43 +1642,43 @@ private TypeContext type(int _p) throws RecognitionException { _localctx = new TypeTupleContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(301); + setState(338); match(LPAREN); - setState(302); + setState(339); type(0); - setState(303); - match(T__8); - setState(304); + setState(340); + match(T__7); + setState(341); type(0); - setState(309); + setState(346); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,29,_ctx); + _alt = getInterpreter().adaptivePredict(_input,33,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(305); - match(T__8); - setState(306); + setState(342); + match(T__7); + setState(343); type(0); } } } - setState(311); + setState(348); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,29,_ctx); + _alt = getInterpreter().adaptivePredict(_input,33,_ctx); } - setState(313); + setState(350); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__8) { + if (_la==T__7) { { - setState(312); - match(T__8); + setState(349); + match(T__7); } } - setState(315); + setState(352); match(RPAREN); } break; @@ -1502,11 +1687,11 @@ private TypeContext type(int _p) throws RecognitionException { _localctx = new TypeRecContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(317); + setState(354); match(T__1); - setState(318); + setState(355); row(); - setState(319); + setState(356); match(T__2); } break; @@ -1515,7 +1700,7 @@ private TypeContext type(int _p) throws RecognitionException { _localctx = new TypeUnionRecContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(322); + setState(359); _errHandler.sync(this); _alt = 1; do { @@ -1523,7 +1708,7 @@ private TypeContext type(int _p) throws RecognitionException { case 1: { { - setState(321); + setState(358); typeUnionRecOne(); } } @@ -1531,9 +1716,9 @@ private TypeContext type(int _p) throws RecognitionException { default: throw new NoViableAltException(this); } - setState(324); + setState(361); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,31,_ctx); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); } break; @@ -1542,8 +1727,8 @@ private TypeContext type(int _p) throws RecognitionException { _localctx = new TypeIntContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(326); - match(T__26); + setState(363); + match(T__27); } break; case 8: @@ -1551,8 +1736,8 @@ private TypeContext type(int _p) throws RecognitionException { _localctx = new TypeStrContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(327); - match(T__27); + setState(364); + match(T__28); } break; case 9: @@ -1560,8 +1745,8 @@ private TypeContext type(int _p) throws RecognitionException { _localctx = new TypeBoolContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(328); - match(T__28); + setState(365); + match(T__29); } break; case 10: @@ -1569,8 +1754,8 @@ private TypeContext type(int _p) throws RecognitionException { _localctx = new TypeConstOrVarContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(329); - match(IDENTIFIER); + setState(366); + qualId(); } break; case 11: @@ -1578,36 +1763,36 @@ private TypeContext type(int _p) throws RecognitionException { _localctx = new TypeParenContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(330); + setState(367); match(LPAREN); - setState(331); + setState(368); type(0); - setState(332); + setState(369); match(RPAREN); } break; } _ctx.stop = _input.LT(-1); - setState(344); + setState(381); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,34,_ctx); + _alt = getInterpreter().adaptivePredict(_input,38,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(342); + setState(379); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) { case 1: { _localctx = new TypeFunContext(new TypeContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_type); - setState(336); + setState(373); if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); - setState(337); - match(T__22); - setState(338); + setState(374); + match(T__23); + setState(375); type(13); } break; @@ -1615,20 +1800,20 @@ private TypeContext type(int _p) throws RecognitionException { { _localctx = new TypeOperContext(new TypeContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_type); - setState(339); + setState(376); if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); - setState(340); - match(T__23); - setState(341); + setState(377); + match(T__24); + setState(378); type(12); } break; } } } - setState(346); + setState(383); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,34,_ctx); + _alt = getInterpreter().adaptivePredict(_input,38,_ctx); } } } @@ -1644,7 +1829,9 @@ private TypeContext type(int _p) throws RecognitionException { } public static class TypeUnionRecOneContext extends ParserRuleContext { - public TerminalNode IDENTIFIER() { return getToken(QuintParser.IDENTIFIER, 0); } + public QualIdContext qualId() { + return getRuleContext(QualIdContext.class,0); + } public TerminalNode STRING() { return getToken(QuintParser.STRING, 0); } public RowContext row() { return getRuleContext(RowContext.class,0); @@ -1657,44 +1844,44 @@ public TypeUnionRecOneContext(ParserRuleContext parent, int invokingState) { public final TypeUnionRecOneContext typeUnionRecOne() throws RecognitionException { TypeUnionRecOneContext _localctx = new TypeUnionRecOneContext(_ctx, getState()); - enterRule(_localctx, 30, RULE_typeUnionRecOne); + enterRule(_localctx, 34, RULE_typeUnionRecOne); int _la; try { enterOuterAlt(_localctx, 1); { - setState(347); - match(T__29); - setState(348); + setState(384); + match(T__10); + setState(385); match(T__1); - setState(349); - match(IDENTIFIER); - setState(350); + setState(386); + qualId(); + setState(387); match(T__4); - setState(351); + setState(388); match(STRING); - setState(354); + setState(391); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,35,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,39,_ctx) ) { case 1: { - setState(352); - match(T__8); - setState(353); + setState(389); + match(T__7); + setState(390); row(); } break; } - setState(357); + setState(394); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__8) { + if (_la==T__7) { { - setState(356); - match(T__8); + setState(393); + match(T__7); } } - setState(359); + setState(396); match(T__2); } } @@ -1710,9 +1897,12 @@ public final TypeUnionRecOneContext typeUnionRecOne() throws RecognitionExceptio } public static class RowContext extends ParserRuleContext { - public List IDENTIFIER() { return getTokens(QuintParser.IDENTIFIER); } - public TerminalNode IDENTIFIER(int i) { - return getToken(QuintParser.IDENTIFIER, i); + public Token rowVar; + public List rowLabel() { + return getRuleContexts(RowLabelContext.class); + } + public RowLabelContext rowLabel(int i) { + return getRuleContext(RowLabelContext.class,i); } public List type() { return getRuleContexts(TypeContext.class); @@ -1720,6 +1910,7 @@ public List type() { public TypeContext type(int i) { return getRuleContext(TypeContext.class,i); } + public TerminalNode IDENTIFIER() { return getToken(QuintParser.IDENTIFIER, 0); } public RowContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -1728,72 +1919,69 @@ public RowContext(ParserRuleContext parent, int invokingState) { public final RowContext row() throws RecognitionException { RowContext _localctx = new RowContext(_ctx, getState()); - enterRule(_localctx, 32, RULE_row); + enterRule(_localctx, 36, RULE_row); int _la; try { int _alt; - setState(385); + setState(421); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,40,_ctx) ) { - case 1: + switch (_input.LA(1)) { + case T__2: + case T__7: + case IDENTIFIER: enterOuterAlt(_localctx, 1); { - } - break; - case 2: - enterOuterAlt(_localctx, 2); - { - setState(369); + setState(405); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,37,_ctx); + _alt = getInterpreter().adaptivePredict(_input,41,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(362); - match(IDENTIFIER); - setState(363); + setState(398); + rowLabel(); + setState(399); match(T__4); - setState(364); + setState(400); type(0); - setState(365); - match(T__8); + setState(401); + match(T__7); } } } - setState(371); + setState(407); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,37,_ctx); + _alt = getInterpreter().adaptivePredict(_input,41,_ctx); } - setState(381); + setState(417); _errHandler.sync(this); _la = _input.LA(1); if (_la==IDENTIFIER) { { { - setState(372); - match(IDENTIFIER); - setState(373); + setState(408); + rowLabel(); + setState(409); match(T__4); - setState(374); + setState(410); type(0); } - setState(379); + setState(415); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,38,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,42,_ctx) ) { case 1: { - setState(376); - match(T__8); + setState(412); + match(T__7); } break; case 2: { - setState(377); - match(T__29); + setState(413); + match(T__10); { - setState(378); - match(IDENTIFIER); + setState(414); + ((RowContext)_localctx).rowVar = match(IDENTIFIER); } } break; @@ -1803,17 +1991,50 @@ public final RowContext row() throws RecognitionException { } break; - case 3: - enterOuterAlt(_localctx, 3); + case T__10: + enterOuterAlt(_localctx, 2); { - setState(383); - match(T__29); + setState(419); + match(T__10); { - setState(384); - match(IDENTIFIER); + setState(420); + ((RowContext)_localctx).rowVar = match(IDENTIFIER); } } break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RowLabelContext extends ParserRuleContext { + public SimpleIdContext simpleId() { + return getRuleContext(SimpleIdContext.class,0); + } + public RowLabelContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_rowLabel; } + } + + public final RowLabelContext rowLabel() throws RecognitionException { + RowLabelContext _localctx = new RowLabelContext(_ctx, getState()); + enterRule(_localctx, 38, RULE_rowLabel); + try { + enterOuterAlt(_localctx, 1); + { + setState(423); + simpleId("record"); } } catch (RecognitionException re) { @@ -2081,7 +2302,9 @@ public ExprContext expr(int i) { public PairContext(ExprContext ctx) { copyFrom(ctx); } } public static class AsgnContext extends ExprContext { - public TerminalNode IDENTIFIER() { return getToken(QuintParser.IDENTIFIER, 0); } + public QualIdContext qualId() { + return getRuleContext(QualIdContext.class,0); + } public TerminalNode ASGN() { return getToken(QuintParser.ASGN, 0); } public ExprContext expr() { return getRuleContext(ExprContext.class,0); @@ -2089,7 +2312,9 @@ public ExprContext expr() { public AsgnContext(ExprContext ctx) { copyFrom(ctx); } } public static class LiteralOrIdContext extends ExprContext { - public TerminalNode IDENTIFIER() { return getToken(QuintParser.IDENTIFIER, 0); } + public QualIdContext qualId() { + return getRuleContext(QualIdContext.class,0); + } public TerminalNode INT() { return getToken(QuintParser.INT, 0); } public TerminalNode BOOL() { return getToken(QuintParser.BOOL, 0); } public TerminalNode STRING() { return getToken(QuintParser.STRING, 0); } @@ -2150,23 +2375,23 @@ private ExprContext expr(int _p) throws RecognitionException { int _parentState = getState(); ExprContext _localctx = new ExprContext(_ctx, _parentState); ExprContext _prevctx = _localctx; - int _startState = 34; - enterRecursionRule(_localctx, 34, RULE_expr, _p); + int _startState = 40; + enterRecursionRule(_localctx, 40, RULE_expr, _p); int _la; try { int _alt; enterOuterAlt(_localctx, 1); { - setState(530); + setState(574); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,57,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,62,_ctx) ) { case 1: { _localctx = new LambdaConsContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(388); + setState(426); lambda(); } break; @@ -2175,21 +2400,21 @@ private ExprContext expr(int _p) throws RecognitionException { _localctx = new OperAppContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(389); + setState(427); normalCallName(); - setState(390); + setState(428); match(LPAREN); - setState(392); + setState(430); _errHandler.sync(this); _la = _input.LA(1); - if (((((_la - 2)) & ~0x3f) == 0 && ((1L << (_la - 2)) & ((1L << (T__1 - 2)) | (1L << (T__10 - 2)) | (1L << (T__11 - 2)) | (1L << (T__12 - 2)) | (1L << (T__13 - 2)) | (1L << (T__14 - 2)) | (1L << (T__15 - 2)) | (1L << (T__16 - 2)) | (1L << (T__24 - 2)) | (1L << (T__32 - 2)) | (1L << (T__33 - 2)) | (1L << (T__34 - 2)) | (1L << (T__36 - 2)) | (1L << (STRING - 2)) | (1L << (BOOL - 2)) | (1L << (INT - 2)) | (1L << (AND - 2)) | (1L << (OR - 2)) | (1L << (IFF - 2)) | (1L << (IMPLIES - 2)) | (1L << (SET - 2)) | (1L << (LIST - 2)) | (1L << (MAP - 2)) | (1L << (MINUS - 2)) | (1L << (LPAREN - 2)) | (1L << (IDENTIFIER - 2)))) != 0)) { + if (((((_la - 2)) & ~0x3f) == 0 && ((1L << (_la - 2)) & ((1L << (T__1 - 2)) | (1L << (T__11 - 2)) | (1L << (T__12 - 2)) | (1L << (T__13 - 2)) | (1L << (T__14 - 2)) | (1L << (T__15 - 2)) | (1L << (T__16 - 2)) | (1L << (T__17 - 2)) | (1L << (T__25 - 2)) | (1L << (T__32 - 2)) | (1L << (T__33 - 2)) | (1L << (T__34 - 2)) | (1L << (T__36 - 2)) | (1L << (STRING - 2)) | (1L << (BOOL - 2)) | (1L << (INT - 2)) | (1L << (AND - 2)) | (1L << (OR - 2)) | (1L << (IFF - 2)) | (1L << (IMPLIES - 2)) | (1L << (SET - 2)) | (1L << (LIST - 2)) | (1L << (MAP - 2)) | (1L << (MINUS - 2)) | (1L << (LPAREN - 2)) | (1L << (IDENTIFIER - 2)))) != 0)) { { - setState(391); + setState(429); argList(); } } - setState(394); + setState(432); match(RPAREN); } break; @@ -2198,9 +2423,9 @@ private ExprContext expr(int _p) throws RecognitionException { _localctx = new UminusContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(396); + setState(434); match(MINUS); - setState(397); + setState(435); expr(25); } break; @@ -2209,13 +2434,13 @@ private ExprContext expr(int _p) throws RecognitionException { _localctx = new AsgnContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(398); - match(IDENTIFIER); - setState(399); + setState(436); + qualId(); + setState(437); match(T__31); - setState(400); + setState(438); match(ASGN); - setState(401); + setState(439); expr(21); } break; @@ -2224,41 +2449,41 @@ private ExprContext expr(int _p) throws RecognitionException { _localctx = new AndExprContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(402); + setState(441); match(AND); - setState(403); + setState(442); match(T__1); - setState(404); + setState(443); expr(0); - setState(409); + setState(448); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,42,_ctx); + _alt = getInterpreter().adaptivePredict(_input,46,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(405); - match(T__8); - setState(406); + setState(444); + match(T__7); + setState(445); expr(0); } } } - setState(411); + setState(450); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,42,_ctx); + _alt = getInterpreter().adaptivePredict(_input,46,_ctx); } - setState(413); + setState(452); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__8) { + if (_la==T__7) { { - setState(412); - match(T__8); + setState(451); + match(T__7); } } - setState(415); + setState(454); match(T__2); } break; @@ -2267,41 +2492,41 @@ private ExprContext expr(int _p) throws RecognitionException { _localctx = new OrExprContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(417); + setState(456); match(OR); - setState(418); + setState(457); match(T__1); - setState(419); + setState(458); expr(0); - setState(424); + setState(463); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,44,_ctx); + _alt = getInterpreter().adaptivePredict(_input,48,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(420); - match(T__8); - setState(421); + setState(459); + match(T__7); + setState(460); expr(0); } } } - setState(426); + setState(465); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,44,_ctx); + _alt = getInterpreter().adaptivePredict(_input,48,_ctx); } - setState(428); + setState(467); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__8) { + if (_la==T__7) { { - setState(427); - match(T__8); + setState(466); + match(T__7); } } - setState(430); + setState(469); match(T__2); } break; @@ -2310,41 +2535,41 @@ private ExprContext expr(int _p) throws RecognitionException { _localctx = new ActionAllContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(432); + setState(471); match(T__32); - setState(433); + setState(472); match(T__1); - setState(434); + setState(473); expr(0); - setState(439); + setState(478); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,46,_ctx); + _alt = getInterpreter().adaptivePredict(_input,50,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(435); - match(T__8); - setState(436); + setState(474); + match(T__7); + setState(475); expr(0); } } } - setState(441); + setState(480); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,46,_ctx); + _alt = getInterpreter().adaptivePredict(_input,50,_ctx); } - setState(443); + setState(482); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__8) { + if (_la==T__7) { { - setState(442); - match(T__8); + setState(481); + match(T__7); } } - setState(445); + setState(484); match(T__2); } break; @@ -2353,41 +2578,41 @@ private ExprContext expr(int _p) throws RecognitionException { _localctx = new ActionAnyContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(447); + setState(486); match(T__33); - setState(448); + setState(487); match(T__1); - setState(449); + setState(488); expr(0); - setState(454); + setState(493); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,48,_ctx); + _alt = getInterpreter().adaptivePredict(_input,52,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(450); - match(T__8); - setState(451); + setState(489); + match(T__7); + setState(490); expr(0); } } } - setState(456); + setState(495); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,48,_ctx); + _alt = getInterpreter().adaptivePredict(_input,52,_ctx); } - setState(458); + setState(497); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__8) { + if (_la==T__7) { { - setState(457); - match(T__8); + setState(496); + match(T__7); } } - setState(460); + setState(499); match(T__2); } break; @@ -2396,15 +2621,35 @@ private ExprContext expr(int _p) throws RecognitionException { _localctx = new LiteralOrIdContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(462); - _la = _input.LA(1); - if ( !(((((_la - 39)) & ~0x3f) == 0 && ((1L << (_la - 39)) & ((1L << (STRING - 39)) | (1L << (BOOL - 39)) | (1L << (INT - 39)) | (1L << (IDENTIFIER - 39)))) != 0)) ) { - _errHandler.recoverInline(this); - } - else { - if ( _input.LA(1)==Token.EOF ) matchedEOF = true; - _errHandler.reportMatch(this); - consume(); + setState(505); + _errHandler.sync(this); + switch (_input.LA(1)) { + case IDENTIFIER: + { + setState(501); + qualId(); + } + break; + case INT: + { + setState(502); + match(INT); + } + break; + case BOOL: + { + setState(503); + match(BOOL); + } + break; + case STRING: + { + setState(504); + match(STRING); + } + break; + default: + throw new NoViableAltException(this); } } break; @@ -2413,43 +2658,43 @@ private ExprContext expr(int _p) throws RecognitionException { _localctx = new TupleContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(463); + setState(507); match(LPAREN); - setState(464); + setState(508); expr(0); - setState(465); - match(T__8); - setState(466); + setState(509); + match(T__7); + setState(510); expr(0); - setState(471); + setState(515); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,50,_ctx); + _alt = getInterpreter().adaptivePredict(_input,55,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(467); - match(T__8); - setState(468); + setState(511); + match(T__7); + setState(512); expr(0); } } } - setState(473); + setState(517); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,50,_ctx); + _alt = getInterpreter().adaptivePredict(_input,55,_ctx); } - setState(475); + setState(519); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__8) { + if (_la==T__7) { { - setState(474); - match(T__8); + setState(518); + match(T__7); } } - setState(477); + setState(521); match(RPAREN); } break; @@ -2458,39 +2703,39 @@ private ExprContext expr(int _p) throws RecognitionException { _localctx = new RecordContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(479); + setState(523); match(T__1); - setState(480); + setState(524); recElem(); - setState(485); + setState(529); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,52,_ctx); + _alt = getInterpreter().adaptivePredict(_input,57,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(481); - match(T__8); - setState(482); + setState(525); + match(T__7); + setState(526); recElem(); } } } - setState(487); + setState(531); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,52,_ctx); + _alt = getInterpreter().adaptivePredict(_input,57,_ctx); } - setState(489); + setState(533); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__8) { + if (_la==T__7) { { - setState(488); - match(T__8); + setState(532); + match(T__7); } } - setState(491); + setState(535); match(T__2); } break; @@ -2499,48 +2744,48 @@ private ExprContext expr(int _p) throws RecognitionException { _localctx = new ListContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(493); - match(T__24); - setState(502); + setState(537); + match(T__25); + setState(546); _errHandler.sync(this); _la = _input.LA(1); - if (((((_la - 2)) & ~0x3f) == 0 && ((1L << (_la - 2)) & ((1L << (T__1 - 2)) | (1L << (T__10 - 2)) | (1L << (T__11 - 2)) | (1L << (T__12 - 2)) | (1L << (T__13 - 2)) | (1L << (T__14 - 2)) | (1L << (T__15 - 2)) | (1L << (T__16 - 2)) | (1L << (T__24 - 2)) | (1L << (T__32 - 2)) | (1L << (T__33 - 2)) | (1L << (T__34 - 2)) | (1L << (T__36 - 2)) | (1L << (STRING - 2)) | (1L << (BOOL - 2)) | (1L << (INT - 2)) | (1L << (AND - 2)) | (1L << (OR - 2)) | (1L << (IFF - 2)) | (1L << (IMPLIES - 2)) | (1L << (SET - 2)) | (1L << (LIST - 2)) | (1L << (MAP - 2)) | (1L << (MINUS - 2)) | (1L << (LPAREN - 2)) | (1L << (IDENTIFIER - 2)))) != 0)) { + if (((((_la - 2)) & ~0x3f) == 0 && ((1L << (_la - 2)) & ((1L << (T__1 - 2)) | (1L << (T__11 - 2)) | (1L << (T__12 - 2)) | (1L << (T__13 - 2)) | (1L << (T__14 - 2)) | (1L << (T__15 - 2)) | (1L << (T__16 - 2)) | (1L << (T__17 - 2)) | (1L << (T__25 - 2)) | (1L << (T__32 - 2)) | (1L << (T__33 - 2)) | (1L << (T__34 - 2)) | (1L << (T__36 - 2)) | (1L << (STRING - 2)) | (1L << (BOOL - 2)) | (1L << (INT - 2)) | (1L << (AND - 2)) | (1L << (OR - 2)) | (1L << (IFF - 2)) | (1L << (IMPLIES - 2)) | (1L << (SET - 2)) | (1L << (LIST - 2)) | (1L << (MAP - 2)) | (1L << (MINUS - 2)) | (1L << (LPAREN - 2)) | (1L << (IDENTIFIER - 2)))) != 0)) { { - setState(494); + setState(538); expr(0); - setState(499); + setState(543); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,54,_ctx); + _alt = getInterpreter().adaptivePredict(_input,59,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(495); - match(T__8); - setState(496); + setState(539); + match(T__7); + setState(540); expr(0); } } } - setState(501); + setState(545); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,54,_ctx); + _alt = getInterpreter().adaptivePredict(_input,59,_ctx); } } } - setState(505); + setState(549); _errHandler.sync(this); _la = _input.LA(1); - if (_la==T__8) { + if (_la==T__7) { { - setState(504); - match(T__8); + setState(548); + match(T__7); } } - setState(507); - match(T__25); + setState(551); + match(T__26); } break; case 13: @@ -2548,19 +2793,19 @@ private ExprContext expr(int _p) throws RecognitionException { _localctx = new IfElseContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(508); + setState(552); match(T__34); - setState(509); + setState(553); match(LPAREN); - setState(510); + setState(554); expr(0); - setState(511); + setState(555); match(RPAREN); - setState(512); + setState(556); expr(0); - setState(513); + setState(557); match(T__35); - setState(514); + setState(558); expr(5); } break; @@ -2569,9 +2814,9 @@ private ExprContext expr(int _p) throws RecognitionException { _localctx = new LetInContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(516); + setState(560); operDef(); - setState(517); + setState(561); expr(4); } break; @@ -2580,9 +2825,9 @@ private ExprContext expr(int _p) throws RecognitionException { _localctx = new NondetContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(519); + setState(563); nondetOperDef(); - setState(520); + setState(564); expr(3); } break; @@ -2591,11 +2836,11 @@ private ExprContext expr(int _p) throws RecognitionException { _localctx = new ParenContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(522); + setState(566); match(LPAREN); - setState(523); + setState(567); expr(0); - setState(524); + setState(568); match(RPAREN); } break; @@ -2604,36 +2849,36 @@ private ExprContext expr(int _p) throws RecognitionException { _localctx = new BracesContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(526); + setState(570); match(T__1); - setState(527); + setState(571); expr(0); - setState(528); + setState(572); match(T__2); } break; } _ctx.stop = _input.LT(-1); - setState(594); + setState(638); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,62,_ctx); + _alt = getInterpreter().adaptivePredict(_input,67,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(592); + setState(636); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,61,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,66,_ctx) ) { case 1: { _localctx = new PowContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(532); + setState(576); if (!(precpred(_ctx, 26))) throw new FailedPredicateException(this, "precpred(_ctx, 26)"); - setState(533); + setState(577); ((PowContext)_localctx).op = match(T__30); - setState(534); + setState(578); expr(26); } break; @@ -2641,9 +2886,9 @@ private ExprContext expr(int _p) throws RecognitionException { { _localctx = new MultDivContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(535); + setState(579); if (!(precpred(_ctx, 24))) throw new FailedPredicateException(this, "precpred(_ctx, 24)"); - setState(536); + setState(580); ((MultDivContext)_localctx).op = _input.LT(1); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << MUL) | (1L << DIV) | (1L << MOD))) != 0)) ) { @@ -2654,7 +2899,7 @@ private ExprContext expr(int _p) throws RecognitionException { _errHandler.reportMatch(this); consume(); } - setState(537); + setState(581); expr(25); } break; @@ -2662,9 +2907,9 @@ private ExprContext expr(int _p) throws RecognitionException { { _localctx = new PlusMinusContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(538); + setState(582); if (!(precpred(_ctx, 23))) throw new FailedPredicateException(this, "precpred(_ctx, 23)"); - setState(539); + setState(583); ((PlusMinusContext)_localctx).op = _input.LT(1); _la = _input.LA(1); if ( !(_la==PLUS || _la==MINUS) ) { @@ -2675,7 +2920,7 @@ private ExprContext expr(int _p) throws RecognitionException { _errHandler.reportMatch(this); consume(); } - setState(540); + setState(584); expr(24); } break; @@ -2683,9 +2928,9 @@ private ExprContext expr(int _p) throws RecognitionException { { _localctx = new RelationsContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(541); + setState(585); if (!(precpred(_ctx, 22))) throw new FailedPredicateException(this, "precpred(_ctx, 22)"); - setState(542); + setState(586); ((RelationsContext)_localctx).op = _input.LT(1); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << GT) | (1L << LT) | (1L << GE) | (1L << LE) | (1L << NE) | (1L << EQ))) != 0)) ) { @@ -2696,7 +2941,7 @@ private ExprContext expr(int _p) throws RecognitionException { _errHandler.reportMatch(this); consume(); } - setState(543); + setState(587); expr(23); } break; @@ -2704,11 +2949,11 @@ private ExprContext expr(int _p) throws RecognitionException { { _localctx = new ErrorEqContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(544); + setState(588); if (!(precpred(_ctx, 20))) throw new FailedPredicateException(this, "precpred(_ctx, 20)"); - setState(545); + setState(589); match(ASGN); - setState(546); + setState(590); expr(21); const m = "QNT006: unexpected '=', did you mean '=='?" @@ -2720,11 +2965,11 @@ private ExprContext expr(int _p) throws RecognitionException { { _localctx = new AndContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(549); + setState(593); if (!(precpred(_ctx, 18))) throw new FailedPredicateException(this, "precpred(_ctx, 18)"); - setState(550); + setState(594); match(AND); - setState(551); + setState(595); expr(19); } break; @@ -2732,11 +2977,11 @@ private ExprContext expr(int _p) throws RecognitionException { { _localctx = new OrContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(552); + setState(596); if (!(precpred(_ctx, 16))) throw new FailedPredicateException(this, "precpred(_ctx, 16)"); - setState(553); + setState(597); match(OR); - setState(554); + setState(598); expr(17); } break; @@ -2744,11 +2989,11 @@ private ExprContext expr(int _p) throws RecognitionException { { _localctx = new IffContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(555); + setState(599); if (!(precpred(_ctx, 15))) throw new FailedPredicateException(this, "precpred(_ctx, 15)"); - setState(556); + setState(600); match(IFF); - setState(557); + setState(601); expr(16); } break; @@ -2756,11 +3001,11 @@ private ExprContext expr(int _p) throws RecognitionException { { _localctx = new ImpliesContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(558); + setState(602); if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)"); - setState(559); + setState(603); match(IMPLIES); - setState(560); + setState(604); expr(15); } break; @@ -2768,11 +3013,11 @@ private ExprContext expr(int _p) throws RecognitionException { { _localctx = new PairContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(561); + setState(605); if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); - setState(562); - match(T__22); - setState(563); + setState(606); + match(T__23); + setState(607); expr(9); } break; @@ -2780,30 +3025,30 @@ private ExprContext expr(int _p) throws RecognitionException { { _localctx = new DotCallContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(564); + setState(608); if (!(precpred(_ctx, 30))) throw new FailedPredicateException(this, "precpred(_ctx, 30)"); - setState(565); - match(T__18); - setState(566); + setState(609); + match(T__19); + setState(610); nameAfterDot(); - setState(572); + setState(616); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,59,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,64,_ctx) ) { case 1: { - setState(567); + setState(611); match(LPAREN); - setState(569); + setState(613); _errHandler.sync(this); _la = _input.LA(1); - if (((((_la - 2)) & ~0x3f) == 0 && ((1L << (_la - 2)) & ((1L << (T__1 - 2)) | (1L << (T__10 - 2)) | (1L << (T__11 - 2)) | (1L << (T__12 - 2)) | (1L << (T__13 - 2)) | (1L << (T__14 - 2)) | (1L << (T__15 - 2)) | (1L << (T__16 - 2)) | (1L << (T__24 - 2)) | (1L << (T__32 - 2)) | (1L << (T__33 - 2)) | (1L << (T__34 - 2)) | (1L << (T__36 - 2)) | (1L << (STRING - 2)) | (1L << (BOOL - 2)) | (1L << (INT - 2)) | (1L << (AND - 2)) | (1L << (OR - 2)) | (1L << (IFF - 2)) | (1L << (IMPLIES - 2)) | (1L << (SET - 2)) | (1L << (LIST - 2)) | (1L << (MAP - 2)) | (1L << (MINUS - 2)) | (1L << (LPAREN - 2)) | (1L << (IDENTIFIER - 2)))) != 0)) { + if (((((_la - 2)) & ~0x3f) == 0 && ((1L << (_la - 2)) & ((1L << (T__1 - 2)) | (1L << (T__11 - 2)) | (1L << (T__12 - 2)) | (1L << (T__13 - 2)) | (1L << (T__14 - 2)) | (1L << (T__15 - 2)) | (1L << (T__16 - 2)) | (1L << (T__17 - 2)) | (1L << (T__25 - 2)) | (1L << (T__32 - 2)) | (1L << (T__33 - 2)) | (1L << (T__34 - 2)) | (1L << (T__36 - 2)) | (1L << (STRING - 2)) | (1L << (BOOL - 2)) | (1L << (INT - 2)) | (1L << (AND - 2)) | (1L << (OR - 2)) | (1L << (IFF - 2)) | (1L << (IMPLIES - 2)) | (1L << (SET - 2)) | (1L << (LIST - 2)) | (1L << (MAP - 2)) | (1L << (MINUS - 2)) | (1L << (LPAREN - 2)) | (1L << (IDENTIFIER - 2)))) != 0)) { { - setState(568); + setState(612); argList(); } } - setState(571); + setState(615); match(RPAREN); } break; @@ -2814,25 +3059,25 @@ private ExprContext expr(int _p) throws RecognitionException { { _localctx = new ListAppContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(574); + setState(618); if (!(precpred(_ctx, 27))) throw new FailedPredicateException(this, "precpred(_ctx, 27)"); - setState(575); - match(T__24); - setState(576); - expr(0); - setState(577); + setState(619); match(T__25); + setState(620); + expr(0); + setState(621); + match(T__26); } break; case 13: { _localctx = new MatchContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(579); + setState(623); if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); - setState(580); + setState(624); match(MATCH); - setState(588); + setState(632); _errHandler.sync(this); _alt = 1; do { @@ -2840,17 +3085,17 @@ private ExprContext expr(int _p) throws RecognitionException { case 1: { { - setState(581); - match(T__29); - setState(582); + setState(625); + match(T__10); + setState(626); match(STRING); - setState(583); + setState(627); match(T__4); - setState(584); + setState(628); parameter(); - setState(585); - match(T__23); - setState(586); + setState(629); + match(T__24); + setState(630); expr(0); } } @@ -2858,18 +3103,18 @@ private ExprContext expr(int _p) throws RecognitionException { default: throw new NoViableAltException(this); } - setState(590); + setState(634); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,60,_ctx); + _alt = getInterpreter().adaptivePredict(_input,65,_ctx); } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); } break; } } } - setState(596); + setState(640); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,62,_ctx); + _alt = getInterpreter().adaptivePredict(_input,67,_ctx); } } } @@ -2884,59 +3129,59 @@ private ExprContext expr(int _p) throws RecognitionException { return _localctx; } - public static class UnitOrExprContext extends ParserRuleContext { - public UnitContext unit() { - return getRuleContext(UnitContext.class,0); + public static class DeclarationOrExprContext extends ParserRuleContext { + public DeclarationContext declaration() { + return getRuleContext(DeclarationContext.class,0); } public TerminalNode EOF() { return getToken(QuintParser.EOF, 0); } public ExprContext expr() { return getRuleContext(ExprContext.class,0); } public TerminalNode DOCCOMMENT() { return getToken(QuintParser.DOCCOMMENT, 0); } - public UnitOrExprContext(ParserRuleContext parent, int invokingState) { + public DeclarationOrExprContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } - @Override public int getRuleIndex() { return RULE_unitOrExpr; } + @Override public int getRuleIndex() { return RULE_declarationOrExpr; } } - public final UnitOrExprContext unitOrExpr() throws RecognitionException { - UnitOrExprContext _localctx = new UnitOrExprContext(_ctx, getState()); - enterRule(_localctx, 36, RULE_unitOrExpr); + public final DeclarationOrExprContext declarationOrExpr() throws RecognitionException { + DeclarationOrExprContext _localctx = new DeclarationOrExprContext(_ctx, getState()); + enterRule(_localctx, 42, RULE_declarationOrExpr); try { - setState(606); + setState(650); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,63,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,68,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(597); - unit(); - setState(598); + setState(641); + declaration(); + setState(642); match(EOF); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(600); + setState(644); expr(0); - setState(601); + setState(645); match(EOF); } break; case 3: enterOuterAlt(_localctx, 3); { - setState(603); + setState(647); match(DOCCOMMENT); - setState(604); + setState(648); match(EOF); } break; case 4: enterOuterAlt(_localctx, 4); { - setState(605); + setState(649); match(EOF); } break; @@ -2973,52 +3218,52 @@ public LambdaContext(ParserRuleContext parent, int invokingState) { public final LambdaContext lambda() throws RecognitionException { LambdaContext _localctx = new LambdaContext(_ctx, getState()); - enterRule(_localctx, 38, RULE_lambda); + enterRule(_localctx, 44, RULE_lambda); int _la; try { - setState(625); + setState(669); _errHandler.sync(this); switch (_input.LA(1)) { case T__36: case IDENTIFIER: enterOuterAlt(_localctx, 1); { - setState(608); + setState(652); parameter(); - setState(609); - match(T__23); - setState(610); + setState(653); + match(T__24); + setState(654); expr(0); } break; case LPAREN: enterOuterAlt(_localctx, 2); { - setState(612); + setState(656); match(LPAREN); - setState(613); + setState(657); parameter(); - setState(618); + setState(662); _errHandler.sync(this); _la = _input.LA(1); - while (_la==T__8) { + while (_la==T__7) { { { - setState(614); - match(T__8); - setState(615); + setState(658); + match(T__7); + setState(659); parameter(); } } - setState(620); + setState(664); _errHandler.sync(this); _la = _input.LA(1); } - setState(621); + setState(665); match(RPAREN); - setState(622); - match(T__23); - setState(623); + setState(666); + match(T__24); + setState(667); expr(0); } break; @@ -3038,7 +3283,9 @@ public final LambdaContext lambda() throws RecognitionException { } public static class IdentOrHoleContext extends ParserRuleContext { - public TerminalNode IDENTIFIER() { return getToken(QuintParser.IDENTIFIER, 0); } + public QualIdContext qualId() { + return getRuleContext(QualIdContext.class,0); + } public IdentOrHoleContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -3047,21 +3294,27 @@ public IdentOrHoleContext(ParserRuleContext parent, int invokingState) { public final IdentOrHoleContext identOrHole() throws RecognitionException { IdentOrHoleContext _localctx = new IdentOrHoleContext(_ctx, getState()); - enterRule(_localctx, 40, RULE_identOrHole); - int _la; + enterRule(_localctx, 46, RULE_identOrHole); try { - enterOuterAlt(_localctx, 1); - { - setState(627); - _la = _input.LA(1); - if ( !(_la==T__36 || _la==IDENTIFIER) ) { - _errHandler.recoverInline(this); - } - else { - if ( _input.LA(1)==Token.EOF ) matchedEOF = true; - _errHandler.reportMatch(this); - consume(); - } + setState(673); + _errHandler.sync(this); + switch (_input.LA(1)) { + case T__36: + enterOuterAlt(_localctx, 1); + { + setState(671); + match(T__36); + } + break; + case IDENTIFIER: + enterOuterAlt(_localctx, 2); + { + setState(672); + qualId(); + } + break; + default: + throw new NoViableAltException(this); } } catch (RecognitionException re) { @@ -3087,11 +3340,11 @@ public ParameterContext(ParserRuleContext parent, int invokingState) { public final ParameterContext parameter() throws RecognitionException { ParameterContext _localctx = new ParameterContext(_ctx, getState()); - enterRule(_localctx, 42, RULE_parameter); + enterRule(_localctx, 48, RULE_parameter); try { enterOuterAlt(_localctx, 1); { - setState(629); + setState(675); identOrHole(); } } @@ -3108,7 +3361,9 @@ public final ParameterContext parameter() throws RecognitionException { public static class IdentOrStarContext extends ParserRuleContext { public TerminalNode MUL() { return getToken(QuintParser.MUL, 0); } - public TerminalNode IDENTIFIER() { return getToken(QuintParser.IDENTIFIER, 0); } + public QualIdContext qualId() { + return getRuleContext(QualIdContext.class,0); + } public IdentOrStarContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -3117,21 +3372,27 @@ public IdentOrStarContext(ParserRuleContext parent, int invokingState) { public final IdentOrStarContext identOrStar() throws RecognitionException { IdentOrStarContext _localctx = new IdentOrStarContext(_ctx, getState()); - enterRule(_localctx, 44, RULE_identOrStar); - int _la; + enterRule(_localctx, 50, RULE_identOrStar); try { - enterOuterAlt(_localctx, 1); - { - setState(631); - _la = _input.LA(1); - if ( !(_la==MUL || _la==IDENTIFIER) ) { - _errHandler.recoverInline(this); - } - else { - if ( _input.LA(1)==Token.EOF ) matchedEOF = true; - _errHandler.reportMatch(this); - consume(); - } + setState(679); + _errHandler.sync(this); + switch (_input.LA(1)) { + case MUL: + enterOuterAlt(_localctx, 1); + { + setState(677); + match(MUL); + } + break; + case IDENTIFIER: + enterOuterAlt(_localctx, 2); + { + setState(678); + qualId(); + } + break; + default: + throw new NoViableAltException(this); } } catch (RecognitionException re) { @@ -3160,26 +3421,26 @@ public ArgListContext(ParserRuleContext parent, int invokingState) { public final ArgListContext argList() throws RecognitionException { ArgListContext _localctx = new ArgListContext(_ctx, getState()); - enterRule(_localctx, 46, RULE_argList); + enterRule(_localctx, 52, RULE_argList); int _la; try { enterOuterAlt(_localctx, 1); { - setState(633); + setState(681); expr(0); - setState(638); + setState(686); _errHandler.sync(this); _la = _input.LA(1); - while (_la==T__8) { + while (_la==T__7) { { { - setState(634); - match(T__8); - setState(635); + setState(682); + match(T__7); + setState(683); expr(0); } } - setState(640); + setState(688); _errHandler.sync(this); _la = _input.LA(1); } @@ -3197,7 +3458,9 @@ public final ArgListContext argList() throws RecognitionException { } public static class RecElemContext extends ParserRuleContext { - public TerminalNode IDENTIFIER() { return getToken(QuintParser.IDENTIFIER, 0); } + public SimpleIdContext simpleId() { + return getRuleContext(SimpleIdContext.class,0); + } public ExprContext expr() { return getRuleContext(ExprContext.class,0); } @@ -3209,28 +3472,28 @@ public RecElemContext(ParserRuleContext parent, int invokingState) { public final RecElemContext recElem() throws RecognitionException { RecElemContext _localctx = new RecElemContext(_ctx, getState()); - enterRule(_localctx, 48, RULE_recElem); + enterRule(_localctx, 54, RULE_recElem); try { - setState(646); + setState(695); _errHandler.sync(this); switch (_input.LA(1)) { case IDENTIFIER: enterOuterAlt(_localctx, 1); { - setState(641); - match(IDENTIFIER); - setState(642); + setState(689); + simpleId("record"); + setState(690); match(T__4); - setState(643); + setState(691); expr(0); } break; case T__37: enterOuterAlt(_localctx, 2); { - setState(644); + setState(693); match(T__37); - setState(645); + setState(694); expr(0); } break; @@ -3251,7 +3514,9 @@ public final RecElemContext recElem() throws RecognitionException { public static class NormalCallNameContext extends ParserRuleContext { public Token op; - public TerminalNode IDENTIFIER() { return getToken(QuintParser.IDENTIFIER, 0); } + public QualIdContext qualId() { + return getRuleContext(QualIdContext.class,0); + } public TerminalNode AND() { return getToken(QuintParser.AND, 0); } public TerminalNode OR() { return getToken(QuintParser.OR, 0); } public TerminalNode IFF() { return getToken(QuintParser.IFF, 0); } @@ -3267,17 +3532,17 @@ public NormalCallNameContext(ParserRuleContext parent, int invokingState) { public final NormalCallNameContext normalCallName() throws RecognitionException { NormalCallNameContext _localctx = new NormalCallNameContext(_ctx, getState()); - enterRule(_localctx, 50, RULE_normalCallName); + enterRule(_localctx, 56, RULE_normalCallName); int _la; try { - setState(650); + setState(699); _errHandler.sync(this); switch (_input.LA(1)) { case IDENTIFIER: enterOuterAlt(_localctx, 1); { - setState(648); - match(IDENTIFIER); + setState(697); + qualId(); } break; case AND: @@ -3289,7 +3554,7 @@ public final NormalCallNameContext normalCallName() throws RecognitionException case MAP: enterOuterAlt(_localctx, 2); { - setState(649); + setState(698); ((NormalCallNameContext)_localctx).op = _input.LT(1); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << AND) | (1L << OR) | (1L << IFF) | (1L << IMPLIES) | (1L << SET) | (1L << LIST) | (1L << MAP))) != 0)) ) { @@ -3319,7 +3584,9 @@ public final NormalCallNameContext normalCallName() throws RecognitionException public static class NameAfterDotContext extends ParserRuleContext { public Token op; - public TerminalNode IDENTIFIER() { return getToken(QuintParser.IDENTIFIER, 0); } + public QualIdContext qualId() { + return getRuleContext(QualIdContext.class,0); + } public TerminalNode AND() { return getToken(QuintParser.AND, 0); } public TerminalNode OR() { return getToken(QuintParser.OR, 0); } public TerminalNode IFF() { return getToken(QuintParser.IFF, 0); } @@ -3332,17 +3599,17 @@ public NameAfterDotContext(ParserRuleContext parent, int invokingState) { public final NameAfterDotContext nameAfterDot() throws RecognitionException { NameAfterDotContext _localctx = new NameAfterDotContext(_ctx, getState()); - enterRule(_localctx, 52, RULE_nameAfterDot); + enterRule(_localctx, 58, RULE_nameAfterDot); int _la; try { - setState(654); + setState(703); _errHandler.sync(this); switch (_input.LA(1)) { case IDENTIFIER: enterOuterAlt(_localctx, 1); { - setState(652); - match(IDENTIFIER); + setState(701); + qualId(); } break; case AND: @@ -3351,7 +3618,7 @@ public final NameAfterDotContext nameAfterDot() throws RecognitionException { case IMPLIES: enterOuterAlt(_localctx, 2); { - setState(653); + setState(702); ((NameAfterDotContext)_localctx).op = _input.LT(1); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << AND) | (1L << OR) | (1L << IFF) | (1L << IMPLIES))) != 0)) ) { @@ -3403,12 +3670,12 @@ public OperatorContext(ParserRuleContext parent, int invokingState) { public final OperatorContext operator() throws RecognitionException { OperatorContext _localctx = new OperatorContext(_ctx, getState()); - enterRule(_localctx, 54, RULE_operator); + enterRule(_localctx, 60, RULE_operator); int _la; try { enterOuterAlt(_localctx, 1); { - setState(656); + setState(705); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__30) | (1L << AND) | (1L << OR) | (1L << IFF) | (1L << IMPLIES) | (1L << PLUS) | (1L << MINUS) | (1L << MUL) | (1L << DIV) | (1L << MOD) | (1L << GT) | (1L << LT) | (1L << GE) | (1L << LE) | (1L << NE) | (1L << EQ))) != 0)) ) { _errHandler.recoverInline(this); @@ -3443,12 +3710,12 @@ public LiteralContext(ParserRuleContext parent, int invokingState) { public final LiteralContext literal() throws RecognitionException { LiteralContext _localctx = new LiteralContext(_ctx, getState()); - enterRule(_localctx, 56, RULE_literal); + enterRule(_localctx, 62, RULE_literal); int _la; try { enterOuterAlt(_localctx, 1); { - setState(658); + setState(707); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << STRING) | (1L << BOOL) | (1L << INT))) != 0)) ) { _errHandler.recoverInline(this); @@ -3471,11 +3738,119 @@ public final LiteralContext literal() throws RecognitionException { return _localctx; } + public static class QualIdContext extends ParserRuleContext { + public List IDENTIFIER() { return getTokens(QuintParser.IDENTIFIER); } + public TerminalNode IDENTIFIER(int i) { + return getToken(QuintParser.IDENTIFIER, i); + } + public QualIdContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_qualId; } + } + + public final QualIdContext qualId() throws RecognitionException { + QualIdContext _localctx = new QualIdContext(_ctx, getState()); + enterRule(_localctx, 64, RULE_qualId); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(709); + match(IDENTIFIER); + setState(714); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,77,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(710); + match(T__38); + setState(711); + match(IDENTIFIER); + } + } + } + setState(716); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,77,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SimpleIdContext extends ParserRuleContext { + public string context; + public QualIdContext qualId; + public TerminalNode IDENTIFIER() { return getToken(QuintParser.IDENTIFIER, 0); } + public QualIdContext qualId() { + return getRuleContext(QualIdContext.class,0); + } + public SimpleIdContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } + public SimpleIdContext(ParserRuleContext parent, int invokingState, string context) { + super(parent, invokingState); + this.context = context; + } + @Override public int getRuleIndex() { return RULE_simpleId; } + } + + public final SimpleIdContext simpleId(string context) throws RecognitionException { + SimpleIdContext _localctx = new SimpleIdContext(_ctx, getState(), context); + enterRule(_localctx, 66, RULE_simpleId); + try { + setState(721); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,78,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(717); + match(IDENTIFIER); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(718); + ((SimpleIdContext)_localctx).qualId = qualId(); + + const err = quintErrorToString( + { code: 'QNT008', + message: "Identifiers in a " + _localctx.context + " cannot be qualified with '::'. Found " + (((SimpleIdContext)_localctx).qualId!=null?_input.getText(((SimpleIdContext)_localctx).qualId.start,((SimpleIdContext)_localctx).qualId.stop):null) + "." + }, + ) + this.notifyErrorListeners(err) + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { switch (ruleIndex) { - case 14: + case 16: return type_sempred((TypeContext)_localctx, predIndex); - case 17: + case 20: return expr_sempred((ExprContext)_localctx, predIndex); } return true; @@ -3522,268 +3897,293 @@ private boolean expr_sempred(ExprContext _localctx, int predIndex) { } public static final String _serializedATN = - "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3G\u0297\4\2\t\2\4"+ + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3G\u02d6\4\2\t\2\4"+ "\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+ "\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ - "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\3\2\6\2>\n\2\r\2\16"+ - "\2?\3\2\3\2\3\3\7\3E\n\3\f\3\16\3H\13\3\3\3\3\3\3\3\3\3\7\3N\n\3\f\3\16"+ - "\3Q\13\3\3\3\3\3\3\4\7\4V\n\4\f\4\16\4Y\13\4\3\4\3\4\3\5\3\5\3\5\3\5\3"+ - "\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5"+ - "\3\5\5\5t\n\5\3\6\3\6\3\6\3\6\3\6\3\6\7\6|\n\6\f\6\16\6\177\13\6\5\6\u0081"+ - "\n\6\3\6\3\6\3\6\5\6\u0086\n\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6"+ - "\3\6\7\6\u0093\n\6\f\6\16\6\u0096\13\6\3\6\3\6\3\6\3\6\5\6\u009c\n\6\3"+ - "\6\3\6\5\6\u00a0\n\6\3\6\5\6\u00a3\n\6\3\7\3\7\3\7\3\7\5\7\u00a9\n\7\3"+ - "\7\3\7\3\7\5\7\u00ae\n\7\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\5\b\u00b9"+ - "\n\b\3\t\3\t\3\t\3\t\3\t\3\t\5\t\u00c1\n\t\3\t\3\t\3\t\3\t\5\t\u00c7\n"+ - "\t\3\t\3\t\5\t\u00cb\n\t\5\t\u00cd\n\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n"+ - "\3\n\5\n\u00d8\n\n\5\n\u00da\n\n\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3"+ - "\13\3\13\3\13\3\13\7\13\u00e7\n\13\f\13\16\13\u00ea\13\13\3\13\3\13\3"+ - "\13\3\13\3\13\5\13\u00f1\n\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13"+ - "\3\13\3\13\3\13\7\13\u00fe\n\13\f\13\16\13\u0101\13\13\3\13\3\13\3\13"+ - "\3\13\3\13\5\13\u0108\n\13\5\13\u010a\n\13\3\f\3\f\3\r\3\r\3\16\3\16\3"+ - "\17\3\17\3\20\3\20\3\20\3\20\3\20\7\20\u0119\n\20\f\20\16\20\u011c\13"+ - "\20\5\20\u011e\n\20\3\20\5\20\u0121\n\20\3\20\3\20\3\20\3\20\3\20\3\20"+ - "\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\7\20"+ - "\u0136\n\20\f\20\16\20\u0139\13\20\3\20\5\20\u013c\n\20\3\20\3\20\3\20"+ - "\3\20\3\20\3\20\3\20\6\20\u0145\n\20\r\20\16\20\u0146\3\20\3\20\3\20\3"+ - "\20\3\20\3\20\3\20\3\20\5\20\u0151\n\20\3\20\3\20\3\20\3\20\3\20\3\20"+ - "\7\20\u0159\n\20\f\20\16\20\u015c\13\20\3\21\3\21\3\21\3\21\3\21\3\21"+ - "\3\21\5\21\u0165\n\21\3\21\5\21\u0168\n\21\3\21\3\21\3\22\3\22\3\22\3"+ - "\22\3\22\3\22\7\22\u0172\n\22\f\22\16\22\u0175\13\22\3\22\3\22\3\22\3"+ - "\22\3\22\3\22\3\22\5\22\u017e\n\22\5\22\u0180\n\22\3\22\3\22\5\22\u0184"+ - "\n\22\3\23\3\23\3\23\3\23\3\23\5\23\u018b\n\23\3\23\3\23\3\23\3\23\3\23"+ - "\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\7\23\u019a\n\23\f\23\16\23\u019d"+ - "\13\23\3\23\5\23\u01a0\n\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\7\23\u01a9"+ - "\n\23\f\23\16\23\u01ac\13\23\3\23\5\23\u01af\n\23\3\23\3\23\3\23\3\23"+ - "\3\23\3\23\3\23\7\23\u01b8\n\23\f\23\16\23\u01bb\13\23\3\23\5\23\u01be"+ - "\n\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\7\23\u01c7\n\23\f\23\16\23\u01ca"+ - "\13\23\3\23\5\23\u01cd\n\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3"+ - "\23\7\23\u01d8\n\23\f\23\16\23\u01db\13\23\3\23\5\23\u01de\n\23\3\23\3"+ - "\23\3\23\3\23\3\23\3\23\7\23\u01e6\n\23\f\23\16\23\u01e9\13\23\3\23\5"+ - "\23\u01ec\n\23\3\23\3\23\3\23\3\23\3\23\3\23\7\23\u01f4\n\23\f\23\16\23"+ - "\u01f7\13\23\5\23\u01f9\n\23\3\23\5\23\u01fc\n\23\3\23\3\23\3\23\3\23"+ - "\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23"+ - "\3\23\3\23\3\23\3\23\3\23\5\23\u0215\n\23\3\23\3\23\3\23\3\23\3\23\3\23"+ - "\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23"+ - "\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23"+ - "\3\23\3\23\3\23\5\23\u023c\n\23\3\23\5\23\u023f\n\23\3\23\3\23\3\23\3"+ - "\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\6\23\u024f\n\23"+ - "\r\23\16\23\u0250\7\23\u0253\n\23\f\23\16\23\u0256\13\23\3\24\3\24\3\24"+ - "\3\24\3\24\3\24\3\24\3\24\3\24\5\24\u0261\n\24\3\25\3\25\3\25\3\25\3\25"+ - "\3\25\3\25\3\25\7\25\u026b\n\25\f\25\16\25\u026e\13\25\3\25\3\25\3\25"+ - "\3\25\5\25\u0274\n\25\3\26\3\26\3\27\3\27\3\30\3\30\3\31\3\31\3\31\7\31"+ - "\u027f\n\31\f\31\16\31\u0282\13\31\3\32\3\32\3\32\3\32\3\32\5\32\u0289"+ - "\n\32\3\33\3\33\5\33\u028d\n\33\3\34\3\34\5\34\u0291\n\34\3\35\3\35\3"+ - "\36\3\36\3\36\2\4\36$\37\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&("+ - "*,.\60\62\64\668:\2\f\4\2)+BB\3\2\668\3\2\64\65\3\29>\4\2\'\'BB\4\2\66"+ - "\66BB\3\2,\62\3\2,/\5\2!!,/\64>\3\2)+\2\u02f4\2=\3\2\2\2\4F\3\2\2\2\6"+ - "W\3\2\2\2\bs\3\2\2\2\nu\3\2\2\2\f\u00a4\3\2\2\2\16\u00b8\3\2\2\2\20\u00cc"+ - "\3\2\2\2\22\u00d9\3\2\2\2\24\u0109\3\2\2\2\26\u010b\3\2\2\2\30\u010d\3"+ - "\2\2\2\32\u010f\3\2\2\2\34\u0111\3\2\2\2\36\u0150\3\2\2\2 \u015d\3\2\2"+ - "\2\"\u0183\3\2\2\2$\u0214\3\2\2\2&\u0260\3\2\2\2(\u0273\3\2\2\2*\u0275"+ - "\3\2\2\2,\u0277\3\2\2\2.\u0279\3\2\2\2\60\u027b\3\2\2\2\62\u0288\3\2\2"+ - "\2\64\u028c\3\2\2\2\66\u0290\3\2\2\28\u0292\3\2\2\2:\u0294\3\2\2\2<>\5"+ - "\4\3\2=<\3\2\2\2>?\3\2\2\2?=\3\2\2\2?@\3\2\2\2@A\3\2\2\2AB\7\2\2\3B\3"+ - "\3\2\2\2CE\7D\2\2DC\3\2\2\2EH\3\2\2\2FD\3\2\2\2FG\3\2\2\2GI\3\2\2\2HF"+ - "\3\2\2\2IJ\7\3\2\2JK\7B\2\2KO\7\4\2\2LN\5\6\4\2ML\3\2\2\2NQ\3\2\2\2OM"+ - "\3\2\2\2OP\3\2\2\2PR\3\2\2\2QO\3\2\2\2RS\7\5\2\2S\5\3\2\2\2TV\7D\2\2U"+ - "T\3\2\2\2VY\3\2\2\2WU\3\2\2\2WX\3\2\2\2XZ\3\2\2\2YW\3\2\2\2Z[\5\b\5\2"+ - "[\7\3\2\2\2\\]\7\6\2\2]^\7B\2\2^_\7\7\2\2_t\5\36\20\2`a\7\b\2\2ab\7B\2"+ - "\2bc\7\7\2\2ct\5\36\20\2de\7\t\2\2ef\5*\26\2fg\7?\2\2gh\5$\23\2ht\3\2"+ - "\2\2it\5\24\13\2jt\5\n\6\2kl\7\n\2\2lt\7B\2\2mn\7\n\2\2no\7B\2\2op\7?"+ - "\2\2pt\5\36\20\2qt\5\20\t\2rt\5\22\n\2s\\\3\2\2\2s`\3\2\2\2sd\3\2\2\2"+ - "si\3\2\2\2sj\3\2\2\2sk\3\2\2\2sm\3\2\2\2sq\3\2\2\2sr\3\2\2\2t\t\3\2\2"+ - "\2uv\5\16\b\2v\u009b\5\64\33\2w\u0080\7@\2\2x}\5,\27\2yz\7\13\2\2z|\5"+ - ",\27\2{y\3\2\2\2|\177\3\2\2\2}{\3\2\2\2}~\3\2\2\2~\u0081\3\2\2\2\177}"+ - "\3\2\2\2\u0080x\3\2\2\2\u0080\u0081\3\2\2\2\u0081\u0082\3\2\2\2\u0082"+ - "\u0085\7A\2\2\u0083\u0084\7\7\2\2\u0084\u0086\5\36\20\2\u0085\u0083\3"+ - "\2\2\2\u0085\u0086\3\2\2\2\u0086\u009c\3\2\2\2\u0087\u0088\7\7\2\2\u0088"+ - "\u009c\5\36\20\2\u0089\u008a\7@\2\2\u008a\u008b\5,\27\2\u008b\u008c\7"+ - "\7\2\2\u008c\u0094\5\36\20\2\u008d\u008e\7\13\2\2\u008e\u008f\5,\27\2"+ - "\u008f\u0090\7\7\2\2\u0090\u0091\5\36\20\2\u0091\u0093\3\2\2\2\u0092\u008d"+ - "\3\2\2\2\u0093\u0096\3\2\2\2\u0094\u0092\3\2\2\2\u0094\u0095\3\2\2\2\u0095"+ - "\u0097\3\2\2\2\u0096\u0094\3\2\2\2\u0097\u0098\7A\2\2\u0098\u0099\7\7"+ - "\2\2\u0099\u009a\5\36\20\2\u009a\u009c\3\2\2\2\u009bw\3\2\2\2\u009b\u0087"+ - "\3\2\2\2\u009b\u0089\3\2\2\2\u009b\u009c\3\2\2\2\u009c\u009f\3\2\2\2\u009d"+ - "\u009e\7?\2\2\u009e\u00a0\5$\23\2\u009f\u009d\3\2\2\2\u009f\u00a0\3\2"+ - "\2\2\u00a0\u00a2\3\2\2\2\u00a1\u00a3\7\f\2\2\u00a2\u00a1\3\2\2\2\u00a2"+ - "\u00a3\3\2\2\2\u00a3\13\3\2\2\2\u00a4\u00a5\7\r\2\2\u00a5\u00a8\7B\2\2"+ - "\u00a6\u00a7\7\7\2\2\u00a7\u00a9\5\36\20\2\u00a8\u00a6\3\2\2\2\u00a8\u00a9"+ - "\3\2\2\2\u00a9\u00aa\3\2\2\2\u00aa\u00ab\7?\2\2\u00ab\u00ad\5$\23\2\u00ac"+ - "\u00ae\7\f\2\2\u00ad\u00ac\3\2\2\2\u00ad\u00ae\3\2\2\2\u00ae\r\3\2\2\2"+ - "\u00af\u00b9\7\16\2\2\u00b0\u00b9\7\17\2\2\u00b1\u00b2\7\20\2\2\u00b2"+ - "\u00b9\7\16\2\2\u00b3\u00b4\7\20\2\2\u00b4\u00b9\7\17\2\2\u00b5\u00b9"+ - "\7\21\2\2\u00b6\u00b9\7\22\2\2\u00b7\u00b9\7\23\2\2\u00b8\u00af\3\2\2"+ - "\2\u00b8\u00b0\3\2\2\2\u00b8\u00b1\3\2\2\2\u00b8\u00b3\3\2\2\2\u00b8\u00b5"+ - "\3\2\2\2\u00b8\u00b6\3\2\2\2\u00b8\u00b7\3\2\2\2\u00b9\17\3\2\2\2\u00ba"+ - "\u00bb\7\24\2\2\u00bb\u00bc\5\30\r\2\u00bc\u00bd\7\25\2\2\u00bd\u00c0"+ - "\5.\30\2\u00be\u00bf\7\26\2\2\u00bf\u00c1\5\34\17\2\u00c0\u00be\3\2\2"+ - "\2\u00c0\u00c1\3\2\2\2\u00c1\u00cd\3\2\2\2\u00c2\u00c3\7\24\2\2\u00c3"+ - "\u00c6\5\30\r\2\u00c4\u00c5\7\27\2\2\u00c5\u00c7\5\30\r\2\u00c6\u00c4"+ - "\3\2\2\2\u00c6\u00c7\3\2\2\2\u00c7\u00ca\3\2\2\2\u00c8\u00c9\7\26\2\2"+ - "\u00c9\u00cb\5\34\17\2\u00ca\u00c8\3\2\2\2\u00ca\u00cb\3\2\2\2\u00cb\u00cd"+ - "\3\2\2\2\u00cc\u00ba\3\2\2\2\u00cc\u00c2\3\2\2\2\u00cd\21\3\2\2\2\u00ce"+ - "\u00cf\7\30\2\2\u00cf\u00d0\5\30\r\2\u00d0\u00d1\7\25\2\2\u00d1\u00d2"+ - "\5.\30\2\u00d2\u00da\3\2\2\2\u00d3\u00d4\7\30\2\2\u00d4\u00d7\5\30\r\2"+ - "\u00d5\u00d6\7\27\2\2\u00d6\u00d8\5\30\r\2\u00d7\u00d5\3\2\2\2\u00d7\u00d8"+ - "\3\2\2\2\u00d8\u00da\3\2\2\2\u00d9\u00ce\3\2\2\2\u00d9\u00d3\3\2\2\2\u00da"+ - "\23\3\2\2\2\u00db\u00dc\7\24\2\2\u00dc\u00dd\5\26\f\2\u00dd\u00de\7@\2"+ - "\2\u00de\u00df\5\30\r\2\u00df\u00e0\7?\2\2\u00e0\u00e8\5$\23\2\u00e1\u00e2"+ - "\7\13\2\2\u00e2\u00e3\5\30\r\2\u00e3\u00e4\7?\2\2\u00e4\u00e5\5$\23\2"+ - "\u00e5\u00e7\3\2\2\2\u00e6\u00e1\3\2\2\2\u00e7\u00ea\3\2\2\2\u00e8\u00e6"+ - "\3\2\2\2\u00e8\u00e9\3\2\2\2\u00e9\u00eb\3\2\2\2\u00ea\u00e8\3\2\2\2\u00eb"+ - "\u00ec\7A\2\2\u00ec\u00ed\7\25\2\2\u00ed\u00f0\7\66\2\2\u00ee\u00ef\7"+ - "\26\2\2\u00ef\u00f1\5\34\17\2\u00f0\u00ee\3\2\2\2\u00f0\u00f1\3\2\2\2"+ - "\u00f1\u010a\3\2\2\2\u00f2\u00f3\7\24\2\2\u00f3\u00f4\5\26\f\2\u00f4\u00f5"+ - "\7@\2\2\u00f5\u00f6\5\30\r\2\u00f6\u00f7\7?\2\2\u00f7\u00ff\5$\23\2\u00f8"+ - "\u00f9\7\13\2\2\u00f9\u00fa\5\30\r\2\u00fa\u00fb\7?\2\2\u00fb\u00fc\5"+ - "$\23\2\u00fc\u00fe\3\2\2\2\u00fd\u00f8\3\2\2\2\u00fe\u0101\3\2\2\2\u00ff"+ - "\u00fd\3\2\2\2\u00ff\u0100\3\2\2\2\u0100\u0102\3\2\2\2\u0101\u00ff\3\2"+ - "\2\2\u0102\u0103\7A\2\2\u0103\u0104\7\27\2\2\u0104\u0107\5\32\16\2\u0105"+ - "\u0106\7\26\2\2\u0106\u0108\5\34\17\2\u0107\u0105\3\2\2\2\u0107\u0108"+ - "\3\2\2\2\u0108\u010a\3\2\2\2\u0109\u00db\3\2\2\2\u0109\u00f2\3\2\2\2\u010a"+ - "\25\3\2\2\2\u010b\u010c\7B\2\2\u010c\27\3\2\2\2\u010d\u010e\7B\2\2\u010e"+ - "\31\3\2\2\2\u010f\u0110\7B\2\2\u0110\33\3\2\2\2\u0111\u0112\7)\2\2\u0112"+ - "\35\3\2\2\2\u0113\u0114\b\20\1\2\u0114\u011d\7@\2\2\u0115\u011a\5\36\20"+ - "\2\u0116\u0117\7\13\2\2\u0117\u0119\5\36\20\2\u0118\u0116\3\2\2\2\u0119"+ - "\u011c\3\2\2\2\u011a\u0118\3\2\2\2\u011a\u011b\3\2\2\2\u011b\u011e\3\2"+ - "\2\2\u011c\u011a\3\2\2\2\u011d\u0115\3\2\2\2\u011d\u011e\3\2\2\2\u011e"+ - "\u0120\3\2\2\2\u011f\u0121\7\13\2\2\u0120\u011f\3\2\2\2\u0120\u0121\3"+ - "\2\2\2\u0121\u0122\3\2\2\2\u0122\u0123\7A\2\2\u0123\u0124\7\32\2\2\u0124"+ - "\u0151\5\36\20\r\u0125\u0126\7\60\2\2\u0126\u0127\7\33\2\2\u0127\u0128"+ - "\5\36\20\2\u0128\u0129\7\34\2\2\u0129\u0151\3\2\2\2\u012a\u012b\7\61\2"+ - "\2\u012b\u012c\7\33\2\2\u012c\u012d\5\36\20\2\u012d\u012e\7\34\2\2\u012e"+ - "\u0151\3\2\2\2\u012f\u0130\7@\2\2\u0130\u0131\5\36\20\2\u0131\u0132\7"+ - "\13\2\2\u0132\u0137\5\36\20\2\u0133\u0134\7\13\2\2\u0134\u0136\5\36\20"+ - "\2\u0135\u0133\3\2\2\2\u0136\u0139\3\2\2\2\u0137\u0135\3\2\2\2\u0137\u0138"+ - "\3\2\2\2\u0138\u013b\3\2\2\2\u0139\u0137\3\2\2\2\u013a\u013c\7\13\2\2"+ - "\u013b\u013a\3\2\2\2\u013b\u013c\3\2\2\2\u013c\u013d\3\2\2\2\u013d\u013e"+ - "\7A\2\2\u013e\u0151\3\2\2\2\u013f\u0140\7\4\2\2\u0140\u0141\5\"\22\2\u0141"+ - "\u0142\7\5\2\2\u0142\u0151\3\2\2\2\u0143\u0145\5 \21\2\u0144\u0143\3\2"+ - "\2\2\u0145\u0146\3\2\2\2\u0146\u0144\3\2\2\2\u0146\u0147\3\2\2\2\u0147"+ - "\u0151\3\2\2\2\u0148\u0151\7\35\2\2\u0149\u0151\7\36\2\2\u014a\u0151\7"+ - "\37\2\2\u014b\u0151\7B\2\2\u014c\u014d\7@\2\2\u014d\u014e\5\36\20\2\u014e"+ - "\u014f\7A\2\2\u014f\u0151\3\2\2\2\u0150\u0113\3\2\2\2\u0150\u0125\3\2"+ - "\2\2\u0150\u012a\3\2\2\2\u0150\u012f\3\2\2\2\u0150\u013f\3\2\2\2\u0150"+ - "\u0144\3\2\2\2\u0150\u0148\3\2\2\2\u0150\u0149\3\2\2\2\u0150\u014a\3\2"+ - "\2\2\u0150\u014b\3\2\2\2\u0150\u014c\3\2\2\2\u0151\u015a\3\2\2\2\u0152"+ - "\u0153\f\17\2\2\u0153\u0154\7\31\2\2\u0154\u0159\5\36\20\17\u0155\u0156"+ - "\f\16\2\2\u0156\u0157\7\32\2\2\u0157\u0159\5\36\20\16\u0158\u0152\3\2"+ - "\2\2\u0158\u0155\3\2\2\2\u0159\u015c\3\2\2\2\u015a\u0158\3\2\2\2\u015a"+ - "\u015b\3\2\2\2\u015b\37\3\2\2\2\u015c\u015a\3\2\2\2\u015d\u015e\7 \2\2"+ - "\u015e\u015f\7\4\2\2\u015f\u0160\7B\2\2\u0160\u0161\7\7\2\2\u0161\u0164"+ - "\7)\2\2\u0162\u0163\7\13\2\2\u0163\u0165\5\"\22\2\u0164\u0162\3\2\2\2"+ - "\u0164\u0165\3\2\2\2\u0165\u0167\3\2\2\2\u0166\u0168\7\13\2\2\u0167\u0166"+ - "\3\2\2\2\u0167\u0168\3\2\2\2\u0168\u0169\3\2\2\2\u0169\u016a\7\5\2\2\u016a"+ - "!\3\2\2\2\u016b\u0184\3\2\2\2\u016c\u016d\7B\2\2\u016d\u016e\7\7\2\2\u016e"+ - "\u016f\5\36\20\2\u016f\u0170\7\13\2\2\u0170\u0172\3\2\2\2\u0171\u016c"+ - "\3\2\2\2\u0172\u0175\3\2\2\2\u0173\u0171\3\2\2\2\u0173\u0174\3\2\2\2\u0174"+ - "\u017f\3\2\2\2\u0175\u0173\3\2\2\2\u0176\u0177\7B\2\2\u0177\u0178\7\7"+ - "\2\2\u0178\u0179\5\36\20\2\u0179\u017d\3\2\2\2\u017a\u017e\7\13\2\2\u017b"+ - "\u017c\7 \2\2\u017c\u017e\7B\2\2\u017d\u017a\3\2\2\2\u017d\u017b\3\2\2"+ - "\2\u017d\u017e\3\2\2\2\u017e\u0180\3\2\2\2\u017f\u0176\3\2\2\2\u017f\u0180"+ - "\3\2\2\2\u0180\u0184\3\2\2\2\u0181\u0182\7 \2\2\u0182\u0184\7B\2\2\u0183"+ - "\u016b\3\2\2\2\u0183\u0173\3\2\2\2\u0183\u0181\3\2\2\2\u0184#\3\2\2\2"+ - "\u0185\u0186\b\23\1\2\u0186\u0215\5(\25\2\u0187\u0188\5\64\33\2\u0188"+ - "\u018a\7@\2\2\u0189\u018b\5\60\31\2\u018a\u0189\3\2\2\2\u018a\u018b\3"+ - "\2\2\2\u018b\u018c\3\2\2\2\u018c\u018d\7A\2\2\u018d\u0215\3\2\2\2\u018e"+ - "\u018f\7\65\2\2\u018f\u0215\5$\23\33\u0190\u0191\7B\2\2\u0191\u0192\7"+ - "\"\2\2\u0192\u0193\7?\2\2\u0193\u0215\5$\23\27\u0194\u0195\7,\2\2\u0195"+ - "\u0196\7\4\2\2\u0196\u019b\5$\23\2\u0197\u0198\7\13\2\2\u0198\u019a\5"+ - "$\23\2\u0199\u0197\3\2\2\2\u019a\u019d\3\2\2\2\u019b\u0199\3\2\2\2\u019b"+ - "\u019c\3\2\2\2\u019c\u019f\3\2\2\2\u019d\u019b\3\2\2\2\u019e\u01a0\7\13"+ - "\2\2\u019f\u019e\3\2\2\2\u019f\u01a0\3\2\2\2\u01a0\u01a1\3\2\2\2\u01a1"+ - "\u01a2\7\5\2\2\u01a2\u0215\3\2\2\2\u01a3\u01a4\7-\2\2\u01a4\u01a5\7\4"+ - "\2\2\u01a5\u01aa\5$\23\2\u01a6\u01a7\7\13\2\2\u01a7\u01a9\5$\23\2\u01a8"+ - "\u01a6\3\2\2\2\u01a9\u01ac\3\2\2\2\u01aa\u01a8\3\2\2\2\u01aa\u01ab\3\2"+ - "\2\2\u01ab\u01ae\3\2\2\2\u01ac\u01aa\3\2\2\2\u01ad\u01af\7\13\2\2\u01ae"+ - "\u01ad\3\2\2\2\u01ae\u01af\3\2\2\2\u01af\u01b0\3\2\2\2\u01b0\u01b1\7\5"+ - "\2\2\u01b1\u0215\3\2\2\2\u01b2\u01b3\7#\2\2\u01b3\u01b4\7\4\2\2\u01b4"+ - "\u01b9\5$\23\2\u01b5\u01b6\7\13\2\2\u01b6\u01b8\5$\23\2\u01b7\u01b5\3"+ - "\2\2\2\u01b8\u01bb\3\2\2\2\u01b9\u01b7\3\2\2\2\u01b9\u01ba\3\2\2\2\u01ba"+ - "\u01bd\3\2\2\2\u01bb\u01b9\3\2\2\2\u01bc\u01be\7\13\2\2\u01bd\u01bc\3"+ - "\2\2\2\u01bd\u01be\3\2\2\2\u01be\u01bf\3\2\2\2\u01bf\u01c0\7\5\2\2\u01c0"+ - "\u0215\3\2\2\2\u01c1\u01c2\7$\2\2\u01c2\u01c3\7\4\2\2\u01c3\u01c8\5$\23"+ - "\2\u01c4\u01c5\7\13\2\2\u01c5\u01c7\5$\23\2\u01c6\u01c4\3\2\2\2\u01c7"+ - "\u01ca\3\2\2\2\u01c8\u01c6\3\2\2\2\u01c8\u01c9\3\2\2\2\u01c9\u01cc\3\2"+ - "\2\2\u01ca\u01c8\3\2\2\2\u01cb\u01cd\7\13\2\2\u01cc\u01cb\3\2\2\2\u01cc"+ - "\u01cd\3\2\2\2\u01cd\u01ce\3\2\2\2\u01ce\u01cf\7\5\2\2\u01cf\u0215\3\2"+ - "\2\2\u01d0\u0215\t\2\2\2\u01d1\u01d2\7@\2\2\u01d2\u01d3\5$\23\2\u01d3"+ - "\u01d4\7\13\2\2\u01d4\u01d9\5$\23\2\u01d5\u01d6\7\13\2\2\u01d6\u01d8\5"+ - "$\23\2\u01d7\u01d5\3\2\2\2\u01d8\u01db\3\2\2\2\u01d9\u01d7\3\2\2\2\u01d9"+ - "\u01da\3\2\2\2\u01da\u01dd\3\2\2\2\u01db\u01d9\3\2\2\2\u01dc\u01de\7\13"+ - "\2\2\u01dd\u01dc\3\2\2\2\u01dd\u01de\3\2\2\2\u01de\u01df\3\2\2\2\u01df"+ - "\u01e0\7A\2\2\u01e0\u0215\3\2\2\2\u01e1\u01e2\7\4\2\2\u01e2\u01e7\5\62"+ - "\32\2\u01e3\u01e4\7\13\2\2\u01e4\u01e6\5\62\32\2\u01e5\u01e3\3\2\2\2\u01e6"+ - "\u01e9\3\2\2\2\u01e7\u01e5\3\2\2\2\u01e7\u01e8\3\2\2\2\u01e8\u01eb\3\2"+ - "\2\2\u01e9\u01e7\3\2\2\2\u01ea\u01ec\7\13\2\2\u01eb\u01ea\3\2\2\2\u01eb"+ - "\u01ec\3\2\2\2\u01ec\u01ed\3\2\2\2\u01ed\u01ee\7\5\2\2\u01ee\u0215\3\2"+ - "\2\2\u01ef\u01f8\7\33\2\2\u01f0\u01f5\5$\23\2\u01f1\u01f2\7\13\2\2\u01f2"+ - "\u01f4\5$\23\2\u01f3\u01f1\3\2\2\2\u01f4\u01f7\3\2\2\2\u01f5\u01f3\3\2"+ - "\2\2\u01f5\u01f6\3\2\2\2\u01f6\u01f9\3\2\2\2\u01f7\u01f5\3\2\2\2\u01f8"+ - "\u01f0\3\2\2\2\u01f8\u01f9\3\2\2\2\u01f9\u01fb\3\2\2\2\u01fa\u01fc\7\13"+ - "\2\2\u01fb\u01fa\3\2\2\2\u01fb\u01fc\3\2\2\2\u01fc\u01fd\3\2\2\2\u01fd"+ - "\u0215\7\34\2\2\u01fe\u01ff\7%\2\2\u01ff\u0200\7@\2\2\u0200\u0201\5$\23"+ - "\2\u0201\u0202\7A\2\2\u0202\u0203\5$\23\2\u0203\u0204\7&\2\2\u0204\u0205"+ - "\5$\23\7\u0205\u0215\3\2\2\2\u0206\u0207\5\n\6\2\u0207\u0208\5$\23\6\u0208"+ - "\u0215\3\2\2\2\u0209\u020a\5\f\7\2\u020a\u020b\5$\23\5\u020b\u0215\3\2"+ - "\2\2\u020c\u020d\7@\2\2\u020d\u020e\5$\23\2\u020e\u020f\7A\2\2\u020f\u0215"+ - "\3\2\2\2\u0210\u0211\7\4\2\2\u0211\u0212\5$\23\2\u0212\u0213\7\5\2\2\u0213"+ - "\u0215\3\2\2\2\u0214\u0185\3\2\2\2\u0214\u0187\3\2\2\2\u0214\u018e\3\2"+ - "\2\2\u0214\u0190\3\2\2\2\u0214\u0194\3\2\2\2\u0214\u01a3\3\2\2\2\u0214"+ - "\u01b2\3\2\2\2\u0214\u01c1\3\2\2\2\u0214\u01d0\3\2\2\2\u0214\u01d1\3\2"+ - "\2\2\u0214\u01e1\3\2\2\2\u0214\u01ef\3\2\2\2\u0214\u01fe\3\2\2\2\u0214"+ - "\u0206\3\2\2\2\u0214\u0209\3\2\2\2\u0214\u020c\3\2\2\2\u0214\u0210\3\2"+ - "\2\2\u0215\u0254\3\2\2\2\u0216\u0217\f\34\2\2\u0217\u0218\7!\2\2\u0218"+ - "\u0253\5$\23\34\u0219\u021a\f\32\2\2\u021a\u021b\t\3\2\2\u021b\u0253\5"+ - "$\23\33\u021c\u021d\f\31\2\2\u021d\u021e\t\4\2\2\u021e\u0253\5$\23\32"+ - "\u021f\u0220\f\30\2\2\u0220\u0221\t\5\2\2\u0221\u0253\5$\23\31\u0222\u0223"+ - "\f\26\2\2\u0223\u0224\7?\2\2\u0224\u0225\5$\23\27\u0225\u0226\b\23\1\2"+ - "\u0226\u0253\3\2\2\2\u0227\u0228\f\24\2\2\u0228\u0229\7,\2\2\u0229\u0253"+ - "\5$\23\25\u022a\u022b\f\22\2\2\u022b\u022c\7-\2\2\u022c\u0253\5$\23\23"+ - "\u022d\u022e\f\21\2\2\u022e\u022f\7.\2\2\u022f\u0253\5$\23\22\u0230\u0231"+ - "\f\20\2\2\u0231\u0232\7/\2\2\u0232\u0253\5$\23\21\u0233\u0234\f\n\2\2"+ - "\u0234\u0235\7\31\2\2\u0235\u0253\5$\23\13\u0236\u0237\f \2\2\u0237\u0238"+ - "\7\25\2\2\u0238\u023e\5\66\34\2\u0239\u023b\7@\2\2\u023a\u023c\5\60\31"+ - "\2\u023b\u023a\3\2\2\2\u023b\u023c\3\2\2\2\u023c\u023d\3\2\2\2\u023d\u023f"+ - "\7A\2\2\u023e\u0239\3\2\2\2\u023e\u023f\3\2\2\2\u023f\u0253\3\2\2\2\u0240"+ - "\u0241\f\35\2\2\u0241\u0242\7\33\2\2\u0242\u0243\5$\23\2\u0243\u0244\7"+ - "\34\2\2\u0244\u0253\3\2\2\2\u0245\u0246\f\17\2\2\u0246\u024e\7\63\2\2"+ - "\u0247\u0248\7 \2\2\u0248\u0249\7)\2\2\u0249\u024a\7\7\2\2\u024a\u024b"+ - "\5,\27\2\u024b\u024c\7\32\2\2\u024c\u024d\5$\23\2\u024d\u024f\3\2\2\2"+ - "\u024e\u0247\3\2\2\2\u024f\u0250\3\2\2\2\u0250\u024e\3\2\2\2\u0250\u0251"+ - "\3\2\2\2\u0251\u0253\3\2\2\2\u0252\u0216\3\2\2\2\u0252\u0219\3\2\2\2\u0252"+ - "\u021c\3\2\2\2\u0252\u021f\3\2\2\2\u0252\u0222\3\2\2\2\u0252\u0227\3\2"+ - "\2\2\u0252\u022a\3\2\2\2\u0252\u022d\3\2\2\2\u0252\u0230\3\2\2\2\u0252"+ - "\u0233\3\2\2\2\u0252\u0236\3\2\2\2\u0252\u0240\3\2\2\2\u0252\u0245\3\2"+ - "\2\2\u0253\u0256\3\2\2\2\u0254\u0252\3\2\2\2\u0254\u0255\3\2\2\2\u0255"+ - "%\3\2\2\2\u0256\u0254\3\2\2\2\u0257\u0258\5\b\5\2\u0258\u0259\7\2\2\3"+ - "\u0259\u0261\3\2\2\2\u025a\u025b\5$\23\2\u025b\u025c\7\2\2\3\u025c\u0261"+ - "\3\2\2\2\u025d\u025e\7D\2\2\u025e\u0261\7\2\2\3\u025f\u0261\7\2\2\3\u0260"+ - "\u0257\3\2\2\2\u0260\u025a\3\2\2\2\u0260\u025d\3\2\2\2\u0260\u025f\3\2"+ - "\2\2\u0261\'\3\2\2\2\u0262\u0263\5,\27\2\u0263\u0264\7\32\2\2\u0264\u0265"+ - "\5$\23\2\u0265\u0274\3\2\2\2\u0266\u0267\7@\2\2\u0267\u026c\5,\27\2\u0268"+ - "\u0269\7\13\2\2\u0269\u026b\5,\27\2\u026a\u0268\3\2\2\2\u026b\u026e\3"+ - "\2\2\2\u026c\u026a\3\2\2\2\u026c\u026d\3\2\2\2\u026d\u026f\3\2\2\2\u026e"+ - "\u026c\3\2\2\2\u026f\u0270\7A\2\2\u0270\u0271\7\32\2\2\u0271\u0272\5$"+ - "\23\2\u0272\u0274\3\2\2\2\u0273\u0262\3\2\2\2\u0273\u0266\3\2\2\2\u0274"+ - ")\3\2\2\2\u0275\u0276\t\6\2\2\u0276+\3\2\2\2\u0277\u0278\5*\26\2\u0278"+ - "-\3\2\2\2\u0279\u027a\t\7\2\2\u027a/\3\2\2\2\u027b\u0280\5$\23\2\u027c"+ - "\u027d\7\13\2\2\u027d\u027f\5$\23\2\u027e\u027c\3\2\2\2\u027f\u0282\3"+ - "\2\2\2\u0280\u027e\3\2\2\2\u0280\u0281\3\2\2\2\u0281\61\3\2\2\2\u0282"+ - "\u0280\3\2\2\2\u0283\u0284\7B\2\2\u0284\u0285\7\7\2\2\u0285\u0289\5$\23"+ - "\2\u0286\u0287\7(\2\2\u0287\u0289\5$\23\2\u0288\u0283\3\2\2\2\u0288\u0286"+ - "\3\2\2\2\u0289\63\3\2\2\2\u028a\u028d\7B\2\2\u028b\u028d\t\b\2\2\u028c"+ - "\u028a\3\2\2\2\u028c\u028b\3\2\2\2\u028d\65\3\2\2\2\u028e\u0291\7B\2\2"+ - "\u028f\u0291\t\t\2\2\u0290\u028e\3\2\2\2\u0290\u028f\3\2\2\2\u0291\67"+ - "\3\2\2\2\u0292\u0293\t\n\2\2\u02939\3\2\2\2\u0294\u0295\t\13\2\2\u0295"+ - ";\3\2\2\2H?FOWs}\u0080\u0085\u0094\u009b\u009f\u00a2\u00a8\u00ad\u00b8"+ - "\u00c0\u00c6\u00ca\u00cc\u00d7\u00d9\u00e8\u00f0\u00ff\u0107\u0109\u011a"+ - "\u011d\u0120\u0137\u013b\u0146\u0150\u0158\u015a\u0164\u0167\u0173\u017d"+ - "\u017f\u0183\u018a\u019b\u019f\u01aa\u01ae\u01b9\u01bd\u01c8\u01cc\u01d9"+ - "\u01dd\u01e7\u01eb\u01f5\u01f8\u01fb\u0214\u023b\u023e\u0250\u0252\u0254"+ - "\u0260\u026c\u0273\u0280\u0288\u028c\u0290"; + "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\3\2\6\2H\n\2\r\2\16\2I\3\2\3\2\3\3\7\3O\n\3\f\3\16\3"+ + "R\13\3\3\3\3\3\3\3\3\3\7\3X\n\3\f\3\16\3[\13\3\3\3\3\3\3\4\7\4`\n\4\f"+ + "\4\16\4c\13\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5"+ + "\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\5\5{\n\5\3\6\3\6\3\6\3\6\3\6\3\6\7\6"+ + "\u0083\n\6\f\6\16\6\u0086\13\6\5\6\u0088\n\6\3\6\3\6\3\6\5\6\u008d\n\6"+ + "\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\7\6\u009a\n\6\f\6\16\6\u009d"+ + "\13\6\3\6\3\6\3\6\3\6\5\6\u00a3\n\6\3\6\3\6\5\6\u00a7\n\6\3\6\5\6\u00aa"+ + "\n\6\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\5\7\u00b7\n\7\3\7\3\7"+ + "\3\7\7\7\u00bc\n\7\f\7\16\7\u00bf\13\7\5\7\u00c1\n\7\3\b\3\b\3\b\3\b\3"+ + "\b\5\b\u00c8\n\b\3\t\3\t\3\t\3\t\5\t\u00ce\n\t\3\t\3\t\3\t\5\t\u00d3\n"+ + "\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\5\n\u00de\n\n\3\13\3\13\3\13\3"+ + "\13\3\13\3\13\5\13\u00e6\n\13\3\13\3\13\3\13\3\13\5\13\u00ec\n\13\3\13"+ + "\3\13\5\13\u00f0\n\13\5\13\u00f2\n\13\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f"+ + "\3\f\5\f\u00fd\n\f\5\f\u00ff\n\f\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3"+ + "\r\3\r\7\r\u010c\n\r\f\r\16\r\u010f\13\r\3\r\3\r\3\r\3\r\3\r\5\r\u0116"+ + "\n\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\7\r\u0123\n\r\f\r\16"+ + "\r\u0126\13\r\3\r\3\r\3\r\3\r\3\r\5\r\u012d\n\r\5\r\u012f\n\r\3\16\3\16"+ + "\3\17\3\17\3\20\3\20\3\21\3\21\3\22\3\22\3\22\3\22\3\22\7\22\u013e\n\22"+ + "\f\22\16\22\u0141\13\22\5\22\u0143\n\22\3\22\5\22\u0146\n\22\3\22\3\22"+ + "\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22"+ + "\3\22\3\22\3\22\7\22\u015b\n\22\f\22\16\22\u015e\13\22\3\22\5\22\u0161"+ + "\n\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\6\22\u016a\n\22\r\22\16\22\u016b"+ + "\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\5\22\u0176\n\22\3\22\3\22\3\22"+ + "\3\22\3\22\3\22\7\22\u017e\n\22\f\22\16\22\u0181\13\22\3\23\3\23\3\23"+ + "\3\23\3\23\3\23\3\23\5\23\u018a\n\23\3\23\5\23\u018d\n\23\3\23\3\23\3"+ + "\24\3\24\3\24\3\24\3\24\7\24\u0196\n\24\f\24\16\24\u0199\13\24\3\24\3"+ + "\24\3\24\3\24\3\24\3\24\3\24\5\24\u01a2\n\24\5\24\u01a4\n\24\3\24\3\24"+ + "\5\24\u01a8\n\24\3\25\3\25\3\26\3\26\3\26\3\26\3\26\5\26\u01b1\n\26\3"+ + "\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\7"+ + "\26\u01c1\n\26\f\26\16\26\u01c4\13\26\3\26\5\26\u01c7\n\26\3\26\3\26\3"+ + "\26\3\26\3\26\3\26\3\26\7\26\u01d0\n\26\f\26\16\26\u01d3\13\26\3\26\5"+ + "\26\u01d6\n\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\7\26\u01df\n\26\f\26"+ + "\16\26\u01e2\13\26\3\26\5\26\u01e5\n\26\3\26\3\26\3\26\3\26\3\26\3\26"+ + "\3\26\7\26\u01ee\n\26\f\26\16\26\u01f1\13\26\3\26\5\26\u01f4\n\26\3\26"+ + "\3\26\3\26\3\26\3\26\3\26\5\26\u01fc\n\26\3\26\3\26\3\26\3\26\3\26\3\26"+ + "\7\26\u0204\n\26\f\26\16\26\u0207\13\26\3\26\5\26\u020a\n\26\3\26\3\26"+ + "\3\26\3\26\3\26\3\26\7\26\u0212\n\26\f\26\16\26\u0215\13\26\3\26\5\26"+ + "\u0218\n\26\3\26\3\26\3\26\3\26\3\26\3\26\7\26\u0220\n\26\f\26\16\26\u0223"+ + "\13\26\5\26\u0225\n\26\3\26\5\26\u0228\n\26\3\26\3\26\3\26\3\26\3\26\3"+ + "\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3"+ + "\26\3\26\3\26\3\26\5\26\u0241\n\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26"+ + "\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26"+ + "\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26"+ + "\3\26\3\26\5\26\u0268\n\26\3\26\5\26\u026b\n\26\3\26\3\26\3\26\3\26\3"+ + "\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\6\26\u027b\n\26\r\26"+ + "\16\26\u027c\7\26\u027f\n\26\f\26\16\26\u0282\13\26\3\27\3\27\3\27\3\27"+ + "\3\27\3\27\3\27\3\27\3\27\5\27\u028d\n\27\3\30\3\30\3\30\3\30\3\30\3\30"+ + "\3\30\3\30\7\30\u0297\n\30\f\30\16\30\u029a\13\30\3\30\3\30\3\30\3\30"+ + "\5\30\u02a0\n\30\3\31\3\31\5\31\u02a4\n\31\3\32\3\32\3\33\3\33\5\33\u02aa"+ + "\n\33\3\34\3\34\3\34\7\34\u02af\n\34\f\34\16\34\u02b2\13\34\3\35\3\35"+ + "\3\35\3\35\3\35\3\35\5\35\u02ba\n\35\3\36\3\36\5\36\u02be\n\36\3\37\3"+ + "\37\5\37\u02c2\n\37\3 \3 \3!\3!\3\"\3\"\3\"\7\"\u02cb\n\"\f\"\16\"\u02ce"+ + "\13\"\3#\3#\3#\3#\5#\u02d4\n#\3#\2\4\"*$\2\4\6\b\n\f\16\20\22\24\26\30"+ + "\32\34\36 \"$&(*,.\60\62\64\668:<>@BD\2\t\3\2\679\3\2\65\66\3\2:?\3\2"+ + "-\63\3\2-\60\5\2!!-\60\65?\3\2*,\2\u0338\2G\3\2\2\2\4P\3\2\2\2\6a\3\2"+ + "\2\2\bz\3\2\2\2\n|\3\2\2\2\f\u00c0\3\2\2\2\16\u00c2\3\2\2\2\20\u00c9\3"+ + "\2\2\2\22\u00dd\3\2\2\2\24\u00f1\3\2\2\2\26\u00fe\3\2\2\2\30\u012e\3\2"+ + "\2\2\32\u0130\3\2\2\2\34\u0132\3\2\2\2\36\u0134\3\2\2\2 \u0136\3\2\2\2"+ + "\"\u0175\3\2\2\2$\u0182\3\2\2\2&\u01a7\3\2\2\2(\u01a9\3\2\2\2*\u0240\3"+ + "\2\2\2,\u028c\3\2\2\2.\u029f\3\2\2\2\60\u02a3\3\2\2\2\62\u02a5\3\2\2\2"+ + "\64\u02a9\3\2\2\2\66\u02ab\3\2\2\28\u02b9\3\2\2\2:\u02bd\3\2\2\2<\u02c1"+ + "\3\2\2\2>\u02c3\3\2\2\2@\u02c5\3\2\2\2B\u02c7\3\2\2\2D\u02d3\3\2\2\2F"+ + "H\5\4\3\2GF\3\2\2\2HI\3\2\2\2IG\3\2\2\2IJ\3\2\2\2JK\3\2\2\2KL\7\2\2\3"+ + "L\3\3\2\2\2MO\7D\2\2NM\3\2\2\2OR\3\2\2\2PN\3\2\2\2PQ\3\2\2\2QS\3\2\2\2"+ + "RP\3\2\2\2ST\7\3\2\2TU\5B\"\2UY\7\4\2\2VX\5\6\4\2WV\3\2\2\2X[\3\2\2\2"+ + "YW\3\2\2\2YZ\3\2\2\2Z\\\3\2\2\2[Y\3\2\2\2\\]\7\5\2\2]\5\3\2\2\2^`\7D\2"+ + "\2_^\3\2\2\2`c\3\2\2\2a_\3\2\2\2ab\3\2\2\2bd\3\2\2\2ca\3\2\2\2de\5\b\5"+ + "\2e\7\3\2\2\2fg\7\6\2\2gh\5B\"\2hi\7\7\2\2ij\5\"\22\2j{\3\2\2\2kl\7\b"+ + "\2\2lm\5B\"\2mn\7\7\2\2no\5\"\22\2o{\3\2\2\2pq\7\t\2\2qr\5\60\31\2rs\7"+ + "@\2\2st\5*\26\2t{\3\2\2\2u{\5\30\r\2v{\5\n\6\2w{\5\f\7\2x{\5\24\13\2y"+ + "{\5\26\f\2zf\3\2\2\2zk\3\2\2\2zp\3\2\2\2zu\3\2\2\2zv\3\2\2\2zw\3\2\2\2"+ + "zx\3\2\2\2zy\3\2\2\2{\t\3\2\2\2|}\5\22\n\2}\u00a2\5:\36\2~\u0087\7A\2"+ + "\2\177\u0084\5\62\32\2\u0080\u0081\7\n\2\2\u0081\u0083\5\62\32\2\u0082"+ + "\u0080\3\2\2\2\u0083\u0086\3\2\2\2\u0084\u0082\3\2\2\2\u0084\u0085\3\2"+ + "\2\2\u0085\u0088\3\2\2\2\u0086\u0084\3\2\2\2\u0087\177\3\2\2\2\u0087\u0088"+ + "\3\2\2\2\u0088\u0089\3\2\2\2\u0089\u008c\7B\2\2\u008a\u008b\7\7\2\2\u008b"+ + "\u008d\5\"\22\2\u008c\u008a\3\2\2\2\u008c\u008d\3\2\2\2\u008d\u00a3\3"+ + "\2\2\2\u008e\u008f\7\7\2\2\u008f\u00a3\5\"\22\2\u0090\u0091\7A\2\2\u0091"+ + "\u0092\5\62\32\2\u0092\u0093\7\7\2\2\u0093\u009b\5\"\22\2\u0094\u0095"+ + "\7\n\2\2\u0095\u0096\5\62\32\2\u0096\u0097\7\7\2\2\u0097\u0098\5\"\22"+ + "\2\u0098\u009a\3\2\2\2\u0099\u0094\3\2\2\2\u009a\u009d\3\2\2\2\u009b\u0099"+ + "\3\2\2\2\u009b\u009c\3\2\2\2\u009c\u009e\3\2\2\2\u009d\u009b\3\2\2\2\u009e"+ + "\u009f\7B\2\2\u009f\u00a0\7\7\2\2\u00a0\u00a1\5\"\22\2\u00a1\u00a3\3\2"+ + "\2\2\u00a2~\3\2\2\2\u00a2\u008e\3\2\2\2\u00a2\u0090\3\2\2\2\u00a2\u00a3"+ + "\3\2\2\2\u00a3\u00a6\3\2\2\2\u00a4\u00a5\7@\2\2\u00a5\u00a7\5*\26\2\u00a6"+ + "\u00a4\3\2\2\2\u00a6\u00a7\3\2\2\2\u00a7\u00a9\3\2\2\2\u00a8\u00aa\7\13"+ + "\2\2\u00a9\u00a8\3\2\2\2\u00a9\u00aa\3\2\2\2\u00aa\13\3\2\2\2\u00ab\u00ac"+ + "\7\f\2\2\u00ac\u00c1\5B\"\2\u00ad\u00ae\7\f\2\2\u00ae\u00af\5B\"\2\u00af"+ + "\u00b0\7@\2\2\u00b0\u00b1\5\"\22\2\u00b1\u00c1\3\2\2\2\u00b2\u00b3\7\f"+ + "\2\2\u00b3\u00b4\5B\"\2\u00b4\u00b6\7@\2\2\u00b5\u00b7\7\r\2\2\u00b6\u00b5"+ + "\3\2\2\2\u00b6\u00b7\3\2\2\2\u00b7\u00b8\3\2\2\2\u00b8\u00bd\5\16\b\2"+ + "\u00b9\u00ba\7\r\2\2\u00ba\u00bc\5\16\b\2\u00bb\u00b9\3\2\2\2\u00bc\u00bf"+ + "\3\2\2\2\u00bd\u00bb\3\2\2\2\u00bd\u00be\3\2\2\2\u00be\u00c1\3\2\2\2\u00bf"+ + "\u00bd\3\2\2\2\u00c0\u00ab\3\2\2\2\u00c0\u00ad\3\2\2\2\u00c0\u00b2\3\2"+ + "\2\2\u00c1\r\3\2\2\2\u00c2\u00c7\5D#\2\u00c3\u00c4\7A\2\2\u00c4\u00c5"+ + "\5\"\22\2\u00c5\u00c6\7B\2\2\u00c6\u00c8\3\2\2\2\u00c7\u00c3\3\2\2\2\u00c7"+ + "\u00c8\3\2\2\2\u00c8\17\3\2\2\2\u00c9\u00ca\7\16\2\2\u00ca\u00cd\5B\""+ + "\2\u00cb\u00cc\7\7\2\2\u00cc\u00ce\5\"\22\2\u00cd\u00cb\3\2\2\2\u00cd"+ + "\u00ce\3\2\2\2\u00ce\u00cf\3\2\2\2\u00cf\u00d0\7@\2\2\u00d0\u00d2\5*\26"+ + "\2\u00d1\u00d3\7\13\2\2\u00d2\u00d1\3\2\2\2\u00d2\u00d3\3\2\2\2\u00d3"+ + "\21\3\2\2\2\u00d4\u00de\7\17\2\2\u00d5\u00de\7\20\2\2\u00d6\u00d7\7\21"+ + "\2\2\u00d7\u00de\7\17\2\2\u00d8\u00d9\7\21\2\2\u00d9\u00de\7\20\2\2\u00da"+ + "\u00de\7\22\2\2\u00db\u00de\7\23\2\2\u00dc\u00de\7\24\2\2\u00dd\u00d4"+ + "\3\2\2\2\u00dd\u00d5\3\2\2\2\u00dd\u00d6\3\2\2\2\u00dd\u00d8\3\2\2\2\u00dd"+ + "\u00da\3\2\2\2\u00dd\u00db\3\2\2\2\u00dd\u00dc\3\2\2\2\u00de\23\3\2\2"+ + "\2\u00df\u00e0\7\25\2\2\u00e0\u00e1\5\34\17\2\u00e1\u00e2\7\26\2\2\u00e2"+ + "\u00e5\5\64\33\2\u00e3\u00e4\7\27\2\2\u00e4\u00e6\5 \21\2\u00e5\u00e3"+ + "\3\2\2\2\u00e5\u00e6\3\2\2\2\u00e6\u00f2\3\2\2\2\u00e7\u00e8\7\25\2\2"+ + "\u00e8\u00eb\5\34\17\2\u00e9\u00ea\7\30\2\2\u00ea\u00ec\5\34\17\2\u00eb"+ + "\u00e9\3\2\2\2\u00eb\u00ec\3\2\2\2\u00ec\u00ef\3\2\2\2\u00ed\u00ee\7\27"+ + "\2\2\u00ee\u00f0\5 \21\2\u00ef\u00ed\3\2\2\2\u00ef\u00f0\3\2\2\2\u00f0"+ + "\u00f2\3\2\2\2\u00f1\u00df\3\2\2\2\u00f1\u00e7\3\2\2\2\u00f2\25\3\2\2"+ + "\2\u00f3\u00f4\7\31\2\2\u00f4\u00f5\5\34\17\2\u00f5\u00f6\7\26\2\2\u00f6"+ + "\u00f7\5\64\33\2\u00f7\u00ff\3\2\2\2\u00f8\u00f9\7\31\2\2\u00f9\u00fc"+ + "\5\34\17\2\u00fa\u00fb\7\30\2\2\u00fb\u00fd\5\34\17\2\u00fc\u00fa\3\2"+ + "\2\2\u00fc\u00fd\3\2\2\2\u00fd\u00ff\3\2\2\2\u00fe\u00f3\3\2\2\2\u00fe"+ + "\u00f8\3\2\2\2\u00ff\27\3\2\2\2\u0100\u0101\7\25\2\2\u0101\u0102\5\32"+ + "\16\2\u0102\u0103\7A\2\2\u0103\u0104\5\34\17\2\u0104\u0105\7@\2\2\u0105"+ + "\u010d\5*\26\2\u0106\u0107\7\n\2\2\u0107\u0108\5\34\17\2\u0108\u0109\7"+ + "@\2\2\u0109\u010a\5*\26\2\u010a\u010c\3\2\2\2\u010b\u0106\3\2\2\2\u010c"+ + "\u010f\3\2\2\2\u010d\u010b\3\2\2\2\u010d\u010e\3\2\2\2\u010e\u0110\3\2"+ + "\2\2\u010f\u010d\3\2\2\2\u0110\u0111\7B\2\2\u0111\u0112\7\26\2\2\u0112"+ + "\u0115\7\67\2\2\u0113\u0114\7\27\2\2\u0114\u0116\5 \21\2\u0115\u0113\3"+ + "\2\2\2\u0115\u0116\3\2\2\2\u0116\u012f\3\2\2\2\u0117\u0118\7\25\2\2\u0118"+ + "\u0119\5\32\16\2\u0119\u011a\7A\2\2\u011a\u011b\5\34\17\2\u011b\u011c"+ + "\7@\2\2\u011c\u0124\5*\26\2\u011d\u011e\7\n\2\2\u011e\u011f\5\34\17\2"+ + "\u011f\u0120\7@\2\2\u0120\u0121\5*\26\2\u0121\u0123\3\2\2\2\u0122\u011d"+ + "\3\2\2\2\u0123\u0126\3\2\2\2\u0124\u0122\3\2\2\2\u0124\u0125\3\2\2\2\u0125"+ + "\u0127\3\2\2\2\u0126\u0124\3\2\2\2\u0127\u0128\7B\2\2\u0128\u0129\7\30"+ + "\2\2\u0129\u012c\5\36\20\2\u012a\u012b\7\27\2\2\u012b\u012d\5 \21\2\u012c"+ + "\u012a\3\2\2\2\u012c\u012d\3\2\2\2\u012d\u012f\3\2\2\2\u012e\u0100\3\2"+ + "\2\2\u012e\u0117\3\2\2\2\u012f\31\3\2\2\2\u0130\u0131\5B\"\2\u0131\33"+ + "\3\2\2\2\u0132\u0133\5B\"\2\u0133\35\3\2\2\2\u0134\u0135\5B\"\2\u0135"+ + "\37\3\2\2\2\u0136\u0137\7*\2\2\u0137!\3\2\2\2\u0138\u0139\b\22\1\2\u0139"+ + "\u0142\7A\2\2\u013a\u013f\5\"\22\2\u013b\u013c\7\n\2\2\u013c\u013e\5\""+ + "\22\2\u013d\u013b\3\2\2\2\u013e\u0141\3\2\2\2\u013f\u013d\3\2\2\2\u013f"+ + "\u0140\3\2\2\2\u0140\u0143\3\2\2\2\u0141\u013f\3\2\2\2\u0142\u013a\3\2"+ + "\2\2\u0142\u0143\3\2\2\2\u0143\u0145\3\2\2\2\u0144\u0146\7\n\2\2\u0145"+ + "\u0144\3\2\2\2\u0145\u0146\3\2\2\2\u0146\u0147\3\2\2\2\u0147\u0148\7B"+ + "\2\2\u0148\u0149\7\33\2\2\u0149\u0176\5\"\22\r\u014a\u014b\7\61\2\2\u014b"+ + "\u014c\7\34\2\2\u014c\u014d\5\"\22\2\u014d\u014e\7\35\2\2\u014e\u0176"+ + "\3\2\2\2\u014f\u0150\7\62\2\2\u0150\u0151\7\34\2\2\u0151\u0152\5\"\22"+ + "\2\u0152\u0153\7\35\2\2\u0153\u0176\3\2\2\2\u0154\u0155\7A\2\2\u0155\u0156"+ + "\5\"\22\2\u0156\u0157\7\n\2\2\u0157\u015c\5\"\22\2\u0158\u0159\7\n\2\2"+ + "\u0159\u015b\5\"\22\2\u015a\u0158\3\2\2\2\u015b\u015e\3\2\2\2\u015c\u015a"+ + "\3\2\2\2\u015c\u015d\3\2\2\2\u015d\u0160\3\2\2\2\u015e\u015c\3\2\2\2\u015f"+ + "\u0161\7\n\2\2\u0160\u015f\3\2\2\2\u0160\u0161\3\2\2\2\u0161\u0162\3\2"+ + "\2\2\u0162\u0163\7B\2\2\u0163\u0176\3\2\2\2\u0164\u0165\7\4\2\2\u0165"+ + "\u0166\5&\24\2\u0166\u0167\7\5\2\2\u0167\u0176\3\2\2\2\u0168\u016a\5$"+ + "\23\2\u0169\u0168\3\2\2\2\u016a\u016b\3\2\2\2\u016b\u0169\3\2\2\2\u016b"+ + "\u016c\3\2\2\2\u016c\u0176\3\2\2\2\u016d\u0176\7\36\2\2\u016e\u0176\7"+ + "\37\2\2\u016f\u0176\7 \2\2\u0170\u0176\5B\"\2\u0171\u0172\7A\2\2\u0172"+ + "\u0173\5\"\22\2\u0173\u0174\7B\2\2\u0174\u0176\3\2\2\2\u0175\u0138\3\2"+ + "\2\2\u0175\u014a\3\2\2\2\u0175\u014f\3\2\2\2\u0175\u0154\3\2\2\2\u0175"+ + "\u0164\3\2\2\2\u0175\u0169\3\2\2\2\u0175\u016d\3\2\2\2\u0175\u016e\3\2"+ + "\2\2\u0175\u016f\3\2\2\2\u0175\u0170\3\2\2\2\u0175\u0171\3\2\2\2\u0176"+ + "\u017f\3\2\2\2\u0177\u0178\f\17\2\2\u0178\u0179\7\32\2\2\u0179\u017e\5"+ + "\"\22\17\u017a\u017b\f\16\2\2\u017b\u017c\7\33\2\2\u017c\u017e\5\"\22"+ + "\16\u017d\u0177\3\2\2\2\u017d\u017a\3\2\2\2\u017e\u0181\3\2\2\2\u017f"+ + "\u017d\3\2\2\2\u017f\u0180\3\2\2\2\u0180#\3\2\2\2\u0181\u017f\3\2\2\2"+ + "\u0182\u0183\7\r\2\2\u0183\u0184\7\4\2\2\u0184\u0185\5B\"\2\u0185\u0186"+ + "\7\7\2\2\u0186\u0189\7*\2\2\u0187\u0188\7\n\2\2\u0188\u018a\5&\24\2\u0189"+ + "\u0187\3\2\2\2\u0189\u018a\3\2\2\2\u018a\u018c\3\2\2\2\u018b\u018d\7\n"+ + "\2\2\u018c\u018b\3\2\2\2\u018c\u018d\3\2\2\2\u018d\u018e\3\2\2\2\u018e"+ + "\u018f\7\5\2\2\u018f%\3\2\2\2\u0190\u0191\5(\25\2\u0191\u0192\7\7\2\2"+ + "\u0192\u0193\5\"\22\2\u0193\u0194\7\n\2\2\u0194\u0196\3\2\2\2\u0195\u0190"+ + "\3\2\2\2\u0196\u0199\3\2\2\2\u0197\u0195\3\2\2\2\u0197\u0198\3\2\2\2\u0198"+ + "\u01a3\3\2\2\2\u0199\u0197\3\2\2\2\u019a\u019b\5(\25\2\u019b\u019c\7\7"+ + "\2\2\u019c\u019d\5\"\22\2\u019d\u01a1\3\2\2\2\u019e\u01a2\7\n\2\2\u019f"+ + "\u01a0\7\r\2\2\u01a0\u01a2\7C\2\2\u01a1\u019e\3\2\2\2\u01a1\u019f\3\2"+ + "\2\2\u01a1\u01a2\3\2\2\2\u01a2\u01a4\3\2\2\2\u01a3\u019a\3\2\2\2\u01a3"+ + "\u01a4\3\2\2\2\u01a4\u01a8\3\2\2\2\u01a5\u01a6\7\r\2\2\u01a6\u01a8\7C"+ + "\2\2\u01a7\u0197\3\2\2\2\u01a7\u01a5\3\2\2\2\u01a8\'\3\2\2\2\u01a9\u01aa"+ + "\5D#\2\u01aa)\3\2\2\2\u01ab\u01ac\b\26\1\2\u01ac\u0241\5.\30\2\u01ad\u01ae"+ + "\5:\36\2\u01ae\u01b0\7A\2\2\u01af\u01b1\5\66\34\2\u01b0\u01af\3\2\2\2"+ + "\u01b0\u01b1\3\2\2\2\u01b1\u01b2\3\2\2\2\u01b2\u01b3\7B\2\2\u01b3\u0241"+ + "\3\2\2\2\u01b4\u01b5\7\66\2\2\u01b5\u0241\5*\26\33\u01b6\u01b7\5B\"\2"+ + "\u01b7\u01b8\7\"\2\2\u01b8\u01b9\7@\2\2\u01b9\u01ba\5*\26\27\u01ba\u0241"+ + "\3\2\2\2\u01bb\u01bc\7-\2\2\u01bc\u01bd\7\4\2\2\u01bd\u01c2\5*\26\2\u01be"+ + "\u01bf\7\n\2\2\u01bf\u01c1\5*\26\2\u01c0\u01be\3\2\2\2\u01c1\u01c4\3\2"+ + "\2\2\u01c2\u01c0\3\2\2\2\u01c2\u01c3\3\2\2\2\u01c3\u01c6\3\2\2\2\u01c4"+ + "\u01c2\3\2\2\2\u01c5\u01c7\7\n\2\2\u01c6\u01c5\3\2\2\2\u01c6\u01c7\3\2"+ + "\2\2\u01c7\u01c8\3\2\2\2\u01c8\u01c9\7\5\2\2\u01c9\u0241\3\2\2\2\u01ca"+ + "\u01cb\7.\2\2\u01cb\u01cc\7\4\2\2\u01cc\u01d1\5*\26\2\u01cd\u01ce\7\n"+ + "\2\2\u01ce\u01d0\5*\26\2\u01cf\u01cd\3\2\2\2\u01d0\u01d3\3\2\2\2\u01d1"+ + "\u01cf\3\2\2\2\u01d1\u01d2\3\2\2\2\u01d2\u01d5\3\2\2\2\u01d3\u01d1\3\2"+ + "\2\2\u01d4\u01d6\7\n\2\2\u01d5\u01d4\3\2\2\2\u01d5\u01d6\3\2\2\2\u01d6"+ + "\u01d7\3\2\2\2\u01d7\u01d8\7\5\2\2\u01d8\u0241\3\2\2\2\u01d9\u01da\7#"+ + "\2\2\u01da\u01db\7\4\2\2\u01db\u01e0\5*\26\2\u01dc\u01dd\7\n\2\2\u01dd"+ + "\u01df\5*\26\2\u01de\u01dc\3\2\2\2\u01df\u01e2\3\2\2\2\u01e0\u01de\3\2"+ + "\2\2\u01e0\u01e1\3\2\2\2\u01e1\u01e4\3\2\2\2\u01e2\u01e0\3\2\2\2\u01e3"+ + "\u01e5\7\n\2\2\u01e4\u01e3\3\2\2\2\u01e4\u01e5\3\2\2\2\u01e5\u01e6\3\2"+ + "\2\2\u01e6\u01e7\7\5\2\2\u01e7\u0241\3\2\2\2\u01e8\u01e9\7$\2\2\u01e9"+ + "\u01ea\7\4\2\2\u01ea\u01ef\5*\26\2\u01eb\u01ec\7\n\2\2\u01ec\u01ee\5*"+ + "\26\2\u01ed\u01eb\3\2\2\2\u01ee\u01f1\3\2\2\2\u01ef\u01ed\3\2\2\2\u01ef"+ + "\u01f0\3\2\2\2\u01f0\u01f3\3\2\2\2\u01f1\u01ef\3\2\2\2\u01f2\u01f4\7\n"+ + "\2\2\u01f3\u01f2\3\2\2\2\u01f3\u01f4\3\2\2\2\u01f4\u01f5\3\2\2\2\u01f5"+ + "\u01f6\7\5\2\2\u01f6\u0241\3\2\2\2\u01f7\u01fc\5B\"\2\u01f8\u01fc\7,\2"+ + "\2\u01f9\u01fc\7+\2\2\u01fa\u01fc\7*\2\2\u01fb\u01f7\3\2\2\2\u01fb\u01f8"+ + "\3\2\2\2\u01fb\u01f9\3\2\2\2\u01fb\u01fa\3\2\2\2\u01fc\u0241\3\2\2\2\u01fd"+ + "\u01fe\7A\2\2\u01fe\u01ff\5*\26\2\u01ff\u0200\7\n\2\2\u0200\u0205\5*\26"+ + "\2\u0201\u0202\7\n\2\2\u0202\u0204\5*\26\2\u0203\u0201\3\2\2\2\u0204\u0207"+ + "\3\2\2\2\u0205\u0203\3\2\2\2\u0205\u0206\3\2\2\2\u0206\u0209\3\2\2\2\u0207"+ + "\u0205\3\2\2\2\u0208\u020a\7\n\2\2\u0209\u0208\3\2\2\2\u0209\u020a\3\2"+ + "\2\2\u020a\u020b\3\2\2\2\u020b\u020c\7B\2\2\u020c\u0241\3\2\2\2\u020d"+ + "\u020e\7\4\2\2\u020e\u0213\58\35\2\u020f\u0210\7\n\2\2\u0210\u0212\58"+ + "\35\2\u0211\u020f\3\2\2\2\u0212\u0215\3\2\2\2\u0213\u0211\3\2\2\2\u0213"+ + "\u0214\3\2\2\2\u0214\u0217\3\2\2\2\u0215\u0213\3\2\2\2\u0216\u0218\7\n"+ + "\2\2\u0217\u0216\3\2\2\2\u0217\u0218\3\2\2\2\u0218\u0219\3\2\2\2\u0219"+ + "\u021a\7\5\2\2\u021a\u0241\3\2\2\2\u021b\u0224\7\34\2\2\u021c\u0221\5"+ + "*\26\2\u021d\u021e\7\n\2\2\u021e\u0220\5*\26\2\u021f\u021d\3\2\2\2\u0220"+ + "\u0223\3\2\2\2\u0221\u021f\3\2\2\2\u0221\u0222\3\2\2\2\u0222\u0225\3\2"+ + "\2\2\u0223\u0221\3\2\2\2\u0224\u021c\3\2\2\2\u0224\u0225\3\2\2\2\u0225"+ + "\u0227\3\2\2\2\u0226\u0228\7\n\2\2\u0227\u0226\3\2\2\2\u0227\u0228\3\2"+ + "\2\2\u0228\u0229\3\2\2\2\u0229\u0241\7\35\2\2\u022a\u022b\7%\2\2\u022b"+ + "\u022c\7A\2\2\u022c\u022d\5*\26\2\u022d\u022e\7B\2\2\u022e\u022f\5*\26"+ + "\2\u022f\u0230\7&\2\2\u0230\u0231\5*\26\7\u0231\u0241\3\2\2\2\u0232\u0233"+ + "\5\n\6\2\u0233\u0234\5*\26\6\u0234\u0241\3\2\2\2\u0235\u0236\5\20\t\2"+ + "\u0236\u0237\5*\26\5\u0237\u0241\3\2\2\2\u0238\u0239\7A\2\2\u0239\u023a"+ + "\5*\26\2\u023a\u023b\7B\2\2\u023b\u0241\3\2\2\2\u023c\u023d\7\4\2\2\u023d"+ + "\u023e\5*\26\2\u023e\u023f\7\5\2\2\u023f\u0241\3\2\2\2\u0240\u01ab\3\2"+ + "\2\2\u0240\u01ad\3\2\2\2\u0240\u01b4\3\2\2\2\u0240\u01b6\3\2\2\2\u0240"+ + "\u01bb\3\2\2\2\u0240\u01ca\3\2\2\2\u0240\u01d9\3\2\2\2\u0240\u01e8\3\2"+ + "\2\2\u0240\u01fb\3\2\2\2\u0240\u01fd\3\2\2\2\u0240\u020d\3\2\2\2\u0240"+ + "\u021b\3\2\2\2\u0240\u022a\3\2\2\2\u0240\u0232\3\2\2\2\u0240\u0235\3\2"+ + "\2\2\u0240\u0238\3\2\2\2\u0240\u023c\3\2\2\2\u0241\u0280\3\2\2\2\u0242"+ + "\u0243\f\34\2\2\u0243\u0244\7!\2\2\u0244\u027f\5*\26\34\u0245\u0246\f"+ + "\32\2\2\u0246\u0247\t\2\2\2\u0247\u027f\5*\26\33\u0248\u0249\f\31\2\2"+ + "\u0249\u024a\t\3\2\2\u024a\u027f\5*\26\32\u024b\u024c\f\30\2\2\u024c\u024d"+ + "\t\4\2\2\u024d\u027f\5*\26\31\u024e\u024f\f\26\2\2\u024f\u0250\7@\2\2"+ + "\u0250\u0251\5*\26\27\u0251\u0252\b\26\1\2\u0252\u027f\3\2\2\2\u0253\u0254"+ + "\f\24\2\2\u0254\u0255\7-\2\2\u0255\u027f\5*\26\25\u0256\u0257\f\22\2\2"+ + "\u0257\u0258\7.\2\2\u0258\u027f\5*\26\23\u0259\u025a\f\21\2\2\u025a\u025b"+ + "\7/\2\2\u025b\u027f\5*\26\22\u025c\u025d\f\20\2\2\u025d\u025e\7\60\2\2"+ + "\u025e\u027f\5*\26\21\u025f\u0260\f\n\2\2\u0260\u0261\7\32\2\2\u0261\u027f"+ + "\5*\26\13\u0262\u0263\f \2\2\u0263\u0264\7\26\2\2\u0264\u026a\5<\37\2"+ + "\u0265\u0267\7A\2\2\u0266\u0268\5\66\34\2\u0267\u0266\3\2\2\2\u0267\u0268"+ + "\3\2\2\2\u0268\u0269\3\2\2\2\u0269\u026b\7B\2\2\u026a\u0265\3\2\2\2\u026a"+ + "\u026b\3\2\2\2\u026b\u027f\3\2\2\2\u026c\u026d\f\35\2\2\u026d\u026e\7"+ + "\34\2\2\u026e\u026f\5*\26\2\u026f\u0270\7\35\2\2\u0270\u027f\3\2\2\2\u0271"+ + "\u0272\f\17\2\2\u0272\u027a\7\64\2\2\u0273\u0274\7\r\2\2\u0274\u0275\7"+ + "*\2\2\u0275\u0276\7\7\2\2\u0276\u0277\5\62\32\2\u0277\u0278\7\33\2\2\u0278"+ + "\u0279\5*\26\2\u0279\u027b\3\2\2\2\u027a\u0273\3\2\2\2\u027b\u027c\3\2"+ + "\2\2\u027c\u027a\3\2\2\2\u027c\u027d\3\2\2\2\u027d\u027f\3\2\2\2\u027e"+ + "\u0242\3\2\2\2\u027e\u0245\3\2\2\2\u027e\u0248\3\2\2\2\u027e\u024b\3\2"+ + "\2\2\u027e\u024e\3\2\2\2\u027e\u0253\3\2\2\2\u027e\u0256\3\2\2\2\u027e"+ + "\u0259\3\2\2\2\u027e\u025c\3\2\2\2\u027e\u025f\3\2\2\2\u027e\u0262\3\2"+ + "\2\2\u027e\u026c\3\2\2\2\u027e\u0271\3\2\2\2\u027f\u0282\3\2\2\2\u0280"+ + "\u027e\3\2\2\2\u0280\u0281\3\2\2\2\u0281+\3\2\2\2\u0282\u0280\3\2\2\2"+ + "\u0283\u0284\5\b\5\2\u0284\u0285\7\2\2\3\u0285\u028d\3\2\2\2\u0286\u0287"+ + "\5*\26\2\u0287\u0288\7\2\2\3\u0288\u028d\3\2\2\2\u0289\u028a\7D\2\2\u028a"+ + "\u028d\7\2\2\3\u028b\u028d\7\2\2\3\u028c\u0283\3\2\2\2\u028c\u0286\3\2"+ + "\2\2\u028c\u0289\3\2\2\2\u028c\u028b\3\2\2\2\u028d-\3\2\2\2\u028e\u028f"+ + "\5\62\32\2\u028f\u0290\7\33\2\2\u0290\u0291\5*\26\2\u0291\u02a0\3\2\2"+ + "\2\u0292\u0293\7A\2\2\u0293\u0298\5\62\32\2\u0294\u0295\7\n\2\2\u0295"+ + "\u0297\5\62\32\2\u0296\u0294\3\2\2\2\u0297\u029a\3\2\2\2\u0298\u0296\3"+ + "\2\2\2\u0298\u0299\3\2\2\2\u0299\u029b\3\2\2\2\u029a\u0298\3\2\2\2\u029b"+ + "\u029c\7B\2\2\u029c\u029d\7\33\2\2\u029d\u029e\5*\26\2\u029e\u02a0\3\2"+ + "\2\2\u029f\u028e\3\2\2\2\u029f\u0292\3\2\2\2\u02a0/\3\2\2\2\u02a1\u02a4"+ + "\7\'\2\2\u02a2\u02a4\5B\"\2\u02a3\u02a1\3\2\2\2\u02a3\u02a2\3\2\2\2\u02a4"+ + "\61\3\2\2\2\u02a5\u02a6\5\60\31\2\u02a6\63\3\2\2\2\u02a7\u02aa\7\67\2"+ + "\2\u02a8\u02aa\5B\"\2\u02a9\u02a7\3\2\2\2\u02a9\u02a8\3\2\2\2\u02aa\65"+ + "\3\2\2\2\u02ab\u02b0\5*\26\2\u02ac\u02ad\7\n\2\2\u02ad\u02af\5*\26\2\u02ae"+ + "\u02ac\3\2\2\2\u02af\u02b2\3\2\2\2\u02b0\u02ae\3\2\2\2\u02b0\u02b1\3\2"+ + "\2\2\u02b1\67\3\2\2\2\u02b2\u02b0\3\2\2\2\u02b3\u02b4\5D#\2\u02b4\u02b5"+ + "\7\7\2\2\u02b5\u02b6\5*\26\2\u02b6\u02ba\3\2\2\2\u02b7\u02b8\7(\2\2\u02b8"+ + "\u02ba\5*\26\2\u02b9\u02b3\3\2\2\2\u02b9\u02b7\3\2\2\2\u02ba9\3\2\2\2"+ + "\u02bb\u02be\5B\"\2\u02bc\u02be\t\5\2\2\u02bd\u02bb\3\2\2\2\u02bd\u02bc"+ + "\3\2\2\2\u02be;\3\2\2\2\u02bf\u02c2\5B\"\2\u02c0\u02c2\t\6\2\2\u02c1\u02bf"+ + "\3\2\2\2\u02c1\u02c0\3\2\2\2\u02c2=\3\2\2\2\u02c3\u02c4\t\7\2\2\u02c4"+ + "?\3\2\2\2\u02c5\u02c6\t\b\2\2\u02c6A\3\2\2\2\u02c7\u02cc\7C\2\2\u02c8"+ + "\u02c9\7)\2\2\u02c9\u02cb\7C\2\2\u02ca\u02c8\3\2\2\2\u02cb\u02ce\3\2\2"+ + "\2\u02cc\u02ca\3\2\2\2\u02cc\u02cd\3\2\2\2\u02cdC\3\2\2\2\u02ce\u02cc"+ + "\3\2\2\2\u02cf\u02d4\7C\2\2\u02d0\u02d1\5B\"\2\u02d1\u02d2\b#\1\2\u02d2"+ + "\u02d4\3\2\2\2\u02d3\u02cf\3\2\2\2\u02d3\u02d0\3\2\2\2\u02d4E\3\2\2\2"+ + "QIPYaz\u0084\u0087\u008c\u009b\u00a2\u00a6\u00a9\u00b6\u00bd\u00c0\u00c7"+ + "\u00cd\u00d2\u00dd\u00e5\u00eb\u00ef\u00f1\u00fc\u00fe\u010d\u0115\u0124"+ + "\u012c\u012e\u013f\u0142\u0145\u015c\u0160\u016b\u0175\u017d\u017f\u0189"+ + "\u018c\u0197\u01a1\u01a3\u01a7\u01b0\u01c2\u01c6\u01d1\u01d5\u01e0\u01e4"+ + "\u01ef\u01f3\u01fb\u0205\u0209\u0213\u0217\u0221\u0224\u0227\u0240\u0267"+ + "\u026a\u027c\u027e\u0280\u028c\u0298\u029f\u02a3\u02a9\u02b0\u02b9\u02bd"+ + "\u02c1\u02cc\u02d3"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/quint/src/generated/Quint.g4 b/quint/src/generated/Quint.g4 index ed4eceb9c..7249e430d 100644 --- a/quint/src/generated/Quint.g4 +++ b/quint/src/generated/Quint.g4 @@ -19,24 +19,24 @@ import { quintErrorToString } from '../quintError' // entry point for the parser modules : module+ EOF; -module : DOCCOMMENT* 'module' qualId '{' documentedUnit* '}'; -documentedUnit : DOCCOMMENT* unit; - -// a module unit -unit : 'const' qualId ':' type # const - | 'var' qualId ':' type # var - | 'assume' identOrHole '=' expr # assume - | instanceMod # instance - | operDef # oper - | typeDef # typeDefs - | importMod # importDef - | exportMod # exportDef - // https://github.com/informalsystems/quint/issues/378 - //| 'nondet' qualId (':' type)? '=' expr ';'? expr { - // const m = "QNT007: 'nondet' is only allowed inside actions" - // this.notifyErrorListeners(m) - //} # nondetError - ; +module : DOCCOMMENT* 'module' qualId '{' documentedDeclaration* '}'; +documentedDeclaration : DOCCOMMENT* declaration; + +// a module declaration +declaration : 'const' qualId ':' type # const + | 'var' qualId ':' type # var + | 'assume' identOrHole '=' expr # assume + | instanceMod # instance + | operDef # oper + | typeDef # typeDefs + | importMod # importDef + | exportMod # exportDef + // https://github.com/informalsystems/quint/issues/378 + //| 'nondet' qualId (':' type)? '=' expr ';'? expr { + // const m = "QNT007: 'nondet' is only allowed inside actions" + // this.notifyErrorListeners(m) + //} # nondetError + ; // An operator definition. // We embed two kinds of parameters right in this rule. @@ -179,7 +179,7 @@ expr: // apply a built-in operator via the dot notation // A probing rule for REPL. // Note that a top-level declaration has priority over an expression. // For example, see: https://github.com/informalsystems/quint/issues/394 -unitOrExpr : unit EOF | expr EOF | DOCCOMMENT EOF | EOF; +declarationOrExpr : declaration EOF | expr EOF | DOCCOMMENT EOF | EOF; // This rule parses anonymous functions, e.g.: // 1. x => e diff --git a/quint/src/generated/Quint.interp b/quint/src/generated/Quint.interp index 9ded23535..e577f51c5 100644 --- a/quint/src/generated/Quint.interp +++ b/quint/src/generated/Quint.interp @@ -145,8 +145,8 @@ WS rule names: modules module -documentedUnit -unit +documentedDeclaration +declaration operDef typeDef typeSumVariant @@ -164,7 +164,7 @@ typeUnionRecOne row rowLabel expr -unitOrExpr +declarationOrExpr lambda identOrHole parameter diff --git a/quint/src/generated/QuintListener.ts b/quint/src/generated/QuintListener.ts index 3da7b4d67..7e2450a03 100644 --- a/quint/src/generated/QuintListener.ts +++ b/quint/src/generated/QuintListener.ts @@ -64,8 +64,8 @@ import { ImportDefContext } from "./QuintParser"; import { ExportDefContext } from "./QuintParser"; import { ModulesContext } from "./QuintParser"; import { ModuleContext } from "./QuintParser"; -import { DocumentedUnitContext } from "./QuintParser"; -import { UnitContext } from "./QuintParser"; +import { DocumentedDeclarationContext } from "./QuintParser"; +import { DeclarationContext } from "./QuintParser"; import { OperDefContext } from "./QuintParser"; import { TypeDefContext } from "./QuintParser"; import { TypeSumVariantContext } from "./QuintParser"; @@ -83,7 +83,7 @@ import { TypeUnionRecOneContext } from "./QuintParser"; import { RowContext } from "./QuintParser"; import { RowLabelContext } from "./QuintParser"; import { ExprContext } from "./QuintParser"; -import { UnitOrExprContext } from "./QuintParser"; +import { DeclarationOrExprContext } from "./QuintParser"; import { LambdaContext } from "./QuintParser"; import { IdentOrHoleContext } from "./QuintParser"; import { ParameterContext } from "./QuintParser"; @@ -690,104 +690,104 @@ export interface QuintListener extends ParseTreeListener { /** * Enter a parse tree produced by the `const` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree */ enterConst?: (ctx: ConstContext) => void; /** * Exit a parse tree produced by the `const` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree */ exitConst?: (ctx: ConstContext) => void; /** * Enter a parse tree produced by the `var` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree */ enterVar?: (ctx: VarContext) => void; /** * Exit a parse tree produced by the `var` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree */ exitVar?: (ctx: VarContext) => void; /** * Enter a parse tree produced by the `assume` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree */ enterAssume?: (ctx: AssumeContext) => void; /** * Exit a parse tree produced by the `assume` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree */ exitAssume?: (ctx: AssumeContext) => void; /** * Enter a parse tree produced by the `instance` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree */ enterInstance?: (ctx: InstanceContext) => void; /** * Exit a parse tree produced by the `instance` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree */ exitInstance?: (ctx: InstanceContext) => void; /** * Enter a parse tree produced by the `oper` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree */ enterOper?: (ctx: OperContext) => void; /** * Exit a parse tree produced by the `oper` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree */ exitOper?: (ctx: OperContext) => void; /** * Enter a parse tree produced by the `typeDefs` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree */ enterTypeDefs?: (ctx: TypeDefsContext) => void; /** * Exit a parse tree produced by the `typeDefs` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree */ exitTypeDefs?: (ctx: TypeDefsContext) => void; /** * Enter a parse tree produced by the `importDef` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree */ enterImportDef?: (ctx: ImportDefContext) => void; /** * Exit a parse tree produced by the `importDef` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree */ exitImportDef?: (ctx: ImportDefContext) => void; /** * Enter a parse tree produced by the `exportDef` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree */ enterExportDef?: (ctx: ExportDefContext) => void; /** * Exit a parse tree produced by the `exportDef` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree */ exitExportDef?: (ctx: ExportDefContext) => void; @@ -815,26 +815,26 @@ export interface QuintListener extends ParseTreeListener { exitModule?: (ctx: ModuleContext) => void; /** - * Enter a parse tree produced by `QuintParser.documentedUnit`. + * Enter a parse tree produced by `QuintParser.documentedDeclaration`. * @param ctx the parse tree */ - enterDocumentedUnit?: (ctx: DocumentedUnitContext) => void; + enterDocumentedDeclaration?: (ctx: DocumentedDeclarationContext) => void; /** - * Exit a parse tree produced by `QuintParser.documentedUnit`. + * Exit a parse tree produced by `QuintParser.documentedDeclaration`. * @param ctx the parse tree */ - exitDocumentedUnit?: (ctx: DocumentedUnitContext) => void; + exitDocumentedDeclaration?: (ctx: DocumentedDeclarationContext) => void; /** - * Enter a parse tree produced by `QuintParser.unit`. + * Enter a parse tree produced by `QuintParser.declaration`. * @param ctx the parse tree */ - enterUnit?: (ctx: UnitContext) => void; + enterDeclaration?: (ctx: DeclarationContext) => void; /** - * Exit a parse tree produced by `QuintParser.unit`. + * Exit a parse tree produced by `QuintParser.declaration`. * @param ctx the parse tree */ - exitUnit?: (ctx: UnitContext) => void; + exitDeclaration?: (ctx: DeclarationContext) => void; /** * Enter a parse tree produced by `QuintParser.operDef`. @@ -1024,15 +1024,15 @@ export interface QuintListener extends ParseTreeListener { exitExpr?: (ctx: ExprContext) => void; /** - * Enter a parse tree produced by `QuintParser.unitOrExpr`. + * Enter a parse tree produced by `QuintParser.declarationOrExpr`. * @param ctx the parse tree */ - enterUnitOrExpr?: (ctx: UnitOrExprContext) => void; + enterDeclarationOrExpr?: (ctx: DeclarationOrExprContext) => void; /** - * Exit a parse tree produced by `QuintParser.unitOrExpr`. + * Exit a parse tree produced by `QuintParser.declarationOrExpr`. * @param ctx the parse tree */ - exitUnitOrExpr?: (ctx: UnitOrExprContext) => void; + exitDeclarationOrExpr?: (ctx: DeclarationOrExprContext) => void; /** * Enter a parse tree produced by `QuintParser.lambda`. diff --git a/quint/src/generated/QuintParser.ts b/quint/src/generated/QuintParser.ts index 1dc9097aa..89b4d12e2 100644 --- a/quint/src/generated/QuintParser.ts +++ b/quint/src/generated/QuintParser.ts @@ -105,8 +105,8 @@ export class QuintParser extends Parser { public static readonly WS = 69; public static readonly RULE_modules = 0; public static readonly RULE_module = 1; - public static readonly RULE_documentedUnit = 2; - public static readonly RULE_unit = 3; + public static readonly RULE_documentedDeclaration = 2; + public static readonly RULE_declaration = 3; public static readonly RULE_operDef = 4; public static readonly RULE_typeDef = 5; public static readonly RULE_typeSumVariant = 6; @@ -124,7 +124,7 @@ export class QuintParser extends Parser { public static readonly RULE_row = 18; public static readonly RULE_rowLabel = 19; public static readonly RULE_expr = 20; - public static readonly RULE_unitOrExpr = 21; + public static readonly RULE_declarationOrExpr = 21; public static readonly RULE_lambda = 22; public static readonly RULE_identOrHole = 23; public static readonly RULE_parameter = 24; @@ -139,12 +139,12 @@ export class QuintParser extends Parser { public static readonly RULE_simpleId = 33; // tslint:disable:no-trailing-whitespace public static readonly ruleNames: string[] = [ - "modules", "module", "documentedUnit", "unit", "operDef", "typeDef", "typeSumVariant", - "nondetOperDef", "qualifier", "importMod", "exportMod", "instanceMod", - "moduleName", "name", "qualifiedName", "fromSource", "type", "typeUnionRecOne", - "row", "rowLabel", "expr", "unitOrExpr", "lambda", "identOrHole", "parameter", - "identOrStar", "argList", "recElem", "normalCallName", "nameAfterDot", - "operator", "literal", "qualId", "simpleId", + "modules", "module", "documentedDeclaration", "declaration", "operDef", + "typeDef", "typeSumVariant", "nondetOperDef", "qualifier", "importMod", + "exportMod", "instanceMod", "moduleName", "name", "qualifiedName", "fromSource", + "type", "typeUnionRecOne", "row", "rowLabel", "expr", "declarationOrExpr", + "lambda", "identOrHole", "parameter", "identOrStar", "argList", "recElem", + "normalCallName", "nameAfterDot", "operator", "literal", "qualId", "simpleId", ]; private static readonly _LITERAL_NAMES: Array = [ @@ -270,7 +270,7 @@ export class QuintParser extends Parser { { { this.state = 84; - this.documentedUnit(); + this.documentedDeclaration(); } } this.state = 89; @@ -296,9 +296,9 @@ export class QuintParser extends Parser { return _localctx; } // @RuleVersion(0) - public documentedUnit(): DocumentedUnitContext { - let _localctx: DocumentedUnitContext = new DocumentedUnitContext(this._ctx, this.state); - this.enterRule(_localctx, 4, QuintParser.RULE_documentedUnit); + public documentedDeclaration(): DocumentedDeclarationContext { + let _localctx: DocumentedDeclarationContext = new DocumentedDeclarationContext(this._ctx, this.state); + this.enterRule(_localctx, 4, QuintParser.RULE_documentedDeclaration); let _la: number; try { this.enterOuterAlt(_localctx, 1); @@ -318,7 +318,7 @@ export class QuintParser extends Parser { _la = this._input.LA(1); } this.state = 98; - this.unit(); + this.declaration(); } } catch (re) { @@ -336,9 +336,9 @@ export class QuintParser extends Parser { return _localctx; } // @RuleVersion(0) - public unit(): UnitContext { - let _localctx: UnitContext = new UnitContext(this._ctx, this.state); - this.enterRule(_localctx, 6, QuintParser.RULE_unit); + public declaration(): DeclarationContext { + let _localctx: DeclarationContext = new DeclarationContext(this._ctx, this.state); + this.enterRule(_localctx, 6, QuintParser.RULE_declaration); try { this.state = 120; this._errHandler.sync(this); @@ -2589,9 +2589,9 @@ export class QuintParser extends Parser { return _localctx; } // @RuleVersion(0) - public unitOrExpr(): UnitOrExprContext { - let _localctx: UnitOrExprContext = new UnitOrExprContext(this._ctx, this.state); - this.enterRule(_localctx, 42, QuintParser.RULE_unitOrExpr); + public declarationOrExpr(): DeclarationOrExprContext { + let _localctx: DeclarationOrExprContext = new DeclarationOrExprContext(this._ctx, this.state); + this.enterRule(_localctx, 42, QuintParser.RULE_declarationOrExpr); try { this.state = 650; this._errHandler.sync(this); @@ -2600,7 +2600,7 @@ export class QuintParser extends Parser { this.enterOuterAlt(_localctx, 1); { this.state = 641; - this.unit(); + this.declaration(); this.state = 642; this.match(QuintParser.EOF); } @@ -3708,13 +3708,13 @@ export class ModuleContext extends ParserRuleContext { return this.getToken(QuintParser.DOCCOMMENT, i); } } - public documentedUnit(): DocumentedUnitContext[]; - public documentedUnit(i: number): DocumentedUnitContext; - public documentedUnit(i?: number): DocumentedUnitContext | DocumentedUnitContext[] { + public documentedDeclaration(): DocumentedDeclarationContext[]; + public documentedDeclaration(i: number): DocumentedDeclarationContext; + public documentedDeclaration(i?: number): DocumentedDeclarationContext | DocumentedDeclarationContext[] { if (i === undefined) { - return this.getRuleContexts(DocumentedUnitContext); + return this.getRuleContexts(DocumentedDeclarationContext); } else { - return this.getRuleContext(i, DocumentedUnitContext); + return this.getRuleContext(i, DocumentedDeclarationContext); } } constructor(parent: ParserRuleContext | undefined, invokingState: number) { @@ -3745,9 +3745,9 @@ export class ModuleContext extends ParserRuleContext { } -export class DocumentedUnitContext extends ParserRuleContext { - public unit(): UnitContext { - return this.getRuleContext(0, UnitContext); +export class DocumentedDeclarationContext extends ParserRuleContext { + public declaration(): DeclarationContext { + return this.getRuleContext(0, DeclarationContext); } public DOCCOMMENT(): TerminalNode[]; public DOCCOMMENT(i: number): TerminalNode; @@ -3762,23 +3762,23 @@ export class DocumentedUnitContext extends ParserRuleContext { super(parent, invokingState); } // @Override - public get ruleIndex(): number { return QuintParser.RULE_documentedUnit; } + public get ruleIndex(): number { return QuintParser.RULE_documentedDeclaration; } // @Override public enterRule(listener: QuintListener): void { - if (listener.enterDocumentedUnit) { - listener.enterDocumentedUnit(this); + if (listener.enterDocumentedDeclaration) { + listener.enterDocumentedDeclaration(this); } } // @Override public exitRule(listener: QuintListener): void { - if (listener.exitDocumentedUnit) { - listener.exitDocumentedUnit(this); + if (listener.exitDocumentedDeclaration) { + listener.exitDocumentedDeclaration(this); } } // @Override public accept(visitor: QuintVisitor): Result { - if (visitor.visitDocumentedUnit) { - return visitor.visitDocumentedUnit(this); + if (visitor.visitDocumentedDeclaration) { + return visitor.visitDocumentedDeclaration(this); } else { return visitor.visitChildren(this); } @@ -3786,24 +3786,24 @@ export class DocumentedUnitContext extends ParserRuleContext { } -export class UnitContext extends ParserRuleContext { +export class DeclarationContext extends ParserRuleContext { constructor(parent: ParserRuleContext | undefined, invokingState: number) { super(parent, invokingState); } // @Override - public get ruleIndex(): number { return QuintParser.RULE_unit; } - public copyFrom(ctx: UnitContext): void { + public get ruleIndex(): number { return QuintParser.RULE_declaration; } + public copyFrom(ctx: DeclarationContext): void { super.copyFrom(ctx); } } -export class ConstContext extends UnitContext { +export class ConstContext extends DeclarationContext { public qualId(): QualIdContext { return this.getRuleContext(0, QualIdContext); } public type(): TypeContext { return this.getRuleContext(0, TypeContext); } - constructor(ctx: UnitContext) { + constructor(ctx: DeclarationContext) { super(ctx.parent, ctx.invokingState); this.copyFrom(ctx); } @@ -3828,14 +3828,14 @@ export class ConstContext extends UnitContext { } } } -export class VarContext extends UnitContext { +export class VarContext extends DeclarationContext { public qualId(): QualIdContext { return this.getRuleContext(0, QualIdContext); } public type(): TypeContext { return this.getRuleContext(0, TypeContext); } - constructor(ctx: UnitContext) { + constructor(ctx: DeclarationContext) { super(ctx.parent, ctx.invokingState); this.copyFrom(ctx); } @@ -3860,7 +3860,7 @@ export class VarContext extends UnitContext { } } } -export class AssumeContext extends UnitContext { +export class AssumeContext extends DeclarationContext { public identOrHole(): IdentOrHoleContext { return this.getRuleContext(0, IdentOrHoleContext); } @@ -3868,7 +3868,7 @@ export class AssumeContext extends UnitContext { public expr(): ExprContext { return this.getRuleContext(0, ExprContext); } - constructor(ctx: UnitContext) { + constructor(ctx: DeclarationContext) { super(ctx.parent, ctx.invokingState); this.copyFrom(ctx); } @@ -3893,11 +3893,11 @@ export class AssumeContext extends UnitContext { } } } -export class InstanceContext extends UnitContext { +export class InstanceContext extends DeclarationContext { public instanceMod(): InstanceModContext { return this.getRuleContext(0, InstanceModContext); } - constructor(ctx: UnitContext) { + constructor(ctx: DeclarationContext) { super(ctx.parent, ctx.invokingState); this.copyFrom(ctx); } @@ -3922,11 +3922,11 @@ export class InstanceContext extends UnitContext { } } } -export class OperContext extends UnitContext { +export class OperContext extends DeclarationContext { public operDef(): OperDefContext { return this.getRuleContext(0, OperDefContext); } - constructor(ctx: UnitContext) { + constructor(ctx: DeclarationContext) { super(ctx.parent, ctx.invokingState); this.copyFrom(ctx); } @@ -3951,11 +3951,11 @@ export class OperContext extends UnitContext { } } } -export class TypeDefsContext extends UnitContext { +export class TypeDefsContext extends DeclarationContext { public typeDef(): TypeDefContext { return this.getRuleContext(0, TypeDefContext); } - constructor(ctx: UnitContext) { + constructor(ctx: DeclarationContext) { super(ctx.parent, ctx.invokingState); this.copyFrom(ctx); } @@ -3980,11 +3980,11 @@ export class TypeDefsContext extends UnitContext { } } } -export class ImportDefContext extends UnitContext { +export class ImportDefContext extends DeclarationContext { public importMod(): ImportModContext { return this.getRuleContext(0, ImportModContext); } - constructor(ctx: UnitContext) { + constructor(ctx: DeclarationContext) { super(ctx.parent, ctx.invokingState); this.copyFrom(ctx); } @@ -4009,11 +4009,11 @@ export class ImportDefContext extends UnitContext { } } } -export class ExportDefContext extends UnitContext { +export class ExportDefContext extends DeclarationContext { public exportMod(): ExportModContext { return this.getRuleContext(0, ExportModContext); } - constructor(ctx: UnitContext) { + constructor(ctx: DeclarationContext) { super(ctx.parent, ctx.invokingState); this.copyFrom(ctx); } @@ -6174,9 +6174,9 @@ export class BracesContext extends ExprContext { } -export class UnitOrExprContext extends ParserRuleContext { - public unit(): UnitContext | undefined { - return this.tryGetRuleContext(0, UnitContext); +export class DeclarationOrExprContext extends ParserRuleContext { + public declaration(): DeclarationContext | undefined { + return this.tryGetRuleContext(0, DeclarationContext); } public EOF(): TerminalNode { return this.getToken(QuintParser.EOF, 0); } public expr(): ExprContext | undefined { @@ -6187,23 +6187,23 @@ export class UnitOrExprContext extends ParserRuleContext { super(parent, invokingState); } // @Override - public get ruleIndex(): number { return QuintParser.RULE_unitOrExpr; } + public get ruleIndex(): number { return QuintParser.RULE_declarationOrExpr; } // @Override public enterRule(listener: QuintListener): void { - if (listener.enterUnitOrExpr) { - listener.enterUnitOrExpr(this); + if (listener.enterDeclarationOrExpr) { + listener.enterDeclarationOrExpr(this); } } // @Override public exitRule(listener: QuintListener): void { - if (listener.exitUnitOrExpr) { - listener.exitUnitOrExpr(this); + if (listener.exitDeclarationOrExpr) { + listener.exitDeclarationOrExpr(this); } } // @Override public accept(visitor: QuintVisitor): Result { - if (visitor.visitUnitOrExpr) { - return visitor.visitUnitOrExpr(this); + if (visitor.visitDeclarationOrExpr) { + return visitor.visitDeclarationOrExpr(this); } else { return visitor.visitChildren(this); } diff --git a/quint/src/generated/QuintVisitor.ts b/quint/src/generated/QuintVisitor.ts index 062d7b797..0a8f2b5f8 100644 --- a/quint/src/generated/QuintVisitor.ts +++ b/quint/src/generated/QuintVisitor.ts @@ -64,8 +64,8 @@ import { ImportDefContext } from "./QuintParser"; import { ExportDefContext } from "./QuintParser"; import { ModulesContext } from "./QuintParser"; import { ModuleContext } from "./QuintParser"; -import { DocumentedUnitContext } from "./QuintParser"; -import { UnitContext } from "./QuintParser"; +import { DocumentedDeclarationContext } from "./QuintParser"; +import { DeclarationContext } from "./QuintParser"; import { OperDefContext } from "./QuintParser"; import { TypeDefContext } from "./QuintParser"; import { TypeSumVariantContext } from "./QuintParser"; @@ -83,7 +83,7 @@ import { TypeUnionRecOneContext } from "./QuintParser"; import { RowContext } from "./QuintParser"; import { RowLabelContext } from "./QuintParser"; import { ExprContext } from "./QuintParser"; -import { UnitOrExprContext } from "./QuintParser"; +import { DeclarationOrExprContext } from "./QuintParser"; import { LambdaContext } from "./QuintParser"; import { IdentOrHoleContext } from "./QuintParser"; import { ParameterContext } from "./QuintParser"; @@ -468,7 +468,7 @@ export interface QuintVisitor extends ParseTreeVisitor { /** * Visit a parse tree produced by the `const` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree * @return the visitor result */ @@ -476,7 +476,7 @@ export interface QuintVisitor extends ParseTreeVisitor { /** * Visit a parse tree produced by the `var` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree * @return the visitor result */ @@ -484,7 +484,7 @@ export interface QuintVisitor extends ParseTreeVisitor { /** * Visit a parse tree produced by the `assume` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree * @return the visitor result */ @@ -492,7 +492,7 @@ export interface QuintVisitor extends ParseTreeVisitor { /** * Visit a parse tree produced by the `instance` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree * @return the visitor result */ @@ -500,7 +500,7 @@ export interface QuintVisitor extends ParseTreeVisitor { /** * Visit a parse tree produced by the `oper` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree * @return the visitor result */ @@ -508,7 +508,7 @@ export interface QuintVisitor extends ParseTreeVisitor { /** * Visit a parse tree produced by the `typeDefs` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree * @return the visitor result */ @@ -516,7 +516,7 @@ export interface QuintVisitor extends ParseTreeVisitor { /** * Visit a parse tree produced by the `importDef` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree * @return the visitor result */ @@ -524,7 +524,7 @@ export interface QuintVisitor extends ParseTreeVisitor { /** * Visit a parse tree produced by the `exportDef` - * labeled alternative in `QuintParser.unit`. + * labeled alternative in `QuintParser.declaration`. * @param ctx the parse tree * @return the visitor result */ @@ -545,18 +545,18 @@ export interface QuintVisitor extends ParseTreeVisitor { visitModule?: (ctx: ModuleContext) => Result; /** - * Visit a parse tree produced by `QuintParser.documentedUnit`. + * Visit a parse tree produced by `QuintParser.documentedDeclaration`. * @param ctx the parse tree * @return the visitor result */ - visitDocumentedUnit?: (ctx: DocumentedUnitContext) => Result; + visitDocumentedDeclaration?: (ctx: DocumentedDeclarationContext) => Result; /** - * Visit a parse tree produced by `QuintParser.unit`. + * Visit a parse tree produced by `QuintParser.declaration`. * @param ctx the parse tree * @return the visitor result */ - visitUnit?: (ctx: UnitContext) => Result; + visitDeclaration?: (ctx: DeclarationContext) => Result; /** * Visit a parse tree produced by `QuintParser.operDef`. @@ -678,11 +678,11 @@ export interface QuintVisitor extends ParseTreeVisitor { visitExpr?: (ctx: ExprContext) => Result; /** - * Visit a parse tree produced by `QuintParser.unitOrExpr`. + * Visit a parse tree produced by `QuintParser.declarationOrExpr`. * @param ctx the parse tree * @return the visitor result */ - visitUnitOrExpr?: (ctx: UnitOrExprContext) => Result; + visitDeclarationOrExpr?: (ctx: DeclarationOrExprContext) => Result; /** * Visit a parse tree produced by `QuintParser.lambda`. diff --git a/quint/src/graphics.ts b/quint/src/graphics.ts index f0ba52a3b..68a5fac0d 100644 --- a/quint/src/graphics.ts +++ b/quint/src/graphics.ts @@ -26,13 +26,13 @@ import { textify, } from './prettierimp' -import { QuintDef, QuintEx, isAnnotatedDef } from './ir/quintIr' +import { QuintDeclaration, QuintEx, isAnnotatedDef } from './ir/quintIr' import { ExecutionFrame } from './runtime/trace' import { zerog } from './idGenerator' import { ConcreteFixedRow, QuintType, Row } from './ir/quintTypes' import { TypeScheme } from './types/base' import { canonicalTypeScheme } from './types/printing' -import { definitionToString, flattenRow, qualifierToString, rowToString } from './ir/IRprinting' +import { declarationToString, flattenRow, qualifierToString, rowToString } from './ir/IRprinting' /** * An abstraction of a Console of bounded text width. @@ -121,33 +121,33 @@ export function prettyQuintEx(ex: QuintEx): Doc { } } -export function prettyQuintDef(def: QuintDef, includeBody: boolean = true, type?: TypeScheme): Doc { - const typeAnnotation = isAnnotatedDef(def) - ? [text(': '), prettyQuintType(def.typeAnnotation)] +export function prettyQuintDeclaration(decl: QuintDeclaration, includeBody: boolean = true, type?: TypeScheme): Doc { + const typeAnnotation = isAnnotatedDef(decl) + ? [text(': '), prettyQuintType(decl.typeAnnotation)] : type // If annotation is not present, but type is, use the type ? [text(': '), prettyTypeScheme(type)] : [] - switch (def.kind) { + switch (decl.kind) { case 'def': { const header = group([ - richtext(chalk.magenta, qualifierToString(def.qualifier)), + richtext(chalk.magenta, qualifierToString(decl.qualifier)), text(' '), - richtext(chalk.blue, def.name), + richtext(chalk.blue, decl.name), ...typeAnnotation, ]) - return includeBody ? group([header, text(' = '), prettyQuintEx(def.expr)]) : header + return includeBody ? group([header, text(' = '), prettyQuintEx(decl.expr)]) : header } case 'typedef': { - const header = group([text('type '), richtext(chalk.blue, def.name)]) - if (def.type) { - return group([header, text(' = '), prettyQuintType(def.type)]) + const header = group([text('type '), richtext(chalk.blue, decl.name)]) + if (decl.type) { + return group([header, text(' = '), prettyQuintType(decl.type)]) } return header } default: // TODO, not used for now - return text(definitionToString(def)) + return text(declarationToString(decl)) } } diff --git a/quint/src/index.ts b/quint/src/index.ts index cb0cb5db8..d6b8c8480 100644 --- a/quint/src/index.ts +++ b/quint/src/index.ts @@ -22,4 +22,4 @@ export * from './quintError' export { newIdGenerator, IdGenerator } from './idGenerator' export { fileSourceResolver, stringSourceResolver } from './parsing/sourceResolver' export { format } from './prettierimp' -export { prettyQuintEx, prettyTypeScheme, prettyQuintDef } from './graphics' +export { prettyQuintEx, prettyTypeScheme, prettyQuintDeclaration } from './graphics' diff --git a/quint/src/ir/IRTransformer.ts b/quint/src/ir/IRTransformer.ts index 13faea040..a451cb60f 100644 --- a/quint/src/ir/IRTransformer.ts +++ b/quint/src/ir/IRTransformer.ts @@ -26,6 +26,8 @@ export class IRTransformer { exitExpr?: (expr: ir.QuintEx) => ir.QuintEx enterDef?: (def: ir.QuintDef) => ir.QuintDef exitDef?: (def: ir.QuintDef) => ir.QuintDef + enterDecl?: (decl: ir.QuintDeclaration) => ir.QuintDeclaration + exitDecl?: (decl: ir.QuintDeclaration) => ir.QuintDeclaration enterType?: (type: t.QuintType) => t.QuintType exitType?: (type: t.QuintType) => t.QuintType @@ -114,7 +116,7 @@ export function transformModule(transformer: IRTransformer, quintModule: ir.Quin newModule = transformer.enterModule(newModule) } - newModule.defs = newModule.defs.map(def => transformDefinition(transformer, def)) + newModule.declarations = newModule.declarations.map(decl => transformDeclaration(transformer, decl)) if (transformer.exitModule) { newModule = transformer.exitModule(newModule) @@ -271,6 +273,64 @@ export function transformType(transformer: IRTransformer, type: t.QuintType): t. return newType } +/** + * Transforms a Quint declaration with a transformer, invoking the corresponding function for each + * inner component. + * + * @param transformer: the IRTransformer instance with the functions to be invoked + * @param decl: the Quint declaration to be transformed + * + * @returns the transformed Quint definition + */ +export function transformDeclaration(transformer: IRTransformer, decl: ir.QuintDeclaration): ir.QuintDeclaration { + let newDecl = { ...decl } + if (transformer.enterDecl) { + newDecl = transformer.enterDecl(newDecl) + } + + switch (newDecl.kind) { + case 'instance': + if (transformer.enterInstance) { + newDecl = transformer.enterInstance(newDecl) + } + newDecl.overrides = newDecl.overrides.map(([i, e]) => [i, transformExpression(transformer, e)]) + if (transformer.exitInstance) { + newDecl = transformer.exitInstance(newDecl) + } + break + case 'import': + if (transformer.enterImport) { + newDecl = transformer.enterImport(newDecl) + } + if (transformer.exitImport) { + newDecl = transformer.exitImport(newDecl) + } + break + case 'export': + if (transformer.enterExport) { + newDecl = transformer.enterExport(newDecl) + } + if (transformer.exitExport) { + newDecl = transformer.exitExport(newDecl) + } + break + case 'const': + case 'var': + case 'def': + case 'typedef': + case 'assume': + newDecl = transformDefinition(transformer, newDecl) + break + default: + unreachable(newDecl) + } + if (transformer.exitDecl) { + newDecl = transformer.exitDecl(newDecl) + } + + return newDecl +} + /** * Transforms a Quint definition with a transformer, invoking the correspondent function for each * inner component. @@ -326,31 +386,6 @@ export function transformDefinition(transformer: IRTransformer, def: ir.QuintDef newDef = transformer.exitTypeDef(newDef) } break - case 'instance': - if (transformer.enterInstance) { - newDef = transformer.enterInstance(newDef) - } - newDef.overrides = newDef.overrides.map(([i, e]) => [i, transformExpression(transformer, e)]) - if (transformer.exitInstance) { - newDef = transformer.exitInstance(newDef) - } - break - case 'import': - if (transformer.enterImport) { - newDef = transformer.enterImport(newDef) - } - if (transformer.exitImport) { - newDef = transformer.exitImport(newDef) - } - break - case 'export': - if (transformer.enterExport) { - newDef = transformer.enterExport(newDef) - } - if (transformer.exitExport) { - newDef = transformer.exitExport(newDef) - } - break case 'assume': if (transformer.enterAssume) { newDef = transformer.enterAssume(newDef) diff --git a/quint/src/ir/IRVisitor.ts b/quint/src/ir/IRVisitor.ts index 3cd17870d..412ef1173 100644 --- a/quint/src/ir/IRVisitor.ts +++ b/quint/src/ir/IRVisitor.ts @@ -28,6 +28,8 @@ export interface IRVisitor { /** General components */ enterExpr?: (_expr: ir.QuintEx) => void exitExpr?: (_expr: ir.QuintEx) => void + enterDecl?: (_def: ir.QuintDeclaration) => void + exitDecl?: (_def: ir.QuintDeclaration) => void enterDef?: (_def: ir.QuintDef) => void exitDef?: (_def: ir.QuintDef) => void enterType?: (_type: t.QuintType) => void @@ -112,7 +114,7 @@ export function walkModule(visitor: IRVisitor, quintModule: ir.QuintModule): voi visitor.enterModule(quintModule) } - quintModule.defs.forEach(def => walkDefinition(visitor, def)) + quintModule.declarations.forEach(decl => walkDeclaration(visitor, decl)) if (visitor.exitModule) { visitor.exitModule(quintModule) @@ -260,6 +262,70 @@ export function walkType(visitor: IRVisitor, type: t.QuintType): void { } } +/** + * Navigates a Quint declaration with a visitor, invoking the correspondent function for each + * inner component. + * + * @param visitor: the IRVisitor instance with the functions to be invoked + * @param decl: the Quint declaration to be navigated + * + * @returns nothing, any collected information has to be a state inside the IRVisitor instance. + */ +export function walkDeclaration(visitor: IRVisitor, decl: ir.QuintDeclaration): void { + if (visitor.enterDecl) { + visitor.enterDecl(decl) + } + + switch (decl.kind) { + case 'const': + case 'var': + case 'def': + case 'typedef': + case 'assume': + walkDefinition(visitor, decl) + break + case 'instance': + if (visitor.enterInstance) { + visitor.enterInstance(decl) + } + decl.overrides.forEach(([_, e]) => walkExpression(visitor, e)) + if (visitor.exitInstance) { + visitor.exitInstance(decl) + } + break + case 'import': + if (visitor.enterImport) { + visitor.enterImport(decl) + } + if (visitor.exitImport) { + visitor.exitImport(decl) + } + break + case 'export': + if (visitor.enterExport) { + visitor.enterExport(decl) + } + if (visitor.exitExport) { + visitor.exitExport(decl) + } + break + default: + unreachable(decl) + } + if (visitor.exitDecl) { + visitor.exitDecl(decl) + } +} + +/** + * Navigates a Quint definition with a visitor, invoking the correspondent function for each + * inner component. + * + * @param visitor: the IRVisitor instance with the functions to be invoked + * @param def: the Quint definition to be navigated + * + * @returns nothing, any collected information has to be a state inside the IRVisitor instance. + */ export function walkDefinition(visitor: IRVisitor, def: ir.QuintDef): void { if (visitor.enterDef) { visitor.enterDef(def) @@ -305,31 +371,6 @@ export function walkDefinition(visitor: IRVisitor, def: ir.QuintDef): void { visitor.exitTypeDef(def) } break - case 'instance': - if (visitor.enterInstance) { - visitor.enterInstance(def) - } - def.overrides.forEach(([_, e]) => walkExpression(visitor, e)) - if (visitor.exitInstance) { - visitor.exitInstance(def) - } - break - case 'import': - if (visitor.enterImport) { - visitor.enterImport(def) - } - if (visitor.exitImport) { - visitor.exitImport(def) - } - break - case 'export': - if (visitor.enterExport) { - visitor.enterExport(def) - } - if (visitor.exitExport) { - visitor.exitExport(def) - } - break case 'assume': if (visitor.enterAssume) { visitor.enterAssume(def) @@ -340,6 +381,8 @@ export function walkDefinition(visitor: IRVisitor, def: ir.QuintDef): void { visitor.exitAssume(def) } break + default: + unreachable(def) } if (visitor.exitDef) { visitor.exitDef(def) diff --git a/quint/src/ir/IRprinting.ts b/quint/src/ir/IRprinting.ts index e838f5528..76315910c 100644 --- a/quint/src/ir/IRprinting.ts +++ b/quint/src/ir/IRprinting.ts @@ -12,7 +12,7 @@ * @module */ -import { OpQualifier, QuintDef, QuintEx, QuintModule, isAnnotatedDef } from './quintIr' +import { OpQualifier, QuintDeclaration, QuintDef, QuintEx, QuintModule, isAnnotatedDef } from './quintIr' import { EmptyRow, QuintSumType, QuintType, Row, RowField, VarRow, isTheUnit } from './quintTypes' import { TypeScheme } from '../types/base' import { typeSchemeToString } from '../types/printing' @@ -25,10 +25,70 @@ import { typeSchemeToString } from '../types/printing' * @returns a string with the pretty printed definition */ export function moduleToString(quintModule: QuintModule): string { - const defs = quintModule.defs.map(d => definitionToString(d)).join('\n ') + const defs = quintModule.declarations.map(d => declarationToString(d)).join('\n ') return `module ${quintModule.name} {\n ${defs}\n}` } +/** + * Pretty prints a declaration. Includes a type annotation if the definition is + * annotated, or if a type is provided. A type annotation, if present, takes + * precedence over a type provided as argument to this function. + * + * @param decl the Quint declaration to be formatted + * @param includeBody optional, whether to include the body of the declaration, + * defaults to true + * @param type optional, the type scheme of the declaration, defaults to + * undefined + * + * @returns a string with the pretty printed declaration. + */ +export function declarationToString(decl: QuintDeclaration, includeBody: boolean = true, type?: TypeScheme): string { + switch (decl.kind) { + case 'def': + case 'var': + case 'const': + case 'assume': + case 'typedef': + return definitionToString(decl, includeBody, type) + case 'import': { + let text = `import ${decl.protoName}` + if (decl.defName) { + text += `.${decl.defName}` + } + if (decl.qualifiedName) { + text += ` as ${decl.qualifiedName}` + } + if (decl.fromSource) { + text += ` from "${decl.fromSource}"` + } + return text + } + case 'export': { + let text = `export ${decl.protoName}` + if (decl.defName) { + text += `.${decl.defName}` + } + if (decl.qualifiedName) { + text += ` as ${decl.qualifiedName}` + } + return text + } + case 'instance': { + const overrides = decl.overrides.map(o => `${o[0].name} = ${expressionToString(o[1])}`).join(', ') + let text = `import ${decl.protoName}(${overrides})` + if (decl.qualifiedName) { + text += ` as ${decl.qualifiedName}` + } else { + text += `.*` + } + if (decl.fromSource) { + text += ` from "${decl.fromSource}"` + } + return text + } + } +} + /** * Pretty prints a definition. Includes a type annotation if the definition is * annotated, or if a type is provided. The annotation is preferred over the @@ -65,42 +125,6 @@ export function definitionToString(def: QuintDef, includeBody: boolean = true, t } else { return `type ${def.name}` } - case 'import': { - let text = `import ${def.protoName}` - if (def.defName) { - text += `.${def.defName}` - } - if (def.qualifiedName) { - text += ` as ${def.qualifiedName}` - } - if (def.fromSource) { - text += ` from "${def.fromSource}"` - } - return text - } - case 'export': { - let text = `export ${def.protoName}` - if (def.defName) { - text += `.${def.defName}` - } - if (def.qualifiedName) { - text += ` as ${def.qualifiedName}` - } - return text - } - case 'instance': { - const overrides = def.overrides.map(o => `${o[0].name} = ${expressionToString(o[1])}`).join(', ') - let text = `import ${def.protoName}(${overrides})` - if (def.qualifiedName) { - text += ` as ${def.qualifiedName}` - } else { - text += `.*` - } - if (def.fromSource) { - text += ` from "${def.fromSource}"` - } - return text - } } } @@ -125,7 +149,7 @@ export function expressionToString(expr: QuintEx): string { case 'lambda': return `((${expr.params.map(p => p.name).join(', ')}) => ${expressionToString(expr.expr)})` case 'let': - return `${definitionToString(expr.opdef)} { ${expressionToString(expr.expr)} }` + return `${declarationToString(expr.opdef)} { ${expressionToString(expr.expr)} }` } } diff --git a/quint/src/ir/namespacer.ts b/quint/src/ir/namespacer.ts index afc39a67a..76564e5bc 100644 --- a/quint/src/ir/namespacer.ts +++ b/quint/src/ir/namespacer.ts @@ -14,7 +14,7 @@ */ import { IRTransformer, transformDefinition } from './IRTransformer' -import { QuintApp, QuintDef, QuintLambda, QuintName, isFlat } from './quintIr' +import { QuintApp, QuintDef, QuintLambda, QuintName } from './quintIr' import { QuintConstType } from './quintTypes' /** @@ -44,12 +44,8 @@ class Namespacer implements IRTransformer { // In the new flattener, we will need to consider it here as well. // Also, considering it here makes the interface consistent. // Uncomment the following line when the new flattener is in place: - // if (isFlat(def) && !this.namesToPreserve.has(def.name)) { - if (isFlat(def)) { - return { ...def, name: namespacedName(this.namespace, def.name) } - } - - return def + // if (!this.namesToPreserve.has(def.name)) { + return { ...def, name: namespacedName(this.namespace, def.name) } } exitLambda(expr: QuintLambda): QuintLambda { diff --git a/quint/src/ir/quintIr.ts b/quint/src/ir/quintIr.ts index 608c8e0a0..01d5a0da4 100644 --- a/quint/src/ir/quintIr.ts +++ b/quint/src/ir/quintIr.ts @@ -366,13 +366,10 @@ export interface QuintInstance extends WithId { } /** - * Definition: constant, state variable, operator definition, assumption, instance, module. + * A declaration is a top-level construct in a module, including definitions, + * imports, exports, and instances. */ -export type QuintDef = (FlatDef | QuintImport | QuintExport | QuintInstance) & WithOptionalDoc - -export function isAnnotatedDef(def: any): def is WithTypeAnnotation { - return def.typeAnnotation !== undefined -} +export type QuintDeclaration = (QuintDef | QuintImport | QuintExport | QuintInstance) & WithOptionalDoc /** * Module definition. @@ -380,39 +377,50 @@ export function isAnnotatedDef(def: any): def is WithTypeAnnotation { export interface QuintModule extends WithId { /** The name of the module. */ name: string - /** The definitions in the module. */ - defs: QuintDef[] + /** The declarations in the module. */ + declarations: QuintDeclaration[] /** Optional documentation for the module. */ doc?: string } /** - * A FlatDef is a sub-type of QuintDef which represents a flat definition. - * A flat definition can be a constant, state variable, operator definition, assumption, or type definition. + * A QuintDef is a sub-type of QuintDeclaration which represents a definition. + * A definition can be a constant, state variable, operator definition, assumption, or type definition. + */ +export type QuintDef = (QuintOpDef | QuintConst | QuintVar | QuintAssume | QuintTypeDef) & WithOptionalDoc + +/** + * Checks if a definition has a type annotation. + * + * @param def The definition to check. + * + * @returns True if the definition has a type annotation, false otherwise. */ -export type FlatDef = (QuintOpDef | QuintConst | QuintVar | QuintAssume | QuintTypeDef) & WithOptionalDoc +export function isAnnotatedDef(def: any): def is WithTypeAnnotation { + return def.typeAnnotation !== undefined +} /** - * A FlatModule represents a module with flat definitions. + * A FlatModule represents a module with only definitions in its declarations. + * That is, no imports, exports or instances. */ export interface FlatModule extends WithId { /** The name of the module. */ name: string - /** The definitions in the module. */ - defs: FlatDef[] + /** The declarations in the module, which are always definitions. */ + declarations: QuintDef[] /** Optional documentation for the module. */ doc?: string } /** - * Checks if a QuintDef is a FlatDef. - * A FlatDef is a sub-type of QuintDef which represents a flat definition. - * A flat definition can be a constant, state variable, operator definition, assumption, or type definition. + * Checks if a Declaration is a QuintDef, that is, it is not an import, an export, or an instance. + * Useful because all QuintDefs have a `name` field, so we can use this to narrow the type. * - * @param def The QuintDef to check. + * @param decl The Declaration to check. * - * @returns True if the QuintDef is a FlatDef, false otherwise. + * @returns True if the Declaration is a QuintDef, false otherwise. */ -export function isFlat(def: QuintDef): def is FlatDef { - return def.kind !== 'instance' && def.kind !== 'import' && def.kind !== 'export' +export function isDef(decl: QuintDeclaration): decl is QuintDef { + return decl.kind !== 'instance' && decl.kind !== 'import' && decl.kind !== 'export' } diff --git a/quint/src/names/base.ts b/quint/src/names/base.ts index 104e8df20..8e3e03199 100644 --- a/quint/src/names/base.ts +++ b/quint/src/names/base.ts @@ -12,6 +12,7 @@ * @module */ +import { QuintDef, QuintExport, QuintImport, QuintInstance, QuintLambdaParameter } from '../ir/quintIr' import { QuintType } from '../ir/quintTypes' /** @@ -20,23 +21,32 @@ import { QuintType } from '../ir/quintTypes' export type DefinitionKind = 'module' | 'def' | 'val' | 'assumption' | 'param' | 'var' | 'const' | 'type' /** - * A minimal representation of a QuintDef, to be stored in `LookupTable` and - * `DefinitionsByName`. + * A definition to be stored in `DefinitionsByName` and `LookupTable`. Either a `QuintDef` + * or a `QuintLambdaParameter`, with additional metadata fields */ -export interface Definition { - kind: DefinitionKind - reference: bigint +export type LookupDefinition = (QuintDef | ({ kind: 'param' } & QuintLambdaParameter)) & { + /* Hidden definitions won't be copied over to a module when an + * import/intance/export statement is resolved. `hidden` can be removed with + * `export` statements for the hidden definitions. */ + hidden?: boolean + /* `namespaces` are names to add to the definition's name, when it + * is copied from one module to another with a qualified name. Ordered from + * innermost to the outermost namespace. */ + namespaces?: string[] + /* importedFrom` is a reference to the import/instance/export statement that + * originated the definition, if the definition was copied from another + * module. */ + importedFrom?: QuintImport | QuintInstance | QuintExport + /* `typeAnnotation` is the type annotation of the definition, if it has one. + * Some types in `QuintDef` already have a `typeAnnotation` field. This + * ensures that this field is always accessible */ typeAnnotation?: QuintType } /** * A module's definitions, indexed by name. - * - * A definition, in this type, can be hidden, meaning it won't be copied over to - * a module when an import/intance/export statement is resolved. `hidden` can be - * removed with `export` statements for the hidden definitions. */ -export type DefinitionsByName = Map +export type DefinitionsByName = Map /** * Definitions for each module @@ -54,7 +64,7 @@ export type DefinitionsByModule = Map * * This should be created by `resolveNames` from `resolver.ts` */ -export type LookupTable = Map +export type LookupTable = Map /** * Copy the names of a definitions table to a new one, ignoring hidden diff --git a/quint/src/names/collector.ts b/quint/src/names/collector.ts index 61e9f6506..f8d3c22b1 100644 --- a/quint/src/names/collector.ts +++ b/quint/src/names/collector.ts @@ -25,7 +25,7 @@ import { QuintTypeDef, QuintVar, } from '../ir/quintIr' -import { Definition, DefinitionsByModule, DefinitionsByName, LookupTable, builtinNames, copyNames } from './base' +import { DefinitionsByModule, DefinitionsByName, LookupDefinition, LookupTable, builtinNames, copyNames } from './base' import { moduleNotFoundError, nameNotFoundError, @@ -62,11 +62,11 @@ export class NameCollector implements IRVisitor { } enterVar(def: QuintVar): void { - this.collectDefinition(def.name, { kind: def.kind, reference: def.id, typeAnnotation: def.typeAnnotation }) + this.collectDefinition(def) } enterConst(def: QuintConst): void { - this.collectDefinition(def.name, { kind: def.kind, reference: def.id, typeAnnotation: def.typeAnnotation }) + this.collectDefinition(def) } enterOpDef(def: QuintOpDef): void { @@ -75,7 +75,7 @@ export class NameCollector implements IRVisitor { // that we collect type annotations here. if (this.definitionDepth === 0) { // collect only top-level definitions - this.collectDefinition(def.name, { kind: def.kind, reference: def.id }) + this.collectDefinition({ ...def, typeAnnotation: undefined }) } this.definitionDepth++ @@ -86,11 +86,11 @@ export class NameCollector implements IRVisitor { } enterTypeDef(def: QuintTypeDef): void { - this.collectDefinition(def.name, { kind: 'type', reference: def.id, typeAnnotation: def.type }) + this.collectDefinition(def) } enterAssume(def: QuintAssume): void { - this.collectDefinition(def.name, { kind: 'assumption', reference: def.id }) + this.collectDefinition(def) } enterInstance(def: QuintInstance): void { @@ -133,7 +133,7 @@ export class NameCollector implements IRVisitor { } // Update the definition to point to the expression being overriden - instanceTable.set(param.name, { ...constDef, reference: ex.id }) + instanceTable.set(param.name, { ...constDef, id: ex.id }) }) // All names from the instanced module should be acessible with the instance namespace @@ -181,7 +181,7 @@ export class NameCollector implements IRVisitor { return } - this.collectDefinition(def.defName, newDef, def.id) + this.collectDefinition(newDef, def.defName, def.id) } // Imported names are copied with a scope since imports are not transitive by @@ -219,23 +219,25 @@ export class NameCollector implements IRVisitor { return } - this.collectDefinition(def.defName, newDef, def.id) + this.collectDefinition(newDef, def.defName, def.id) } /** Public interface to manipulate the collected definitions. Used by * `NameResolver` to add and remove scoped definitions */ /** - * Collects a definition with the given identifier and definition object. If the - * identifier is an underscore or a built-in name, the definition is not collected. - * If the identifier conflicts with a previous definition, a conflict is recorded. + * Collects a definition. If the identifier is an underscore or a built-in + * name, the definition is not collected. If the identifier conflicts with a + * previous definition, a conflict is recorded. * - * @param identifier - The identifier of the definition to collect. * @param def - The definition object to collect. + * @param name - An optional name for the definition, if the name is different + * than `def.name` (i.e. in import-like statements). * @param source - An optional source identifier for the definition, if the * source is different than `def.id` (i.e. in import-like statements). */ - collectDefinition(identifier: string, def: Definition, source?: bigint): void { + collectDefinition(def: LookupDefinition, name?: string, source?: bigint): void { + const identifier = name ?? def.name if (identifier === '_') { // Don't collect underscores, as they are special identifiers that allow no usage return @@ -243,13 +245,13 @@ export class NameCollector implements IRVisitor { if (builtinNames.includes(identifier)) { // Conflict with a built-in name - this.recordConflict(identifier, undefined, source ?? def.reference) + this.recordConflict(identifier, undefined, source ?? def.id) return } - if (this.definitionsByName.has(identifier) && this.definitionsByName.get(identifier)!.reference != def.reference) { + if (this.definitionsByName.has(identifier) && this.definitionsByName.get(identifier)!.id != def.id) { // Conflict with a previous definition - this.recordConflict(identifier, this.definitionsByName.get(identifier)!.reference, source ?? def.reference) + this.recordConflict(identifier, this.definitionsByName.get(identifier)!.id, source ?? def.id) return } @@ -273,15 +275,15 @@ export class NameCollector implements IRVisitor { * @returns The definition object for the given identifier, or undefined if a * definitions with that identifier was never collected. */ - getDefinition(identifier: string): Definition | undefined { + getDefinition(identifier: string): LookupDefinition | undefined { return this.definitionsByName.get(identifier) } private collectDefinitions(newDefs: DefinitionsByName): void { newDefs.forEach((def, identifier) => { const existingEntry = this.definitionsByName.get(identifier) - if (existingEntry && existingEntry.reference !== def.reference) { - this.recordConflict(identifier, existingEntry.reference, def.reference) + if (existingEntry && existingEntry.id !== def.id) { + this.recordConflict(identifier, existingEntry.id, def.id) } }) diff --git a/quint/src/names/resolver.ts b/quint/src/names/resolver.ts index 609c633cc..21455800a 100644 --- a/quint/src/names/resolver.ts +++ b/quint/src/names/resolver.ts @@ -61,11 +61,7 @@ class NameResolver implements IRVisitor { // Top-level definitions were already collected, so we only need to collect // scoped definitions. if (this.definitionDepth > 0) { - this.collector.collectDefinition(def.name, { - kind: def.kind, - reference: def.id, - typeAnnotation: def.typeAnnotation, - }) + this.collector.collectDefinition(def) } this.definitionDepth++ @@ -84,7 +80,7 @@ class NameResolver implements IRVisitor { enterLambda(expr: QuintLambda): void { // Lambda parameters are scoped, so they are collected here expr.params.forEach(p => { - this.collector.collectDefinition(p.name, { kind: 'param', reference: p.id }) + this.collector.collectDefinition({ ...p, kind: 'param' }) }) } @@ -109,7 +105,7 @@ class NameResolver implements IRVisitor { enterConstType(type: QuintConstType): void { // Type is a name, check that it is defined const def = this.collector.getDefinition(type.name) - if (!def || def.kind !== 'type') { + if (!def || def.kind !== 'typedef') { this.recordNameError('type', type.name, type.id!) return } @@ -131,12 +127,12 @@ class NameResolver implements IRVisitor { } const def = this.collector.getDefinition(name) - if (!def || def.kind === 'type') { + if (!def || def.kind === 'typedef') { this.recordNameError('name', name, id) return } - this.table.set(id, { kind: def.kind, reference: def.reference, typeAnnotation: def.typeAnnotation }) + this.table.set(id, def) } private recordNameError(kind: 'name' | 'type', name: string, id: bigint) { diff --git a/quint/src/parsing/ToIrListener.ts b/quint/src/parsing/ToIrListener.ts index 0d1aaca9a..86044563c 100644 --- a/quint/src/parsing/ToIrListener.ts +++ b/quint/src/parsing/ToIrListener.ts @@ -5,6 +5,7 @@ import { QuintListener } from '../generated/QuintListener' import { OpQualifier, QuintApp, + QuintDeclaration, QuintDef, QuintEx, QuintLambdaParameter, @@ -53,7 +54,7 @@ export class ToIrListener implements QuintListener { private sourceLocation: string = '' // the stack of definitions - protected definitionStack: QuintDef[] = [] + protected declarationStack: QuintDeclaration[] = [] // the stack of expressions protected exprStack: QuintEx[] = [] // the stack of parameter lists @@ -80,10 +81,10 @@ export class ToIrListener implements QuintListener { const module: QuintModule = { id: moduleId, name: ctx.qualId().text, - defs: this.definitionStack, + declarations: this.declarationStack, } - this.definitionStack = [] + this.declarationStack = [] const doc = getDocText(ctx.DOCCOMMENT()) @@ -106,7 +107,7 @@ export class ToIrListener implements QuintListener { typeAnnotation: typeTag, id, } - this.definitionStack.push(constDef) + this.declarationStack.push(constDef) } // translate: var x: type @@ -120,11 +121,11 @@ export class ToIrListener implements QuintListener { typeAnnotation: typeTag, id, } - this.definitionStack.push(varDef) + this.declarationStack.push(varDef) } exitLetIn(ctx: p.LetInContext) { - const def = this.definitionStack.pop() + const def = this.declarationStack.pop() const expr = this.exprStack.pop() const id = this.getId(ctx) @@ -160,12 +161,12 @@ export class ToIrListener implements QuintListener { typeAnnotation, } - this.definitionStack.push(def) + this.declarationStack.push(def) } // special case for: nondet x = e1; e2 exitNondet(ctx: p.NondetContext) { - const def = this.definitionStack.pop() + const def = this.declarationStack.pop() const nested = this.exprStack.pop() const id = this.getId(ctx) @@ -235,7 +236,7 @@ export class ToIrListener implements QuintListener { if (typeTag.isJust()) { def.typeAnnotation = typeTag.value } - this.definitionStack.push(def) + this.declarationStack.push(def) } else { const ls = this.locStr(ctx) // istanbul ignore next @@ -245,7 +246,7 @@ export class ToIrListener implements QuintListener { // translate a top-level def exitOper(ctx: p.OperContext) { - const def = this.definitionStack[this.definitionStack.length - 1] + const def = this.declarationStack[this.declarationStack.length - 1] const ls = this.locStr(ctx) assert(def, `exitOper: ${ls}: undefined operDef in exitOper`) } @@ -287,7 +288,7 @@ export class ToIrListener implements QuintListener { name: name, assumption: expr, } - this.definitionStack.push(assume) + this.declarationStack.push(assume) } // import Foo, import Foo as F, import Foo.x, import Foo.* @@ -300,7 +301,7 @@ export class ToIrListener implements QuintListener { // slice from the quoted string "", if the path is present const fromSource = ctx.fromSource() ? ctx.fromSource()!.text.slice(1, -1) : undefined const id = this.getId(ctx) - const importDef: QuintDef = { + const importDecl: QuintDeclaration = { id, kind: 'import', defName: defName, @@ -308,7 +309,7 @@ export class ToIrListener implements QuintListener { qualifiedName: qualifier, fromSource, } - this.definitionStack.push(importDef) + this.declarationStack.push(importDecl) } exitExportMod(ctx: p.ExportModContext) { @@ -316,14 +317,14 @@ export class ToIrListener implements QuintListener { const protoName = ctx.name()[0].text const qualifier = ctx.name().length > 1 ? ctx.name()[1].text : undefined const id = this.getId(ctx) - const exportDef: QuintDef = { + const exportDecl: QuintDeclaration = { id, kind: 'export', defName: defName, protoName: protoName, qualifiedName: qualifier, } - this.definitionStack.push(exportDef) + this.declarationStack.push(exportDecl) } // type T @@ -343,7 +344,7 @@ export class ToIrListener implements QuintListener { name, } - this.definitionStack.push(def) + this.declarationStack.push(def) } // type Alias = set(int) @@ -365,7 +366,7 @@ export class ToIrListener implements QuintListener { type, } - this.definitionStack.push(def) + this.declarationStack.push(def) } // type T = | A | B(t1) | C(t2) @@ -388,7 +389,7 @@ export class ToIrListener implements QuintListener { type, } - this.definitionStack.push(def) + this.declarationStack.push(def) } exitTypeSumVariant(ctx: p.TypeSumVariantContext) { @@ -433,7 +434,7 @@ export class ToIrListener implements QuintListener { const identityOverride = ctx.MUL() !== undefined const id = this.getId(ctx) - const instance: QuintDef = { + const instance: QuintDeclaration = { id, kind: 'instance', qualifiedName: qualifiedName, @@ -442,7 +443,7 @@ export class ToIrListener implements QuintListener { identityOverride, fromSource, } - this.definitionStack.push(instance) + this.declarationStack.push(instance) } /** ******************* translate expressions **************************/ @@ -1070,13 +1071,13 @@ export class ToIrListener implements QuintListener { }) } - exitDocumentedUnit(ctx: p.DocumentedUnitContext) { + exitDocumentedDeclaration(ctx: p.DocumentedDeclarationContext) { const doc = getDocText(ctx.DOCCOMMENT()) if (doc) { - // Pop last def and re-push it with the doc - const def = this.definitionStack.pop()! - this.definitionStack.push({ doc, ...def }) + // Pop last declaration and re-push it with the doc + const decl = this.declarationStack.pop()! + this.declarationStack.push({ doc, ...decl }) } } diff --git a/quint/src/parsing/quintParserFrontend.ts b/quint/src/parsing/quintParserFrontend.ts index 3e4a7e554..d36f0b236 100644 --- a/quint/src/parsing/quintParserFrontend.ts +++ b/quint/src/parsing/quintParserFrontend.ts @@ -17,7 +17,7 @@ import { QuintLexer } from '../generated/QuintLexer' import * as p from '../generated/QuintParser' import { QuintListener } from '../generated/QuintListener' -import { IrErrorMessage, QuintDef, QuintEx, QuintModule } from '../ir/quintIr' +import { IrErrorMessage, QuintDeclaration, QuintEx, QuintModule } from '../ir/quintIr' import { IdGenerator } from '../idGenerator' import { ToIrListener } from './ToIrListener' import { LookupTable } from '../names/base' @@ -116,15 +116,15 @@ export interface ParserPhase3 extends ParserPhase2 { } /** - * Phase 4: Topological sort of definitions and cycle detection. + * Phase 4: Topological sort of declarations and cycle detection. */ export interface ParserPhase4 extends ParserPhase3 {} /** * The result of parsing an expression or unit. */ -export type ExpressionOrUnitParseResult = - | { kind: 'toplevel'; def: QuintDef } +export type ExpressionOrDeclarationParseResult = + | { kind: 'declaration'; decl: QuintDeclaration } | { kind: 'expr'; expr: QuintEx } | { kind: 'none' } | { kind: 'error'; messages: ErrorMessage[] } @@ -136,19 +136,19 @@ export type ExpressionOrUnitParseResult = * @param sourceLocation a textual description of the source * @returns the parsing result */ -export function parseExpressionOrUnit( +export function parseExpressionOrDeclaration( text: string, sourceLocation: string, idGenerator: IdGenerator, sourceMap: SourceMap -): ExpressionOrUnitParseResult { +): ExpressionOrDeclarationParseResult { const errorMessages: ErrorMessage[] = [] const parser = setupParser(text, sourceLocation, errorMessages) - const tree = parser.unitOrExpr() + const tree = parser.declarationOrExpr() if (errorMessages.length > 0) { return { kind: 'error', messages: errorMessages } } else { - const listener = new ExpressionOrUnitListener(sourceLocation, idGenerator) + const listener = new ExpressionOrDeclarationListener(sourceLocation, idGenerator) // Use an existing source map as a starting point. listener.sourceMap = sourceMap @@ -192,7 +192,7 @@ export function parsePhase1fromText( } /** - * Phase 2 of the Quint parser. Go over each definition of the form + * Phase 2 of the Quint parser. Go over each declaration of the form * `import ... from ''`, do the following: * * - parse the modules that are referenced by each path, @@ -226,11 +226,11 @@ export function parsePhase2sourceResolution( .forEach(m => moduleRank.set(m.name, maxModuleRank++)) while (worklist.length > 0) { const [importer, pathTrail] = worklist.splice(0, 1)[0] - for (const def of importer.defs) { - if ((def.kind === 'import' || def.kind === 'instance') && def.fromSource) { + for (const decl of importer.declarations) { + if ((decl.kind === 'import' || decl.kind === 'instance') && decl.fromSource) { const importerPath = pathTrail[pathTrail.length - 1] const stemPath = sourceResolver.stempath(importerPath) - const importeePath = sourceResolver.lookupPath(stemPath, def.fromSource + '.qnt') + const importeePath = sourceResolver.lookupPath(stemPath, decl.fromSource + '.qnt') // check for import cycles if (pathTrail.find(p => p.normalizedPath === importeePath.normalizedPath)) { // found a cyclic dependency @@ -240,7 +240,7 @@ export function parsePhase2sourceResolution( .join(' imports ') const err = fromIrErrorMessage(sourceMap)({ explanation: `Cyclic imports: ${cycle}`, - refs: [def.id], + refs: [decl.id], }) return left([err]) } @@ -256,8 +256,8 @@ export function parsePhase2sourceResolution( // failed to load the imported source const err = fromIrErrorMessage(sourceMap)({ // do not use the original message as it propagates absolute file names - explanation: `import ... from '${def.fromSource}': could not load`, - refs: [def.id], + explanation: `import ... from '${decl.fromSource}': could not load`, + refs: [decl.id], }) return left([err]) } @@ -300,18 +300,18 @@ export function parsePhase3importAndNameResolution(phase2Data: ParserPhase2): Pa } /** - * Phase 4 of the Quint parser. Sort all definitions in the topologocal order, + * Phase 4 of the Quint parser. Sort all declarations in the topologocal order, * that is, every name should be defined before it is used. */ export function parsePhase4toposort(phase3Data: ParserPhase3): ParseResult { - // topologically sort all definitions in each module + // topologically sort all declarations in each module const context = mkCallGraphContext(phase3Data.modules) const cycleOrModules: Either, QuintModule[]> = merge( phase3Data.modules.map(mod => { const visitor = new CallGraphVisitor(phase3Data.table, context) walkModule(visitor, mod) - return toposort(visitor.graph, mod.defs).mapRight(defs => { - return { ...mod, defs } as QuintModule + return toposort(visitor.graph, mod.declarations).mapRight(decls => { + return { ...mod, declarations: decls } }) }) ) @@ -323,12 +323,12 @@ export function parsePhase4toposort(phase3Data: ParserPhase3): ParseResult sourceIdToLoc(phase3Data.sourceMap, id)), - explanation: `${errorCode}: Found cyclic definitions. Use fold and foldl instead of recursion`, + explanation: `${errorCode}: Found cyclic declarations. Use fold and foldl instead of recursion`, }, ] as ErrorMessage[] }) .mapRight(modules => { - // reordered the definitions + // reordered the declarations return { ...phase3Data, modules } }) } @@ -408,9 +408,9 @@ function setupParser(text: string, sourceLocation: string, errorMessages: ErrorM return parser } -// A simple listener to parse a unit or expression -class ExpressionOrUnitListener extends ToIrListener { - result: ExpressionOrUnitParseResult = { +// A simple listener to parse a declaration or expression +class ExpressionOrDeclarationListener extends ToIrListener { + result: ExpressionOrDeclarationParseResult = { kind: 'error', messages: [ { @@ -420,10 +420,10 @@ class ExpressionOrUnitListener extends ToIrListener { ], } - exitUnitOrExpr(ctx: p.UnitOrExprContext) { - if (ctx.unit()) { - const def = this.definitionStack[this.definitionStack.length - 1] - this.result = { kind: 'toplevel', def } + exitDeclarationOrExpr(ctx: p.DeclarationOrExprContext) { + if (ctx.declaration()) { + const decl = this.declarationStack[this.declarationStack.length - 1] + this.result = { kind: 'declaration', decl } } else if (ctx.expr()) { const expr = this.exprStack[this.exprStack.length - 1] this.result = { kind: 'expr', expr } diff --git a/quint/src/quintAnalyzer.ts b/quint/src/quintAnalyzer.ts index ab4770a7f..e9f9cda7a 100644 --- a/quint/src/quintAnalyzer.ts +++ b/quint/src/quintAnalyzer.ts @@ -13,7 +13,7 @@ */ import { LookupTable } from './names/base' -import { OpQualifier, QuintDef, QuintModule } from './ir/quintIr' +import { OpQualifier, QuintDeclaration, QuintModule } from './ir/quintIr' import { TypeScheme } from './types/base' import { TypeInferrer } from './types/inferrer' import { EffectScheme } from './effects/base' @@ -51,12 +51,16 @@ export function analyzeModules(lookupTable: LookupTable, quintModules: QuintModu * * @param analysisOutput - The previous analysis output to be used as a starting point. * @param lookupTable - The lookup tables for the modules. - * @param def - The Quint definition to be analyzed. + * @param declaration - The Quint declaration to be analyzed. * @returns A tuple with a list of errors and the analysis output. */ -export function analyzeInc(analysisOutput: AnalysisOutput, lookupTable: LookupTable, def: QuintDef): AnalysisResult { +export function analyzeInc( + analysisOutput: AnalysisOutput, + lookupTable: LookupTable, + declaration: QuintDeclaration +): AnalysisResult { const analyzer = new QuintAnalyzer(lookupTable, analysisOutput) - analyzer.analyzeDef(def) + analyzer.analyzeDeclaration(declaration) return analyzer.getResult() } @@ -87,18 +91,18 @@ class QuintAnalyzer { } analyze(module: QuintModule): void { - this.analyzeDefs(module.defs) + this.analyzeDeclarations(module.declarations) } - analyzeDef(def: QuintDef): void { - this.analyzeDefs([def]) + analyzeDeclaration(decl: QuintDeclaration): void { + this.analyzeDeclarations([decl]) } - private analyzeDefs(defs: QuintDef[]): void { - const [typeErrMap, types] = this.typeInferrer.inferTypes(defs) - const [effectErrMap, effects] = this.effectInferrer.inferEffects(defs) + private analyzeDeclarations(decls: QuintDeclaration[]): void { + const [typeErrMap, types] = this.typeInferrer.inferTypes(decls) + const [effectErrMap, effects] = this.effectInferrer.inferEffects(decls) const updatesErrMap = this.multipleUpdatesChecker.checkEffects([...effects.values()]) - const [modeErrMap, modes] = this.modeChecker.checkModes(defs, effects) + const [modeErrMap, modes] = this.modeChecker.checkModes(decls, effects) const errorTrees = [...typeErrMap, ...effectErrMap] diff --git a/quint/src/repl.ts b/quint/src/repl.ts index 32551f790..a99fc1124 100644 --- a/quint/src/repl.ts +++ b/quint/src/repl.ts @@ -17,11 +17,11 @@ import { Either, left, right } from '@sweet-monads/either' import chalk from 'chalk' import { format } from './prettierimp' -import { FlatDef, QuintEx, isFlat } from './ir/quintIr' +import { FlatModule, QuintDef, QuintEx, isDef } from './ir/quintIr' import { CompilationContext, CompilationState, - compileDef, + compileDecl, compileExpr, compileFromCode, contextNameLookup, @@ -31,7 +31,7 @@ import { import { formatError } from './errorReporter' import { Register } from './runtime/runtime' import { TraceRecorder, newTraceRecorder } from './runtime/trace' -import { ErrorMessage, parseExpressionOrUnit } from './parsing/quintParserFrontend' +import { ErrorMessage, parseExpressionOrDeclaration } from './parsing/quintParserFrontend' import { prettyQuintEx, printExecutionFrameRec, terminalWidth } from './graphics' import { verbosity } from './verbosity' import { Rng, newRng } from './rng' @@ -83,7 +83,7 @@ class ReplState { } addReplModule() { - const replModule = { name: '__repl__', defs: simulatorBuiltins(this.compilationState), id: 0n } + const replModule: FlatModule = { name: '__repl__', declarations: simulatorBuiltins(this.compilationState), id: 0n } this.compilationState.modules.push(replModule) this.compilationState.originalModules.push(replModule) this.moduleHist += moduleToString(replModule) @@ -476,7 +476,7 @@ function saveVars(vars: Register[], nextvars: Register[]): Maybe { // Declarations that are overloaded by the simulator. // In the future, we will declare them in a separate module. -function simulatorBuiltins(compilationState: CompilationState): FlatDef[] { +function simulatorBuiltins(compilationState: CompilationState): QuintDef[] { return [ parseDefOrThrow(compilationState, `val ${lastTraceName} = []`), parseDefOrThrow(compilationState, `def q::test = (q::nruns, q::nsteps, q::init, q::next, q::inv) => false`), @@ -484,12 +484,12 @@ function simulatorBuiltins(compilationState: CompilationState): FlatDef[] { ] } -function parseDefOrThrow(compilationState: CompilationState, text: string): FlatDef { - const result = parseExpressionOrUnit(text, '', compilationState.idGen, compilationState.sourceMap) - if (result.kind === 'toplevel' && isFlat(result.def)) { - return result.def +function parseDefOrThrow(compilationState: CompilationState, text: string): QuintDef { + const result = parseExpressionOrDeclaration(text, '', compilationState.idGen, compilationState.sourceMap) + if (result.kind === 'declaration' && isDef(result.decl)) { + return result.decl } else { - throw new Error(`Expected a flat definition, got ${result.kind}, parsing ${text}`) + throw new Error(`Expected a definition, got ${result.kind}, parsing ${text}`) } } @@ -541,7 +541,7 @@ function tryEval(out: writer, state: ReplState, newInput: string): boolean { tryEvalModule(out, state, '__repl__') } - const parseResult = parseExpressionOrUnit( + const parseResult = parseExpressionOrDeclaration( newInput, '', state.compilationState.idGen, @@ -581,9 +581,9 @@ function tryEval(out: writer, state: ReplState, newInput: string): boolean { }) .isRight() } - if (parseResult.kind === 'toplevel') { + if (parseResult.kind === 'declaration') { // compile the module and add it to history if everything worked - const context = compileDef(state.compilationState, state.evaluationState, state.rng, parseResult.def) + const context = compileDecl(state.compilationState, state.evaluationState, state.rng, parseResult.decl) if ( context.evaluationState.context.size === 0 || diff --git a/quint/src/runtime/compile.ts b/quint/src/runtime/compile.ts index 7f5881fc1..bea023f3c 100644 --- a/quint/src/runtime/compile.ts +++ b/quint/src/runtime/compile.ts @@ -18,7 +18,7 @@ import { } from '../parsing/quintParserFrontend' import { Computable, ComputableKind, kindName } from './runtime' import { ExecutionListener } from './trace' -import { FlatDef, FlatModule, IrErrorMessage, QuintDef, QuintEx, QuintModule } from '../ir/quintIr' +import { FlatModule, IrErrorMessage, QuintDeclaration, QuintDef, QuintEx, QuintModule } from '../ir/quintIr' import { CompilerVisitor, EvaluationState, newEvaluationState } from './impl/compilerImpl' import { walkDefinition } from '../ir/IRVisitor' import { LookupTable } from '../names/base' @@ -26,7 +26,7 @@ import { AnalysisOutput, analyzeInc, analyzeModules } from '../quintAnalyzer' import { mkErrorMessage } from '../cliCommands' import { IdGenerator, newIdGenerator } from '../idGenerator' import { SourceLookupPath } from '../parsing/sourceResolver' -import { addDefToFlatModule, flattenModules } from '../flattening' +import { addDefToFlatModule as addDeclataionToFlatModule, flattenModules } from '../flattening' import { Rng } from '../rng' /** @@ -118,18 +118,16 @@ export function contextNameLookup( } /** - * Compile Quint modules to JS runtime objects from the parsed and type-checked + * Compile Quint defs to JS runtime objects from the parsed and type-checked * data structures. This is a user-facing function. In case of an error, the * error messages are passed to an error handler and the function returns * undefined. * - * @param modules Quint modules in the intermediate representation - * @param sourceMap source map as produced by the parser + * @param compilationState the state of the compilation process + * @param evaluationState the state of the compiler visitor * @param lookupTable lookup table as produced by the parser - * @param analysisOutput the maps produced by the static analysis - * @param mainName the name of the module that may contain state varibles - * @param execListener execution listener * @param rand the random number generator + * @param defs the definitions to compile * @returns the compilation context */ export function compile( @@ -137,7 +135,7 @@ export function compile( evaluationState: EvaluationState, lookupTable: LookupTable, rand: (bound: bigint) => bigint, - defs: FlatDef[] + defs: QuintDef[] ): CompilationContext { const { sourceMap, analysisOutput } = compilationState @@ -181,7 +179,7 @@ export function compileExpr( // Hence, we have to compile it via an auxilliary definition. const def: QuintDef = { kind: 'def', qualifier: 'action', name: 'q::input', expr, id: state.idGen.nextId() } - return compileDef(state, evaluationState, rng, def) + return compileDecl(state, evaluationState, rng, def) } /** @@ -192,15 +190,15 @@ export function compileExpr( * @param state - The current compilation state * @param evaluationState - The current evaluation state * @param rng - The random number generator - * @param def - The Quint definition to be compiled + * @param decl - The Quint declaration to be compiled * * @returns A compilation context with the compiled definition or its errors */ -export function compileDef( +export function compileDecl( state: CompilationState, evaluationState: EvaluationState, rng: Rng, - def: QuintDef + decl: QuintDeclaration ): CompilationContext { if (state.originalModules.length === 0 || state.modules.length === 0) { throw new Error('No modules in state') @@ -210,30 +208,30 @@ export function compileDef( // ensuring the original object is not modified const originalModules = [...state.originalModules] const originalLastModule = originalModules.pop()! - originalModules.push({ ...originalLastModule, defs: [...originalLastModule.defs, def] }) + originalModules.push({ ...originalLastModule, declarations: [...originalLastModule.declarations, decl] }) // Same for the flattened module list, but that requires extra care with types const modules: QuintModule[] = [...state.modules] // This is not modules.pop() to ensure flatness const lastModule: FlatModule = state.modules[state.modules.length - 1] modules.pop() - modules.push({ ...lastModule, defs: [...lastModule.defs, def] }) + modules.push({ ...lastModule, declarations: [...lastModule.declarations, decl] }) // We need to resolve names for this new definition. Incremental name // resolution is not our focus now, so just resolve everything again. return parsePhase3importAndNameResolution({ modules: originalModules, sourceMap: state.sourceMap }) .mapLeft(errorContextFromMessage(evaluationState.listener)) .map(({ table }) => { - const [analysisErrors, analysisOutput] = analyzeInc(state.analysisOutput, table, def) + const [analysisErrors, analysisOutput] = analyzeInc(state.analysisOutput, table, decl) - const { flattenedModule, flattenedDefs, flattenedTable, flattenedAnalysis } = addDefToFlatModule( + const { flattenedModule, flattenedDefs, flattenedTable, flattenedAnalysis } = addDeclataionToFlatModule( modules, table, state.idGen, state.sourceMap, analysisOutput, lastModule, - def + decl ) const flatModules: FlatModule[] = [...state.modules] @@ -311,7 +309,7 @@ export function compileFromCode( refs: [], }, ] - const defsToCompile = main ? main.defs : [] + const defsToCompile = main ? main.declarations : [] const ctx = compile(compilationState, newEvaluationState(execListener), flattenedTable, rand, defsToCompile) const errorLocator = mkErrorMessage(sourceMap) diff --git a/quint/src/runtime/impl/compilerImpl.ts b/quint/src/runtime/impl/compilerImpl.ts index 320e0c825..78d0a1878 100644 --- a/quint/src/runtime/impl/compilerImpl.ts +++ b/quint/src/runtime/impl/compilerImpl.ts @@ -922,7 +922,7 @@ export class CompilerVisitor implements IRVisitor { } // retrieve the operator type to see, whether tuples should be unpacked - const operScheme = this.types.get(lookupEntry.reference) + const operScheme = this.types.get(lookupEntry.id) if (operScheme === undefined) { return onError(app.id, `No type for ${app.opcode}`) } @@ -1611,7 +1611,7 @@ export class CompilerVisitor implements IRVisitor { private contextLookup(id: bigint, kinds: ComputableKind[]) { const vdef = this.lookupTable.get(id) if (vdef) { - const refId = vdef.reference! + const refId = vdef.id! for (const k of kinds) { const value = this.context.get(kindName(k, refId)) if (value) { diff --git a/quint/src/runtime/testing.ts b/quint/src/runtime/testing.ts index 87cd695cd..140779526 100644 --- a/quint/src/runtime/testing.ts +++ b/quint/src/runtime/testing.ts @@ -88,7 +88,7 @@ export function compileAndTest( return left([{ explanation: 'Cannot find main module', locs: [] }]) } - const ctx = compile(compilationState, newEvaluationState(recorder), lookupTable, options.rng.next, main.defs) + const ctx = compile(compilationState, newEvaluationState(recorder), lookupTable, options.rng.next, main.declarations) const saveTrace = (index: number, name: string, status: string) => { // Save the best traces that are reported by the recorder: @@ -111,7 +111,7 @@ export function compileAndTest( return left(ctxErrors) } - const testDefs = main.defs.filter(d => d.kind === 'def' && options.testMatch(d.name)) as QuintOpDef[] + const testDefs = main.declarations.filter(d => d.kind === 'def' && options.testMatch(d.name)) as QuintOpDef[] return merge( testDefs.map((def, index) => { diff --git a/quint/src/static/callgraph.ts b/quint/src/static/callgraph.ts index 7dd071dc0..ac68dfe8b 100644 --- a/quint/src/static/callgraph.ts +++ b/quint/src/static/callgraph.ts @@ -14,7 +14,16 @@ import type { RecordOf } from 'immutable' import { IRVisitor } from '../ir/IRVisitor' import { LookupTable } from '../names/base' -import { QuintApp, QuintDef, QuintExport, QuintImport, QuintInstance, QuintModule, QuintName } from '../ir/quintIr' +import { + QuintApp, + QuintDeclaration, + QuintDef, + QuintExport, + QuintImport, + QuintInstance, + QuintModule, + QuintName, +} from '../ir/quintIr' import { QuintConstType } from '../ir/quintTypes' /** @@ -78,15 +87,15 @@ export function mkCallGraphContext(modules: QuintModule[]): CallGraphContext { return map.set(key, value.add(importId)) } // add all imports and instances - return mod.defs.reduce((map, def) => { - if (def.kind === 'import' || def.kind === 'instance') { + return mod.declarations.reduce((map, decl) => { + if (decl.kind === 'import' || decl.kind === 'instance') { // import A // import B(N = 3) - let result = addImport(map, def.id, def.protoName) - if (def.qualifiedName) { + let result = addImport(map, decl.id, decl.protoName) + if (decl.qualifiedName) { // import A as A1 // import B(N = 3) as B1 - result = addImport(result, def.id, def.qualifiedName) + result = addImport(result, decl.id, decl.qualifiedName) } return result } else { @@ -96,7 +105,7 @@ export function mkCallGraphContext(modules: QuintModule[]): CallGraphContext { } function collectDefinedAt(map: DefinedAtMap, mod: QuintModule): DefinedAtMap { - return mod.defs.reduce((map, def) => map.set(def.id, mod), map) + return mod.declarations.reduce((map, decl) => map.set(decl.id, mod), map) } const definedAt = modules.reduce(collectDefinedAt, Map()) @@ -113,7 +122,7 @@ export function mkCallGraphContext(modules: QuintModule[]): CallGraphContext { export class CallGraphVisitor implements IRVisitor { private lookupTable: LookupTable private context: CallGraphContext - private stack: QuintDef[] + private stack: QuintDeclaration[] private currentModuleId: bigint /** * The call graph computed by the visitor. @@ -167,33 +176,40 @@ export class CallGraphVisitor implements IRVisitor { this.stack.pop() } - enterImport(def: QuintImport) { - const importedModule = this.context.modulesByName.get(def.protoName) + enterImport(decl: QuintImport) { + const importedModule = this.context.modulesByName.get(decl.protoName) if (importedModule) { - this.graphAddAll(def.id, Set([importedModule.id])) + this.graphAddAll(decl.id, Set([importedModule.id])) } } - enterInstance(def: QuintInstance) { - const importedModule = this.context.modulesByName.get(def.protoName) + enterInstance(decl: QuintInstance) { + // Instances are the only non-definition declarations that need to be added to the stack, + // because they may contain names in the overrides + this.stack.push(decl) + const importedModule = this.context.modulesByName.get(decl.protoName) if (importedModule) { - this.graphAddAll(def.id, Set([importedModule.id])) + this.graphAddAll(decl.id, Set([importedModule.id])) } } - enterExport(def: QuintExport) { - const key = mkImportKey(this.currentModuleId, def.protoName) + exitInstance(_decl: QuintInstance) { + this.stack.pop() + } + + enterExport(decl: QuintExport) { + const key = mkImportKey(this.currentModuleId, decl.protoName) const imports = this.context.importsByName.get(key) ?? Set() // the imports and instance of the same module must precede the export - this.graphAddAll(def.id, imports) + this.graphAddAll(decl.id, imports) } // e.g., called for plus inside plus(x, y) exitApp(app: QuintApp) { const lookupDef = this.lookupTable.get(app.id) if (lookupDef) { - this.graphAddOne(lookupDef.reference) - this.graphAddImports(lookupDef.reference) + this.graphAddOne(lookupDef.id) + this.graphAddImports(lookupDef.id) } } @@ -201,8 +217,8 @@ export class CallGraphVisitor implements IRVisitor { exitName(name: QuintName) { const lookupDef = this.lookupTable.get(name.id) if (lookupDef) { - this.graphAddOne(lookupDef.reference) - this.graphAddImports(lookupDef.reference) + this.graphAddOne(lookupDef.id) + this.graphAddImports(lookupDef.id) } } @@ -211,8 +227,8 @@ export class CallGraphVisitor implements IRVisitor { if (tp.id) { const lookupDef = this.lookupTable.get(tp.id) if (lookupDef) { - this.graphAddOne(lookupDef.reference) - this.graphAddImports(lookupDef.reference) + this.graphAddOne(lookupDef.id) + this.graphAddImports(lookupDef.id) } } } diff --git a/quint/src/types/aliasInliner.ts b/quint/src/types/aliasInliner.ts index 7e635090e..69df7ab39 100644 --- a/quint/src/types/aliasInliner.ts +++ b/quint/src/types/aliasInliner.ts @@ -14,7 +14,7 @@ */ import { IRTransformer, transformDefinition, transformModule, transformType } from '../ir/IRTransformer' -import { LookupTable } from '../names/base' +import { LookupDefinition, LookupTable } from '../names/base' import { AnalysisOutput } from '../quintAnalyzer' import { QuintDef, QuintModule } from '../ir/quintIr' import { QuintType } from '../ir/quintTypes' @@ -35,13 +35,13 @@ export function inlineTypeAliases( ): { modules: QuintModule[]; table: LookupTable; analysisOutput: AnalysisOutput } { const modulesWithInlinedAliases = modules.map(m => inlineAliasesInModule(m, table)) const tableWithInlinedAliases = new Map( - [...table.entries()].map(([id, def]) => { - if (!def.typeAnnotation) { - return [id, def] + [...table.entries()].map(([id, def]): [bigint, LookupDefinition] => { + if (def.kind === 'param') { + const typeAnnotation = def.typeAnnotation ? inlineAliasesInType(def.typeAnnotation, table) : undefined + return [id, { ...def, typeAnnotation }] } - const inlinedType = inlineAliasesInType(def.typeAnnotation, table) - return [id, { ...def, typeAnnotation: inlinedType }] + return [id, inlineAliasesInDef(def, table)] }) ) @@ -136,8 +136,8 @@ class AliasInliner implements IRTransformer { function resolveAlias(lookupTable: LookupTable, type: QuintType): QuintType { if (type.kind === 'const' && type.id) { const aliasValue = lookupTable.get(type.id) - if (aliasValue && aliasValue.typeAnnotation) { - return resolveAlias(lookupTable, aliasValue.typeAnnotation) + if (aliasValue && aliasValue.kind === 'typedef' && aliasValue.type) { + return resolveAlias(lookupTable, aliasValue.type) } } return type diff --git a/quint/src/types/constraintGenerator.ts b/quint/src/types/constraintGenerator.ts index dde5ca78c..b9f97736b 100644 --- a/quint/src/types/constraintGenerator.ts +++ b/quint/src/types/constraintGenerator.ts @@ -154,6 +154,11 @@ export class ConstraintGeneratorVisitor implements IRVisitor { }) }) }) + + // Solve constraints here since this won't go through `exitDef` + if (this.constraints.length > 0) { + this.solveConstraints() + } } // n: t ∈ Γ @@ -364,7 +369,7 @@ export class ConstraintGeneratorVisitor implements IRVisitor { return right(def.typeAnnotation) } - const id = def?.reference + const id = def?.id if (!def || !id) { return left(buildErrorLeaf(this.location, `Signature not found for name: ${name}`)) } diff --git a/quint/src/types/constraintSolver.ts b/quint/src/types/constraintSolver.ts index 1fc340d04..6d28b1bb0 100644 --- a/quint/src/types/constraintSolver.ts +++ b/quint/src/types/constraintSolver.ts @@ -189,13 +189,13 @@ export function unifyRows(table: LookupTable, r1: Row, r2: Row): Either { diff --git a/quint/src/types/inferrer.ts b/quint/src/types/inferrer.ts index 07f74acfb..6a755101a 100644 --- a/quint/src/types/inferrer.ts +++ b/quint/src/types/inferrer.ts @@ -14,9 +14,9 @@ */ import { ErrorTree } from '../errorTree' -import { walkDefinition } from '../ir/IRVisitor' +import { walkDeclaration } from '../ir/IRVisitor' import { LookupTable } from '../names/base' -import { QuintDef } from '../ir/quintIr' +import { QuintDeclaration } from '../ir/quintIr' import { TypeScheme } from './base' import { ConstraintGeneratorVisitor } from './constraintGenerator' import { solveConstraint } from './constraintSolver' @@ -29,16 +29,16 @@ export class TypeInferrer extends ConstraintGeneratorVisitor { } /** - * Infers an type for each expression in a list of QuintDefs + * Infers an type for each expression in a list of QuintDeclarations * - * @param defs: the list of QuintDefs to infer types for + * @param declarations: the list of QuintDeclarations to infer types for * * @returns a map from expression ids to their types and a map from expression * ids to the corresponding error for any problematic expressions. */ - inferTypes(defs: QuintDef[]): TypeInferenceResult { - defs.forEach(quintDef => { - walkDefinition(this, quintDef) + inferTypes(declarations: QuintDeclaration[]): TypeInferenceResult { + declarations.forEach(decl => { + walkDeclaration(this, decl) }) return [this.errors, this.types] } diff --git a/quint/src/util.ts b/quint/src/util.ts index 61074beb3..061434919 100644 --- a/quint/src/util.ts +++ b/quint/src/util.ts @@ -12,6 +12,8 @@ * @module */ +import JSONbig from 'json-bigint' + /** Add this at the end of a switch statement or if/then sequence to enforce exhaustiveness checking * * E.g., @@ -24,6 +26,6 @@ * } * ``` * See https://stackoverflow.com/a/39419171 */ -export function unreachable(_: never): never { - throw new Error('impossible: non-exhuastive check should fail during type checking') +export function unreachable(object: never): never { + throw new Error(`impossible: non-exhuastive check should fail during type checking ${JSONbig.stringify(object)}`) } diff --git a/quint/test/builders/ir.ts b/quint/test/builders/ir.ts index 90ff4bbf5..6ba966c3a 100644 --- a/quint/test/builders/ir.ts +++ b/quint/test/builders/ir.ts @@ -1,6 +1,6 @@ import { parsePhase1fromText } from '../../src/parsing/quintParserFrontend' import { IdGenerator, newIdGenerator } from '../../src/idGenerator' -import { QuintDef, QuintEx, QuintModule } from '../../src/ir/quintIr' +import { QuintDeclaration, QuintDef, QuintEx, QuintModule, isDef } from '../../src/ir/quintIr' import JSONbig from 'json-bigint' import { QuintType } from '../../src/ir/quintTypes' @@ -8,8 +8,8 @@ export function buildModuleWithExpressions(expressions: string[]): QuintModule { return buildModule([], expressions) } -export function buildModuleWithDefs(defs: string[], name?: string, idGenerator?: IdGenerator): QuintModule { - const quintModule: string = `module ${name ?? 'wrapper'} { ${defs.join('\n')} }` +export function buildModuleWithDecls(decls: string[], name?: string, idGenerator?: IdGenerator): QuintModule { + const quintModule: string = `module ${name ?? 'wrapper'} { ${decls.join('\n')} }` const result = parsePhase1fromText(idGenerator ?? newIdGenerator(), quintModule, 'mocked_path') @@ -27,12 +27,21 @@ export function buildModule( idGenerator?: IdGenerator ): QuintModule { const defsFromExprs = expressions.map((expr, index) => `def d${index} = ${expr}`) - return buildModuleWithDefs(defs.concat(defsFromExprs), name, idGenerator) + return buildModuleWithDecls(defs.concat(defsFromExprs), name, idGenerator) +} + +export function buildDecl(decl: string): QuintDeclaration { + const quintModule = buildModuleWithDecls([decl]) + return quintModule.declarations[0] } export function buildDef(def: string): QuintDef { - const quintModule = buildModuleWithDefs([def]) - return quintModule.defs[0] + const quintModule = buildModuleWithDecls([def]) + const decl = quintModule.declarations[0] + if (!isDef(decl)) { + throw new Error(`Error trying to build def from declaration that is not a def: ${JSONbig.stringify(decl)}`) + } + return decl } export function buildExpression(expression: string): QuintEx { diff --git a/quint/test/docs.test.ts b/quint/test/docs.test.ts index c8c2ff6b1..9ce58e892 100644 --- a/quint/test/docs.test.ts +++ b/quint/test/docs.test.ts @@ -1,11 +1,11 @@ import { assert } from 'chai' import { describe, it } from 'mocha' import { produceDocs, toMarkdown } from '../src/docs' -import { buildModuleWithDefs } from './builders/ir' +import { buildModuleWithDecls } from './builders/ir' import { dedent } from './textUtils' describe('produceDocs', () => { - const module = buildModuleWithDefs([ + const module = buildModuleWithDecls([ dedent( `/// This is a docstring for foo |val foo = 1` diff --git a/quint/test/effects/inferrer.test.ts b/quint/test/effects/inferrer.test.ts index 14e838b76..60e5d7f60 100644 --- a/quint/test/effects/inferrer.test.ts +++ b/quint/test/effects/inferrer.test.ts @@ -1,11 +1,12 @@ import { describe, it } from 'mocha' import { assert } from 'chai' -import { buildModuleWithDefs } from '../builders/ir' +import { buildModuleWithDecls } from '../builders/ir' import { effectSchemeToString } from '../../src/effects/printing' import { errorTreeToString } from '../../src/errorTree' import { EffectInferenceResult, EffectInferrer } from '../../src/effects/inferrer' import { parseMockedModule } from '../util' import { EffectScheme } from '../../src/effects/base' +import { isDef } from '../../src/ir/quintIr' describe('inferEffects', () => { const baseDefs = ['const N: int', 'const S: Set[int]', 'var x: int'] @@ -15,14 +16,12 @@ describe('inferEffects', () => { const { modules, table } = parseMockedModule(text) const inferrer = new EffectInferrer(table) - return inferrer.inferEffects(modules[0].defs) + return inferrer.inferEffects(modules[0].declarations) } function effectForDef(defs: string[], effects: Map, defName: string) { - const module = buildModuleWithDefs(baseDefs.concat(defs)) - const result = module.defs.find( - def => def.kind !== 'instance' && def.kind !== 'import' && def.kind != 'export' && def.name === defName - ) + const module = buildModuleWithDecls(baseDefs.concat(defs)) + const result = module.declarations.find(decl => isDef(decl) && decl.name === defName) if (!result) { throw new Error(`Could not find def with name ${defName}`) diff --git a/quint/test/effects/modeChecker.test.ts b/quint/test/effects/modeChecker.test.ts index 854ff44b8..ec0ee145e 100644 --- a/quint/test/effects/modeChecker.test.ts +++ b/quint/test/effects/modeChecker.test.ts @@ -15,12 +15,12 @@ describe('checkModes', () => { const { modules, table } = parseMockedModule(text) const inferrer = new EffectInferrer(table) - const [errors, effects] = inferrer.inferEffects(modules[1].defs) + const [errors, effects] = inferrer.inferEffects(modules[1].declarations) assert.isEmpty(errors, `Should find no errors, found: ${[...errors.values()].map(errorTreeToString)}`) const modeChecker = new ModeChecker() - return modeChecker.checkModes(modules[1].defs, effects) + return modeChecker.checkModes(modules[1].declarations, effects) } it('finds mode errors between action and def', () => { diff --git a/quint/test/flatenning.test.ts b/quint/test/flatenning.test.ts index 7433e65fc..2ed1c6c8c 100644 --- a/quint/test/flatenning.test.ts +++ b/quint/test/flatenning.test.ts @@ -2,7 +2,7 @@ import { assert } from 'chai' import { describe, it } from 'mocha' import { addDefToFlatModule, flattenModules } from '../src/flattening' import { newIdGenerator } from '../src/idGenerator' -import { definitionToString } from '../src/ir/IRprinting' +import { declarationToString } from '../src/ir/IRprinting' import { parse } from '../src/parsing/quintParserFrontend' import { FlatModule, analyzeModules } from '../src' import { SourceLookupPath } from '../src/parsing/sourceResolver' @@ -32,9 +32,9 @@ describe('flattenModules', () => { ) const [_, flattenedModule] = flattenedModules - it('has all expected defs', () => { + it('has all expected declarations', () => { assert.sameDeepMembers( - flattenedModule.defs.map(def => definitionToString(def)), + flattenedModule.declarations.map(decl => declarationToString(decl)), expectedDefs ) }) @@ -188,8 +188,8 @@ describe('addDefToFlatModule', () => { const [analysisErrors, analysisOutput] = analyzeModules(table, modules) assert.isEmpty(analysisErrors) - const def = module.defs[module.defs.length - 1] - const moduleWithoutDef: FlatModule = { ...module, defs: [] } + const def = module.declarations[module.declarations.length - 1] + const moduleWithoutDef: FlatModule = { ...module, declarations: [] } const { flattenedModule, flattenedAnalysis } = addDefToFlatModule( modules, table, @@ -200,9 +200,9 @@ describe('addDefToFlatModule', () => { def ) - it('has all expected defs', () => { + it('has all expected declarations', () => { assert.sameDeepMembers( - flattenedModule.defs.map(def => definitionToString(def)), + flattenedModule.declarations.map(decl => declarationToString(decl)), expectedDefs ) }) diff --git a/quint/test/ir/IRFinder.test.ts b/quint/test/ir/IRFinder.test.ts index 0d6ed76af..640b9f812 100644 --- a/quint/test/ir/IRFinder.test.ts +++ b/quint/test/ir/IRFinder.test.ts @@ -1,7 +1,7 @@ import { assert } from 'chai' import { describe, it } from 'mocha' import { findDefinitionWithId, findExpressionWithId, findTypeWithId } from '../../src/ir/IRFinder' -import { buildModuleWithDefs, buildModuleWithExpressions } from '../builders/ir' +import { buildModuleWithDecls, buildModuleWithExpressions } from '../builders/ir' describe('findExpressionWithId', () => { const modules = [buildModuleWithExpressions(['Nat'])] @@ -21,7 +21,7 @@ describe('findExpressionWithId', () => { }) describe('findTypeWithId', () => { - const modules = [buildModuleWithDefs(['const N: MY_TYPE'])] + const modules = [buildModuleWithDecls(['const N: MY_TYPE'])] it('finds type for existing id', () => { const type = findTypeWithId(modules, 1n) @@ -38,7 +38,7 @@ describe('findTypeWithId', () => { }) describe('findDefinitionWithId', () => { - const modules = [buildModuleWithDefs(['val a = 1'])] + const modules = [buildModuleWithDecls(['val a = 1'])] it('finds definition for existing id', () => { const def = findDefinitionWithId(modules, 2n) diff --git a/quint/test/ir/IRTransformer.test.ts b/quint/test/ir/IRTransformer.test.ts index 0fec005c1..c01ce0d51 100644 --- a/quint/test/ir/IRTransformer.test.ts +++ b/quint/test/ir/IRTransformer.test.ts @@ -1,12 +1,12 @@ import { describe, it } from 'mocha' import { assert } from 'chai' -import { buildModuleWithDefs } from '../builders/ir' -import { QuintDef, QuintEx, isFlat } from '../../src/ir/quintIr' +import { buildModuleWithDecls } from '../builders/ir' +import { QuintDeclaration, QuintDef, QuintEx, isDef } from '../../src/ir/quintIr' import { moduleToString } from '../../src/ir/IRprinting' import { IRTransformer, transformModule } from '../../src/ir/IRTransformer' import { ConcreteRow, QuintType } from '../../src/ir/quintTypes' -const quintModule = buildModuleWithDefs([ +const quintModule = buildModuleWithDecls([ 'var a: int', 'const B: int', 'type MY_TYPE = int', @@ -28,7 +28,7 @@ describe('enterExpr', () => { const transformer = new TestTransformer() const result = transformModule(transformer, quintModule) - const expectedModule = buildModuleWithDefs([ + const expectedModule = buildModuleWithDecls([ 'var a: int', 'const B: int', 'type MY_TYPE = int', @@ -43,22 +43,48 @@ describe('enterExpr', () => { }) }) +describe('enterDecl', () => { + it('transforms declarations', () => { + class TestTransformer implements IRTransformer { + enterDecl(decl: QuintDeclaration): QuintDeclaration { + if (isDef(decl)) { + return { ...decl, name: 'NewName' } + } else { + return { ...decl, protoName: 'NewModuleName' } + } + } + } + + const transformer = new TestTransformer() + const result = transformModule(transformer, quintModule) + + const expectedModule = buildModuleWithDecls([ + 'var NewName: int', + 'const NewName: int', + 'type NewName = int', + 'assume NewName = N > 1', + 'import NewModuleName.*', + 'import NewModuleName(x = "rainbow") as A1', + 'val NewName = S.filter(x => x + 1)', + 'def NewName = val x = false { x }', + ]) + + assert.deepEqual(moduleToString(result), moduleToString(expectedModule)) + }) +}) + describe('enterDef', () => { it('transforms definitions', () => { class TestTransformer implements IRTransformer { enterDef(def: QuintDef): QuintDef { - if (isFlat(def)) { - return { ...def, name: 'NewName' } - } - - return def + return { ...def, name: 'NewName' } } } const transformer = new TestTransformer() const result = transformModule(transformer, quintModule) - const expectedModule = buildModuleWithDefs([ + const expectedModule = buildModuleWithDecls([ 'var NewName: int', 'const NewName: int', 'type NewName = int', @@ -84,7 +110,7 @@ describe('enterType', () => { const transformer = new TestTransformer() const result = transformModule(transformer, quintModule) - const expectedModule = buildModuleWithDefs([ + const expectedModule = buildModuleWithDecls([ 'var a: bool', 'const B: bool', 'type MY_TYPE = bool', @@ -107,12 +133,12 @@ describe('enterConcreteRow', () => { } } - const quintModuleWithRow = buildModuleWithDefs(['type T = { x: int, y: bool }']) + const quintModuleWithRow = buildModuleWithDecls(['type T = { x: int, y: bool }']) const transformer = new TestTransformer() const result = transformModule(transformer, quintModuleWithRow) - const expectedModule = buildModuleWithDefs(['type T = { newField: int }']) + const expectedModule = buildModuleWithDecls(['type T = { newField: int }']) assert.deepEqual(moduleToString(result), moduleToString(expectedModule)) }) diff --git a/quint/test/ir/IRVisitor.test.ts b/quint/test/ir/IRVisitor.test.ts index b943cbd7b..572cd88ce 100644 --- a/quint/test/ir/IRVisitor.test.ts +++ b/quint/test/ir/IRVisitor.test.ts @@ -1,13 +1,19 @@ import { describe, it } from 'mocha' import { assert } from 'chai' -import { buildModuleWithDefs } from '../builders/ir' +import { buildModuleWithDecls } from '../builders/ir' import { IRVisitor, walkModule } from '../../src/ir/IRVisitor' -import { QuintDef, QuintEx, QuintModule } from '../../src/ir/quintIr' -import { definitionToString, expressionToString, moduleToString, typeToString } from '../../src/ir/IRprinting' +import { QuintDeclaration, QuintDef, QuintEx, QuintModule } from '../../src/ir/quintIr' +import { + declarationToString, + definitionToString, + expressionToString, + moduleToString, + typeToString, +} from '../../src/ir/IRprinting' import { QuintType } from '../../src/ir/quintTypes' describe('walkModule', () => { - const quintModule = buildModuleWithDefs([ + const quintModule = buildModuleWithDecls([ 'var a: int', 'const B: int', 'type MY_TYPE = int', @@ -70,6 +76,54 @@ describe('walkModule', () => { assert.deepEqual(visitor.exited.map(expressionToString), exitedExpressions) }) + it('finds declarations', () => { + class TestVisitor implements IRVisitor { + entered: QuintDeclaration[] = [] + exited: QuintDeclaration[] = [] + + enterDecl(decl: QuintDeclaration): void { + this.entered.push(decl) + } + + exitDecl(decl: QuintDeclaration): void { + this.exited.push(decl) + } + } + + const enteredDeclarations = [ + 'var a: int', + 'const B: int', + 'type MY_TYPE = int', + 'assume _ = igt(N, 1)', + 'import M.*', + 'import A(x = "rainbow") as A1', + 'val f = filter(S, ((x) => iadd(x, 1)))', + 'def l = val x = false { x }', + ] + + const exitedDeclarations = [ + 'var a: int', + 'const B: int', + 'type MY_TYPE = int', + 'assume _ = igt(N, 1)', + 'import M.*', + 'import A(x = "rainbow") as A1', + 'val f = filter(S, ((x) => iadd(x, 1)))', + 'def l = val x = false { x }', + ] + + const visitor = new TestVisitor() + walkModule(visitor, quintModule) + assert.deepEqual( + visitor.entered.map(d => declarationToString(d)), + enteredDeclarations + ) + assert.deepEqual( + visitor.exited.map(d => declarationToString(d)), + exitedDeclarations + ) + }) + it('finds definitions', () => { class TestVisitor implements IRVisitor { entered: QuintDef[] = [] @@ -89,8 +143,6 @@ describe('walkModule', () => { 'const B: int', 'type MY_TYPE = int', 'assume _ = igt(N, 1)', - 'import M.*', - 'import A(x = "rainbow") as A1', 'val f = filter(S, ((x) => iadd(x, 1)))', 'def l = val x = false { x }', 'val x = false', // From the let definition @@ -101,8 +153,6 @@ describe('walkModule', () => { 'const B: int', 'type MY_TYPE = int', 'assume _ = igt(N, 1)', - 'import M.*', - 'import A(x = "rainbow") as A1', 'val f = filter(S, ((x) => iadd(x, 1)))', 'val x = false', // From the let definition 'def l = val x = false { x }', @@ -151,14 +201,14 @@ describe('walkModule', () => { describe('visiting specific definitions', () => { it('finds operator definitions', () => { class TestVisitor implements IRVisitor { - entered: QuintDef[] = [] - exited: QuintDef[] = [] + entered: QuintDeclaration[] = [] + exited: QuintDeclaration[] = [] - enterOpDef(def: QuintDef): void { + enterOpDef(def: QuintDeclaration): void { this.entered.push(def) } - exitOpDef(def: QuintDef): void { + exitOpDef(def: QuintDeclaration): void { this.exited.push(def) } } @@ -178,25 +228,25 @@ describe('walkModule', () => { const visitor = new TestVisitor() walkModule(visitor, quintModule) assert.deepEqual( - visitor.entered.map(d => definitionToString(d)), + visitor.entered.map(d => declarationToString(d)), enteredDefinitions ) assert.deepEqual( - visitor.exited.map(d => definitionToString(d)), + visitor.exited.map(d => declarationToString(d)), exitedDefinitions ) }) it('finds constant definitions', () => { class TestVisitor implements IRVisitor { - entered: QuintDef[] = [] - exited: QuintDef[] = [] + entered: QuintDeclaration[] = [] + exited: QuintDeclaration[] = [] - enterConst(def: QuintDef): void { + enterConst(def: QuintDeclaration): void { this.entered.push(def) } - exitConst(def: QuintDef): void { + exitConst(def: QuintDeclaration): void { this.exited.push(def) } } @@ -208,25 +258,25 @@ describe('walkModule', () => { const visitor = new TestVisitor() walkModule(visitor, quintModule) assert.deepEqual( - visitor.entered.map(d => definitionToString(d)), + visitor.entered.map(d => declarationToString(d)), enteredDefinitions ) assert.deepEqual( - visitor.exited.map(d => definitionToString(d)), + visitor.exited.map(d => declarationToString(d)), exitedDefinitions ) }) it('finds variable definitions', () => { class TestVisitor implements IRVisitor { - entered: QuintDef[] = [] - exited: QuintDef[] = [] + entered: QuintDeclaration[] = [] + exited: QuintDeclaration[] = [] - enterVar(def: QuintDef): void { + enterVar(def: QuintDeclaration): void { this.entered.push(def) } - exitVar(def: QuintDef): void { + exitVar(def: QuintDeclaration): void { this.exited.push(def) } } @@ -238,25 +288,25 @@ describe('walkModule', () => { const visitor = new TestVisitor() walkModule(visitor, quintModule) assert.deepEqual( - visitor.entered.map(d => definitionToString(d)), + visitor.entered.map(d => declarationToString(d)), enteredDefinitions ) assert.deepEqual( - visitor.exited.map(d => definitionToString(d)), + visitor.exited.map(d => declarationToString(d)), exitedDefinitions ) }) it('finds assume definitions', () => { class TestVisitor implements IRVisitor { - entered: QuintDef[] = [] - exited: QuintDef[] = [] + entered: QuintDeclaration[] = [] + exited: QuintDeclaration[] = [] - enterAssume(def: QuintDef): void { + enterAssume(def: QuintDeclaration): void { this.entered.push(def) } - exitAssume(def: QuintDef): void { + exitAssume(def: QuintDeclaration): void { this.exited.push(def) } } @@ -268,25 +318,25 @@ describe('walkModule', () => { const visitor = new TestVisitor() walkModule(visitor, quintModule) assert.deepEqual( - visitor.entered.map(d => definitionToString(d)), + visitor.entered.map(d => declarationToString(d)), enteredDefinitions ) assert.deepEqual( - visitor.exited.map(d => definitionToString(d)), + visitor.exited.map(d => declarationToString(d)), exitedDefinitions ) }) it('finds typedef definitions', () => { class TestVisitor implements IRVisitor { - entered: QuintDef[] = [] - exited: QuintDef[] = [] + entered: QuintDeclaration[] = [] + exited: QuintDeclaration[] = [] - enterTypeDef(def: QuintDef): void { + enterTypeDef(def: QuintDeclaration): void { this.entered.push(def) } - exitTypeDef(def: QuintDef): void { + exitTypeDef(def: QuintDeclaration): void { this.exited.push(def) } } @@ -298,25 +348,25 @@ describe('walkModule', () => { const visitor = new TestVisitor() walkModule(visitor, quintModule) assert.deepEqual( - visitor.entered.map(d => definitionToString(d)), + visitor.entered.map(d => declarationToString(d)), enteredDefinitions ) assert.deepEqual( - visitor.exited.map(d => definitionToString(d)), + visitor.exited.map(d => declarationToString(d)), exitedDefinitions ) }) it('finds import definitions', () => { class TestVisitor implements IRVisitor { - entered: QuintDef[] = [] - exited: QuintDef[] = [] + entered: QuintDeclaration[] = [] + exited: QuintDeclaration[] = [] - enterImport(def: QuintDef): void { + enterImport(def: QuintDeclaration): void { this.entered.push(def) } - exitImport(def: QuintDef): void { + exitImport(def: QuintDeclaration): void { this.exited.push(def) } } @@ -328,25 +378,25 @@ describe('walkModule', () => { const visitor = new TestVisitor() walkModule(visitor, quintModule) assert.deepEqual( - visitor.entered.map(d => definitionToString(d)), + visitor.entered.map(d => declarationToString(d)), enteredDefinitions ) assert.deepEqual( - visitor.exited.map(d => definitionToString(d)), + visitor.exited.map(d => declarationToString(d)), exitedDefinitions ) }) it('finds instance definitions', () => { class TestVisitor implements IRVisitor { - entered: QuintDef[] = [] - exited: QuintDef[] = [] + entered: QuintDeclaration[] = [] + exited: QuintDeclaration[] = [] - enterInstance(def: QuintDef): void { + enterInstance(def: QuintDeclaration): void { this.entered.push(def) } - exitInstance(def: QuintDef): void { + exitInstance(def: QuintDeclaration): void { this.exited.push(def) } } @@ -358,11 +408,11 @@ describe('walkModule', () => { const visitor = new TestVisitor() walkModule(visitor, quintModule) assert.deepEqual( - visitor.entered.map(d => definitionToString(d)), + visitor.entered.map(d => declarationToString(d)), enteredDefinitions ) assert.deepEqual( - visitor.exited.map(d => definitionToString(d)), + visitor.exited.map(d => declarationToString(d)), exitedDefinitions ) }) @@ -532,7 +582,7 @@ describe('walkModule', () => { }) describe('visiting specific types', () => { - const quintModule = buildModuleWithDefs([ + const quintModule = buildModuleWithDecls([ 'var a: bool', 'const b: int', 'val c: str = "rainbow"', diff --git a/quint/test/ir/IRprinting.test.ts b/quint/test/ir/IRprinting.test.ts index 37ef529cd..8cbee1b85 100644 --- a/quint/test/ir/IRprinting.test.ts +++ b/quint/test/ir/IRprinting.test.ts @@ -1,12 +1,18 @@ import { describe, it } from 'mocha' import { assert } from 'chai' -import { buildDef, buildExpression, buildModuleWithDefs, buildType } from '../builders/ir' -import { definitionToString, expressionToString, moduleToString, typeToString } from '../../src/ir/IRprinting' +import { buildDecl, buildDef, buildExpression, buildModuleWithDecls, buildType } from '../builders/ir' +import { + declarationToString, + definitionToString, + expressionToString, + moduleToString, + typeToString, +} from '../../src/ir/IRprinting' import { toScheme } from '../../src/types/base' import { QuintSumType, unitValue } from '../../src' describe('moduleToString', () => { - const quintModule = buildModuleWithDefs(['var S: Set[int]', 'val f = S.filter(x => x + 1)']) + const quintModule = buildModuleWithDecls(['var S: Set[int]', 'val f = S.filter(x => x + 1)']) it('pretty prints the module', () => { const expectedModule = `module wrapper { @@ -17,6 +23,74 @@ describe('moduleToString', () => { }) }) +describe('declarationToString', () => { + it('pretty prints import declarations', () => { + const decl = buildDecl('import M.*') + const expectedDecl = 'import M.*' + assert.deepEqual(declarationToString(decl), expectedDecl) + }) + + it('pretty prints import declarations with qualifier', () => { + const decl = buildDecl('import M as M1') + const expectedDecl = 'import M as M1' + assert.deepEqual(declarationToString(decl), expectedDecl) + }) + + it('pretty prints import declarations with the module name as qualifier', () => { + const decl = buildDecl('import M') + const expectedDecl = 'import M' + assert.deepEqual(declarationToString(decl), expectedDecl) + }) + + it('pretty prints import declarations with from statement', () => { + const decl = buildDecl('import M.* from "./file"') + const expectedDecl = 'import M.* from "./file"' + assert.deepEqual(declarationToString(decl), expectedDecl) + }) + + it('pretty prints instance declarations', () => { + const decl = buildDecl('import M(x = N + 1, y = 3).*') + const expectedDecl = 'import M(x = iadd(N, 1), y = 3).*' + assert.deepEqual(declarationToString(decl), expectedDecl) + }) + + it('pretty prints instance declarations with qualifier', () => { + const decl = buildDecl('import M(x = N + 1, y = 3) as A') + const expectedDecl = 'import M(x = iadd(N, 1), y = 3) as A' + assert.deepEqual(declarationToString(decl), expectedDecl) + }) + + it('pretty prints instance declarations with from statement', () => { + const decl = buildDecl('import M(x = N + 1, y = 3) as A from "./file"') + const expectedDecl = 'import M(x = iadd(N, 1), y = 3) as A from "./file"' + assert.deepEqual(declarationToString(decl), expectedDecl) + }) + + it('pretty prints export declarations', () => { + const decl = buildDecl('export M.*') + const expectedDecl = 'export M.*' + assert.deepEqual(declarationToString(decl), expectedDecl) + }) + + it('pretty prints export declarations with qualifier', () => { + const decl = buildDecl('export M as M1') + const expectedDecl = 'export M as M1' + assert.deepEqual(declarationToString(decl), expectedDecl) + }) + + it('pretty prints export declarations with the module name as qualifier', () => { + const decl = buildDecl('export M') + const expectedDecl = 'export M' + assert.deepEqual(declarationToString(decl), expectedDecl) + }) + + it('pretty prints op definitions', () => { + const decl = buildDecl('val f = S.filter(x => x + 1)') + const expectedDecl = 'val f = filter(S, ((x) => iadd(x, 1)))' + assert.deepEqual(declarationToString(decl), expectedDecl) + }) +}) + describe('definitionToString', () => { it('pretty prints op definitions', () => { const def = buildDef('val f = S.filter(x => x + 1)') @@ -60,66 +134,6 @@ describe('definitionToString', () => { assert.deepEqual(definitionToString(def), expectedDef) }) - it('pretty prints import definitions', () => { - const def = buildDef('import M.*') - const expectedDef = 'import M.*' - assert.deepEqual(definitionToString(def), expectedDef) - }) - - it('pretty prints import definitions with qualifier', () => { - const def = buildDef('import M as M1') - const expectedDef = 'import M as M1' - assert.deepEqual(definitionToString(def), expectedDef) - }) - - it('pretty prints import definitions with the module name as qualifier', () => { - const def = buildDef('import M') - const expectedDef = 'import M' - assert.deepEqual(definitionToString(def), expectedDef) - }) - - it('pretty prints import definitions with from statement', () => { - const def = buildDef('import M.* from "./file"') - const expectedDef = 'import M.* from "./file"' - assert.deepEqual(definitionToString(def), expectedDef) - }) - - it('pretty prints instance definitions', () => { - const def = buildDef('import M(x = N + 1, y = 3).*') - const expectedDef = 'import M(x = iadd(N, 1), y = 3).*' - assert.deepEqual(definitionToString(def), expectedDef) - }) - - it('pretty prints instance definitions with qualifier', () => { - const def = buildDef('import M(x = N + 1, y = 3) as A') - const expectedDef = 'import M(x = iadd(N, 1), y = 3) as A' - assert.deepEqual(definitionToString(def), expectedDef) - }) - - it('pretty prints instance definitions with from statement', () => { - const def = buildDef('import M(x = N + 1, y = 3) as A from "./file"') - const expectedDef = 'import M(x = iadd(N, 1), y = 3) as A from "./file"' - assert.deepEqual(definitionToString(def), expectedDef) - }) - - it('pretty prints export definitions', () => { - const def = buildDef('export M.*') - const expectedDef = 'export M.*' - assert.deepEqual(definitionToString(def), expectedDef) - }) - - it('pretty prints export definitions with qualifier', () => { - const def = buildDef('export M as M1') - const expectedDef = 'export M as M1' - assert.deepEqual(definitionToString(def), expectedDef) - }) - - it('pretty prints export definitions with the module name as qualifier', () => { - const def = buildDef('export M') - const expectedDef = 'export M' - assert.deepEqual(definitionToString(def), expectedDef) - }) - it('pretty prints definitions with given type', () => { const def = buildDef('val f = 1') const expectedDef = 'val f: int = 1' diff --git a/quint/test/ir/idRefresher.test.ts b/quint/test/ir/idRefresher.test.ts index 23cc09c18..a44acbb72 100644 --- a/quint/test/ir/idRefresher.test.ts +++ b/quint/test/ir/idRefresher.test.ts @@ -6,6 +6,8 @@ import { SourceLookupPath } from '../../src/parsing/sourceResolver' import { parse } from '../../src/parsing/quintParserFrontend' import { analyzeModules } from '../../src/quintAnalyzer' import { collectIds } from '../util' +import { QuintModule, isDef } from '../../src/ir/quintIr' +import JSONbig from 'json-bigint' describe('generateFreshIds', () => { // Generate ids starting from 100, so that we can easily distinguish them from @@ -40,14 +42,16 @@ describe('generateFreshIds', () => { assert.isEmpty(analysisErrors) }) - const result = module.defs.map(def => generateFreshIds(def, mockGenerator, sourceMap, analysisOutput)) - const newModule = { ...module, defs: result, id: 200n } + const result = module.declarations + .filter(isDef) + .map(def => generateFreshIds(def, mockGenerator, sourceMap, analysisOutput)) + const newModule: QuintModule = { ...module, declarations: result, id: 200n } it('does not repeat ids', () => { const ids = collectIds(newModule) assert.isTrue( ids.every(id => id >= 100n), - 'ids should be greater than 100 if they were generated by the mock generator' + `ids should be greater than 100 if they were generated by the mock generator: ${JSONbig.stringify(newModule)}` ) assert.sameDeepMembers(ids, [...new Set(ids)]) }) @@ -55,14 +59,14 @@ describe('generateFreshIds', () => { it('adds new entries to the source map', () => { assert.includeDeepMembers( [...sourceMap.keys()], - newModule.defs.map(def => def.id) + newModule.declarations.map(def => def.id) ) }) it('adds new entries to the types map', () => { assert.includeDeepMembers( [...analysisOutput.types.keys()], - newModule.defs.filter(def => def.kind !== 'typedef').map(def => def.id) + newModule.declarations.filter(def => def.kind !== 'typedef').map(def => def.id) ) }) }) diff --git a/quint/test/ir/namespacer.test.ts b/quint/test/ir/namespacer.test.ts index e0736ca7d..d0398452d 100644 --- a/quint/test/ir/namespacer.test.ts +++ b/quint/test/ir/namespacer.test.ts @@ -37,12 +37,4 @@ describe('addNamespaceToDefinition', () => { assert.deepEqual(definitionToString(result), 'val M::a = pure val M::b = Set(1, 2) { map(M::b, ((M::x) => M::x)) }') }) - - it('keeps imports as is', () => { - const def = buildDef('import A.*') - - const result = addNamespaceToDefinition(def, 'M', new Set()) - - assert.deepEqual(definitionToString(result), 'import A.*') - }) }) diff --git a/quint/test/names/collector.test.ts b/quint/test/names/collector.test.ts index 9bae37496..229ffcf71 100644 --- a/quint/test/names/collector.test.ts +++ b/quint/test/names/collector.test.ts @@ -1,6 +1,6 @@ import { describe, it } from 'mocha' import { assert } from 'chai' -import { buildModuleWithDefs } from '../builders/ir' +import { buildModuleWithDecls } from '../builders/ir' import { QuintError, QuintModule } from '../../src' import { NameCollector } from '../../src/names/collector' import { walkModule } from '../../src/ir/IRVisitor' @@ -8,7 +8,7 @@ import { DefinitionsByName } from '../../src/names/base' import { zerog } from '../../src/idGenerator' describe('NameCollector', () => { - const baseModule = buildModuleWithDefs( + const baseModule = buildModuleWithDecls( ['def a = 1', 'def b = 2', 'def c = 3', 'const c1: int', 'const c2: int', 'type T = int', 'type R'], 'test_module', zerog @@ -23,7 +23,7 @@ describe('NameCollector', () => { describe('existing modules', () => { it('imports named definitions', () => { - const quintModule = buildModuleWithDefs(['import test_module.a'], undefined, zerog) + const quintModule = buildModuleWithDecls(['import test_module.a'], undefined, zerog) const [errors, definitions] = collect(quintModule) @@ -33,7 +33,7 @@ describe('NameCollector', () => { }) it('imports all definitions', () => { - const quintModule = buildModuleWithDefs(['import test_module.*'], undefined, zerog) + const quintModule = buildModuleWithDecls(['import test_module.*'], undefined, zerog) const [errors, definitions] = collect(quintModule) @@ -42,25 +42,31 @@ describe('NameCollector', () => { }) it('imports definitions with namespace', () => { - const quintModule = buildModuleWithDefs(['import test_module'], undefined, zerog) + const quintModule = buildModuleWithDecls(['import test_module'], undefined, zerog) const [errors, definitions] = collect(quintModule) assert.isEmpty(errors) - assert.deepEqual(definitions.get('test_module::a'), { kind: 'def', reference: 0n, hidden: true }) + + const def = definitions.get('test_module::a') + assert.isTrue(def!.hidden) + assert.deepEqual(def?.kind, 'def') }) it('imports definitions with qualifier', () => { - const quintModule = buildModuleWithDefs(['import test_module as my_import'], undefined, zerog) + const quintModule = buildModuleWithDecls(['import test_module as my_import'], undefined, zerog) const [errors, definitions] = collect(quintModule) assert.isEmpty(errors) - assert.deepEqual(definitions.get('my_import::a'), { kind: 'def', reference: 0n, hidden: true }) + + const def = definitions.get('my_import::a') + assert.isTrue(def!.hidden) + assert.deepEqual(def?.kind, 'def') }) it('instantiates modules', () => { - const quintModule = buildModuleWithDefs( + const quintModule = buildModuleWithDecls( ['import test_module(c1 = 3, c2 = 4) as test_module_instance'], undefined, zerog @@ -74,7 +80,7 @@ describe('NameCollector', () => { }) it('fails instantiating when a param does not exists', () => { - const quintModule = buildModuleWithDefs( + const quintModule = buildModuleWithDecls( ['import test_module(c1 = 3, c2 = 4, other = 5) as test_module_instance'], undefined, zerog @@ -93,7 +99,7 @@ describe('NameCollector', () => { }) it('fails instantiating when a param is not a constant', () => { - const quintModule = buildModuleWithDefs( + const quintModule = buildModuleWithDecls( ['import test_module(c1 = 3, c2 = 4, a = 5) as test_module_instance'], undefined, zerog @@ -112,7 +118,7 @@ describe('NameCollector', () => { }) it('fails importing itself', () => { - const quintModule = buildModuleWithDefs( + const quintModule = buildModuleWithDecls( ['import wrapper.*', 'import wrapper(c1 = 1) as w', 'export wrapper.*'], undefined, zerog @@ -128,58 +134,49 @@ describe('NameCollector', () => { }) it('exports all definitions', () => { - const quintModule = buildModuleWithDefs(['export test_module.*'], undefined, zerog) + const quintModule = buildModuleWithDecls(['export test_module.*'], undefined, zerog) const [errors, definitions] = collect(quintModule) assert.isEmpty(errors) - assert.deepEqual(definitions.get('a'), { kind: 'def', reference: 0n }) - assert.deepEqual(definitions.get('T'), { kind: 'type', reference: 0n, typeAnnotation: { kind: 'int', id: 0n } }) + assert.isNotTrue(definitions.get('a')!.hidden) + assert.isNotTrue(definitions.get('T')!.hidden) }) it('exports previously imported definitions', () => { - const quintModule = buildModuleWithDefs(['import test_module.*', 'export test_module.*'], undefined, zerog) + const quintModule = buildModuleWithDecls(['import test_module.*', 'export test_module.*'], undefined, zerog) const [errors, definitions] = collect(quintModule) assert.isEmpty(errors) - assert.deepEqual(definitions.get('a'), { kind: 'def', reference: 0n }) - assert.deepEqual(definitions.get('T'), { kind: 'type', reference: 0n, typeAnnotation: { kind: 'int', id: 0n } }) + assert.isNotTrue(definitions.get('a')!.hidden) + assert.isNotTrue(definitions.get('T')!.hidden) }) it('exports imported definitions that were previously qualified', () => { - const quintModule = buildModuleWithDefs(['import test_module as T1', 'export T1.*'], undefined, zerog) + const quintModule = buildModuleWithDecls(['import test_module as T1', 'export T1.*'], undefined, zerog) const [errors, definitions] = collect(quintModule) assert.isEmpty(errors) - assert.deepEqual(definitions.get('a'), { kind: 'def', reference: 0n }) - assert.deepEqual(definitions.get('T'), { - kind: 'type', - reference: 0n, - typeAnnotation: { kind: 'int', id: 0n }, - }) + assert.isNotTrue(definitions.get('a')!.hidden) + assert.isNotTrue(definitions.get('T')!.hidden) }) it('exports specific definitions', () => { - const quintModule = buildModuleWithDefs(['import test_module.*', 'export test_module.a'], undefined, zerog) + const quintModule = buildModuleWithDecls(['import test_module.*', 'export test_module.a'], undefined, zerog) const [errors, definitions] = collect(quintModule) assert.isEmpty(errors) // a is not hidden anymore - assert.deepEqual(definitions.get('a'), { kind: 'def', reference: 0n }) + assert.isNotTrue(definitions.get('a')!.hidden) // T is still hidden - assert.deepEqual(definitions.get('T'), { - kind: 'type', - reference: 0n, - typeAnnotation: { kind: 'int', id: 0n }, - hidden: true, - }) + assert.isTrue(definitions.get('T')!.hidden) }) it('exports definitions with qualifier', () => { - const quintModule = buildModuleWithDefs( + const quintModule = buildModuleWithDecls( ['import test_module.*', 'export test_module as my_export'], undefined, zerog @@ -188,22 +185,22 @@ describe('NameCollector', () => { const [errors, definitions] = collect(quintModule) assert.isEmpty(errors) - assert.deepEqual(definitions.get('a'), { kind: 'def', reference: 0n, hidden: true }) - assert.deepEqual(definitions.get('my_export::a'), { kind: 'def', reference: 0n }) + assert.isTrue(definitions.get('a')!.hidden) + assert.isNotTrue(definitions.get('my_export::a')!.hidden) }) it('exports definitions with namespace', () => { - const quintModule = buildModuleWithDefs(['import test_module.*', 'export test_module'], undefined, zerog) + const quintModule = buildModuleWithDecls(['import test_module.*', 'export test_module'], undefined, zerog) const [errors, definitions] = collect(quintModule) assert.isEmpty(errors) - assert.deepEqual(definitions.get('a'), { kind: 'def', reference: 0n, hidden: true }) - assert.deepEqual(definitions.get('test_module::a'), { kind: 'def', reference: 0n }) + assert.isTrue(definitions.get('a')!.hidden) + assert.isNotTrue(definitions.get('test_module::a')!.hidden) }) it('fails exporting unexisting definition', () => { - const quintModule = buildModuleWithDefs(['import test_module.*', 'export test_module.other'], undefined, zerog) + const quintModule = buildModuleWithDecls(['import test_module.*', 'export test_module.other'], undefined, zerog) const [errors, _definitions] = collect(quintModule) @@ -215,7 +212,7 @@ describe('NameCollector', () => { describe('conflicts', () => { it('reports conflicts with builtin names', () => { - const quintModule = buildModuleWithDefs(['def size(x) = 10'], undefined, zerog) + const quintModule = buildModuleWithDecls(['def size(x) = 10'], undefined, zerog) const [errors, _definitions] = collect(quintModule) @@ -226,7 +223,7 @@ describe('NameCollector', () => { it('reports conflicts with user defined names', () => { // Use the real id generator to have different references for each def - const quintModule = buildModuleWithDefs(['def a = 10', 'import test_module.*']) + const quintModule = buildModuleWithDecls(['def a = 10', 'import test_module.*']) const [errors, _definitions] = collect(quintModule) @@ -248,7 +245,7 @@ describe('NameCollector', () => { it('reports conflicts with module names', () => { // Setup already defines a module named 'test_module', see `baseDefs` - const quintModule = buildModuleWithDefs(['def a = 10'], 'test_module') + const quintModule = buildModuleWithDecls(['def a = 10'], 'test_module') const [errors, _definitions] = collect(quintModule) @@ -265,7 +262,7 @@ describe('NameCollector', () => { describe('unexisting modules', () => { it('fails importing', () => { - const quintModule = buildModuleWithDefs(['import unexisting_module.*'], undefined, zerog) + const quintModule = buildModuleWithDecls(['import unexisting_module.*'], undefined, zerog) const [errors, _definitions] = collect(quintModule) @@ -275,7 +272,7 @@ describe('NameCollector', () => { }) it('fails instantiating', () => { - const quintModule = buildModuleWithDefs( + const quintModule = buildModuleWithDecls( ['import unexisting_module(c1 = c1, c2 = c2) as test_module_instance'], undefined, zerog @@ -289,7 +286,7 @@ describe('NameCollector', () => { }) it('fails exporting', () => { - const quintModule = buildModuleWithDefs(['export unexisting_module.*'], undefined, zerog) + const quintModule = buildModuleWithDecls(['export unexisting_module.*'], undefined, zerog) const [errors, _definitions] = collect(quintModule) diff --git a/quint/test/names/resolver.test.ts b/quint/test/names/resolver.test.ts index e6b4fb0e6..601e1508d 100644 --- a/quint/test/names/resolver.test.ts +++ b/quint/test/names/resolver.test.ts @@ -5,7 +5,7 @@ import { Either } from '@sweet-monads/either' import { QuintError } from '../../src/quintError' import { LookupTable } from '../../src/names/base' import { resolveNames } from '../../src/names/resolver' -import { buildModule, buildModuleWithDefs } from '../builders/ir' +import { buildModule, buildModuleWithDecls } from '../builders/ir' import { zerog } from '../../src/idGenerator' describe('resolveNames', () => { @@ -22,7 +22,7 @@ describe('resolveNames', () => { } function resolveNamesForDefs(defs: string[]): Either { - const module = buildModuleWithDefs(baseDefs.concat(defs), undefined, zerog) + const module = buildModuleWithDecls(baseDefs.concat(defs), undefined, zerog) return resolveNames([module]) } diff --git a/quint/test/parsing/quintParserFrontend.test.ts b/quint/test/parsing/quintParserFrontend.test.ts index 3dc443781..d2fe46df8 100644 --- a/quint/test/parsing/quintParserFrontend.test.ts +++ b/quint/test/parsing/quintParserFrontend.test.ts @@ -106,7 +106,7 @@ describe('parsing', () => { readQuint('_0001emptyModule'), 'mocked_path/testFixture/_0001emptyModule.qnt' ) - const module = { id: 1n, name: 'empty', defs: [] } + const module = { id: 1n, name: 'empty', declarations: [] } assert.deepEqual( result.map(r => r.modules[0]), right(module) @@ -140,7 +140,7 @@ describe('parsing', () => { ` const result = parsePhase1fromText(newIdGenerator(), mod, 'test') assert(result.isRight()) - const typeDef = result.value.modules[0].defs[0] + const typeDef = result.value.modules[0].declarations[0] assert(typeDef.kind === 'typedef') const sumType = typeDef.type! assert(sumType.kind === 'sum') diff --git a/quint/test/runtime/compile.test.ts b/quint/test/runtime/compile.test.ts index 8c0f52046..92c2c8cc2 100644 --- a/quint/test/runtime/compile.test.ts +++ b/quint/test/runtime/compile.test.ts @@ -9,7 +9,7 @@ import { CompilationContext, CompilationState, compile, - compileDef, + compileDecl, compileExpr, compileFromCode, contextNameLookup, @@ -19,7 +19,7 @@ import { dedent } from '../textUtils' import { newIdGenerator } from '../../src/idGenerator' import { Rng, newRng } from '../../src/rng' import { SourceLookupPath, stringSourceResolver } from '../../src/parsing/sourceResolver' -import { analyzeModules, parse, parseExpressionOrUnit } from '../../src' +import { analyzeModules, parse, parseExpressionOrDeclaration } from '../../src' import { flattenModules } from '../../src/flattening' import { newEvaluationState } from '../../src/runtime/impl/compilerImpl' @@ -85,7 +85,7 @@ function evalVarAfterCall(varName: string, callee: string, input: string): Eithe const callback = (ctx: CompilationContext): Either => { let key = undefined const lastModule = ctx.compilationState.modules[ctx.compilationState.modules.length - 1] - const def = lastModule.defs.find(def => def.kind === 'def' && def.name === callee) + const def = lastModule.declarations.find(def => def.kind === 'def' && def.name === callee) if (!def) { return left(`${callee} definition not found`) } @@ -1019,14 +1019,25 @@ describe('incremental compilation', () => { const moduleToCompile = flattenedModules[flattenedModules.length - 1] - return compile(state, newEvaluationState(noExecutionListener), flattenedTable, dummyRng.next, moduleToCompile.defs) + return compile( + state, + newEvaluationState(noExecutionListener), + flattenedTable, + dummyRng.next, + moduleToCompile.declarations + ) } describe('compileExpr', () => { it('should compile a Quint expression', () => { const { compilationState, evaluationState } = compileModules('module m { pure val x = 1 }') - const parsed = parseExpressionOrUnit('x + 2', 'test.qnt', compilationState.idGen, compilationState.sourceMap) + const parsed = parseExpressionOrDeclaration( + 'x + 2', + 'test.qnt', + compilationState.idGen, + compilationState.sourceMap + ) const expr = parsed.kind === 'expr' ? parsed.expr : undefined const context = compileExpr(compilationState, evaluationState, dummyRng, expr!) @@ -1040,14 +1051,14 @@ describe('incremental compilation', () => { it('should compile a Quint definition', () => { const { compilationState, evaluationState } = compileModules('module m { pure val x = 1 }') - const parsed = parseExpressionOrUnit( + const parsed = parseExpressionOrDeclaration( 'val y = x + 2', 'test.qnt', compilationState.idGen, compilationState.sourceMap ) - const def = parsed.kind === 'toplevel' ? parsed.def : undefined - const context = compileDef(compilationState, evaluationState, dummyRng, def!) + const def = parsed.kind === 'declaration' ? parsed.decl : undefined + const context = compileDecl(compilationState, evaluationState, dummyRng, def!) assert.deepEqual(context.compilationState.analysisOutput.types.get(def!.id)?.type, { kind: 'int', id: 3n }) @@ -1060,14 +1071,14 @@ describe('incremental compilation', () => { 'module m1 { pure val x1 = 1 }' + 'module m2 { import m1.* pure val x2 = x1 }' + 'module m3 { import m2.* }' // m1 shouldn't be acessible inside m3 ) - const parsed = parseExpressionOrUnit( + const parsed = parseExpressionOrDeclaration( 'def x3 = x1', 'test.qnt', compilationState.idGen, compilationState.sourceMap ) - const def = parsed.kind === 'toplevel' ? parsed.def : undefined - const context = compileDef(compilationState, evaluationState, dummyRng, def!) + const decl = parsed.kind === 'declaration' ? parsed.decl : undefined + const context = compileDecl(compilationState, evaluationState, dummyRng, decl!) assert.sameDeepMembers(context.syntaxErrors, [ { diff --git a/quint/test/static/callgraph.test.ts b/quint/test/static/callgraph.test.ts index 63a497d02..0814500d9 100644 --- a/quint/test/static/callgraph.test.ts +++ b/quint/test/static/callgraph.test.ts @@ -9,7 +9,7 @@ import { parsePhase3importAndNameResolution, } from '../../src/parsing/quintParserFrontend' import { SourceLookupPath, fileSourceResolver } from '../../src/parsing/sourceResolver' -import { LookupTable, QuintDef, QuintExport, QuintImport, QuintInstance, QuintModule } from '../../src' +import { LookupTable, QuintDeclaration, QuintExport, QuintImport, QuintInstance, QuintModule } from '../../src' import { CallGraphVisitor, mkCallGraphContext } from '../../src/static/callgraph' import { walkModule } from '../../src/ir/IRVisitor' @@ -37,28 +37,28 @@ describe('compute call graph', () => { return [modules, table] } - function findDef(module: QuintModule, name: string): QuintDef { - const d = module.defs.find( + function findDef(module: QuintModule, name: string): QuintDeclaration { + const d = module.declarations.find( d => (d.kind === 'def' || d.kind === 'const' || d.kind === 'var' || d.kind === 'typedef') && d.name === name ) assert(d, `Definition ${name} not found`) return d } - function findImport(module: QuintModule, pred: (imp: QuintImport) => boolean): QuintDef { - const d = module.defs.find(d => d.kind === 'import' && pred(d)) + function findImport(module: QuintModule, pred: (imp: QuintImport) => boolean): QuintDeclaration { + const d = module.declarations.find(d => d.kind === 'import' && pred(d)) assert(d, `Import not found in ${module.name}`) return d } - function findInstance(module: QuintModule, pred: (imp: QuintInstance) => boolean): QuintDef { - const d = module.defs.find(d => d.kind === 'instance' && pred(d)) + function findInstance(module: QuintModule, pred: (imp: QuintInstance) => boolean): QuintDeclaration { + const d = module.declarations.find(d => d.kind === 'instance' && pred(d)) assert(d, `Instance not found in ${module.name}`) return d } - function findExport(module: QuintModule, pred: (imp: QuintExport) => boolean): QuintDef { - const d = module.defs.find(d => d.kind === 'export' && pred(d)) + function findExport(module: QuintModule, pred: (imp: QuintExport) => boolean): QuintDeclaration { + const d = module.declarations.find(d => d.kind === 'export' && pred(d)) assert(d, `Export not found in ${module.name}`) return d } diff --git a/quint/test/types/constraintSolver.test.ts b/quint/test/types/constraintSolver.test.ts index 125f5918a..905a3b4c1 100644 --- a/quint/test/types/constraintSolver.test.ts +++ b/quint/test/types/constraintSolver.test.ts @@ -10,11 +10,11 @@ import { errorTreeToString } from '../../src/errorTree' import { LookupTable } from '../../src/names/base' const table: LookupTable = new Map([ - // A type alias (ref 1n) - [3n, { kind: 'type', typeAnnotation: { kind: 'int' }, reference: 1n }], - // An uniterpreted type (ref 2n) - [4n, { kind: 'type', reference: 2n }], - [5n, { kind: 'type', reference: 2n }], + // A type alias (id 1n) + [3n, { kind: 'typedef', name: 'MY_ALIAS', type: { kind: 'int' }, id: 1n }], + // An uniterpreted type (id 2n) + [4n, { kind: 'typedef', name: 'MY_UNINTERPRETED', id: 2n }], + [5n, { kind: 'typedef', name: 'MY_UNINTERPRETED', id: 2n }], ]) describe('solveConstraint', () => { diff --git a/quint/test/types/inferrer.test.ts b/quint/test/types/inferrer.test.ts index 88e1ccba4..6d1f43063 100644 --- a/quint/test/types/inferrer.test.ts +++ b/quint/test/types/inferrer.test.ts @@ -11,7 +11,7 @@ describe('inferTypes', () => { const { modules, table } = parseMockedModule(text) const inferrer = new TypeInferrer(table) - return inferrer.inferTypes(modules[0].defs) + return inferrer.inferTypes(modules[0].declarations) } it('infers types for basic expressions', () => { diff --git a/quint/test/util.ts b/quint/test/util.ts index 959df0df6..8a41ea4af 100644 --- a/quint/test/util.ts +++ b/quint/test/util.ts @@ -2,11 +2,12 @@ import { assert } from 'chai' import { IRVisitor, walkModule } from '../src/ir/IRVisitor' import { QuintBool, - QuintDef, + QuintDeclaration, QuintEx, QuintInstance, QuintInt, QuintLambda, + QuintLet, QuintModule, QuintStr, QuintTypeDef, @@ -20,8 +21,8 @@ import { newIdGenerator } from '../src/idGenerator' export function collectIds(module: QuintModule): bigint[] { const ids = new Set() const visitor: IRVisitor = { - exitDef: (def: QuintDef) => { - ids.add(def.id) + exitDecl: (decl: QuintDeclaration) => { + ids.add(decl.id) }, exitExpr(e: QuintEx) { ids.add(e.id) @@ -40,6 +41,9 @@ export function collectIds(module: QuintModule): bigint[] { exitLambda(l: QuintLambda) { l.params.forEach(p => ids.add(p.id)) }, + exitLet(l: QuintLet) { + ids.add(l.opdef.id) + }, exitInstance(i: QuintInstance) { i.overrides.forEach(([n, _]) => ids.add(n.id)) }, diff --git a/quint/testFixture/SuperSpec.json b/quint/testFixture/SuperSpec.json index 82e0aaa6e..4d24d9b67 100644 --- a/quint/testFixture/SuperSpec.json +++ b/quint/testFixture/SuperSpec.json @@ -1 +1 @@ -{"stage":"parsing","warnings":[],"modules":[{"id":3,"name":"M1","defs":[{"id":2,"kind":"def","name":"foo","qualifier":"val","expr":{"id":1,"kind":"int","value":4}}]},{"id":6,"name":"M2","defs":[{"id":5,"kind":"def","name":"bar","qualifier":"val","expr":{"id":4,"kind":"int","value":4}}]},{"id":11,"name":"Proto","defs":[{"kind":"var","name":"x","typeAnnotation":{"id":9,"kind":"int"},"id":10},{"kind":"const","name":"N","typeAnnotation":{"id":7,"kind":"int"},"id":8}]},{"id":503,"name":"withConsts","defs":[{"id":102,"kind":"def","name":"pow_2_to_3","qualifier":"val","expr":{"id":101,"kind":"app","opcode":"ipow","args":[{"id":99,"kind":"int","value":2},{"id":100,"kind":"int","value":3}]}},{"id":105,"kind":"def","name":"uminus","qualifier":"val","expr":{"id":104,"kind":"app","opcode":"iuminus","args":[{"id":103,"kind":"int","value":100}]}},{"id":109,"kind":"def","name":"gt_2_to_3","qualifier":"val","expr":{"id":108,"kind":"app","opcode":"igt","args":[{"id":106,"kind":"int","value":2},{"id":107,"kind":"int","value":3}]}},{"id":113,"kind":"def","name":"ge_2_to_3","qualifier":"val","expr":{"id":112,"kind":"app","opcode":"igte","args":[{"id":110,"kind":"int","value":2},{"id":111,"kind":"int","value":3}]}},{"id":117,"kind":"def","name":"lt_2_to_3","qualifier":"val","expr":{"id":116,"kind":"app","opcode":"ilt","args":[{"id":114,"kind":"int","value":2},{"id":115,"kind":"int","value":3}]}},{"id":121,"kind":"def","name":"le_2_to_3","qualifier":"val","expr":{"id":120,"kind":"app","opcode":"ilte","args":[{"id":118,"kind":"int","value":2},{"id":119,"kind":"int","value":3}]}},{"id":125,"kind":"def","name":"eqeq_2_to_3","qualifier":"val","expr":{"id":124,"kind":"app","opcode":"eq","args":[{"id":122,"kind":"int","value":2},{"id":123,"kind":"int","value":3}]}},{"id":129,"kind":"def","name":"ne_2_to_3","qualifier":"val","expr":{"id":128,"kind":"app","opcode":"neq","args":[{"id":126,"kind":"int","value":2},{"id":127,"kind":"int","value":3}]}},{"kind":"const","name":"N","typeAnnotation":{"id":12,"kind":"int"},"id":13},{"id":135,"kind":"def","name":"VeryTrue","qualifier":"val","expr":{"id":134,"kind":"app","opcode":"eq","args":[{"id":132,"kind":"app","opcode":"iadd","args":[{"id":130,"kind":"int","value":2},{"id":131,"kind":"int","value":2}]},{"id":133,"kind":"int","value":4}]}},{"id":139,"kind":"def","name":"nat_includes_one","qualifier":"val","expr":{"id":138,"kind":"app","opcode":"in","args":[{"id":136,"kind":"int","value":1},{"id":137,"kind":"name","name":"Nat"}]}},{"id":151,"kind":"def","name":"withType","qualifier":"val","expr":{"id":150,"kind":"app","opcode":"Set","args":[{"id":148,"kind":"int","value":1},{"id":149,"kind":"int","value":2}]},"typeAnnotation":{"id":147,"kind":"set","elem":{"id":146,"kind":"int"}}},{"id":152,"kind":"typedef","name":"PROC"},{"kind":"var","name":"n","typeAnnotation":{"id":157,"kind":"int"},"id":158},{"kind":"const","name":"S","typeAnnotation":{"id":15,"kind":"set","elem":{"id":14,"kind":"int"}},"id":16},{"id":160,"kind":"def","name":"magicNumber","qualifier":"pureval","expr":{"id":159,"kind":"int","value":42}},{"kind":"const","name":"MySet","typeAnnotation":{"id":18,"kind":"set","elem":{"id":17,"kind":"int"}},"id":19},{"kind":"var","name":"k","typeAnnotation":{"id":197,"kind":"int"},"id":198},{"id":219,"kind":"def","name":"test_and","qualifier":"val","expr":{"id":218,"kind":"app","opcode":"and","args":[{"id":216,"kind":"bool","value":false},{"id":217,"kind":"bool","value":true}]}},{"kind":"const","name":"MySeq","typeAnnotation":{"id":21,"kind":"list","elem":{"id":20,"kind":"bool"}},"id":22},{"id":223,"kind":"def","name":"test_or","qualifier":"val","expr":{"id":222,"kind":"app","opcode":"or","args":[{"id":220,"kind":"bool","value":false},{"id":221,"kind":"bool","value":true}]}},{"id":227,"kind":"def","name":"test_implies","qualifier":"val","expr":{"id":226,"kind":"app","opcode":"implies","args":[{"id":224,"kind":"bool","value":false},{"id":225,"kind":"bool","value":true}]}},{"id":256,"kind":"def","name":"test_block_and","qualifier":"val","expr":{"id":255,"kind":"app","opcode":"and","args":[{"id":252,"kind":"bool","value":false},{"id":253,"kind":"bool","value":true},{"id":254,"kind":"bool","value":false}]}},{"kind":"const","name":"MyFun","typeAnnotation":{"id":25,"kind":"fun","arg":{"id":23,"kind":"int"},"res":{"id":24,"kind":"str"}},"id":26},{"id":261,"kind":"def","name":"test_action_and","qualifier":"action","expr":{"id":260,"kind":"app","opcode":"actionAll","args":[{"id":257,"kind":"bool","value":false},{"id":258,"kind":"bool","value":true},{"id":259,"kind":"bool","value":false}]}},{"id":266,"kind":"def","name":"test_block_or","qualifier":"val","expr":{"id":265,"kind":"app","opcode":"or","args":[{"id":262,"kind":"bool","value":false},{"id":263,"kind":"bool","value":true},{"id":264,"kind":"bool","value":false}]}},{"id":271,"kind":"def","name":"test_action_or","qualifier":"action","expr":{"id":270,"kind":"app","opcode":"actionAny","args":[{"id":267,"kind":"bool","value":false},{"id":268,"kind":"bool","value":true},{"id":269,"kind":"bool","value":false}]}},{"id":276,"kind":"def","name":"test_ite","qualifier":"val","expr":{"id":275,"kind":"app","opcode":"ite","args":[{"id":272,"kind":"bool","value":true},{"id":273,"kind":"int","value":1},{"id":274,"kind":"int","value":0}]}},{"kind":"var","name":"f1","typeAnnotation":{"id":292,"kind":"fun","arg":{"id":290,"kind":"str"},"res":{"id":291,"kind":"int"}},"id":293},{"id":301,"kind":"def","name":"MyOper","qualifier":"def","expr":{"id":301,"kind":"lambda","params":[{"id":298,"name":"a"},{"id":299,"name":"b"}],"qualifier":"def","expr":{"id":300,"kind":"int","value":1}}},{"id":313,"kind":"def","name":"oper_in","qualifier":"val","expr":{"id":312,"kind":"app","opcode":"in","args":[{"id":310,"kind":"int","value":1},{"id":311,"kind":"app","opcode":"Set","args":[]}]}},{"kind":"const","name":"MyFunFun","typeAnnotation":{"id":31,"kind":"fun","arg":{"id":29,"kind":"fun","arg":{"id":27,"kind":"int"},"res":{"id":28,"kind":"str"}},"res":{"id":30,"kind":"bool"}},"id":32},{"id":358,"kind":"def","name":"one","qualifier":"val","expr":{"id":357,"kind":"app","opcode":"head","args":[{"id":356,"kind":"app","opcode":"List","args":[{"id":354,"kind":"int","value":1},{"id":355,"kind":"int","value":2}]}]}},{"id":363,"kind":"def","name":"test_tuple","qualifier":"val","expr":{"id":362,"kind":"app","opcode":"Tup","args":[{"id":359,"kind":"int","value":1},{"id":360,"kind":"int","value":2},{"id":361,"kind":"int","value":3}]}},{"id":368,"kind":"def","name":"test_tuple2","qualifier":"val","expr":{"id":367,"kind":"app","opcode":"Tup","args":[{"id":364,"kind":"int","value":1},{"id":365,"kind":"int","value":2},{"id":366,"kind":"int","value":3}]}},{"kind":"const","name":"MyOperator","typeAnnotation":{"id":36,"kind":"oper","args":[{"id":33,"kind":"int"},{"id":34,"kind":"str"}],"res":{"id":35,"kind":"bool"}},"id":37},{"id":372,"kind":"def","name":"test_pair","qualifier":"val","expr":{"id":371,"kind":"app","opcode":"Tup","args":[{"id":369,"kind":"int","value":4},{"id":370,"kind":"int","value":5}]}},{"id":377,"kind":"def","name":"test_list","qualifier":"val","expr":{"id":376,"kind":"app","opcode":"List","args":[{"id":373,"kind":"int","value":1},{"id":374,"kind":"int","value":2},{"id":375,"kind":"int","value":3}]}},{"id":382,"kind":"def","name":"test_list2","qualifier":"val","expr":{"id":381,"kind":"app","opcode":"List","args":[{"id":378,"kind":"int","value":1},{"id":379,"kind":"int","value":2},{"id":380,"kind":"int","value":3}]}},{"id":389,"kind":"def","name":"test_list_nth","qualifier":"val","expr":{"id":388,"kind":"app","opcode":"nth","args":[{"id":386,"kind":"app","opcode":"List","args":[{"id":383,"kind":"int","value":2},{"id":384,"kind":"int","value":3},{"id":385,"kind":"int","value":4}]},{"id":387,"kind":"int","value":2}]}},{"id":395,"kind":"def","name":"test_record","qualifier":"val","expr":{"id":394,"kind":"app","opcode":"Rec","args":[{"id":391,"kind":"str","value":"name"},{"id":390,"kind":"str","value":"igor"},{"id":393,"kind":"str","value":"year"},{"id":392,"kind":"int","value":1981}]}},{"id":401,"kind":"def","name":"test_record2","qualifier":"val","expr":{"id":400,"kind":"app","opcode":"Rec","args":[{"id":396,"kind":"str","value":"name"},{"id":397,"kind":"str","value":"igor"},{"id":398,"kind":"str","value":"year"},{"id":399,"kind":"int","value":1981}]}},{"id":414,"kind":"def","name":"test_set","qualifier":"val","expr":{"id":413,"kind":"app","opcode":"Set","args":[{"id":410,"kind":"int","value":1},{"id":411,"kind":"int","value":2},{"id":412,"kind":"int","value":3}]}},{"kind":"const","name":"MyOperatorWithComma","typeAnnotation":{"id":41,"kind":"oper","args":[{"id":38,"kind":"int"},{"id":39,"kind":"str"}],"res":{"id":40,"kind":"bool"}},"id":42},{"id":443,"kind":"def","name":"in_2_empty","qualifier":"val","expr":{"id":442,"kind":"app","opcode":"in","args":[{"id":440,"kind":"int","value":2},{"id":441,"kind":"app","opcode":"Set","args":[]}]}},{"id":447,"kind":"def","name":"subseteq_empty","qualifier":"val","expr":{"id":446,"kind":"app","opcode":"subseteq","args":[{"id":444,"kind":"app","opcode":"Set","args":[]},{"id":445,"kind":"app","opcode":"Set","args":[]}]}},{"id":456,"kind":"def","name":"powersets","qualifier":"val","expr":{"id":455,"kind":"app","opcode":"in","args":[{"id":449,"kind":"app","opcode":"Set","args":[{"id":448,"kind":"int","value":1}]},{"id":454,"kind":"app","opcode":"powerset","args":[{"id":453,"kind":"app","opcode":"Set","args":[{"id":450,"kind":"int","value":1},{"id":451,"kind":"int","value":2},{"id":452,"kind":"int","value":3}]}]}]}},{"id":469,"kind":"typedef","name":"INT_SET","type":{"id":468,"kind":"set","elem":{"id":467,"kind":"int"}}},{"kind":"const","name":"MyTuple","typeAnnotation":{"id":46,"kind":"tup","fields":{"kind":"row","fields":[{"fieldName":"0","fieldType":{"id":43,"kind":"int"}},{"fieldName":"1","fieldType":{"id":44,"kind":"bool"}},{"fieldName":"2","fieldType":{"id":45,"kind":"str"}}],"other":{"kind":"empty"}}},"id":47},{"id":470,"kind":"typedef","name":"UNINTERPRETED_TYPE"},{"id":482,"kind":"typedef","name":"ENTRY_TYPE","type":{"id":481,"kind":"union","tag":"tag","records":[{"tagValue":"Cat","fields":{"kind":"row","fields":[{"fieldName":"name","fieldType":{"id":476,"kind":"str"}},{"fieldName":"year","fieldType":{"id":477,"kind":"int"}}],"other":{"kind":"empty"}}},{"tagValue":"Date","fields":{"kind":"row","fields":[{"fieldName":"day","fieldType":{"id":478,"kind":"int"}},{"fieldName":"month","fieldType":{"id":479,"kind":"int"}},{"fieldName":"year","fieldType":{"id":480,"kind":"int"}}],"other":{"kind":"empty"}}}]}},{"kind":"const","name":"MyTupleWithComma","typeAnnotation":{"id":51,"kind":"tup","fields":{"kind":"row","fields":[{"fieldName":"0","fieldType":{"id":48,"kind":"int"}},{"fieldName":"1","fieldType":{"id":49,"kind":"bool"}},{"fieldName":"2","fieldType":{"id":50,"kind":"str"}}],"other":{"kind":"empty"}}},"id":52},{"kind":"const","name":"MyRecord","typeAnnotation":{"id":56,"kind":"rec","fields":{"kind":"row","fields":[{"fieldName":"i","fieldType":{"id":53,"kind":"int"}},{"fieldName":"b","fieldType":{"id":54,"kind":"bool"}},{"fieldName":"s","fieldType":{"id":55,"kind":"str"}}],"other":{"kind":"empty"}}},"id":57},{"kind":"const","name":"MyRecordWithComma","typeAnnotation":{"id":61,"kind":"rec","fields":{"kind":"row","fields":[{"fieldName":"i","fieldType":{"id":58,"kind":"int"}},{"fieldName":"b","fieldType":{"id":59,"kind":"bool"}},{"fieldName":"s","fieldType":{"id":60,"kind":"str"}}],"other":{"kind":"empty"}}},"id":62},{"kind":"const","name":"MyUnion","typeAnnotation":{"id":67,"kind":"union","tag":"tag","records":[{"tagValue":"circle","fields":{"kind":"row","fields":[{"fieldName":"radius","fieldType":{"id":63,"kind":"int"}}],"other":{"kind":"empty"}}},{"tagValue":"rectangle","fields":{"kind":"row","fields":[{"fieldName":"width","fieldType":{"id":64,"kind":"int"}},{"fieldName":"height","fieldType":{"id":65,"kind":"int"}}],"other":{"kind":"empty"}}},{"tagValue":"dog","fields":{"kind":"row","fields":[{"fieldName":"name","fieldType":{"id":66,"kind":"str"}}],"other":{"kind":"empty"}}}]},"id":68},{"kind":"const","name":"MyUnionWithComma","typeAnnotation":{"id":73,"kind":"union","tag":"tag","records":[{"tagValue":"circle","fields":{"kind":"row","fields":[{"fieldName":"radius","fieldType":{"id":69,"kind":"int"}}],"other":{"kind":"empty"}}},{"tagValue":"rectangle","fields":{"kind":"row","fields":[{"fieldName":"width","fieldType":{"id":70,"kind":"int"}},{"fieldName":"height","fieldType":{"id":71,"kind":"int"}}],"other":{"kind":"empty"}}},{"tagValue":"dog","fields":{"kind":"row","fields":[{"fieldName":"name","fieldType":{"id":72,"kind":"str"}}],"other":{"kind":"empty"}}}]},"id":74},{"kind":"var","name":"i","typeAnnotation":{"id":75,"kind":"int"},"id":76},{"kind":"var","name":"j","typeAnnotation":{"id":77,"kind":"bool"},"id":78},{"id":82,"kind":"def","name":"add_1_to_2","qualifier":"val","expr":{"id":81,"kind":"app","opcode":"iadd","args":[{"id":79,"kind":"int","value":1},{"id":80,"kind":"int","value":2}]}},{"id":86,"kind":"def","name":"sub_1_to_2","qualifier":"val","expr":{"id":85,"kind":"app","opcode":"isub","args":[{"id":83,"kind":"int","value":1},{"id":84,"kind":"int","value":2}]}},{"id":90,"kind":"def","name":"mul_2_to_3","qualifier":"val","expr":{"id":89,"kind":"app","opcode":"imul","args":[{"id":87,"kind":"int","value":2},{"id":88,"kind":"int","value":3}]}},{"id":94,"kind":"def","name":"div_2_to_3","qualifier":"val","expr":{"id":93,"kind":"app","opcode":"idiv","args":[{"id":91,"kind":"int","value":2},{"id":92,"kind":"int","value":3}]}},{"id":98,"kind":"def","name":"mod_2_to_3","qualifier":"val","expr":{"id":97,"kind":"app","opcode":"imod","args":[{"id":95,"kind":"int","value":2},{"id":96,"kind":"int","value":3}]}},{"id":145,"kind":"def","name":"there_is_truth","qualifier":"val","expr":{"id":144,"kind":"app","opcode":"exists","args":[{"id":140,"kind":"name","name":"Bool"},{"id":143,"kind":"lambda","params":[{"id":141,"name":"x"}],"qualifier":"def","expr":{"id":142,"kind":"name","name":"x"}}]}},{"id":156,"kind":"def","name":"withUninterpretedType","qualifier":"val","expr":{"id":155,"kind":"app","opcode":"Set","args":[]},"typeAnnotation":{"id":154,"kind":"set","elem":{"id":153,"kind":"const","name":"PROC"}}},{"id":166,"kind":"def","name":"add","qualifier":"puredef","expr":{"id":166,"kind":"lambda","params":[{"id":161,"name":"x"},{"id":162,"name":"y"}],"qualifier":"puredef","expr":{"id":165,"kind":"app","opcode":"iadd","args":[{"id":163,"kind":"name","name":"x"},{"id":164,"kind":"name","name":"y"}]}}},{"id":171,"kind":"def","name":"ofN","qualifier":"def","expr":{"id":171,"kind":"lambda","params":[{"id":167,"name":"factor"}],"qualifier":"def","expr":{"id":170,"kind":"app","opcode":"imul","args":[{"id":168,"kind":"name","name":"factor"},{"id":169,"kind":"name","name":"n"}]}}},{"id":176,"kind":"def","name":"A","qualifier":"action","expr":{"id":176,"kind":"lambda","params":[{"id":172,"name":"x"}],"qualifier":"action","expr":{"id":175,"kind":"app","opcode":"assign","args":[{"id":174,"kind":"name","name":"n"},{"id":173,"kind":"name","name":"x"}]}}},{"id":180,"kind":"def","name":"B","qualifier":"puredef","expr":{"id":180,"kind":"lambda","params":[{"id":177,"name":"x"}],"qualifier":"puredef","expr":{"id":179,"kind":"app","opcode":"not","args":[{"id":178,"kind":"name","name":"x"}]}}},{"id":190,"kind":"def","name":"H","qualifier":"def","expr":{"id":190,"kind":"lambda","params":[{"id":181,"name":"x"},{"id":182,"name":"y"}],"qualifier":"def","expr":{"id":189,"kind":"app","opcode":"iadd","args":[{"id":187,"kind":"name","name":"x"},{"id":188,"kind":"name","name":"y"}]}},"typeAnnotation":{"id":186,"kind":"oper","args":[{"id":183,"kind":"int"},{"id":184,"kind":"int"}],"res":{"id":185,"kind":"int"}}},{"id":196,"kind":"def","name":"Pol","qualifier":"def","expr":{"id":196,"kind":"lambda","params":[{"id":191,"name":"x"}],"qualifier":"def","expr":{"id":195,"kind":"name","name":"x"}},"typeAnnotation":{"id":194,"kind":"oper","args":[{"id":192,"kind":"var","name":"a"}],"res":{"id":193,"kind":"var","name":"a"}}},{"id":202,"kind":"def","name":"asgn","qualifier":"action","expr":{"id":201,"kind":"app","opcode":"assign","args":[{"id":200,"kind":"name","name":"k"},{"id":199,"kind":"int","value":3}]}},{"id":215,"kind":"def","name":"min","qualifier":"puredef","expr":{"id":215,"kind":"lambda","params":[{"id":203,"name":"x"},{"id":205,"name":"y"}],"qualifier":"puredef","expr":{"id":213,"kind":"app","opcode":"ite","args":[{"id":210,"kind":"app","opcode":"ilt","args":[{"id":208,"kind":"name","name":"x"},{"id":209,"kind":"name","name":"y"}]},{"id":211,"kind":"name","name":"x"},{"id":212,"kind":"name","name":"y"}]}},"typeAnnotation":{"id":214,"kind":"oper","args":[{"id":204,"kind":"int"},{"id":206,"kind":"int"}],"res":{"id":207,"kind":"int"}}},{"id":230,"kind":"def","name":"F","qualifier":"def","expr":{"id":230,"kind":"lambda","params":[{"id":228,"name":"x"}],"qualifier":"def","expr":{"id":229,"kind":"name","name":"x"}}},{"id":289,"kind":"def","name":"test_ite2","qualifier":"def","expr":{"id":289,"kind":"lambda","params":[{"id":277,"name":"x"},{"id":278,"name":"y"}],"qualifier":"def","expr":{"id":288,"kind":"app","opcode":"ite","args":[{"id":281,"kind":"app","opcode":"ilt","args":[{"id":279,"kind":"name","name":"x"},{"id":280,"kind":"int","value":10}]},{"id":284,"kind":"app","opcode":"iadd","args":[{"id":282,"kind":"name","name":"y"},{"id":283,"kind":"int","value":5}]},{"id":287,"kind":"app","opcode":"imod","args":[{"id":285,"kind":"name","name":"y"},{"id":286,"kind":"int","value":5}]}]}}},{"id":297,"kind":"def","name":"funapp","qualifier":"val","expr":{"id":296,"kind":"app","opcode":"get","args":[{"id":294,"kind":"name","name":"f1"},{"id":295,"kind":"str","value":"a"}]}},{"id":305,"kind":"def","name":"oper_app_normal","qualifier":"val","expr":{"id":304,"kind":"app","opcode":"MyOper","args":[{"id":302,"kind":"str","value":"a"},{"id":303,"kind":"int","value":42}]}},{"id":309,"kind":"def","name":"oper_app_ufcs","qualifier":"val","expr":{"id":308,"kind":"app","opcode":"MyOper","args":[{"id":306,"kind":"str","value":"a"},{"id":307,"kind":"int","value":42}]}},{"id":321,"kind":"def","name":"oper_app_dot1","qualifier":"val","expr":{"id":320,"kind":"app","opcode":"filter","args":[{"id":314,"kind":"name","name":"S"},{"id":319,"kind":"lambda","params":[{"id":315,"name":"x"}],"qualifier":"def","expr":{"id":318,"kind":"app","opcode":"igt","args":[{"id":316,"kind":"name","name":"x"},{"id":317,"kind":"int","value":10}]}}]}},{"id":339,"kind":"def","name":"oper_app_dot4","qualifier":"val","expr":{"id":338,"kind":"app","opcode":"filter","args":[{"id":334,"kind":"name","name":"S"},{"id":337,"kind":"lambda","params":[{"id":335,"name":"_"}],"qualifier":"def","expr":{"id":336,"kind":"bool","value":true}}]}},{"id":347,"kind":"def","name":"f","qualifier":"val","expr":{"id":346,"kind":"app","opcode":"mapBy","args":[{"id":340,"kind":"name","name":"S"},{"id":345,"kind":"lambda","params":[{"id":341,"name":"x"}],"qualifier":"def","expr":{"id":344,"kind":"app","opcode":"iadd","args":[{"id":342,"kind":"name","name":"x"},{"id":343,"kind":"int","value":1}]}}]}},{"id":353,"kind":"def","name":"set_difference","qualifier":"val","expr":{"id":352,"kind":"app","opcode":"exclude","args":[{"id":348,"kind":"name","name":"S"},{"id":351,"kind":"app","opcode":"Set","args":[{"id":349,"kind":"int","value":3},{"id":350,"kind":"int","value":4}]}]}},{"id":409,"kind":"def","name":"test_record3","qualifier":"val","expr":{"id":408,"kind":"app","opcode":"with","args":[{"id":407,"kind":"app","opcode":"with","args":[{"id":406,"kind":"name","name":"test_record"},{"id":403,"kind":"str","value":"name"},{"id":402,"kind":"str","value":"quint"}]},{"id":405,"kind":"str","value":"year"},{"id":404,"kind":"int","value":2023}]}},{"id":425,"kind":"def","name":"rec_field","qualifier":"val","expr":{"id":424,"kind":"let","opdef":{"id":420,"kind":"def","name":"my_rec","qualifier":"val","expr":{"id":419,"kind":"app","opcode":"Rec","args":[{"id":416,"kind":"str","value":"a"},{"id":415,"kind":"int","value":1},{"id":418,"kind":"str","value":"b"},{"id":417,"kind":"str","value":"foo"}]}},"expr":{"id":423,"kind":"app","opcode":"field","args":[{"id":421,"kind":"name","name":"my_rec"},{"id":422,"kind":"str","value":"a"}]}}},{"id":434,"kind":"def","name":"tup_elem","qualifier":"val","expr":{"id":433,"kind":"let","opdef":{"id":429,"kind":"def","name":"my_tup","qualifier":"val","expr":{"id":428,"kind":"app","opcode":"Tup","args":[{"id":426,"kind":"str","value":"a"},{"id":427,"kind":"int","value":3}]}},"expr":{"id":432,"kind":"app","opcode":"item","args":[{"id":430,"kind":"name","name":"my_tup"},{"id":431,"kind":"int","value":2}]}}},{"id":439,"kind":"def","name":"isEmpty","qualifier":"def","expr":{"id":439,"kind":"lambda","params":[{"id":435,"name":"s"}],"qualifier":"def","expr":{"id":438,"kind":"app","opcode":"eq","args":[{"id":436,"kind":"name","name":"s"},{"id":437,"kind":"app","opcode":"List","args":[]}]}}},{"id":460,"kind":"assume","name":"positive","assumption":{"id":459,"kind":"app","opcode":"igt","args":[{"id":457,"kind":"name","name":"N"},{"id":458,"kind":"int","value":0}]}},{"id":464,"kind":"assume","name":"_","assumption":{"id":463,"kind":"app","opcode":"neq","args":[{"id":461,"kind":"name","name":"N"},{"id":462,"kind":"int","value":0}]}},{"id":465,"kind":"import","defName":"foo","protoName":"M1"},{"id":466,"kind":"import","defName":"*","protoName":"M2"},{"kind":"var","name":"S1","typeAnnotation":{"id":471,"kind":"const","name":"INT_SET"},"id":472},{"id":475,"kind":"instance","qualifiedName":"Inst1","protoName":"Proto","overrides":[[{"id":474,"name":"N"},{"id":473,"kind":"name","name":"N"}]],"identityOverride":false},{"id":502,"kind":"def","name":"isValid","qualifier":"def","expr":{"id":502,"kind":"lambda","params":[{"id":483,"name":"entry"}],"qualifier":"def","expr":{"id":501,"kind":"app","opcode":"unionMatch","args":[{"id":484,"kind":"name","name":"entry"},{"id":497,"kind":"str","value":"Cat"},{"id":498,"kind":"lambda","params":[{"id":485,"name":"cat"}],"qualifier":"def","expr":{"id":490,"kind":"app","opcode":"neq","args":[{"id":488,"kind":"app","opcode":"field","args":[{"id":486,"kind":"name","name":"cat"},{"id":487,"kind":"str","value":"name"}]},{"id":489,"kind":"str","value":""}]}},{"id":499,"kind":"str","value":"Date"},{"id":500,"kind":"lambda","params":[{"id":491,"name":"date"}],"qualifier":"def","expr":{"id":496,"kind":"app","opcode":"igt","args":[{"id":494,"kind":"app","opcode":"field","args":[{"id":492,"kind":"name","name":"date"},{"id":493,"kind":"str","value":"year"}]},{"id":495,"kind":"int","value":0}]}}]}}},{"id":237,"kind":"def","name":"G","qualifier":"val","expr":{"id":237,"kind":"lambda","params":[{"id":231,"name":"x"}],"qualifier":"val","expr":{"id":236,"kind":"app","opcode":"and","args":[{"id":233,"kind":"app","opcode":"F","args":[{"id":232,"kind":"name","name":"x"}]},{"id":235,"kind":"app","opcode":"not","args":[{"id":234,"kind":"name","name":"x"}]}]}}},{"id":244,"kind":"def","name":"test_and_arg","qualifier":"val","expr":{"id":244,"kind":"lambda","params":[{"id":238,"name":"x"}],"qualifier":"val","expr":{"id":243,"kind":"app","opcode":"and","args":[{"id":240,"kind":"app","opcode":"F","args":[{"id":239,"kind":"name","name":"x"}]},{"id":242,"kind":"app","opcode":"not","args":[{"id":241,"kind":"name","name":"x"}]}]}}},{"id":251,"kind":"def","name":"test_or_arg","qualifier":"val","expr":{"id":251,"kind":"lambda","params":[{"id":245,"name":"x"}],"qualifier":"val","expr":{"id":250,"kind":"app","opcode":"or","args":[{"id":247,"kind":"app","opcode":"F","args":[{"id":246,"kind":"name","name":"x"}]},{"id":249,"kind":"app","opcode":"not","args":[{"id":248,"kind":"name","name":"x"}]}]}}},{"id":333,"kind":"def","name":"oper_nondet","qualifier":"action","expr":{"id":332,"kind":"let","opdef":{"id":324,"kind":"def","name":"x","qualifier":"nondet","expr":{"id":323,"kind":"app","opcode":"oneOf","args":[{"id":322,"kind":"name","name":"S"}]}},"expr":{"id":331,"kind":"app","opcode":"actionAll","args":[{"id":327,"kind":"app","opcode":"igt","args":[{"id":325,"kind":"name","name":"x"},{"id":326,"kind":"int","value":10}]},{"id":330,"kind":"app","opcode":"assign","args":[{"id":329,"kind":"name","name":"k"},{"id":328,"kind":"name","name":"x"}]}]}}}]}],"table":{"142":{"kind":"param","reference":141},"153":{"kind":"type","reference":152},"163":{"kind":"param","reference":161},"164":{"kind":"param","reference":162},"168":{"kind":"param","reference":167},"169":{"kind":"var","reference":158,"typeAnnotation":{"id":157,"kind":"int"}},"173":{"kind":"param","reference":172},"174":{"kind":"var","reference":158,"typeAnnotation":{"id":157,"kind":"int"}},"178":{"kind":"param","reference":177},"187":{"kind":"param","reference":181},"188":{"kind":"param","reference":182},"195":{"kind":"param","reference":191},"200":{"kind":"var","reference":198,"typeAnnotation":{"id":197,"kind":"int"}},"208":{"kind":"param","reference":203},"209":{"kind":"param","reference":205},"211":{"kind":"param","reference":203},"212":{"kind":"param","reference":205},"229":{"kind":"param","reference":228},"232":{"kind":"param","reference":231},"233":{"kind":"def","reference":230},"234":{"kind":"param","reference":231},"239":{"kind":"param","reference":238},"240":{"kind":"def","reference":230},"241":{"kind":"param","reference":238},"246":{"kind":"param","reference":245},"247":{"kind":"def","reference":230},"248":{"kind":"param","reference":245},"279":{"kind":"param","reference":277},"282":{"kind":"param","reference":278},"285":{"kind":"param","reference":278},"294":{"kind":"var","reference":293,"typeAnnotation":{"id":292,"kind":"fun","arg":{"id":290,"kind":"str"},"res":{"id":291,"kind":"int"}}},"304":{"kind":"def","reference":301},"308":{"kind":"def","reference":301},"314":{"kind":"const","reference":16,"typeAnnotation":{"id":15,"kind":"set","elem":{"id":14,"kind":"int"}}},"316":{"kind":"param","reference":315},"322":{"kind":"const","reference":16,"typeAnnotation":{"id":15,"kind":"set","elem":{"id":14,"kind":"int"}}},"325":{"kind":"def","reference":324},"328":{"kind":"def","reference":324},"329":{"kind":"var","reference":198,"typeAnnotation":{"id":197,"kind":"int"}},"334":{"kind":"const","reference":16,"typeAnnotation":{"id":15,"kind":"set","elem":{"id":14,"kind":"int"}}},"340":{"kind":"const","reference":16,"typeAnnotation":{"id":15,"kind":"set","elem":{"id":14,"kind":"int"}}},"342":{"kind":"param","reference":341},"348":{"kind":"const","reference":16,"typeAnnotation":{"id":15,"kind":"set","elem":{"id":14,"kind":"int"}}},"406":{"kind":"def","reference":395},"421":{"kind":"def","reference":420},"430":{"kind":"def","reference":429},"436":{"kind":"param","reference":435},"457":{"kind":"const","reference":13,"typeAnnotation":{"id":12,"kind":"int"}},"461":{"kind":"const","reference":13,"typeAnnotation":{"id":12,"kind":"int"}},"471":{"kind":"type","reference":469,"typeAnnotation":{"id":468,"kind":"set","elem":{"id":467,"kind":"int"}}},"473":{"kind":"const","reference":13,"typeAnnotation":{"id":12,"kind":"int"}},"474":{"kind":"const","reference":473,"typeAnnotation":{"id":7,"kind":"int"}},"484":{"kind":"param","reference":483},"486":{"kind":"param","reference":485},"492":{"kind":"param","reference":491}}} \ No newline at end of file +{"stage":"parsing","warnings":[],"modules":[{"id":3,"name":"M1","declarations":[{"id":2,"kind":"def","name":"foo","qualifier":"val","expr":{"id":1,"kind":"int","value":4}}]},{"id":6,"name":"M2","declarations":[{"id":5,"kind":"def","name":"bar","qualifier":"val","expr":{"id":4,"kind":"int","value":4}}]},{"id":11,"name":"Proto","declarations":[{"kind":"var","name":"x","typeAnnotation":{"id":9,"kind":"int"},"id":10},{"kind":"const","name":"N","typeAnnotation":{"id":7,"kind":"int"},"id":8}]},{"id":503,"name":"withConsts","declarations":[{"id":102,"kind":"def","name":"pow_2_to_3","qualifier":"val","expr":{"id":101,"kind":"app","opcode":"ipow","args":[{"id":99,"kind":"int","value":2},{"id":100,"kind":"int","value":3}]}},{"id":105,"kind":"def","name":"uminus","qualifier":"val","expr":{"id":104,"kind":"app","opcode":"iuminus","args":[{"id":103,"kind":"int","value":100}]}},{"id":109,"kind":"def","name":"gt_2_to_3","qualifier":"val","expr":{"id":108,"kind":"app","opcode":"igt","args":[{"id":106,"kind":"int","value":2},{"id":107,"kind":"int","value":3}]}},{"id":113,"kind":"def","name":"ge_2_to_3","qualifier":"val","expr":{"id":112,"kind":"app","opcode":"igte","args":[{"id":110,"kind":"int","value":2},{"id":111,"kind":"int","value":3}]}},{"id":117,"kind":"def","name":"lt_2_to_3","qualifier":"val","expr":{"id":116,"kind":"app","opcode":"ilt","args":[{"id":114,"kind":"int","value":2},{"id":115,"kind":"int","value":3}]}},{"id":121,"kind":"def","name":"le_2_to_3","qualifier":"val","expr":{"id":120,"kind":"app","opcode":"ilte","args":[{"id":118,"kind":"int","value":2},{"id":119,"kind":"int","value":3}]}},{"id":125,"kind":"def","name":"eqeq_2_to_3","qualifier":"val","expr":{"id":124,"kind":"app","opcode":"eq","args":[{"id":122,"kind":"int","value":2},{"id":123,"kind":"int","value":3}]}},{"id":129,"kind":"def","name":"ne_2_to_3","qualifier":"val","expr":{"id":128,"kind":"app","opcode":"neq","args":[{"id":126,"kind":"int","value":2},{"id":127,"kind":"int","value":3}]}},{"kind":"const","name":"N","typeAnnotation":{"id":12,"kind":"int"},"id":13},{"id":135,"kind":"def","name":"VeryTrue","qualifier":"val","expr":{"id":134,"kind":"app","opcode":"eq","args":[{"id":132,"kind":"app","opcode":"iadd","args":[{"id":130,"kind":"int","value":2},{"id":131,"kind":"int","value":2}]},{"id":133,"kind":"int","value":4}]}},{"id":139,"kind":"def","name":"nat_includes_one","qualifier":"val","expr":{"id":138,"kind":"app","opcode":"in","args":[{"id":136,"kind":"int","value":1},{"id":137,"kind":"name","name":"Nat"}]}},{"id":151,"kind":"def","name":"withType","qualifier":"val","expr":{"id":150,"kind":"app","opcode":"Set","args":[{"id":148,"kind":"int","value":1},{"id":149,"kind":"int","value":2}]},"typeAnnotation":{"id":147,"kind":"set","elem":{"id":146,"kind":"int"}}},{"id":152,"kind":"typedef","name":"PROC"},{"kind":"var","name":"n","typeAnnotation":{"id":157,"kind":"int"},"id":158},{"kind":"const","name":"S","typeAnnotation":{"id":15,"kind":"set","elem":{"id":14,"kind":"int"}},"id":16},{"id":160,"kind":"def","name":"magicNumber","qualifier":"pureval","expr":{"id":159,"kind":"int","value":42}},{"kind":"const","name":"MySet","typeAnnotation":{"id":18,"kind":"set","elem":{"id":17,"kind":"int"}},"id":19},{"kind":"var","name":"k","typeAnnotation":{"id":197,"kind":"int"},"id":198},{"id":219,"kind":"def","name":"test_and","qualifier":"val","expr":{"id":218,"kind":"app","opcode":"and","args":[{"id":216,"kind":"bool","value":false},{"id":217,"kind":"bool","value":true}]}},{"kind":"const","name":"MySeq","typeAnnotation":{"id":21,"kind":"list","elem":{"id":20,"kind":"bool"}},"id":22},{"id":223,"kind":"def","name":"test_or","qualifier":"val","expr":{"id":222,"kind":"app","opcode":"or","args":[{"id":220,"kind":"bool","value":false},{"id":221,"kind":"bool","value":true}]}},{"id":227,"kind":"def","name":"test_implies","qualifier":"val","expr":{"id":226,"kind":"app","opcode":"implies","args":[{"id":224,"kind":"bool","value":false},{"id":225,"kind":"bool","value":true}]}},{"id":256,"kind":"def","name":"test_block_and","qualifier":"val","expr":{"id":255,"kind":"app","opcode":"and","args":[{"id":252,"kind":"bool","value":false},{"id":253,"kind":"bool","value":true},{"id":254,"kind":"bool","value":false}]}},{"kind":"const","name":"MyFun","typeAnnotation":{"id":25,"kind":"fun","arg":{"id":23,"kind":"int"},"res":{"id":24,"kind":"str"}},"id":26},{"id":261,"kind":"def","name":"test_action_and","qualifier":"action","expr":{"id":260,"kind":"app","opcode":"actionAll","args":[{"id":257,"kind":"bool","value":false},{"id":258,"kind":"bool","value":true},{"id":259,"kind":"bool","value":false}]}},{"id":266,"kind":"def","name":"test_block_or","qualifier":"val","expr":{"id":265,"kind":"app","opcode":"or","args":[{"id":262,"kind":"bool","value":false},{"id":263,"kind":"bool","value":true},{"id":264,"kind":"bool","value":false}]}},{"id":271,"kind":"def","name":"test_action_or","qualifier":"action","expr":{"id":270,"kind":"app","opcode":"actionAny","args":[{"id":267,"kind":"bool","value":false},{"id":268,"kind":"bool","value":true},{"id":269,"kind":"bool","value":false}]}},{"id":276,"kind":"def","name":"test_ite","qualifier":"val","expr":{"id":275,"kind":"app","opcode":"ite","args":[{"id":272,"kind":"bool","value":true},{"id":273,"kind":"int","value":1},{"id":274,"kind":"int","value":0}]}},{"kind":"var","name":"f1","typeAnnotation":{"id":292,"kind":"fun","arg":{"id":290,"kind":"str"},"res":{"id":291,"kind":"int"}},"id":293},{"id":301,"kind":"def","name":"MyOper","qualifier":"def","expr":{"id":301,"kind":"lambda","params":[{"id":298,"name":"a"},{"id":299,"name":"b"}],"qualifier":"def","expr":{"id":300,"kind":"int","value":1}}},{"id":313,"kind":"def","name":"oper_in","qualifier":"val","expr":{"id":312,"kind":"app","opcode":"in","args":[{"id":310,"kind":"int","value":1},{"id":311,"kind":"app","opcode":"Set","args":[]}]}},{"kind":"const","name":"MyFunFun","typeAnnotation":{"id":31,"kind":"fun","arg":{"id":29,"kind":"fun","arg":{"id":27,"kind":"int"},"res":{"id":28,"kind":"str"}},"res":{"id":30,"kind":"bool"}},"id":32},{"id":358,"kind":"def","name":"one","qualifier":"val","expr":{"id":357,"kind":"app","opcode":"head","args":[{"id":356,"kind":"app","opcode":"List","args":[{"id":354,"kind":"int","value":1},{"id":355,"kind":"int","value":2}]}]}},{"id":363,"kind":"def","name":"test_tuple","qualifier":"val","expr":{"id":362,"kind":"app","opcode":"Tup","args":[{"id":359,"kind":"int","value":1},{"id":360,"kind":"int","value":2},{"id":361,"kind":"int","value":3}]}},{"id":368,"kind":"def","name":"test_tuple2","qualifier":"val","expr":{"id":367,"kind":"app","opcode":"Tup","args":[{"id":364,"kind":"int","value":1},{"id":365,"kind":"int","value":2},{"id":366,"kind":"int","value":3}]}},{"kind":"const","name":"MyOperator","typeAnnotation":{"id":36,"kind":"oper","args":[{"id":33,"kind":"int"},{"id":34,"kind":"str"}],"res":{"id":35,"kind":"bool"}},"id":37},{"id":372,"kind":"def","name":"test_pair","qualifier":"val","expr":{"id":371,"kind":"app","opcode":"Tup","args":[{"id":369,"kind":"int","value":4},{"id":370,"kind":"int","value":5}]}},{"id":377,"kind":"def","name":"test_list","qualifier":"val","expr":{"id":376,"kind":"app","opcode":"List","args":[{"id":373,"kind":"int","value":1},{"id":374,"kind":"int","value":2},{"id":375,"kind":"int","value":3}]}},{"id":382,"kind":"def","name":"test_list2","qualifier":"val","expr":{"id":381,"kind":"app","opcode":"List","args":[{"id":378,"kind":"int","value":1},{"id":379,"kind":"int","value":2},{"id":380,"kind":"int","value":3}]}},{"id":389,"kind":"def","name":"test_list_nth","qualifier":"val","expr":{"id":388,"kind":"app","opcode":"nth","args":[{"id":386,"kind":"app","opcode":"List","args":[{"id":383,"kind":"int","value":2},{"id":384,"kind":"int","value":3},{"id":385,"kind":"int","value":4}]},{"id":387,"kind":"int","value":2}]}},{"id":395,"kind":"def","name":"test_record","qualifier":"val","expr":{"id":394,"kind":"app","opcode":"Rec","args":[{"id":391,"kind":"str","value":"name"},{"id":390,"kind":"str","value":"igor"},{"id":393,"kind":"str","value":"year"},{"id":392,"kind":"int","value":1981}]}},{"id":401,"kind":"def","name":"test_record2","qualifier":"val","expr":{"id":400,"kind":"app","opcode":"Rec","args":[{"id":396,"kind":"str","value":"name"},{"id":397,"kind":"str","value":"igor"},{"id":398,"kind":"str","value":"year"},{"id":399,"kind":"int","value":1981}]}},{"id":414,"kind":"def","name":"test_set","qualifier":"val","expr":{"id":413,"kind":"app","opcode":"Set","args":[{"id":410,"kind":"int","value":1},{"id":411,"kind":"int","value":2},{"id":412,"kind":"int","value":3}]}},{"kind":"const","name":"MyOperatorWithComma","typeAnnotation":{"id":41,"kind":"oper","args":[{"id":38,"kind":"int"},{"id":39,"kind":"str"}],"res":{"id":40,"kind":"bool"}},"id":42},{"id":443,"kind":"def","name":"in_2_empty","qualifier":"val","expr":{"id":442,"kind":"app","opcode":"in","args":[{"id":440,"kind":"int","value":2},{"id":441,"kind":"app","opcode":"Set","args":[]}]}},{"id":447,"kind":"def","name":"subseteq_empty","qualifier":"val","expr":{"id":446,"kind":"app","opcode":"subseteq","args":[{"id":444,"kind":"app","opcode":"Set","args":[]},{"id":445,"kind":"app","opcode":"Set","args":[]}]}},{"id":456,"kind":"def","name":"powersets","qualifier":"val","expr":{"id":455,"kind":"app","opcode":"in","args":[{"id":449,"kind":"app","opcode":"Set","args":[{"id":448,"kind":"int","value":1}]},{"id":454,"kind":"app","opcode":"powerset","args":[{"id":453,"kind":"app","opcode":"Set","args":[{"id":450,"kind":"int","value":1},{"id":451,"kind":"int","value":2},{"id":452,"kind":"int","value":3}]}]}]}},{"id":469,"kind":"typedef","name":"INT_SET","type":{"id":468,"kind":"set","elem":{"id":467,"kind":"int"}}},{"kind":"const","name":"MyTuple","typeAnnotation":{"id":46,"kind":"tup","fields":{"kind":"row","fields":[{"fieldName":"0","fieldType":{"id":43,"kind":"int"}},{"fieldName":"1","fieldType":{"id":44,"kind":"bool"}},{"fieldName":"2","fieldType":{"id":45,"kind":"str"}}],"other":{"kind":"empty"}}},"id":47},{"id":470,"kind":"typedef","name":"UNINTERPRETED_TYPE"},{"id":482,"kind":"typedef","name":"ENTRY_TYPE","type":{"id":481,"kind":"union","tag":"tag","records":[{"tagValue":"Cat","fields":{"kind":"row","fields":[{"fieldName":"name","fieldType":{"id":476,"kind":"str"}},{"fieldName":"year","fieldType":{"id":477,"kind":"int"}}],"other":{"kind":"empty"}}},{"tagValue":"Date","fields":{"kind":"row","fields":[{"fieldName":"day","fieldType":{"id":478,"kind":"int"}},{"fieldName":"month","fieldType":{"id":479,"kind":"int"}},{"fieldName":"year","fieldType":{"id":480,"kind":"int"}}],"other":{"kind":"empty"}}}]}},{"kind":"const","name":"MyTupleWithComma","typeAnnotation":{"id":51,"kind":"tup","fields":{"kind":"row","fields":[{"fieldName":"0","fieldType":{"id":48,"kind":"int"}},{"fieldName":"1","fieldType":{"id":49,"kind":"bool"}},{"fieldName":"2","fieldType":{"id":50,"kind":"str"}}],"other":{"kind":"empty"}}},"id":52},{"kind":"const","name":"MyRecord","typeAnnotation":{"id":56,"kind":"rec","fields":{"kind":"row","fields":[{"fieldName":"i","fieldType":{"id":53,"kind":"int"}},{"fieldName":"b","fieldType":{"id":54,"kind":"bool"}},{"fieldName":"s","fieldType":{"id":55,"kind":"str"}}],"other":{"kind":"empty"}}},"id":57},{"kind":"const","name":"MyRecordWithComma","typeAnnotation":{"id":61,"kind":"rec","fields":{"kind":"row","fields":[{"fieldName":"i","fieldType":{"id":58,"kind":"int"}},{"fieldName":"b","fieldType":{"id":59,"kind":"bool"}},{"fieldName":"s","fieldType":{"id":60,"kind":"str"}}],"other":{"kind":"empty"}}},"id":62},{"kind":"const","name":"MyUnion","typeAnnotation":{"id":67,"kind":"union","tag":"tag","records":[{"tagValue":"circle","fields":{"kind":"row","fields":[{"fieldName":"radius","fieldType":{"id":63,"kind":"int"}}],"other":{"kind":"empty"}}},{"tagValue":"rectangle","fields":{"kind":"row","fields":[{"fieldName":"width","fieldType":{"id":64,"kind":"int"}},{"fieldName":"height","fieldType":{"id":65,"kind":"int"}}],"other":{"kind":"empty"}}},{"tagValue":"dog","fields":{"kind":"row","fields":[{"fieldName":"name","fieldType":{"id":66,"kind":"str"}}],"other":{"kind":"empty"}}}]},"id":68},{"kind":"const","name":"MyUnionWithComma","typeAnnotation":{"id":73,"kind":"union","tag":"tag","records":[{"tagValue":"circle","fields":{"kind":"row","fields":[{"fieldName":"radius","fieldType":{"id":69,"kind":"int"}}],"other":{"kind":"empty"}}},{"tagValue":"rectangle","fields":{"kind":"row","fields":[{"fieldName":"width","fieldType":{"id":70,"kind":"int"}},{"fieldName":"height","fieldType":{"id":71,"kind":"int"}}],"other":{"kind":"empty"}}},{"tagValue":"dog","fields":{"kind":"row","fields":[{"fieldName":"name","fieldType":{"id":72,"kind":"str"}}],"other":{"kind":"empty"}}}]},"id":74},{"kind":"var","name":"i","typeAnnotation":{"id":75,"kind":"int"},"id":76},{"kind":"var","name":"j","typeAnnotation":{"id":77,"kind":"bool"},"id":78},{"id":82,"kind":"def","name":"add_1_to_2","qualifier":"val","expr":{"id":81,"kind":"app","opcode":"iadd","args":[{"id":79,"kind":"int","value":1},{"id":80,"kind":"int","value":2}]}},{"id":86,"kind":"def","name":"sub_1_to_2","qualifier":"val","expr":{"id":85,"kind":"app","opcode":"isub","args":[{"id":83,"kind":"int","value":1},{"id":84,"kind":"int","value":2}]}},{"id":90,"kind":"def","name":"mul_2_to_3","qualifier":"val","expr":{"id":89,"kind":"app","opcode":"imul","args":[{"id":87,"kind":"int","value":2},{"id":88,"kind":"int","value":3}]}},{"id":94,"kind":"def","name":"div_2_to_3","qualifier":"val","expr":{"id":93,"kind":"app","opcode":"idiv","args":[{"id":91,"kind":"int","value":2},{"id":92,"kind":"int","value":3}]}},{"id":98,"kind":"def","name":"mod_2_to_3","qualifier":"val","expr":{"id":97,"kind":"app","opcode":"imod","args":[{"id":95,"kind":"int","value":2},{"id":96,"kind":"int","value":3}]}},{"id":145,"kind":"def","name":"there_is_truth","qualifier":"val","expr":{"id":144,"kind":"app","opcode":"exists","args":[{"id":140,"kind":"name","name":"Bool"},{"id":143,"kind":"lambda","params":[{"id":141,"name":"x"}],"qualifier":"def","expr":{"id":142,"kind":"name","name":"x"}}]}},{"id":156,"kind":"def","name":"withUninterpretedType","qualifier":"val","expr":{"id":155,"kind":"app","opcode":"Set","args":[]},"typeAnnotation":{"id":154,"kind":"set","elem":{"id":153,"kind":"const","name":"PROC"}}},{"id":166,"kind":"def","name":"add","qualifier":"puredef","expr":{"id":166,"kind":"lambda","params":[{"id":161,"name":"x"},{"id":162,"name":"y"}],"qualifier":"puredef","expr":{"id":165,"kind":"app","opcode":"iadd","args":[{"id":163,"kind":"name","name":"x"},{"id":164,"kind":"name","name":"y"}]}}},{"id":171,"kind":"def","name":"ofN","qualifier":"def","expr":{"id":171,"kind":"lambda","params":[{"id":167,"name":"factor"}],"qualifier":"def","expr":{"id":170,"kind":"app","opcode":"imul","args":[{"id":168,"kind":"name","name":"factor"},{"id":169,"kind":"name","name":"n"}]}}},{"id":176,"kind":"def","name":"A","qualifier":"action","expr":{"id":176,"kind":"lambda","params":[{"id":172,"name":"x"}],"qualifier":"action","expr":{"id":175,"kind":"app","opcode":"assign","args":[{"id":174,"kind":"name","name":"n"},{"id":173,"kind":"name","name":"x"}]}}},{"id":180,"kind":"def","name":"B","qualifier":"puredef","expr":{"id":180,"kind":"lambda","params":[{"id":177,"name":"x"}],"qualifier":"puredef","expr":{"id":179,"kind":"app","opcode":"not","args":[{"id":178,"kind":"name","name":"x"}]}}},{"id":190,"kind":"def","name":"H","qualifier":"def","expr":{"id":190,"kind":"lambda","params":[{"id":181,"name":"x"},{"id":182,"name":"y"}],"qualifier":"def","expr":{"id":189,"kind":"app","opcode":"iadd","args":[{"id":187,"kind":"name","name":"x"},{"id":188,"kind":"name","name":"y"}]}},"typeAnnotation":{"id":186,"kind":"oper","args":[{"id":183,"kind":"int"},{"id":184,"kind":"int"}],"res":{"id":185,"kind":"int"}}},{"id":196,"kind":"def","name":"Pol","qualifier":"def","expr":{"id":196,"kind":"lambda","params":[{"id":191,"name":"x"}],"qualifier":"def","expr":{"id":195,"kind":"name","name":"x"}},"typeAnnotation":{"id":194,"kind":"oper","args":[{"id":192,"kind":"var","name":"a"}],"res":{"id":193,"kind":"var","name":"a"}}},{"id":202,"kind":"def","name":"asgn","qualifier":"action","expr":{"id":201,"kind":"app","opcode":"assign","args":[{"id":200,"kind":"name","name":"k"},{"id":199,"kind":"int","value":3}]}},{"id":215,"kind":"def","name":"min","qualifier":"puredef","expr":{"id":215,"kind":"lambda","params":[{"id":203,"name":"x"},{"id":205,"name":"y"}],"qualifier":"puredef","expr":{"id":213,"kind":"app","opcode":"ite","args":[{"id":210,"kind":"app","opcode":"ilt","args":[{"id":208,"kind":"name","name":"x"},{"id":209,"kind":"name","name":"y"}]},{"id":211,"kind":"name","name":"x"},{"id":212,"kind":"name","name":"y"}]}},"typeAnnotation":{"id":214,"kind":"oper","args":[{"id":204,"kind":"int"},{"id":206,"kind":"int"}],"res":{"id":207,"kind":"int"}}},{"id":230,"kind":"def","name":"F","qualifier":"def","expr":{"id":230,"kind":"lambda","params":[{"id":228,"name":"x"}],"qualifier":"def","expr":{"id":229,"kind":"name","name":"x"}}},{"id":289,"kind":"def","name":"test_ite2","qualifier":"def","expr":{"id":289,"kind":"lambda","params":[{"id":277,"name":"x"},{"id":278,"name":"y"}],"qualifier":"def","expr":{"id":288,"kind":"app","opcode":"ite","args":[{"id":281,"kind":"app","opcode":"ilt","args":[{"id":279,"kind":"name","name":"x"},{"id":280,"kind":"int","value":10}]},{"id":284,"kind":"app","opcode":"iadd","args":[{"id":282,"kind":"name","name":"y"},{"id":283,"kind":"int","value":5}]},{"id":287,"kind":"app","opcode":"imod","args":[{"id":285,"kind":"name","name":"y"},{"id":286,"kind":"int","value":5}]}]}}},{"id":297,"kind":"def","name":"funapp","qualifier":"val","expr":{"id":296,"kind":"app","opcode":"get","args":[{"id":294,"kind":"name","name":"f1"},{"id":295,"kind":"str","value":"a"}]}},{"id":305,"kind":"def","name":"oper_app_normal","qualifier":"val","expr":{"id":304,"kind":"app","opcode":"MyOper","args":[{"id":302,"kind":"str","value":"a"},{"id":303,"kind":"int","value":42}]}},{"id":309,"kind":"def","name":"oper_app_ufcs","qualifier":"val","expr":{"id":308,"kind":"app","opcode":"MyOper","args":[{"id":306,"kind":"str","value":"a"},{"id":307,"kind":"int","value":42}]}},{"id":321,"kind":"def","name":"oper_app_dot1","qualifier":"val","expr":{"id":320,"kind":"app","opcode":"filter","args":[{"id":314,"kind":"name","name":"S"},{"id":319,"kind":"lambda","params":[{"id":315,"name":"x"}],"qualifier":"def","expr":{"id":318,"kind":"app","opcode":"igt","args":[{"id":316,"kind":"name","name":"x"},{"id":317,"kind":"int","value":10}]}}]}},{"id":339,"kind":"def","name":"oper_app_dot4","qualifier":"val","expr":{"id":338,"kind":"app","opcode":"filter","args":[{"id":334,"kind":"name","name":"S"},{"id":337,"kind":"lambda","params":[{"id":335,"name":"_"}],"qualifier":"def","expr":{"id":336,"kind":"bool","value":true}}]}},{"id":347,"kind":"def","name":"f","qualifier":"val","expr":{"id":346,"kind":"app","opcode":"mapBy","args":[{"id":340,"kind":"name","name":"S"},{"id":345,"kind":"lambda","params":[{"id":341,"name":"x"}],"qualifier":"def","expr":{"id":344,"kind":"app","opcode":"iadd","args":[{"id":342,"kind":"name","name":"x"},{"id":343,"kind":"int","value":1}]}}]}},{"id":353,"kind":"def","name":"set_difference","qualifier":"val","expr":{"id":352,"kind":"app","opcode":"exclude","args":[{"id":348,"kind":"name","name":"S"},{"id":351,"kind":"app","opcode":"Set","args":[{"id":349,"kind":"int","value":3},{"id":350,"kind":"int","value":4}]}]}},{"id":409,"kind":"def","name":"test_record3","qualifier":"val","expr":{"id":408,"kind":"app","opcode":"with","args":[{"id":407,"kind":"app","opcode":"with","args":[{"id":406,"kind":"name","name":"test_record"},{"id":403,"kind":"str","value":"name"},{"id":402,"kind":"str","value":"quint"}]},{"id":405,"kind":"str","value":"year"},{"id":404,"kind":"int","value":2023}]}},{"id":425,"kind":"def","name":"rec_field","qualifier":"val","expr":{"id":424,"kind":"let","opdef":{"id":420,"kind":"def","name":"my_rec","qualifier":"val","expr":{"id":419,"kind":"app","opcode":"Rec","args":[{"id":416,"kind":"str","value":"a"},{"id":415,"kind":"int","value":1},{"id":418,"kind":"str","value":"b"},{"id":417,"kind":"str","value":"foo"}]}},"expr":{"id":423,"kind":"app","opcode":"field","args":[{"id":421,"kind":"name","name":"my_rec"},{"id":422,"kind":"str","value":"a"}]}}},{"id":434,"kind":"def","name":"tup_elem","qualifier":"val","expr":{"id":433,"kind":"let","opdef":{"id":429,"kind":"def","name":"my_tup","qualifier":"val","expr":{"id":428,"kind":"app","opcode":"Tup","args":[{"id":426,"kind":"str","value":"a"},{"id":427,"kind":"int","value":3}]}},"expr":{"id":432,"kind":"app","opcode":"item","args":[{"id":430,"kind":"name","name":"my_tup"},{"id":431,"kind":"int","value":2}]}}},{"id":439,"kind":"def","name":"isEmpty","qualifier":"def","expr":{"id":439,"kind":"lambda","params":[{"id":435,"name":"s"}],"qualifier":"def","expr":{"id":438,"kind":"app","opcode":"eq","args":[{"id":436,"kind":"name","name":"s"},{"id":437,"kind":"app","opcode":"List","args":[]}]}}},{"id":460,"kind":"assume","name":"positive","assumption":{"id":459,"kind":"app","opcode":"igt","args":[{"id":457,"kind":"name","name":"N"},{"id":458,"kind":"int","value":0}]}},{"id":464,"kind":"assume","name":"_","assumption":{"id":463,"kind":"app","opcode":"neq","args":[{"id":461,"kind":"name","name":"N"},{"id":462,"kind":"int","value":0}]}},{"id":465,"kind":"import","defName":"foo","protoName":"M1"},{"id":466,"kind":"import","defName":"*","protoName":"M2"},{"kind":"var","name":"S1","typeAnnotation":{"id":471,"kind":"const","name":"INT_SET"},"id":472},{"id":475,"kind":"instance","qualifiedName":"Inst1","protoName":"Proto","overrides":[[{"id":474,"name":"N"},{"id":473,"kind":"name","name":"N"}]],"identityOverride":false},{"id":502,"kind":"def","name":"isValid","qualifier":"def","expr":{"id":502,"kind":"lambda","params":[{"id":483,"name":"entry"}],"qualifier":"def","expr":{"id":501,"kind":"app","opcode":"unionMatch","args":[{"id":484,"kind":"name","name":"entry"},{"id":497,"kind":"str","value":"Cat"},{"id":498,"kind":"lambda","params":[{"id":485,"name":"cat"}],"qualifier":"def","expr":{"id":490,"kind":"app","opcode":"neq","args":[{"id":488,"kind":"app","opcode":"field","args":[{"id":486,"kind":"name","name":"cat"},{"id":487,"kind":"str","value":"name"}]},{"id":489,"kind":"str","value":""}]}},{"id":499,"kind":"str","value":"Date"},{"id":500,"kind":"lambda","params":[{"id":491,"name":"date"}],"qualifier":"def","expr":{"id":496,"kind":"app","opcode":"igt","args":[{"id":494,"kind":"app","opcode":"field","args":[{"id":492,"kind":"name","name":"date"},{"id":493,"kind":"str","value":"year"}]},{"id":495,"kind":"int","value":0}]}}]}}},{"id":237,"kind":"def","name":"G","qualifier":"val","expr":{"id":237,"kind":"lambda","params":[{"id":231,"name":"x"}],"qualifier":"val","expr":{"id":236,"kind":"app","opcode":"and","args":[{"id":233,"kind":"app","opcode":"F","args":[{"id":232,"kind":"name","name":"x"}]},{"id":235,"kind":"app","opcode":"not","args":[{"id":234,"kind":"name","name":"x"}]}]}}},{"id":244,"kind":"def","name":"test_and_arg","qualifier":"val","expr":{"id":244,"kind":"lambda","params":[{"id":238,"name":"x"}],"qualifier":"val","expr":{"id":243,"kind":"app","opcode":"and","args":[{"id":240,"kind":"app","opcode":"F","args":[{"id":239,"kind":"name","name":"x"}]},{"id":242,"kind":"app","opcode":"not","args":[{"id":241,"kind":"name","name":"x"}]}]}}},{"id":251,"kind":"def","name":"test_or_arg","qualifier":"val","expr":{"id":251,"kind":"lambda","params":[{"id":245,"name":"x"}],"qualifier":"val","expr":{"id":250,"kind":"app","opcode":"or","args":[{"id":247,"kind":"app","opcode":"F","args":[{"id":246,"kind":"name","name":"x"}]},{"id":249,"kind":"app","opcode":"not","args":[{"id":248,"kind":"name","name":"x"}]}]}}},{"id":333,"kind":"def","name":"oper_nondet","qualifier":"action","expr":{"id":332,"kind":"let","opdef":{"id":324,"kind":"def","name":"x","qualifier":"nondet","expr":{"id":323,"kind":"app","opcode":"oneOf","args":[{"id":322,"kind":"name","name":"S"}]}},"expr":{"id":331,"kind":"app","opcode":"actionAll","args":[{"id":327,"kind":"app","opcode":"igt","args":[{"id":325,"kind":"name","name":"x"},{"id":326,"kind":"int","value":10}]},{"id":330,"kind":"app","opcode":"assign","args":[{"id":329,"kind":"name","name":"k"},{"id":328,"kind":"name","name":"x"}]}]}}}]}],"table":{"142":{"id":141,"name":"x","kind":"param"},"153":{"id":152,"kind":"typedef","name":"PROC"},"163":{"id":161,"name":"x","kind":"param"},"164":{"id":162,"name":"y","kind":"param"},"168":{"id":167,"name":"factor","kind":"param"},"169":{"kind":"var","name":"n","typeAnnotation":{"id":157,"kind":"int"},"id":158},"173":{"id":172,"name":"x","kind":"param"},"174":{"kind":"var","name":"n","typeAnnotation":{"id":157,"kind":"int"},"id":158},"178":{"id":177,"name":"x","kind":"param"},"187":{"id":181,"name":"x","kind":"param"},"188":{"id":182,"name":"y","kind":"param"},"195":{"id":191,"name":"x","kind":"param"},"200":{"kind":"var","name":"k","typeAnnotation":{"id":197,"kind":"int"},"id":198},"208":{"id":203,"name":"x","kind":"param"},"209":{"id":205,"name":"y","kind":"param"},"211":{"id":203,"name":"x","kind":"param"},"212":{"id":205,"name":"y","kind":"param"},"229":{"id":228,"name":"x","kind":"param"},"232":{"id":231,"name":"x","kind":"param"},"233":{"id":230,"kind":"def","name":"F","qualifier":"def","expr":{"id":230,"kind":"lambda","params":[{"id":228,"name":"x"}],"qualifier":"def","expr":{"id":229,"kind":"name","name":"x"}}},"234":{"id":231,"name":"x","kind":"param"},"239":{"id":238,"name":"x","kind":"param"},"240":{"id":230,"kind":"def","name":"F","qualifier":"def","expr":{"id":230,"kind":"lambda","params":[{"id":228,"name":"x"}],"qualifier":"def","expr":{"id":229,"kind":"name","name":"x"}}},"241":{"id":238,"name":"x","kind":"param"},"246":{"id":245,"name":"x","kind":"param"},"247":{"id":230,"kind":"def","name":"F","qualifier":"def","expr":{"id":230,"kind":"lambda","params":[{"id":228,"name":"x"}],"qualifier":"def","expr":{"id":229,"kind":"name","name":"x"}}},"248":{"id":245,"name":"x","kind":"param"},"279":{"id":277,"name":"x","kind":"param"},"282":{"id":278,"name":"y","kind":"param"},"285":{"id":278,"name":"y","kind":"param"},"294":{"kind":"var","name":"f1","typeAnnotation":{"id":292,"kind":"fun","arg":{"id":290,"kind":"str"},"res":{"id":291,"kind":"int"}},"id":293},"304":{"id":301,"kind":"def","name":"MyOper","qualifier":"def","expr":{"id":301,"kind":"lambda","params":[{"id":298,"name":"a"},{"id":299,"name":"b"}],"qualifier":"def","expr":{"id":300,"kind":"int","value":1}}},"308":{"id":301,"kind":"def","name":"MyOper","qualifier":"def","expr":{"id":301,"kind":"lambda","params":[{"id":298,"name":"a"},{"id":299,"name":"b"}],"qualifier":"def","expr":{"id":300,"kind":"int","value":1}}},"314":{"kind":"const","name":"S","typeAnnotation":{"id":15,"kind":"set","elem":{"id":14,"kind":"int"}},"id":16},"316":{"id":315,"name":"x","kind":"param"},"322":{"kind":"const","name":"S","typeAnnotation":{"id":15,"kind":"set","elem":{"id":14,"kind":"int"}},"id":16},"325":{"id":324,"kind":"def","name":"x","qualifier":"nondet","expr":{"id":323,"kind":"app","opcode":"oneOf","args":[{"id":322,"kind":"name","name":"S"}]}},"328":{"id":324,"kind":"def","name":"x","qualifier":"nondet","expr":{"id":323,"kind":"app","opcode":"oneOf","args":[{"id":322,"kind":"name","name":"S"}]}},"329":{"kind":"var","name":"k","typeAnnotation":{"id":197,"kind":"int"},"id":198},"334":{"kind":"const","name":"S","typeAnnotation":{"id":15,"kind":"set","elem":{"id":14,"kind":"int"}},"id":16},"340":{"kind":"const","name":"S","typeAnnotation":{"id":15,"kind":"set","elem":{"id":14,"kind":"int"}},"id":16},"342":{"id":341,"name":"x","kind":"param"},"348":{"kind":"const","name":"S","typeAnnotation":{"id":15,"kind":"set","elem":{"id":14,"kind":"int"}},"id":16},"406":{"id":395,"kind":"def","name":"test_record","qualifier":"val","expr":{"id":394,"kind":"app","opcode":"Rec","args":[{"id":391,"kind":"str","value":"name"},{"id":390,"kind":"str","value":"igor"},{"id":393,"kind":"str","value":"year"},{"id":392,"kind":"int","value":1981}]}},"421":{"id":420,"kind":"def","name":"my_rec","qualifier":"val","expr":{"id":419,"kind":"app","opcode":"Rec","args":[{"id":416,"kind":"str","value":"a"},{"id":415,"kind":"int","value":1},{"id":418,"kind":"str","value":"b"},{"id":417,"kind":"str","value":"foo"}]}},"430":{"id":429,"kind":"def","name":"my_tup","qualifier":"val","expr":{"id":428,"kind":"app","opcode":"Tup","args":[{"id":426,"kind":"str","value":"a"},{"id":427,"kind":"int","value":3}]}},"436":{"id":435,"name":"s","kind":"param"},"457":{"kind":"const","name":"N","typeAnnotation":{"id":12,"kind":"int"},"id":13},"461":{"kind":"const","name":"N","typeAnnotation":{"id":12,"kind":"int"},"id":13},"471":{"id":469,"kind":"typedef","name":"INT_SET","type":{"id":468,"kind":"set","elem":{"id":467,"kind":"int"}}},"473":{"kind":"const","name":"N","typeAnnotation":{"id":12,"kind":"int"},"id":13},"474":{"kind":"const","name":"N","typeAnnotation":{"id":7,"kind":"int"},"id":473,"hidden":true},"484":{"id":483,"name":"entry","kind":"param"},"486":{"id":485,"name":"cat","kind":"param"},"492":{"id":491,"name":"date","kind":"param"}}} \ No newline at end of file diff --git a/quint/testFixture/TrivialTypeError.json b/quint/testFixture/TrivialTypeError.json index 2ef3b80ba..4da6a4b71 100644 --- a/quint/testFixture/TrivialTypeError.json +++ b/quint/testFixture/TrivialTypeError.json @@ -1 +1 @@ -{"stage":"parsing","warnings":[],"modules":[{"id":4,"name":"Foo","defs":[{"id":3,"kind":"def","name":"x","qualifier":"val","expr":{"id":2,"kind":"str","value":"not an int"},"typeAnnotation":{"id":1,"kind":"int"}}]}],"table":{}} \ No newline at end of file +{"stage":"parsing","warnings":[],"modules":[{"id":4,"name":"Foo","declarations":[{"id":3,"kind":"def","name":"x","qualifier":"val","expr":{"id":2,"kind":"str","value":"not an int"},"typeAnnotation":{"id":1,"kind":"int"}}]}],"table":{}} \ No newline at end of file diff --git a/quint/testFixture/_0001emptyModule.json b/quint/testFixture/_0001emptyModule.json index 258b9c73c..b4e3a3618 100644 --- a/quint/testFixture/_0001emptyModule.json +++ b/quint/testFixture/_0001emptyModule.json @@ -1 +1 @@ -{"stage":"parsing","warnings":[],"modules":[{"id":1,"name":"empty","defs":[]}],"table":{}} \ No newline at end of file +{"stage":"parsing","warnings":[],"modules":[{"id":1,"name":"empty","declarations":[]}],"table":{}} \ No newline at end of file diff --git a/quint/testFixture/_0099unorderedDefs.json b/quint/testFixture/_0099unorderedDefs.json index 83528e568..d837b914b 100644 --- a/quint/testFixture/_0099unorderedDefs.json +++ b/quint/testFixture/_0099unorderedDefs.json @@ -1 +1 @@ -{"stage":"parsing","warnings":[],"modules":[{"id":12,"name":"unorderedDefs","defs":[{"id":11,"kind":"def","name":"plus","qualifier":"puredef","expr":{"id":11,"kind":"lambda","params":[{"id":6,"name":"x"},{"id":7,"name":"y"}],"qualifier":"puredef","expr":{"id":10,"kind":"app","opcode":"iadd","args":[{"id":8,"kind":"name","name":"x"},{"id":9,"kind":"name","name":"y"}]}}},{"id":5,"kind":"def","name":"double","qualifier":"puredef","expr":{"id":5,"kind":"lambda","params":[{"id":1,"name":"x"}],"qualifier":"puredef","expr":{"id":4,"kind":"app","opcode":"plus","args":[{"id":2,"kind":"name","name":"x"},{"id":3,"kind":"name","name":"x"}]}}}]}],"table":{"2":{"kind":"param","reference":1},"3":{"kind":"param","reference":1},"4":{"kind":"def","reference":11},"8":{"kind":"param","reference":6},"9":{"kind":"param","reference":7}}} \ No newline at end of file +{"stage":"parsing","warnings":[],"modules":[{"id":12,"name":"unorderedDefs","declarations":[{"id":11,"kind":"def","name":"plus","qualifier":"puredef","expr":{"id":11,"kind":"lambda","params":[{"id":6,"name":"x"},{"id":7,"name":"y"}],"qualifier":"puredef","expr":{"id":10,"kind":"app","opcode":"iadd","args":[{"id":8,"kind":"name","name":"x"},{"id":9,"kind":"name","name":"y"}]}}},{"id":5,"kind":"def","name":"double","qualifier":"puredef","expr":{"id":5,"kind":"lambda","params":[{"id":1,"name":"x"}],"qualifier":"puredef","expr":{"id":4,"kind":"app","opcode":"plus","args":[{"id":2,"kind":"name","name":"x"},{"id":3,"kind":"name","name":"x"}]}}}]}],"table":{"2":{"id":1,"name":"x","kind":"param"},"3":{"id":1,"name":"x","kind":"param"},"4":{"id":11,"kind":"def","name":"plus","qualifier":"puredef","expr":{"id":11,"kind":"lambda","params":[{"id":6,"name":"x"},{"id":7,"name":"y"}],"qualifier":"puredef","expr":{"id":10,"kind":"app","opcode":"iadd","args":[{"id":8,"kind":"name","name":"x"},{"id":9,"kind":"name","name":"y"}]}}},"8":{"id":6,"name":"x","kind":"param"},"9":{"id":7,"name":"y","kind":"param"}}} \ No newline at end of file diff --git a/quint/testFixture/_0100cyclicDefs.json b/quint/testFixture/_0100cyclicDefs.json index a809159d0..4eaebeeab 100644 --- a/quint/testFixture/_0100cyclicDefs.json +++ b/quint/testFixture/_0100cyclicDefs.json @@ -1 +1 @@ -{"stage":"parsing","warnings":[],"errors":[{"locs":[{"source":"mocked_path/testFixture/_0100cyclicDefs.qnt","start":{"line":2,"col":2,"index":70},"end":{"line":2,"col":25,"index":93}},{"source":"mocked_path/testFixture/_0100cyclicDefs.qnt","start":{"line":3,"col":2,"index":97},"end":{"line":3,"col":25,"index":120}},{"source":"mocked_path/testFixture/_0100cyclicDefs.qnt","start":{"line":4,"col":2,"index":124},"end":{"line":4,"col":25,"index":147}}],"explanation":"QNT099: Found cyclic definitions. Use fold and foldl instead of recursion"}]} \ No newline at end of file +{"stage":"parsing","warnings":[],"errors":[{"locs":[{"source":"mocked_path/testFixture/_0100cyclicDefs.qnt","start":{"line":2,"col":2,"index":70},"end":{"line":2,"col":25,"index":93}},{"source":"mocked_path/testFixture/_0100cyclicDefs.qnt","start":{"line":3,"col":2,"index":97},"end":{"line":3,"col":25,"index":120}},{"source":"mocked_path/testFixture/_0100cyclicDefs.qnt","start":{"line":4,"col":2,"index":124},"end":{"line":4,"col":25,"index":147}}],"explanation":"QNT099: Found cyclic declarations. Use fold and foldl instead of recursion"}]} \ No newline at end of file diff --git a/quint/testFixture/_0101noRecursion.json b/quint/testFixture/_0101noRecursion.json index 899481e3f..69116b772 100644 --- a/quint/testFixture/_0101noRecursion.json +++ b/quint/testFixture/_0101noRecursion.json @@ -1 +1 @@ -{"stage":"parsing","warnings":[],"errors":[{"locs":[{"source":"mocked_path/testFixture/_0101noRecursion.qnt","start":{"line":3,"col":2,"index":131},"end":{"line":3,"col":41,"index":170}}],"explanation":"QNT099: Found cyclic definitions. Use fold and foldl instead of recursion"}]} \ No newline at end of file +{"stage":"parsing","warnings":[],"errors":[{"locs":[{"source":"mocked_path/testFixture/_0101noRecursion.qnt","start":{"line":3,"col":2,"index":131},"end":{"line":3,"col":41,"index":170}}],"explanation":"QNT099: Found cyclic declarations. Use fold and foldl instead of recursion"}]} \ No newline at end of file diff --git a/quint/testFixture/_1020importFrom.json b/quint/testFixture/_1020importFrom.json index f1084e962..841638abc 100644 --- a/quint/testFixture/_1020importFrom.json +++ b/quint/testFixture/_1020importFrom.json @@ -1 +1 @@ -{"stage":"parsing","warnings":[],"modules":[{"id":6,"name":"importee2","defs":[{"id":5,"kind":"def","name":"name2","qualifier":"val","expr":{"id":4,"kind":"str","value":"importee2"}}]},{"id":10,"name":"importee1","defs":[{"id":8,"kind":"def","name":"name1","qualifier":"val","expr":{"id":7,"kind":"str","value":"importee1"}},{"id":9,"kind":"import","defName":"*","protoName":"importee2","fromSource":"./_1022importee2"}]},{"id":3,"name":"importer","defs":[{"id":1,"kind":"import","defName":"*","protoName":"importee2","fromSource":"./_1022importee2"},{"id":2,"kind":"import","defName":"*","protoName":"importee1","fromSource":"./_1021importee1"}]}],"table":{}} \ No newline at end of file +{"stage":"parsing","warnings":[],"modules":[{"id":6,"name":"importee2","declarations":[{"id":5,"kind":"def","name":"name2","qualifier":"val","expr":{"id":4,"kind":"str","value":"importee2"}}]},{"id":10,"name":"importee1","declarations":[{"id":8,"kind":"def","name":"name1","qualifier":"val","expr":{"id":7,"kind":"str","value":"importee1"}},{"id":9,"kind":"import","defName":"*","protoName":"importee2","fromSource":"./_1022importee2"}]},{"id":3,"name":"importer","declarations":[{"id":1,"kind":"import","defName":"*","protoName":"importee2","fromSource":"./_1022importee2"},{"id":2,"kind":"import","defName":"*","protoName":"importee1","fromSource":"./_1021importee1"}]}],"table":{}} \ No newline at end of file diff --git a/quint/testFixture/_1021importee1.json b/quint/testFixture/_1021importee1.json index 233abb5f2..420d0395c 100644 --- a/quint/testFixture/_1021importee1.json +++ b/quint/testFixture/_1021importee1.json @@ -1 +1 @@ -{"stage":"parsing","warnings":[],"modules":[{"id":7,"name":"importee2","defs":[{"id":6,"kind":"def","name":"name2","qualifier":"val","expr":{"id":5,"kind":"str","value":"importee2"}}]},{"id":4,"name":"importee1","defs":[{"id":2,"kind":"def","name":"name1","qualifier":"val","expr":{"id":1,"kind":"str","value":"importee1"}},{"id":3,"kind":"import","defName":"*","protoName":"importee2","fromSource":"./_1022importee2"}]}],"table":{}} \ No newline at end of file +{"stage":"parsing","warnings":[],"modules":[{"id":7,"name":"importee2","declarations":[{"id":6,"kind":"def","name":"name2","qualifier":"val","expr":{"id":5,"kind":"str","value":"importee2"}}]},{"id":4,"name":"importee1","declarations":[{"id":2,"kind":"def","name":"name1","qualifier":"val","expr":{"id":1,"kind":"str","value":"importee1"}},{"id":3,"kind":"import","defName":"*","protoName":"importee2","fromSource":"./_1022importee2"}]}],"table":{}} \ No newline at end of file diff --git a/quint/testFixture/_1022importee2.json b/quint/testFixture/_1022importee2.json index ecf068ace..5b4f04712 100644 --- a/quint/testFixture/_1022importee2.json +++ b/quint/testFixture/_1022importee2.json @@ -1 +1 @@ -{"stage":"parsing","warnings":[],"modules":[{"id":3,"name":"importee2","defs":[{"id":2,"kind":"def","name":"name2","qualifier":"val","expr":{"id":1,"kind":"str","value":"importee2"}}]}],"table":{}} \ No newline at end of file +{"stage":"parsing","warnings":[],"modules":[{"id":3,"name":"importee2","declarations":[{"id":2,"kind":"def","name":"name2","qualifier":"val","expr":{"id":1,"kind":"str","value":"importee2"}}]}],"table":{}} \ No newline at end of file diff --git a/quint/testFixture/_1030const.json b/quint/testFixture/_1030const.json index 8ce09e0de..d569bc3ba 100644 --- a/quint/testFixture/_1030const.json +++ b/quint/testFixture/_1030const.json @@ -1 +1 @@ -{"stage":"parsing","warnings":[],"modules":[{"id":11,"name":"c","defs":[{"kind":"const","name":"N","typeAnnotation":{"id":1,"kind":"int"},"id":2},{"id":10,"kind":"def","name":"foo","qualifier":"puredef","expr":{"id":10,"kind":"lambda","params":[{"id":3,"name":"i"}],"qualifier":"puredef","expr":{"id":8,"kind":"app","opcode":"iadd","args":[{"id":6,"kind":"name","name":"i"},{"id":7,"kind":"name","name":"N"}]}},"typeAnnotation":{"id":9,"kind":"oper","args":[{"id":4,"kind":"int"}],"res":{"id":5,"kind":"int"}}}]}],"table":{"6":{"kind":"param","reference":3},"7":{"kind":"const","reference":2,"typeAnnotation":{"id":1,"kind":"int"}}}} \ No newline at end of file +{"stage":"parsing","warnings":[],"modules":[{"id":11,"name":"c","declarations":[{"kind":"const","name":"N","typeAnnotation":{"id":1,"kind":"int"},"id":2},{"id":10,"kind":"def","name":"foo","qualifier":"puredef","expr":{"id":10,"kind":"lambda","params":[{"id":3,"name":"i"}],"qualifier":"puredef","expr":{"id":8,"kind":"app","opcode":"iadd","args":[{"id":6,"kind":"name","name":"i"},{"id":7,"kind":"name","name":"N"}]}},"typeAnnotation":{"id":9,"kind":"oper","args":[{"id":4,"kind":"int"}],"res":{"id":5,"kind":"int"}}}]}],"table":{"6":{"id":3,"name":"i","kind":"param"},"7":{"kind":"const","name":"N","typeAnnotation":{"id":1,"kind":"int"},"id":2}}} \ No newline at end of file diff --git a/quint/testFixture/_1031instance.json b/quint/testFixture/_1031instance.json index 0d3bda144..bd4b7d239 100644 --- a/quint/testFixture/_1031instance.json +++ b/quint/testFixture/_1031instance.json @@ -1 +1 @@ -{"stage":"parsing","warnings":[],"modules":[{"id":18,"name":"c","defs":[{"kind":"const","name":"N","typeAnnotation":{"id":8,"kind":"int"},"id":9},{"id":17,"kind":"def","name":"foo","qualifier":"puredef","expr":{"id":17,"kind":"lambda","params":[{"id":10,"name":"i"}],"qualifier":"puredef","expr":{"id":15,"kind":"app","opcode":"iadd","args":[{"id":13,"kind":"name","name":"i"},{"id":14,"kind":"name","name":"N"}]}},"typeAnnotation":{"id":16,"kind":"oper","args":[{"id":11,"kind":"int"}],"res":{"id":12,"kind":"int"}}}]},{"id":7,"name":"inst","defs":[{"id":3,"kind":"instance","protoName":"c","overrides":[[{"id":2,"name":"N"},{"id":1,"kind":"int","value":3}]],"identityOverride":true,"fromSource":"./_1030const"},{"id":6,"kind":"def","name":"baz","qualifier":"puredef","expr":{"id":5,"kind":"app","opcode":"foo","args":[{"id":4,"kind":"int","value":6}]}}]}],"table":{"2":{"kind":"const","reference":1,"typeAnnotation":{"id":8,"kind":"int"}},"5":{"kind":"def","reference":17},"13":{"kind":"param","reference":10},"14":{"kind":"const","reference":9,"typeAnnotation":{"id":8,"kind":"int"}}}} \ No newline at end of file +{"stage":"parsing","warnings":[],"modules":[{"id":18,"name":"c","declarations":[{"kind":"const","name":"N","typeAnnotation":{"id":8,"kind":"int"},"id":9},{"id":17,"kind":"def","name":"foo","qualifier":"puredef","expr":{"id":17,"kind":"lambda","params":[{"id":10,"name":"i"}],"qualifier":"puredef","expr":{"id":15,"kind":"app","opcode":"iadd","args":[{"id":13,"kind":"name","name":"i"},{"id":14,"kind":"name","name":"N"}]}},"typeAnnotation":{"id":16,"kind":"oper","args":[{"id":11,"kind":"int"}],"res":{"id":12,"kind":"int"}}}]},{"id":7,"name":"inst","declarations":[{"id":3,"kind":"instance","protoName":"c","overrides":[[{"id":2,"name":"N"},{"id":1,"kind":"int","value":3}]],"identityOverride":true,"fromSource":"./_1030const"},{"id":6,"kind":"def","name":"baz","qualifier":"puredef","expr":{"id":5,"kind":"app","opcode":"foo","args":[{"id":4,"kind":"int","value":6}]}}]}],"table":{"2":{"kind":"const","name":"N","typeAnnotation":{"id":8,"kind":"int"},"id":1,"hidden":true},"5":{"id":17,"kind":"def","name":"foo","qualifier":"puredef","expr":{"id":17,"kind":"lambda","params":[{"id":10,"name":"i"}],"qualifier":"puredef","expr":{"id":15,"kind":"app","opcode":"iadd","args":[{"id":13,"kind":"name","name":"i"},{"id":14,"kind":"name","name":"N"}]}},"hidden":true},"13":{"id":10,"name":"i","kind":"param"},"14":{"kind":"const","name":"N","typeAnnotation":{"id":8,"kind":"int"},"id":9}}} \ No newline at end of file diff --git a/quint/testFixture/_1032docstrings.json b/quint/testFixture/_1032docstrings.json index 0e0946488..2c3bf2eb6 100644 --- a/quint/testFixture/_1032docstrings.json +++ b/quint/testFixture/_1032docstrings.json @@ -1 +1 @@ -{"stage":"parsing","warnings":[],"modules":[{"id":10,"name":"docstrings","defs":[{"doc":"Docstring for var","kind":"var","name":"x","typeAnnotation":{"id":6,"kind":"int"},"id":7},{"doc":"Docstring for const","kind":"const","name":"N","typeAnnotation":{"id":8,"kind":"int"},"id":9},{"doc":"Top level docstring","id":5,"kind":"def","name":"nestedVals","qualifier":"val","expr":{"id":4,"kind":"let","opdef":{"id":2,"kind":"def","name":"foo","qualifier":"pureval","expr":{"id":1,"kind":"int","value":1}},"expr":{"id":3,"kind":"name","name":"foo"}}}],"doc":"Docstring for module"}],"table":{"3":{"kind":"def","reference":2}}} \ No newline at end of file +{"stage":"parsing","warnings":[],"modules":[{"id":10,"name":"docstrings","declarations":[{"doc":"Docstring for var","kind":"var","name":"x","typeAnnotation":{"id":6,"kind":"int"},"id":7},{"doc":"Docstring for const","kind":"const","name":"N","typeAnnotation":{"id":8,"kind":"int"},"id":9},{"doc":"Top level docstring","id":5,"kind":"def","name":"nestedVals","qualifier":"val","expr":{"id":4,"kind":"let","opdef":{"id":2,"kind":"def","name":"foo","qualifier":"pureval","expr":{"id":1,"kind":"int","value":1}},"expr":{"id":3,"kind":"name","name":"foo"}}}],"doc":"Docstring for module"}],"table":{"3":{"id":2,"kind":"def","name":"foo","qualifier":"pureval","expr":{"id":1,"kind":"int","value":1}}}} \ No newline at end of file diff --git a/quint/testFixture/_1040compileError.json b/quint/testFixture/_1040compileError.json index dd6408a99..48bf2a1f8 100644 --- a/quint/testFixture/_1040compileError.json +++ b/quint/testFixture/_1040compileError.json @@ -1 +1 @@ -{"stage":"parsing","warnings":[],"modules":[{"id":8,"name":"_1040compileError","defs":[{"kind":"const","name":"n","typeAnnotation":{"id":1,"kind":"int"},"id":2},{"id":7,"kind":"def","name":"myTest","qualifier":"run","expr":{"id":6,"kind":"app","opcode":"assert","args":[{"id":5,"kind":"app","opcode":"igt","args":[{"id":3,"kind":"name","name":"n"},{"id":4,"kind":"int","value":0}]}]}}]}],"table":{"3":{"kind":"const","reference":2,"typeAnnotation":{"id":1,"kind":"int"}}}} \ No newline at end of file +{"stage":"parsing","warnings":[],"modules":[{"id":8,"name":"_1040compileError","declarations":[{"kind":"const","name":"n","typeAnnotation":{"id":1,"kind":"int"},"id":2},{"id":7,"kind":"def","name":"myTest","qualifier":"run","expr":{"id":6,"kind":"app","opcode":"assert","args":[{"id":5,"kind":"app","opcode":"igt","args":[{"id":3,"kind":"name","name":"n"},{"id":4,"kind":"int","value":0}]}]}}]}],"table":{"3":{"kind":"const","name":"n","typeAnnotation":{"id":1,"kind":"int"},"id":2}}} \ No newline at end of file diff --git a/quint/testFixture/_1041compileConst.json b/quint/testFixture/_1041compileConst.json index 944bcc140..60c4358b7 100644 --- a/quint/testFixture/_1041compileConst.json +++ b/quint/testFixture/_1041compileConst.json @@ -1 +1 @@ -{"stage":"parsing","warnings":[],"modules":[{"id":15,"name":"_1041compileConst","defs":[{"kind":"const","name":"N","typeAnnotation":{"id":1,"kind":"int"},"id":2},{"kind":"var","name":"x","typeAnnotation":{"id":3,"kind":"int"},"id":4},{"id":14,"kind":"def","name":"step","qualifier":"action","expr":{"id":13,"kind":"app","opcode":"assign","args":[{"id":12,"kind":"name","name":"x"},{"id":11,"kind":"app","opcode":"isub","args":[{"id":9,"kind":"name","name":"x"},{"id":10,"kind":"int","value":1}]}]}},{"id":8,"kind":"def","name":"init","qualifier":"action","expr":{"id":7,"kind":"app","opcode":"assign","args":[{"id":6,"kind":"name","name":"x"},{"id":5,"kind":"name","name":"N"}]}}]}],"table":{"5":{"kind":"const","reference":2,"typeAnnotation":{"id":1,"kind":"int"}},"6":{"kind":"var","reference":4,"typeAnnotation":{"id":3,"kind":"int"}},"9":{"kind":"var","reference":4,"typeAnnotation":{"id":3,"kind":"int"}},"12":{"kind":"var","reference":4,"typeAnnotation":{"id":3,"kind":"int"}}}} \ No newline at end of file +{"stage":"parsing","warnings":[],"modules":[{"id":15,"name":"_1041compileConst","declarations":[{"kind":"const","name":"N","typeAnnotation":{"id":1,"kind":"int"},"id":2},{"kind":"var","name":"x","typeAnnotation":{"id":3,"kind":"int"},"id":4},{"id":14,"kind":"def","name":"step","qualifier":"action","expr":{"id":13,"kind":"app","opcode":"assign","args":[{"id":12,"kind":"name","name":"x"},{"id":11,"kind":"app","opcode":"isub","args":[{"id":9,"kind":"name","name":"x"},{"id":10,"kind":"int","value":1}]}]}},{"id":8,"kind":"def","name":"init","qualifier":"action","expr":{"id":7,"kind":"app","opcode":"assign","args":[{"id":6,"kind":"name","name":"x"},{"id":5,"kind":"name","name":"N"}]}}]}],"table":{"5":{"kind":"const","name":"N","typeAnnotation":{"id":1,"kind":"int"},"id":2},"6":{"kind":"var","name":"x","typeAnnotation":{"id":3,"kind":"int"},"id":4},"9":{"kind":"var","name":"x","typeAnnotation":{"id":3,"kind":"int"},"id":4},"12":{"kind":"var","name":"x","typeAnnotation":{"id":3,"kind":"int"},"id":4}}} \ No newline at end of file diff --git a/vscode/quint-vscode/server/src/definitions.ts b/vscode/quint-vscode/server/src/definitions.ts index cc1d3659d..05d9eb1e0 100644 --- a/vscode/quint-vscode/server/src/definitions.ts +++ b/vscode/quint-vscode/server/src/definitions.ts @@ -26,13 +26,13 @@ export function findDefinition( // Find definition of name const def = table.get(id) - if (!def || !def.reference) { + if (!def) { return { nameId: id, name } } return { nameId: id, name, - definitionId: def?.reference, + definitionId: def.id, } } diff --git a/vscode/quint-vscode/server/src/documentSymbols.ts b/vscode/quint-vscode/server/src/documentSymbols.ts index c338334eb..686862dd7 100644 --- a/vscode/quint-vscode/server/src/documentSymbols.ts +++ b/vscode/quint-vscode/server/src/documentSymbols.ts @@ -38,7 +38,7 @@ function symbolKind(def: QuintOpDef | QuintConst | QuintVar): SymbolKind { * Return the def symbols defined in a module */ function getDefs(module: QuintModule, sourceMap: Map): DocumentSymbol[] { - return module.defs.reduce((symbols, def) => { + return module.declarations.reduce((symbols, def) => { // skip certain kinds of defs if ( def.kind === 'assume' || diff --git a/vscode/quint-vscode/server/src/hover.ts b/vscode/quint-vscode/server/src/hover.ts index 965fa0c12..6b2e6fd96 100644 --- a/vscode/quint-vscode/server/src/hover.ts +++ b/vscode/quint-vscode/server/src/hover.ts @@ -11,7 +11,7 @@ import { findDefinitionWithId, findExpressionWithId, format, - prettyQuintDef, + prettyQuintDeclaration, prettyTypeScheme, qualifierToString, } from '@informalsystems/quint' @@ -92,7 +92,7 @@ function inferredDataHover( } const text = def - ? format(lineLength, 0, prettyQuintDef(def, false, result)) + ? format(lineLength, 0, prettyQuintDeclaration(def, false, result)) : expressionToShow(expr!, parsedData.modules, link, document, loc, result) if (!text) {