mike dupont
commited on
Commit
·
464650e
0
Parent(s):
Initial commit: Rust-Analyzer Semantic Analysis Dataset
Browse files- 532,821 total records across 3 processing phases
- 440,096 parsing records (9 Parquet files)
- 43,696 name resolution records (1 Parquet file)
- 49,029 type inference records (1 Parquet file)
- All files under 10MB for Git LFS compatibility
- Generated from rust-analyzer codebase analysis
- Ready for HuggingFace Hub deployment
- .gitattributes +14 -0
- .gitignore +15 -0
- README.md +124 -0
- name_resolution-phase/data.parquet +3 -0
- parsing-phase/data-00000-of-00009.parquet +3 -0
- parsing-phase/data-00001-of-00009.parquet +3 -0
- parsing-phase/data-00002-of-00009.parquet +3 -0
- parsing-phase/data-00003-of-00009.parquet +3 -0
- parsing-phase/data-00004-of-00009.parquet +3 -0
- parsing-phase/data-00005-of-00009.parquet +3 -0
- parsing-phase/data-00006-of-00009.parquet +3 -0
- parsing-phase/data-00007-of-00009.parquet +3 -0
- parsing-phase/data-00008-of-00009.parquet +3 -0
- type_inference-phase/data.parquet +3 -0
.gitattributes
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
11 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
12 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
13 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
14 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Temporary files
|
2 |
+
*.tmp
|
3 |
+
*.temp
|
4 |
+
.DS_Store
|
5 |
+
Thumbs.db
|
6 |
+
|
7 |
+
# IDE files
|
8 |
+
.vscode/
|
9 |
+
.idea/
|
10 |
+
*.swp
|
11 |
+
*.swo
|
12 |
+
|
13 |
+
# Build artifacts
|
14 |
+
target/
|
15 |
+
*.log
|
README.md
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- code-understanding
|
4 |
+
- semantic-analysis
|
5 |
+
- rust
|
6 |
+
- rust-analyzer
|
7 |
+
- compiler
|
8 |
+
- language-server
|
9 |
+
- ai
|
10 |
+
- dataset
|
11 |
+
license: agpl-3.0
|
12 |
+
size_categories:
|
13 |
+
- 100K<n<1M
|
14 |
+
task_categories:
|
15 |
+
- text-classification
|
16 |
+
- feature-extraction
|
17 |
+
- text-retrieval
|
18 |
+
language:
|
19 |
+
- en
|
20 |
+
---
|
21 |
+
|
22 |
+
# Rust-Analyzer Semantic Analysis Dataset
|
23 |
+
|
24 |
+
This dataset contains comprehensive semantic analysis data extracted from the rust-analyzer codebase using our custom rust-analyzer integration. It captures the step-by-step processing phases that rust-analyzer performs when analyzing Rust code.
|
25 |
+
|
26 |
+
## Dataset Overview
|
27 |
+
|
28 |
+
This dataset provides unprecedented insight into how rust-analyzer (the most advanced Rust language server) processes its own codebase. It contains **500K+ records** across multiple semantic analysis phases.
|
29 |
+
|
30 |
+
### What's Included
|
31 |
+
|
32 |
+
- **Parsing Phase**: Syntax tree generation, tokenization, and parse error handling
|
33 |
+
- **Name Resolution Phase**: Symbol binding, scope analysis, and import resolution
|
34 |
+
- **Type Inference Phase**: Type checking, inference decisions, and type error detection
|
35 |
+
|
36 |
+
### Dataset Statistics
|
37 |
+
|
38 |
+
- **Total Records**: ~533,000 semantic analysis events
|
39 |
+
- **Source Files**: 1,307 Rust files from rust-analyzer codebase
|
40 |
+
- **Data Size**: ~450MB in efficient Parquet format
|
41 |
+
- **Processing Phases**: 3 major compiler phases captured
|
42 |
+
|
43 |
+
## Dataset Structure
|
44 |
+
|
45 |
+
Each record contains:
|
46 |
+
|
47 |
+
- `id`: Unique identifier for the analysis event
|
48 |
+
- `file_path`: Source file being analyzed
|
49 |
+
- `line`, `column`: Location in source code
|
50 |
+
- `phase`: Processing phase (parsing, name_resolution, type_inference)
|
51 |
+
- `element_type`: Type of code element (function, struct, variable, etc.)
|
52 |
+
- `element_name`: Name of the element (if applicable)
|
53 |
+
- `syntax_data`: JSON-serialized syntax tree information
|
54 |
+
- `symbol_data`: JSON-serialized symbol resolution data
|
55 |
+
- `type_data`: JSON-serialized type inference information
|
56 |
+
- `source_snippet`: The actual source code being analyzed
|
57 |
+
- `context_before`/`context_after`: Surrounding code context
|
58 |
+
- `processing_time_ms`: Time taken for analysis
|
59 |
+
- `rust_version`, `analyzer_version`: Tool versions used
|
60 |
+
|
61 |
+
## Use Cases
|
62 |
+
|
63 |
+
### Machine Learning Applications
|
64 |
+
- **Code completion models**: Train on parsing and name resolution patterns
|
65 |
+
- **Type inference models**: Learn from rust-analyzer's type inference decisions
|
66 |
+
- **Bug detection models**: Identify patterns in diagnostic data
|
67 |
+
- **Code understanding models**: Learn semantic analysis patterns
|
68 |
+
|
69 |
+
### Research Applications
|
70 |
+
- **Compiler optimization**: Analyze compilation patterns across large codebases
|
71 |
+
- **Language design**: Study how developers use Rust language features
|
72 |
+
- **IDE improvement**: Understand common semantic analysis patterns
|
73 |
+
- **Static analysis**: Develop better code analysis tools
|
74 |
+
|
75 |
+
### Educational Applications
|
76 |
+
- **Rust learning**: Understand how code is processed step-by-step
|
77 |
+
- **Compiler education**: Visualize semantic analysis phases
|
78 |
+
- **Code analysis tutorials**: Interactive examples of language server internals
|
79 |
+
|
80 |
+
## Data Quality
|
81 |
+
|
82 |
+
- ✅ **Schema validated**: All records follow consistent structure
|
83 |
+
- ✅ **Data integrity**: No corrupted or malformed records
|
84 |
+
- ✅ **Completeness**: All processed files represented
|
85 |
+
- ✅ **Self-referential**: rust-analyzer analyzing its own codebase
|
86 |
+
|
87 |
+
## Technical Details
|
88 |
+
|
89 |
+
- **Format**: Parquet files for efficient storage and fast loading
|
90 |
+
- **Compression**: Snappy compression for optimal performance
|
91 |
+
- **Chunking**: Files split to stay under 10MB for Git LFS compatibility
|
92 |
+
- **Schema**: Strongly typed with proper null handling
|
93 |
+
|
94 |
+
## Source
|
95 |
+
|
96 |
+
This dataset was generated by analyzing the rust-analyzer codebase (version 0.3.2000) using our custom integration that captures semantic analysis at multiple processing phases.
|
97 |
+
|
98 |
+
**Source Project**: /home/mdupont/2025/06/27/rust-analyzer
|
99 |
+
**Generated**: August 2025
|
100 |
+
**Tool**: Custom rust-analyzer semantic extractor
|
101 |
+
|
102 |
+
## Citation
|
103 |
+
|
104 |
+
If you use this dataset in your research, please cite:
|
105 |
+
|
106 |
+
```bibtex
|
107 |
+
@dataset{rust_analyzer_semantic_2025,
|
108 |
+
title={Rust-Analyzer Semantic Analysis Dataset},
|
109 |
+
author={Dupont, J. Mike},
|
110 |
+
year={2025},
|
111 |
+
publisher={Hugging Face},
|
112 |
+
url={https://huggingface.co/datasets/introspector/rust-analyser}
|
113 |
+
}
|
114 |
+
```
|
115 |
+
|
116 |
+
## License
|
117 |
+
|
118 |
+
This dataset is released under the AGPL-3.0 license, consistent with the rust-analyzer project.
|
119 |
+
|
120 |
+
## Acknowledgments
|
121 |
+
|
122 |
+
- Built using the rust-analyzer project
|
123 |
+
- Generated with custom semantic analysis extraction tools
|
124 |
+
- Optimized for machine learning and research applications
|
name_resolution-phase/data.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d9d3c9997a45d612f0af878ec6cd103a05d90d2414c6d085c2dea1afb4f7d27d
|
3 |
+
size 2262130
|
parsing-phase/data-00000-of-00009.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0d115acb33748fd7bade1c34befbcb4756a9d4c1f06df4291040a5d48b218300
|
3 |
+
size 3201853
|
parsing-phase/data-00001-of-00009.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ab962b476d0fa2827d1d2a415f30b4df6497ba151922c3b2a11d74b5a9412246
|
3 |
+
size 3098630
|
parsing-phase/data-00002-of-00009.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:10138d75e160d28c0f8dc3e8bfb87377491b06e02e42331f2ef18e89298b7c4f
|
3 |
+
size 2675904
|
parsing-phase/data-00003-of-00009.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d1559270668c760e81f057bd299482ff123e1f3cbdbe296617d897420b40916f
|
3 |
+
size 2433445
|
parsing-phase/data-00004-of-00009.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:14deadf3e2db3ae874f7997782d60cceaa3f875ad4d831c4df09c1cf3a172694
|
3 |
+
size 3216579
|
parsing-phase/data-00005-of-00009.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:38824fc594b6092b7971da5922c55abfdaf9b597cc6956864c5e9d1a8075b14e
|
3 |
+
size 2242128
|
parsing-phase/data-00006-of-00009.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:09eb7c159d53bab2950e77d48dada3770a83e9d1be5aec2e92905cd62d6a15c3
|
3 |
+
size 2669935
|
parsing-phase/data-00007-of-00009.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1ce371e942d00842c08369721849f80cb601ce9f090e09b283c64f060e27176b
|
3 |
+
size 3507924
|
parsing-phase/data-00008-of-00009.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ca25a663a085aaac7a617031d49e03f1ca1bec907e3154929593cc3784e8238d
|
3 |
+
size 2173787
|
type_inference-phase/data.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:02f89a04f72ed47ccf7e8f03ed03aa1d603908f11339c14feb43b95ae48333be
|
3 |
+
size 2021413
|