Datasets:
File size: 32,420 Bytes
892a0e9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 | {
"@context": {
"@language": "en",
"@vocab": "https://schema.org/",
"citeAs": "cr:citeAs",
"column": "cr:column",
"conformsTo": "dct:conformsTo",
"cr": "http://mlcommons.org/croissant/",
"rai": "http://mlcommons.org/croissant/RAI/",
"data": {
"@id": "cr:data",
"@type": "@json"
},
"dataType": {
"@id": "cr:dataType",
"@type": "@vocab"
},
"dct": "http://purl.org/dc/terms/",
"equivalentProperty": "cr:equivalentProperty",
"examples": {
"@id": "cr:examples",
"@type": "@json"
},
"extract": "cr:extract",
"field": "cr:field",
"fileProperty": "cr:fileProperty",
"fileObject": "cr:fileObject",
"fileSet": "cr:fileSet",
"format": "cr:format",
"includes": "cr:includes",
"isLiveDataset": "cr:isLiveDataset",
"jsonPath": "cr:jsonPath",
"key": "cr:key",
"md5": "cr:md5",
"parentField": "cr:parentField",
"path": "cr:path",
"recordSet": "cr:recordSet",
"references": "cr:references",
"regex": "cr:regex",
"repeated": "cr:repeated",
"replace": "cr:replace",
"samplingRate": "cr:samplingRate",
"sc": "https://schema.org/",
"separator": "cr:separator",
"source": "cr:source",
"subField": "cr:subField",
"transform": "cr:transform"
},
"@type": "sc:Dataset",
"conformsTo": "http://mlcommons.org/croissant/1.0",
"name": "MathlibGraph",
"description": "MathlibGraph is the multinetwork of Lean 4's Mathlib (commit 534cf0b, 2026-02-02; lean4 v4.28.0-rc1) released as analysis-ready CSV files. The dataset contains a three-layer dependency graph of formalized mathematics: 308,129 declarations with 8,436,366 dependency edges, 7,564 source modules with 20,881 import edges, and 10,097 depth-2 namespaces with 332,081 weighted edges. Each declaration node carries 20 attributes spanning structural metadata, graph metrics (degree, PageRank, betweenness, Louvain community, DAG layer), proof metadata (tactic usage), and type-system annotations (typeclass instances, coercions, definitional heights). The release also includes raw extractions (full Lean+Std+Mathlib environment, language-mechanism records, tactic-usage profiles) and per-level metric tables. The dataset is intended for network analysis of formal mathematics, premise retrieval, and structural studies of theorem-proving libraries.",
"license": "https://www.apache.org/licenses/LICENSE-2.0",
"url": "https://huggingface.co/datasets/anon-mlib-d3a4/MathlibGraph",
"creator": {
"@type": "sc:Organization",
"name": "Anonymous Authors"
},
"datePublished": "2026-02-02",
"version": "2.0",
"keywords": [
"mathematics",
"lean4",
"mathlib",
"dependency-graph",
"formal-verification",
"network-analysis",
"premise-retrieval"
],
"isLiveDataset": false,
"rai:dataCollection": "Programmatically extracted from the open-source Mathlib repository (https://github.com/leanprover-community/mathlib4) at commit 534cf0b (2026-02-02). Extraction was performed with four complementary open-source tools: lean4export (declaration enumeration from the Lean environment), lean-training-data (premise-level dependency edges), importGraph (module-level import edges), and jixia (per-declaration metadata including tactic usage). A custom extraction script queried Lean's Environment API for language mechanisms (typeclass instances, coercions, structure inheritance, to_additive pairs, definitional heights) across all 499,732 constants in the environment.",
"rai:dataCollectionType": "Automated programmatic extraction from a public open-source software repository. No human subjects, no surveys, and no crowdsourcing were involved.",
"rai:dataCollectionTimeframe": "2026-02-02",
"rai:dataCollectionRawData": "Raw extractions are released alongside the analysis-ready files: nodes.csv and edges.csv contain the full Lean+Std+Mathlib environment (633,364 nodes, 10,889,011 edges), mechanisms.ndjson contains language-mechanism records, and tactic_usage.ndjson contains per-declaration tactic profiles.",
"rai:dataCollectionMissingData": "30,944 Lean core declarations have no module attribution (file_module is null). Several derived metrics have partial coverage: file_module is populated for 278K of 308K declarations, is_tactic_proof and tactic_count for 78,315 tactic proofs, and def_height for 42,935 declarations. The 4,755 constructor self-loops are filtered before metric computation.",
"rai:dataPreprocessingProtocol": "(1) Deduplication by declaration name reduces 317,655 raw rows to 308,129 unique declarations, removing 9,526 @[to_additive] mirrors. (2) 4,755 constructor self-loops are filtered. (3) PageRank computed with alpha=0.85, max_iter=100, tol=1e-6. (4) Betweenness centrality computed with k=500 (declaration), k=300 (namespace), exact (module); seed=42. (5) Louvain communities computed with resolution=1.0, random_state=42, on the undirected projection. (6) DAG layers computed via Kahn's algorithm; nodes in cycles assigned layer=-1; the namespace graph is condensed via SCC before layering. (7) The depth-2 namespace projection aggregates declaration edges by their first two dotted-name components and weights edges by underlying declaration-edge count.",
"rai:dataAnnotationProtocol": "No human annotation. All node and edge attributes are derived deterministically from the Lean kernel via the extraction tools listed under rai:dataCollection. Attribute provenance is documented in the dataset README.",
"rai:dataAnnotationPlatform": "Not applicable — no annotation platform was used.",
"rai:dataAnnotationAnalysis": "Not applicable — no human annotators were involved.",
"rai:annotationsPerItem": "Not applicable — no human annotation.",
"rai:annotatorDemographics": "Not applicable — no human annotators were involved.",
"rai:machineAnnotationTools": "lean4export (https://github.com/leanprover/lean4export), lean-training-data (https://github.com/semorrison/lean-training-data), importGraph (https://github.com/leanprover-community/mathlib4 importGraph utility), jixia (https://github.com/frenzymath/jixia), and a custom Python extraction script that queries Lean's Environment API.",
"rai:dataReleaseMaintenancePlan": "The dataset is a fixed snapshot pinned to Mathlib commit 534cf0b. Periodic refreshes aligned with Mathlib's stable releases are planned but not on a fixed schedule. The extraction pipeline is released so users can reproduce or refresh the snapshot for any later commit. Issues, schema changes, and version bumps will be tracked through the dataset's HuggingFace repository.",
"rai:personalSensitiveInformation": "None. The dataset contains only formal mathematical declarations, dependency relationships, and derived structural metrics extracted from a public open-source library. It contains no personal data, no identifying information about any individual, and no human-subject data.",
"rai:dataBiases": "The dataset reflects the structural and topical biases of the Mathlib library at the snapshot date: (1) areas of mathematics that are more thoroughly formalized (e.g., algebra, topology, analysis) are over-represented relative to less formalized areas; (2) declarations follow Lean 4 stylistic conventions and naming practices set by the Mathlib community; (3) the prevalence of tactic-driven proofs (78,315 of 308,129 declarations) reflects current Mathlib practice and may not generalize to other formal libraries (Coq, Isabelle, Agda); (4) cross-namespace coupling and import patterns reflect the social and architectural decisions of Mathlib maintainers and may not be representative of formal-mathematics libraries in general.",
"rai:dataLimitations": "(1) Single-snapshot dataset: the graph corresponds to one Mathlib commit and does not include temporal/version history. (2) Coverage gaps: file_module attribution is missing for 30,944 Lean core declarations; def_height is computed only for 42,935 declarations. (3) The depth-2 namespace projection is one of several reasonable aggregations; results at depths 1, 3, or full namespace would differ. (4) Centrality computations on declaration-level betweenness use sampling (k=500) rather than exact computation due to graph size. (5) Synthesized vs explicit edge decompositions rely on the lean-training-data convention and may not exactly match alternative extraction pipelines.",
"rai:dataUseCases": "Intended uses: (a) network analysis of formal mathematics libraries; (b) premise retrieval for automated theorem proving; (c) studies of how human-designed taxonomies (namespaces, modules) relate to logical dependency structure; (d) benchmarking centrality, community detection, and graph-learning methods on a large, real-world directed graph; (e) auditing Mathlib structure (over-imports, cross-namespace coupling, redundancy) for library-engineering research.",
"rai:dataSocialImpact": "The dataset enables quantitative study of formalized mathematics and supports research on automated theorem proving, which has potential to accelerate verified software, formal verification of safety-critical systems, and machine-checked mathematical research. The dataset is derived from a permissively licensed open-source library and adds no personally identifying information. We are not aware of foreseeable harms from release.",
"rai:hasSyntheticData": false,
"citeAs": "Anonymous Authors. The Multinetwork of Mathlib: Structure, Data, and Analysis. Submitted to NeurIPS 2026 Track on Evaluations and Datasets, 2026.",
"distribution": [
{
"@type": "cr:FileObject",
"@id": "mathlib_edges.csv",
"name": "mathlib_edges.csv",
"description": "Declaration-level dependency edges over the deduplicated Mathlib graph (8,436,366 edges).",
"contentUrl": "https://huggingface.co/datasets/anon-mlib-d3a4/MathlibGraph/resolve/main/mathlib_edges.csv",
"encodingFormat": "text/csv",
"sha256": "5e1426b2304a97924cca1e48fa22d76620e1cb7bbb496a1bd9dd742cc6906922",
"contentSize": "584463744 B"
},
{
"@type": "cr:FileObject",
"@id": "mathlib_nodes.csv",
"name": "mathlib_nodes.csv",
"description": "Mathlib declaration nodes prior to deduplication (317,655 rows).",
"contentUrl": "https://huggingface.co/datasets/anon-mlib-d3a4/MathlibGraph/resolve/main/mathlib_nodes.csv",
"encodingFormat": "text/csv",
"sha256": "b222647e7f5871ae20603c2ef87ec0da58143f097e03babdd584c654061725cb",
"contentSize": "17813672 B"
},
{
"@type": "cr:FileObject",
"@id": "edges.csv",
"name": "edges.csv",
"description": "Full-environment dependency edges (Lean + Std + Mathlib, 10,889,011 edges).",
"contentUrl": "https://huggingface.co/datasets/anon-mlib-d3a4/MathlibGraph/resolve/main/edges.csv",
"encodingFormat": "text/csv",
"sha256": "78b20d6311388159bdab03ddfb68d5ef5687ced629ee04a99d9880bcd043a08f",
"contentSize": "753711915 B"
},
{
"@type": "cr:FileObject",
"@id": "nodes.csv",
"name": "nodes.csv",
"description": "Full-environment declaration nodes (Lean + Std + Mathlib, 633,364 rows).",
"contentUrl": "https://huggingface.co/datasets/anon-mlib-d3a4/MathlibGraph/resolve/main/nodes.csv",
"encodingFormat": "text/csv",
"sha256": "cf2578bb394a14efb77bb5ce31e3313e5f24498a86139aa35be1f2c8c5a685b2",
"contentSize": "51121872 B"
},
{
"@type": "cr:FileObject",
"@id": "mechanisms.ndjson",
"name": "mechanisms.ndjson",
"description": "Lean language-mechanism extractions (typeclass instances, coercions, structure inheritance, to_additive pairs, definitional heights).",
"contentUrl": "https://huggingface.co/datasets/anon-mlib-d3a4/MathlibGraph/resolve/main/mechanisms.ndjson",
"encodingFormat": "application/x-ndjson",
"sha256": "c8d0905876f58af256e2f56bc6ac3c8f90f6a6e5d4c0a4b7f921e3e113e123f9",
"contentSize": "86007387 B"
},
{
"@type": "cr:FileObject",
"@id": "tactic_usage.ndjson",
"name": "tactic_usage.ndjson",
"description": "Per-declaration tactic-usage profiles for 78,315 tactic-driven proofs.",
"contentUrl": "https://huggingface.co/datasets/anon-mlib-d3a4/MathlibGraph/resolve/main/tactic_usage.ndjson",
"encodingFormat": "application/x-ndjson",
"sha256": "3927807af5920b626b687565f415233219df017b5b1555a074a073809bff4f84",
"contentSize": "45050618 B"
},
{
"@type": "cr:FileObject",
"@id": "v2-decl-nodes",
"name": "v2/declaration/nodes.csv",
"description": "Deduplicated declaration nodes (308,129 rows; name, kind, module).",
"contentUrl": "https://huggingface.co/datasets/anon-mlib-d3a4/MathlibGraph/resolve/main/v2/declaration/nodes.csv",
"encodingFormat": "text/csv",
"sha256": "c0d2ad9ce65b83b1b650455eebea408b9820e9eef2ac8524d2b70a496044247e",
"contentSize": "37905777 B"
},
{
"@type": "cr:FileObject",
"@id": "v2-decl-metrics",
"name": "v2/declaration/metrics.csv",
"description": "Declaration-level node attributes and precomputed network metrics (308,129 rows x 20 columns).",
"contentUrl": "https://huggingface.co/datasets/anon-mlib-d3a4/MathlibGraph/resolve/main/v2/declaration/metrics.csv",
"encodingFormat": "text/csv",
"sha256": "0c88b5044db57d48ba150fbe0a3550d47684739ca9b97dbb141564c5ce7a5658",
"contentSize": "57521366 B"
},
{
"@type": "cr:FileObject",
"@id": "v2-mod-nodes",
"name": "v2/module/nodes.csv",
"description": "Module nodes: dotted module name and declarations defined in the source file (7,564 rows).",
"contentUrl": "https://huggingface.co/datasets/anon-mlib-d3a4/MathlibGraph/resolve/main/v2/module/nodes.csv",
"encodingFormat": "text/csv",
"sha256": "0b75f986818fa25bd0df7a303a205eaa24c4e814fe5c5178aa57575852e15be7",
"contentSize": "323577 B"
},
{
"@type": "cr:FileObject",
"@id": "v2-mod-edges",
"name": "v2/module/edges.csv",
"description": "Module import edges with public/private flag (20,881 rows; 99.1% public imports).",
"contentUrl": "https://huggingface.co/datasets/anon-mlib-d3a4/MathlibGraph/resolve/main/v2/module/edges.csv",
"encodingFormat": "text/csv",
"sha256": "d0a660e41bf06a9d7381d435934c3484a0080b70747a06cb54565f13aa3fee80",
"contentSize": "1680350 B"
},
{
"@type": "cr:FileObject",
"@id": "v2-mod-metrics",
"name": "v2/module/metrics.csv",
"description": "Module-level network metrics including degree, PageRank, betweenness, DAG layer, Louvain community, cohesion, and median import utilization (7,564 rows).",
"contentUrl": "https://huggingface.co/datasets/anon-mlib-d3a4/MathlibGraph/resolve/main/v2/module/metrics.csv",
"encodingFormat": "text/csv",
"sha256": "66175be8cd776e0483bae3ef12ba41ff2e3fe582b1f6a55575e95f32bd741966",
"contentSize": "987528 B"
},
{
"@type": "cr:FileObject",
"@id": "v2-ns-nodes",
"name": "v2/namespace/nodes.csv",
"description": "Depth-2 namespace nodes with cycle annotations (10,097 rows; 6,055 namespaces in 38 SCCs).",
"contentUrl": "https://huggingface.co/datasets/anon-mlib-d3a4/MathlibGraph/resolve/main/v2/namespace/nodes.csv",
"encodingFormat": "text/csv",
"sha256": "cb38403368388c8e1430530979ef01fdd1ad37d84953fda39bcb35a79a45cd83",
"contentSize": "308113 B"
},
{
"@type": "cr:FileObject",
"@id": "v2-ns-edges",
"name": "v2/namespace/edges.csv",
"description": "Depth-2 namespace edges weighted by underlying declaration-edge count (332,081 rows).",
"contentUrl": "https://huggingface.co/datasets/anon-mlib-d3a4/MathlibGraph/resolve/main/v2/namespace/edges.csv",
"encodingFormat": "text/csv",
"sha256": "83bfba3f35e645002b03877bd82cf0013b9ee79d858c9a7b6fbe6281981fbc92",
"contentSize": "10799848 B"
},
{
"@type": "cr:FileObject",
"@id": "v2-ns-metrics",
"name": "v2/namespace/metrics.csv",
"description": "Depth-2 namespace network metrics including weighted PageRank, weighted betweenness, Louvain community, cross-namespace ratio, and SCC membership (10,097 rows).",
"contentUrl": "https://huggingface.co/datasets/anon-mlib-d3a4/MathlibGraph/resolve/main/v2/namespace/metrics.csv",
"encodingFormat": "text/csv",
"sha256": "edc9d78a0049af7196fc4a91909cf770c8d7134431b970949fe75a741b36350e",
"contentSize": "844078 B"
}
],
"recordSet": [
{
"@type": "cr:RecordSet",
"@id": "declaration-edges",
"name": "declaration-edges",
"description": "Declaration-to-declaration dependency edges over the deduplicated Mathlib graph.",
"field": [
{
"@type": "cr:Field",
"@id": "declaration-edges/source",
"name": "source",
"description": "Fully qualified name of the depending declaration.",
"dataType": "sc:Text",
"source": {
"fileObject": {"@id": "mathlib_edges.csv"},
"extract": {"column": "source"}
}
},
{
"@type": "cr:Field",
"@id": "declaration-edges/target",
"name": "target",
"description": "Fully qualified name of the depended-upon declaration.",
"dataType": "sc:Text",
"source": {
"fileObject": {"@id": "mathlib_edges.csv"},
"extract": {"column": "target"}
}
}
]
},
{
"@type": "cr:RecordSet",
"@id": "declaration-nodes",
"name": "declaration-nodes",
"description": "Deduplicated declaration nodes from v2/declaration/nodes.csv.",
"field": [
{
"@type": "cr:Field",
"@id": "declaration-nodes/name",
"name": "name",
"description": "Fully qualified declaration name.",
"dataType": "sc:Text",
"source": {
"fileObject": {"@id": "v2-decl-nodes"},
"extract": {"column": "name"}
}
},
{
"@type": "cr:Field",
"@id": "declaration-nodes/kind",
"name": "kind",
"description": "Declaration kind: theorem, definition, abbrev, inductive, constructor, opaque, axiom, or quotient.",
"dataType": "sc:Text",
"source": {
"fileObject": {"@id": "v2-decl-nodes"},
"extract": {"column": "kind"}
}
},
{
"@type": "cr:Field",
"@id": "declaration-nodes/module",
"name": "module",
"description": "Parent namespace; null for 30,944 Lean core declarations.",
"dataType": "sc:Text",
"source": {
"fileObject": {"@id": "v2-decl-nodes"},
"extract": {"column": "module"}
}
}
]
},
{
"@type": "cr:RecordSet",
"@id": "declaration-metrics",
"name": "declaration-metrics",
"description": "Per-declaration structural metadata, network metrics, proof metadata, and type-system annotations.",
"field": [
{"@type": "cr:Field", "@id": "declaration-metrics/name", "name": "name", "dataType": "sc:Text", "source": {"fileObject": {"@id": "v2-decl-metrics"}, "extract": {"column": "name"}}},
{"@type": "cr:Field", "@id": "declaration-metrics/kind", "name": "kind", "dataType": "sc:Text", "source": {"fileObject": {"@id": "v2-decl-metrics"}, "extract": {"column": "kind"}}},
{"@type": "cr:Field", "@id": "declaration-metrics/module", "name": "module", "dataType": "sc:Text", "source": {"fileObject": {"@id": "v2-decl-metrics"}, "extract": {"column": "module"}}},
{"@type": "cr:Field", "@id": "declaration-metrics/namespace_depth2", "name": "namespace_depth2", "description": "First two dot-separated components of the declaration name.", "dataType": "sc:Text", "source": {"fileObject": {"@id": "v2-decl-metrics"}, "extract": {"column": "namespace_depth2"}}},
{"@type": "cr:Field", "@id": "declaration-metrics/namespace_depth3", "name": "namespace_depth3", "dataType": "sc:Text", "source": {"fileObject": {"@id": "v2-decl-metrics"}, "extract": {"column": "namespace_depth3"}}},
{"@type": "cr:Field", "@id": "declaration-metrics/in_degree", "name": "in_degree", "description": "Number of declarations that depend on this one.", "dataType": "sc:Integer", "source": {"fileObject": {"@id": "v2-decl-metrics"}, "extract": {"column": "in_degree"}}},
{"@type": "cr:Field", "@id": "declaration-metrics/out_degree", "name": "out_degree", "dataType": "sc:Integer", "source": {"fileObject": {"@id": "v2-decl-metrics"}, "extract": {"column": "out_degree"}}},
{"@type": "cr:Field", "@id": "declaration-metrics/pagerank", "name": "pagerank", "description": "PageRank with alpha=0.85.", "dataType": "sc:Float", "source": {"fileObject": {"@id": "v2-decl-metrics"}, "extract": {"column": "pagerank"}}},
{"@type": "cr:Field", "@id": "declaration-metrics/betweenness", "name": "betweenness", "description": "Betweenness centrality (k=500 sampling, seed=42).", "dataType": "sc:Float", "source": {"fileObject": {"@id": "v2-decl-metrics"}, "extract": {"column": "betweenness"}}},
{"@type": "cr:Field", "@id": "declaration-metrics/community_id", "name": "community_id", "description": "Louvain community on undirected projection.", "dataType": "sc:Integer", "source": {"fileObject": {"@id": "v2-decl-metrics"}, "extract": {"column": "community_id"}}},
{"@type": "cr:Field", "@id": "declaration-metrics/dag_layer", "name": "dag_layer", "description": "Topological depth; -1 for 5,732 nodes in cycles.", "dataType": "sc:Integer", "source": {"fileObject": {"@id": "v2-decl-metrics"}, "extract": {"column": "dag_layer"}}},
{"@type": "cr:Field", "@id": "declaration-metrics/file_module", "name": "file_module", "dataType": "sc:Text", "source": {"fileObject": {"@id": "v2-decl-metrics"}, "extract": {"column": "file_module"}}},
{"@type": "cr:Field", "@id": "declaration-metrics/is_tactic_proof", "name": "is_tactic_proof", "dataType": "sc:Boolean", "source": {"fileObject": {"@id": "v2-decl-metrics"}, "extract": {"column": "is_tactic_proof"}}},
{"@type": "cr:Field", "@id": "declaration-metrics/tactic_count", "name": "tactic_count", "dataType": "sc:Integer", "source": {"fileObject": {"@id": "v2-decl-metrics"}, "extract": {"column": "tactic_count"}}},
{"@type": "cr:Field", "@id": "declaration-metrics/top_tactic", "name": "top_tactic", "dataType": "sc:Text", "source": {"fileObject": {"@id": "v2-decl-metrics"}, "extract": {"column": "top_tactic"}}},
{"@type": "cr:Field", "@id": "declaration-metrics/is_instance", "name": "is_instance", "dataType": "sc:Boolean", "source": {"fileObject": {"@id": "v2-decl-metrics"}, "extract": {"column": "is_instance"}}},
{"@type": "cr:Field", "@id": "declaration-metrics/instance_class", "name": "instance_class", "dataType": "sc:Text", "source": {"fileObject": {"@id": "v2-decl-metrics"}, "extract": {"column": "instance_class"}}},
{"@type": "cr:Field", "@id": "declaration-metrics/is_coercion", "name": "is_coercion", "dataType": "sc:Boolean", "source": {"fileObject": {"@id": "v2-decl-metrics"}, "extract": {"column": "is_coercion"}}},
{"@type": "cr:Field", "@id": "declaration-metrics/to_additive_pair", "name": "to_additive_pair", "dataType": "sc:Text", "source": {"fileObject": {"@id": "v2-decl-metrics"}, "extract": {"column": "to_additive_pair"}}},
{"@type": "cr:Field", "@id": "declaration-metrics/def_height", "name": "def_height", "dataType": "sc:Float", "source": {"fileObject": {"@id": "v2-decl-metrics"}, "extract": {"column": "def_height"}}}
]
},
{
"@type": "cr:RecordSet",
"@id": "module-nodes",
"name": "module-nodes",
"description": "Source-file (module) nodes with declaration counts.",
"field": [
{"@type": "cr:Field", "@id": "module-nodes/module", "name": "module", "dataType": "sc:Text", "source": {"fileObject": {"@id": "v2-mod-nodes"}, "extract": {"column": "module"}}},
{"@type": "cr:Field", "@id": "module-nodes/decl_count", "name": "decl_count", "dataType": "sc:Integer", "source": {"fileObject": {"@id": "v2-mod-nodes"}, "extract": {"column": "decl_count"}}}
]
},
{
"@type": "cr:RecordSet",
"@id": "module-edges",
"name": "module-edges",
"description": "Module-to-module import edges with public/private flag.",
"field": [
{"@type": "cr:Field", "@id": "module-edges/source", "name": "source", "dataType": "sc:Text", "source": {"fileObject": {"@id": "v2-mod-edges"}, "extract": {"column": "source"}}},
{"@type": "cr:Field", "@id": "module-edges/target", "name": "target", "dataType": "sc:Text", "source": {"fileObject": {"@id": "v2-mod-edges"}, "extract": {"column": "target"}}},
{"@type": "cr:Field", "@id": "module-edges/is_exported", "name": "is_exported", "description": "Whether the import is public; 20,699 of 20,881 are public.", "dataType": "sc:Boolean", "source": {"fileObject": {"@id": "v2-mod-edges"}, "extract": {"column": "is_exported"}}}
]
},
{
"@type": "cr:RecordSet",
"@id": "module-metrics",
"name": "module-metrics",
"description": "Module-level network metrics.",
"field": [
{"@type": "cr:Field", "@id": "module-metrics/module", "name": "module", "dataType": "sc:Text", "source": {"fileObject": {"@id": "v2-mod-metrics"}, "extract": {"column": "module"}}},
{"@type": "cr:Field", "@id": "module-metrics/decl_count", "name": "decl_count", "dataType": "sc:Integer", "source": {"fileObject": {"@id": "v2-mod-metrics"}, "extract": {"column": "decl_count"}}},
{"@type": "cr:Field", "@id": "module-metrics/in_degree", "name": "in_degree", "dataType": "sc:Integer", "source": {"fileObject": {"@id": "v2-mod-metrics"}, "extract": {"column": "in_degree"}}},
{"@type": "cr:Field", "@id": "module-metrics/out_degree", "name": "out_degree", "dataType": "sc:Integer", "source": {"fileObject": {"@id": "v2-mod-metrics"}, "extract": {"column": "out_degree"}}},
{"@type": "cr:Field", "@id": "module-metrics/pagerank", "name": "pagerank", "dataType": "sc:Float", "source": {"fileObject": {"@id": "v2-mod-metrics"}, "extract": {"column": "pagerank"}}},
{"@type": "cr:Field", "@id": "module-metrics/betweenness", "name": "betweenness", "description": "Exact betweenness centrality on the module graph.", "dataType": "sc:Float", "source": {"fileObject": {"@id": "v2-mod-metrics"}, "extract": {"column": "betweenness"}}},
{"@type": "cr:Field", "@id": "module-metrics/dag_layer", "name": "dag_layer", "dataType": "sc:Integer", "source": {"fileObject": {"@id": "v2-mod-metrics"}, "extract": {"column": "dag_layer"}}},
{"@type": "cr:Field", "@id": "module-metrics/community_id", "name": "community_id", "dataType": "sc:Integer", "source": {"fileObject": {"@id": "v2-mod-metrics"}, "extract": {"column": "community_id"}}},
{"@type": "cr:Field", "@id": "module-metrics/cohesion", "name": "cohesion", "description": "Fraction of declaration edges contained within the module.", "dataType": "sc:Float", "source": {"fileObject": {"@id": "v2-mod-metrics"}, "extract": {"column": "cohesion"}}},
{"@type": "cr:Field", "@id": "module-metrics/import_utilization_median", "name": "import_utilization_median", "description": "Median fraction of imported declarations actually used.", "dataType": "sc:Float", "source": {"fileObject": {"@id": "v2-mod-metrics"}, "extract": {"column": "import_utilization_median"}}}
]
},
{
"@type": "cr:RecordSet",
"@id": "namespace-nodes",
"name": "namespace-nodes",
"description": "Depth-2 namespace nodes with strongly connected component annotations.",
"field": [
{"@type": "cr:Field", "@id": "namespace-nodes/namespace", "name": "namespace", "dataType": "sc:Text", "source": {"fileObject": {"@id": "v2-ns-nodes"}, "extract": {"column": "namespace"}}},
{"@type": "cr:Field", "@id": "namespace-nodes/decl_count", "name": "decl_count", "dataType": "sc:Integer", "source": {"fileObject": {"@id": "v2-ns-nodes"}, "extract": {"column": "decl_count"}}},
{"@type": "cr:Field", "@id": "namespace-nodes/in_cycle", "name": "in_cycle", "description": "True if this namespace participates in an SCC.", "dataType": "sc:Boolean", "source": {"fileObject": {"@id": "v2-ns-nodes"}, "extract": {"column": "in_cycle"}}},
{"@type": "cr:Field", "@id": "namespace-nodes/scc_id", "name": "scc_id", "description": "SCC identifier; -1 if acyclic.", "dataType": "sc:Integer", "source": {"fileObject": {"@id": "v2-ns-nodes"}, "extract": {"column": "scc_id"}}}
]
},
{
"@type": "cr:RecordSet",
"@id": "namespace-edges",
"name": "namespace-edges",
"description": "Depth-2 namespace-to-namespace edges weighted by declaration-edge count.",
"field": [
{"@type": "cr:Field", "@id": "namespace-edges/source", "name": "source", "dataType": "sc:Text", "source": {"fileObject": {"@id": "v2-ns-edges"}, "extract": {"column": "source"}}},
{"@type": "cr:Field", "@id": "namespace-edges/target", "name": "target", "dataType": "sc:Text", "source": {"fileObject": {"@id": "v2-ns-edges"}, "extract": {"column": "target"}}},
{"@type": "cr:Field", "@id": "namespace-edges/weight", "name": "weight", "dataType": "sc:Integer", "source": {"fileObject": {"@id": "v2-ns-edges"}, "extract": {"column": "weight"}}}
]
},
{
"@type": "cr:RecordSet",
"@id": "namespace-metrics",
"name": "namespace-metrics",
"description": "Depth-2 namespace network metrics with weighted centralities.",
"field": [
{"@type": "cr:Field", "@id": "namespace-metrics/namespace", "name": "namespace", "dataType": "sc:Text", "source": {"fileObject": {"@id": "v2-ns-metrics"}, "extract": {"column": "namespace"}}},
{"@type": "cr:Field", "@id": "namespace-metrics/decl_count", "name": "decl_count", "dataType": "sc:Integer", "source": {"fileObject": {"@id": "v2-ns-metrics"}, "extract": {"column": "decl_count"}}},
{"@type": "cr:Field", "@id": "namespace-metrics/in_degree", "name": "in_degree", "dataType": "sc:Integer", "source": {"fileObject": {"@id": "v2-ns-metrics"}, "extract": {"column": "in_degree"}}},
{"@type": "cr:Field", "@id": "namespace-metrics/out_degree", "name": "out_degree", "dataType": "sc:Integer", "source": {"fileObject": {"@id": "v2-ns-metrics"}, "extract": {"column": "out_degree"}}},
{"@type": "cr:Field", "@id": "namespace-metrics/edge_weight_sum", "name": "edge_weight_sum", "dataType": "sc:Integer", "source": {"fileObject": {"@id": "v2-ns-metrics"}, "extract": {"column": "edge_weight_sum"}}},
{"@type": "cr:Field", "@id": "namespace-metrics/pagerank", "name": "pagerank", "description": "Weighted PageRank with alpha=0.85.", "dataType": "sc:Float", "source": {"fileObject": {"@id": "v2-ns-metrics"}, "extract": {"column": "pagerank"}}},
{"@type": "cr:Field", "@id": "namespace-metrics/betweenness", "name": "betweenness", "description": "Weighted betweenness centrality (k=300 sampling, seed=42).", "dataType": "sc:Float", "source": {"fileObject": {"@id": "v2-ns-metrics"}, "extract": {"column": "betweenness"}}},
{"@type": "cr:Field", "@id": "namespace-metrics/community_id", "name": "community_id", "dataType": "sc:Integer", "source": {"fileObject": {"@id": "v2-ns-metrics"}, "extract": {"column": "community_id"}}},
{"@type": "cr:Field", "@id": "namespace-metrics/cross_ns_ratio", "name": "cross_ns_ratio", "description": "Fraction of declaration edges crossing namespace boundaries.", "dataType": "sc:Float", "source": {"fileObject": {"@id": "v2-ns-metrics"}, "extract": {"column": "cross_ns_ratio"}}},
{"@type": "cr:Field", "@id": "namespace-metrics/in_cycle", "name": "in_cycle", "dataType": "sc:Boolean", "source": {"fileObject": {"@id": "v2-ns-metrics"}, "extract": {"column": "in_cycle"}}},
{"@type": "cr:Field", "@id": "namespace-metrics/scc_id", "name": "scc_id", "dataType": "sc:Integer", "source": {"fileObject": {"@id": "v2-ns-metrics"}, "extract": {"column": "scc_id"}}}
]
}
]
}
|