src/compiler/module_bindings.panack
Green: covered; red: known zero; amber: unavailable. Blank lines are outside the executable-start-line denominator.
1 import "resolver.panack" 2 3 // Tags keep semantic identities separate from source spelling and inference 4 // placeholders. P3 will add manifest package identities to this sum type. 5 enum ModulePackageIdentity { 6 StandaloneModulePackage, 7 ToolchainModulePackage 8 } 9 10 record ModuleIdentity { 11 package: ModulePackageIdentity, 12 path: Str 13 } 14 15 record DeclarationIdentity { 16 module: ModuleIdentity, 17 name: Str 18 } 19 20 enum ModuleDeclarationKind { 21 ModuleFunction, 22 ModuleGuardedType, 23 ModuleRecord, 24 ModuleEnum, 25 ModuleVariant(Str) 26 } 27 28 record ModuleDeclarationBinding { 29 identity: DeclarationIdentity, 30 kind: ModuleDeclarationKind, 31 is_public: Bool, 32 span: SourceSpan 33 } 34 35 record ModuleImportBinding { 36 path: Str, 37 syntax: ImportBindingSyntax, 38 is_public: Bool, 39 span: SourceSpan 40 } 41 42 record ModuleBindings { 43 identity: ModuleIdentity, 44 declarations: [ModuleDeclarationBinding], 45 imports: [ModuleImportBinding] 46 } 47 48 record LoadedModule { 49 source_path: Str, 50 parsed: ParsedModule, 51 execution_program: Program, 52 bindings: ModuleBindings 53 } 54 55 pure module_declaration_binding(identity: ModuleIdentity, name: Str, kind: ModuleDeclarationKind, syntax: DeclarationSyntax): ModuleDeclarationBinding { 56 ModuleDeclarationBinding(DeclarationIdentity(identity, name), kind, syntax.is_public, syntax.span) 57 } 58 59 pure collect_module_bindings(identity: ModuleIdentity, parsed: ParsedModule): ModuleBindings { 60 mut declarations: [ModuleDeclarationBinding] = [] 61 mut imports: [ModuleImportBinding] = [] 62 mut index: Nat = 0 63 for declaration in parsed.program.declarations { 64 syntax: DeclarationSyntax = parsed.syntax[index] 65 match declaration { 66 ImportDeclaration(path) => { imports = append(imports, ModuleImportBinding(path, syntax.binding, syntax.is_public, syntax.span)) }, 67 TypeDeclaration(name, base, guard) => { declarations = append(declarations, module_declaration_binding(identity, name, ModuleGuardedType(), syntax)) }, 68 RecordDeclaration(name, parameters, fields) => { declarations = append(declarations, module_declaration_binding(identity, name, ModuleRecord(), syntax)) }, 69 EnumDeclaration(name, parameters, variants) => { 70 declarations = append(declarations, module_declaration_binding(identity, name, ModuleEnum(), syntax)) 71 for variant in variants { 72 declarations = append(declarations, module_declaration_binding(identity, variant.name, ModuleVariant(name), syntax)) 73 } 74 }, 75 FunctionDeclaration(name, parameters, return_type, is_pure, is_async, body, type_parameters) => { 76 declarations = append(declarations, module_declaration_binding(identity, name, ModuleFunction(), syntax)) 77 } 78 } 79 index = index + 1 80 } 81 ModuleBindings(identity, declarations, imports) 82 } 83 84 pure module_reserved_binding(name: Str): Bool { 85 is_builtin(name) || name == "Nat" || name == "Int" || name == "Dec" || 86 name == "Rat" || name == "Array" || name == "Bool" || name == "Str" || name == "Bytes" || name == "Unit" || 87 name == "Void" || name == "Path" || name == "Duration" || name == "Instant" || 88 name == "Option" || name == "Result" || name == "Map" || name == "Set" || 89 name == "PureFn" || name == "Fn" || name == "AsyncFn" || 90 name == "None" || name == "Some" || name == "Ok" || name == "Error" 91 } 92 93 pure module_import_names(imported: ModuleImportBinding): [ImportSelector] { 94 match imported.syntax { 95 NoImportBinding() => [], 96 NamespaceImportBinding(alias, explicit_alias) => [ImportSelector("", alias, imported.span)], 97 SelectiveImportBinding(selectors) => selectors 98 } 99 } 100 101 pure module_binding_diagnostics(bindings: ModuleBindings): [Diagnostic] { 102 mut names: Set[Str] = set() 103 mut diagnostics: [Diagnostic] = [] 104 for declaration in bindings.declarations { 105 name: Str = declaration.identity.name 106 if names.has(name) { 107 diagnostics = append(diagnostics, Diagnostic("module declaration ${name} is already bound", declaration.span.start)) 108 } else {} 109 names = names.add(name) 110 } 111 for imported in bindings.imports { 112 for selector in module_import_names(imported) { 113 name: Str = selector.alias 114 if names.has(name) { 115 diagnostics = append(diagnostics, Diagnostic("import binding ${name} conflicts with an existing module binding", selector.span.start)) 116 } else { 117 if module_reserved_binding(name) { 118 diagnostics = append(diagnostics, Diagnostic("import binding ${name} conflicts with a built-in", selector.span.start)) 119 } else {} 120 } 121 names = names.add(name) 122 } 123 } 124 diagnostics 125 } 126 127 // Export lookup returns the original declaration identity, never a renamed copy. 128 // An enum binding is one binding; variants must be selected explicitly. 129 pure module_export(bindings: ModuleBindings, selector: Str): Result[ModuleDeclarationBinding,Str] { 130 mut found: Option[ModuleDeclarationBinding] = None() 131 mut matches: Nat = 0 132 for declaration in bindings.declarations { 133 name: Str = declaration.identity.name 134 selected: Bool = match declaration.kind { 135 ModuleVariant(parent) => selector == parent + "." + name, 136 ModuleFunction() => selector == name, 137 ModuleGuardedType() => selector == name, 138 ModuleRecord() => selector == name, 139 ModuleEnum() => selector == name 140 } 141 if selected { found = Some(declaration); matches = matches + 1 } else {} 142 } 143 if matches > 1 { Error("ambiguous module declaration ${selector}") } else { 144 match found { 145 None() => Error("module has no exported declaration ${selector}"), 146 Some(declaration) => { 147 if declaration.is_public { Ok(declaration) } 148 else { Error("module declaration ${selector} is private") } 149 } 150 } 151 } 152 } 153 154 // Source paths are kept separately. Semantic module paths are relative even for 155 // the existing bootstrap's parent imports, and remain stable after relocation. 156 pure module_relative_path(path: Str, root: Str): Str { 157 mut cursor: Nat = 0 158 mut common: Nat = 0 159 while cursor < len(path) && cursor < len(root) && path[cursor] == root[cursor] { 160 if path[cursor] == "/" { common = cursor + 1 } else {} 161 cursor = cursor + 1 162 } 163 if cursor == len(root) && cursor < len(path) && path[cursor] == "/" { 164 slice(path, cursor + 1, len(path)) 165 } else { 166 mut prefix: Str = "" 167 mut index: Nat = common 168 while index < len(root) { 169 if root[index] == "/" { prefix = prefix + "../" } else {} 170 index = index + 1 171 } 172 if common < len(root) { prefix = prefix + "../" } else {} 173 prefix + slice(path, common, len(path)) 174 } 175 } 176 177 pure source_module_identity(path: Str, project_root: Str, stdlib_root: Str): ModuleIdentity { 178 if starts_with(path, stdlib_root + "/") { 179 ModuleIdentity(ToolchainModulePackage(), module_relative_path(path, stdlib_root)) 180 } else { ModuleIdentity(StandaloneModulePackage(), module_relative_path(path, project_root)) } 181 } 182 183 pure module_programs(modules: [LoadedModule]): [Program] { 184 mut programs: [Program] = [] 185 for module in modules { programs = append(programs, module.execution_program) } 186 programs 187 } 188 189 // Align positions with the exact declaration order used by module_programs. 190 // The resolver attaches each origin while creating a diagnostic; repeated 191 // spellings in three or more modules must never collapse onto the last source. 192 pure module_declaration_positions(modules: [LoadedModule]): [SourcePos] { 193 mut positions: [SourcePos] = [] 194 for module in modules { 195 for syntax in module.parsed.syntax { positions = append(positions, syntax.span.start) } 196 } 197 positions 198 } 199
Functions
[
{
"id": "declaration/9",
"name": "module_declaration_binding",
"line": 55,
"state": "covered",
"entries": "1570"
},
{
"id": "declaration/10",
"name": "collect_module_bindings",
"line": 59,
"state": "covered",
"entries": "408"
},
{
"id": "declaration/11",
"name": "module_reserved_binding",
"line": 84,
"state": "covered",
"entries": "1615"
},
{
"id": "declaration/12",
"name": "module_import_names",
"line": 93,
"state": "covered",
"entries": "1349"
},
{
"id": "declaration/13",
"name": "module_binding_diagnostics",
"line": 101,
"state": "covered",
"entries": "521"
},
{
"id": "declaration/14",
"name": "module_export",
"line": 129,
"state": "covered",
"entries": "5"
},
{
"id": "declaration/15",
"name": "module_relative_path",
"line": 156,
"state": "covered",
"entries": "96"
},
{
"id": "declaration/16",
"name": "source_module_identity",
"line": 177,
"state": "covered",
"entries": "94"
},
{
"id": "declaration/17",
"name": "module_programs",
"line": 183,
"state": "covered",
"entries": "20"
},
{
"id": "declaration/18",
"name": "module_declaration_positions",
"line": 192,
"state": "covered",
"entries": "20"
}
]Source branch outcomes
[
{
"id": "declaration/10/statement/3/decision/body",
"outcome": "body",
"line": 63,
"state": "covered",
"hits": "1459"
},
{
"id": "declaration/10/statement/3/decision/exit",
"outcome": "exit",
"line": 63,
"state": "covered",
"hits": "408"
},
{
"id": "declaration/10/statement/3/body/statement/1/value/arm/0",
"outcome": "ImportDeclaration",
"line": 66,
"state": "covered",
"hits": "177"
},
{
"id": "declaration/10/statement/3/body/statement/1/value/arm/1",
"outcome": "TypeDeclaration",
"line": 67,
"state": "covered",
"hits": "16"
},
{
"id": "declaration/10/statement/3/body/statement/1/value/arm/2",
"outcome": "RecordDeclaration",
"line": 68,
"state": "covered",
"hits": "170"
},
{
"id": "declaration/10/statement/3/body/statement/1/value/arm/3",
"outcome": "EnumDeclaration",
"line": 69,
"state": "covered",
"hits": "108"
},
{
"id": "declaration/10/statement/3/body/statement/1/value/arm/3/body/block/statement/1/decision/body",
"outcome": "body",
"line": 71,
"state": "covered",
"hits": "288"
},
{
"id": "declaration/10/statement/3/body/statement/1/value/arm/3/body/block/statement/1/decision/exit",
"outcome": "exit",
"line": 71,
"state": "covered",
"hits": "108"
},
{
"id": "declaration/10/statement/3/body/statement/1/value/arm/4",
"outcome": "FunctionDeclaration",
"line": 75,
"state": "covered",
"hits": "988"
},
{
"id": "declaration/11/tail/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1515"
},
{
"id": "declaration/11/tail/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "100"
},
{
"id": "declaration/11/tail/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1519"
},
{
"id": "declaration/11/tail/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "96"
},
{
"id": "declaration/11/tail/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1556"
},
{
"id": "declaration/11/tail/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "59"
},
{
"id": "declaration/11/tail/left/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1593"
},
{
"id": "declaration/11/tail/left/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "22"
},
{
"id": "declaration/11/tail/left/left/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1593"
},
{
"id": "declaration/11/tail/left/left/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "22"
},
{
"id": "declaration/11/tail/left/left/left/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1593"
},
{
"id": "declaration/11/tail/left/left/left/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "22"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1593"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "22"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1593"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "22"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1593"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "22"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1594"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "21"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1596"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1596"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1596"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1596"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1596"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1596"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1596"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1596"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1596"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1596"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1596"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1596"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1596"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "19"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 85,
"state": "covered",
"hits": "1597"
},
{
"id": "declaration/11/tail/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/left/decision/skip-right",
"outcome": "skip-right",
"line": 85,
"state": "covered",
"hits": "18"
},
{
"id": "declaration/12/tail/arm/0",
"outcome": "NoImportBinding",
"line": 95,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/12/tail/arm/1",
"outcome": "NamespaceImportBinding",
"line": 96,
"state": "covered",
"hits": "1114"
},
{
"id": "declaration/12/tail/arm/2",
"outcome": "SelectiveImportBinding",
"line": 97,
"state": "covered",
"hits": "235"
},
{
"id": "declaration/13/statement/2/decision/body",
"outcome": "body",
"line": 104,
"state": "covered",
"hits": "1640"
},
{
"id": "declaration/13/statement/2/decision/exit",
"outcome": "exit",
"line": 104,
"state": "covered",
"hits": "521"
},
{
"id": "declaration/13/statement/2/body/statement/1/value/decision/true",
"outcome": "true",
"line": 106,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/13/statement/2/body/statement/1/value/decision/false",
"outcome": "false",
"line": 106,
"state": "covered",
"hits": "1640"
},
{
"id": "declaration/13/statement/3/decision/body",
"outcome": "body",
"line": 111,
"state": "covered",
"hits": "651"
},
{
"id": "declaration/13/statement/3/decision/exit",
"outcome": "exit",
"line": 111,
"state": "covered",
"hits": "521"
},
{
"id": "declaration/13/statement/3/body/statement/0/decision/body",
"outcome": "body",
"line": 112,
"state": "covered",
"hits": "884"
},
{
"id": "declaration/13/statement/3/body/statement/0/decision/exit",
"outcome": "exit",
"line": 112,
"state": "covered",
"hits": "651"
},
{
"id": "declaration/13/statement/3/body/statement/0/body/statement/1/value/decision/true",
"outcome": "true",
"line": 114,
"state": "covered",
"hits": "2"
},
{
"id": "declaration/13/statement/3/body/statement/0/body/statement/1/value/decision/false",
"outcome": "false",
"line": 114,
"state": "covered",
"hits": "882"
},
{
"id": "declaration/13/statement/3/body/statement/0/body/statement/1/value/false/tail/decision/true",
"outcome": "true",
"line": 117,
"state": "covered",
"hits": "1"
},
{
"id": "declaration/13/statement/3/body/statement/0/body/statement/1/value/false/tail/decision/false",
"outcome": "false",
"line": 117,
"state": "covered",
"hits": "881"
},
{
"id": "declaration/14/statement/2/decision/body",
"outcome": "body",
"line": 132,
"state": "covered",
"hits": "30"
},
{
"id": "declaration/14/statement/2/decision/exit",
"outcome": "exit",
"line": 132,
"state": "covered",
"hits": "5"
},
{
"id": "declaration/14/statement/2/body/statement/1/value/arm/0",
"outcome": "ModuleVariant",
"line": 135,
"state": "covered",
"hits": "10"
},
{
"id": "declaration/14/statement/2/body/statement/1/value/arm/1",
"outcome": "ModuleFunction",
"line": 136,
"state": "covered",
"hits": "10"
},
{
"id": "declaration/14/statement/2/body/statement/1/value/arm/2",
"outcome": "ModuleGuardedType",
"line": 137,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/14/statement/2/body/statement/1/value/arm/3",
"outcome": "ModuleRecord",
"line": 138,
"state": "covered",
"hits": "5"
},
{
"id": "declaration/14/statement/2/body/statement/1/value/arm/4",
"outcome": "ModuleEnum",
"line": 139,
"state": "covered",
"hits": "5"
},
{
"id": "declaration/14/statement/2/body/tail/decision/true",
"outcome": "true",
"line": 141,
"state": "covered",
"hits": "4"
},
{
"id": "declaration/14/statement/2/body/tail/decision/false",
"outcome": "false",
"line": 141,
"state": "covered",
"hits": "26"
},
{
"id": "declaration/14/tail/decision/true",
"outcome": "true",
"line": 143,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/14/tail/decision/false",
"outcome": "false",
"line": 143,
"state": "covered",
"hits": "5"
},
{
"id": "declaration/14/tail/false/tail/arm/0",
"outcome": "None",
"line": 145,
"state": "covered",
"hits": "1"
},
{
"id": "declaration/14/tail/false/tail/arm/1",
"outcome": "Some",
"line": 146,
"state": "covered",
"hits": "4"
},
{
"id": "declaration/14/tail/false/tail/arm/1/body/block/tail/decision/true",
"outcome": "true",
"line": 147,
"state": "covered",
"hits": "3"
},
{
"id": "declaration/14/tail/false/tail/arm/1/body/block/tail/decision/false",
"outcome": "false",
"line": 147,
"state": "covered",
"hits": "1"
},
{
"id": "declaration/15/statement/2/decision/body",
"outcome": "body",
"line": 159,
"state": "covered",
"hits": "5426"
},
{
"id": "declaration/15/statement/2/decision/exit",
"outcome": "exit",
"line": 159,
"state": "covered",
"hits": "96"
},
{
"id": "declaration/15/statement/2/condition/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 159,
"state": "covered",
"hits": "5429"
},
{
"id": "declaration/15/statement/2/condition/decision/skip-right",
"outcome": "skip-right",
"line": 159,
"state": "covered",
"hits": "93"
},
{
"id": "declaration/15/statement/2/condition/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 159,
"state": "covered",
"hits": "5522"
},
{
"id": "declaration/15/statement/2/condition/left/decision/skip-right",
"outcome": "skip-right",
"line": 159,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/15/statement/2/body/statement/0/value/decision/true",
"outcome": "true",
"line": 160,
"state": "covered",
"hits": "690"
},
{
"id": "declaration/15/statement/2/body/statement/0/value/decision/false",
"outcome": "false",
"line": 160,
"state": "covered",
"hits": "4736"
},
{
"id": "declaration/15/tail/decision/true",
"outcome": "true",
"line": 163,
"state": "covered",
"hits": "91"
},
{
"id": "declaration/15/tail/decision/false",
"outcome": "false",
"line": 163,
"state": "covered",
"hits": "5"
},
{
"id": "declaration/15/tail/condition/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 163,
"state": "covered",
"hits": "93"
},
{
"id": "declaration/15/tail/condition/decision/skip-right",
"outcome": "skip-right",
"line": 163,
"state": "covered",
"hits": "3"
},
{
"id": "declaration/15/tail/condition/left/decision/evaluate-right",
"outcome": "evaluate-right",
"line": 163,
"state": "covered",
"hits": "93"
},
{
"id": "declaration/15/tail/condition/left/decision/skip-right",
"outcome": "skip-right",
"line": 163,
"state": "covered",
"hits": "3"
},
{
"id": "declaration/15/tail/false/statement/2/decision/body",
"outcome": "body",
"line": 168,
"state": "covered",
"hits": "24"
},
{
"id": "declaration/15/tail/false/statement/2/decision/exit",
"outcome": "exit",
"line": 168,
"state": "covered",
"hits": "5"
},
{
"id": "declaration/15/tail/false/statement/2/body/statement/0/value/decision/true",
"outcome": "true",
"line": 169,
"state": "zero",
"hits": "0"
},
{
"id": "declaration/15/tail/false/statement/2/body/statement/0/value/decision/false",
"outcome": "false",
"line": 169,
"state": "covered",
"hits": "24"
},
{
"id": "declaration/15/tail/false/statement/3/value/decision/true",
"outcome": "true",
"line": 172,
"state": "covered",
"hits": "3"
},
{
"id": "declaration/15/tail/false/statement/3/value/decision/false",
"outcome": "false",
"line": 172,
"state": "covered",
"hits": "2"
},
{
"id": "declaration/16/tail/decision/true",
"outcome": "true",
"line": 178,
"state": "covered",
"hits": "42"
},
{
"id": "declaration/16/tail/decision/false",
"outcome": "false",
"line": 178,
"state": "covered",
"hits": "52"
},
{
"id": "declaration/17/statement/1/decision/body",
"outcome": "body",
"line": 185,
"state": "covered",
"hits": "93"
},
{
"id": "declaration/17/statement/1/decision/exit",
"outcome": "exit",
"line": 185,
"state": "covered",
"hits": "20"
},
{
"id": "declaration/18/statement/1/decision/body",
"outcome": "body",
"line": 194,
"state": "covered",
"hits": "93"
},
{
"id": "declaration/18/statement/1/decision/exit",
"outcome": "exit",
"line": 194,
"state": "covered",
"hits": "20"
},
{
"id": "declaration/18/statement/1/body/statement/0/decision/body",
"outcome": "body",
"line": 195,
"state": "covered",
"hits": "908"
},
{
"id": "declaration/18/statement/1/body/statement/0/decision/exit",
"outcome": "exit",
"line": 195,
"state": "covered",
"hits": "93"
}
]Reviewed declaration exclusions
[
{
"id": "declaration/0",
"reason": "import",
"line": 1
},
{
"id": "declaration/1",
"reason": "enum-declaration",
"line": 5
},
{
"id": "declaration/2",
"reason": "record-declaration",
"line": 10
},
{
"id": "declaration/3",
"reason": "record-declaration",
"line": 15
},
{
"id": "declaration/4",
"reason": "enum-declaration",
"line": 20
},
{
"id": "declaration/5",
"reason": "record-declaration",
"line": 28
},
{
"id": "declaration/6",
"reason": "record-declaration",
"line": 35
},
{
"id": "declaration/7",
"reason": "record-declaration",
"line": 42
},
{
"id": "declaration/8",
"reason": "record-declaration",
"line": 48
}
]