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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
license: other
|
| 3 |
license_name: open-data-attribution-training-disclosure-license-odatl-1.0
|
| 4 |
license_link: LICENSE
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
tags:
|
| 8 |
+
- benchmark
|
| 9 |
+
- bench
|
| 10 |
+
- corpus
|
| 11 |
+
- coding
|
| 12 |
+
- code
|
| 13 |
+
- english
|
| 14 |
---
|
| 15 |
+
|
| 16 |
+
# Coding-Corpus-Bench
|
| 17 |
+
|
| 18 |
+
A benchmark dataset for evaluating language-semantics reasoning across systems programming and low-level programming languages.
|
| 19 |
+
|
| 20 |
+
## Overview
|
| 21 |
+
|
| 22 |
+
**Coding-Corpus-Bench** contains 100 curated programming-language questions designed to test whether a model can reason precisely about language semantics rather than rely on superficial pattern matching or observed behavior.
|
| 23 |
+
|
| 24 |
+
The benchmark covers:
|
| 25 |
+
|
| 26 |
+
* Rust
|
| 27 |
+
* Go
|
| 28 |
+
* C
|
| 29 |
+
* C++
|
| 30 |
+
* Zig
|
| 31 |
+
* V
|
| 32 |
+
* CUDA
|
| 33 |
+
|
| 34 |
+
Questions focus on subtle semantic rules including ownership, lifetimes, type systems, overload resolution, memory models, evaluation order, synchronization, representation validity, and compiler behavior under explicitly stated language/toolchain versions.
|
| 35 |
+
|
| 36 |
+
Each example provides both a question and a rubric describing the reasoning and conclusion expected from a high-quality answer.
|
| 37 |
+
|
| 38 |
+
## Dataset Statistics
|
| 39 |
+
|
| 40 |
+
| Language | Examples |
|
| 41 |
+
| --------- | -------: |
|
| 42 |
+
| Rust | 15 |
|
| 43 |
+
| Go | 15 |
|
| 44 |
+
| C | 14 |
|
| 45 |
+
| C++ | 14 |
|
| 46 |
+
| Zig | 14 |
|
| 47 |
+
| V | 14 |
|
| 48 |
+
| CUDA | 14 |
|
| 49 |
+
| **Total** | **100** |
|
| 50 |
+
|
| 51 |
+
## Dataset Format
|
| 52 |
+
|
| 53 |
+
The dataset is provided as **JSONL**. Each line represents one benchmark item.
|
| 54 |
+
|
| 55 |
+
```json
|
| 56 |
+
{
|
| 57 |
+
"id_aa": "rust_001",
|
| 58 |
+
"title": "GAT higher-ranked implied static",
|
| 59 |
+
"category": "Rust",
|
| 60 |
+
"prompt": "...",
|
| 61 |
+
"system_prompt": "...",
|
| 62 |
+
"rubric": "...",
|
| 63 |
+
"expected_deliverables": "",
|
| 64 |
+
"reference_files": ""
|
| 65 |
+
}
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
### Fields
|
| 69 |
+
|
| 70 |
+
| Field | Description |
|
| 71 |
+
| ----------------------- | ------------------------------------------------------------------------------------------------------ |
|
| 72 |
+
| `id_aa` | Unique identifier for the benchmark item. |
|
| 73 |
+
| `title` | Short description of the semantic issue being tested. |
|
| 74 |
+
| `category` | Programming language or platform category. |
|
| 75 |
+
| `prompt` | The question presented to the model, often including a code fragment and explicit version assumptions. |
|
| 76 |
+
| `system_prompt` | Task-specific instruction describing the required reasoning perspective. |
|
| 77 |
+
| `rubric` | Evaluation criteria for judging the answer. |
|
| 78 |
+
| `expected_deliverables` | Reserved field for expected deliverables; currently empty for all examples. |
|
| 79 |
+
| `reference_files` | Reserved field for supporting references; currently empty for all examples. |
|
| 80 |
+
|
| 81 |
+
## What the Benchmark Tests
|
| 82 |
+
|
| 83 |
+
The corpus emphasizes questions where a superficially plausible answer can be wrong without precise knowledge of the language specification.
|
| 84 |
+
|
| 85 |
+
### Rust
|
| 86 |
+
|
| 87 |
+
Examples cover topics such as:
|
| 88 |
+
|
| 89 |
+
* Generic associated types and higher-ranked trait bounds
|
| 90 |
+
* Lifetime inference and implied `'static` requirements
|
| 91 |
+
* Drop timing
|
| 92 |
+
* Wildcard patterns
|
| 93 |
+
* Method-call receiver adjustment and autoref
|
| 94 |
+
* Closure capture and closure traits
|
| 95 |
+
* Two-phase borrows
|
| 96 |
+
* Trait coherence
|
| 97 |
+
* `ManuallyDrop`
|
| 98 |
+
* Type validity and undefined behavior
|
| 99 |
+
* Trait-object method dispatch
|
| 100 |
+
* `Self: Sized` and dyn compatibility
|
| 101 |
+
* Non-lexical lifetimes
|
| 102 |
+
* Borrowing through `ref` patterns
|
| 103 |
+
* Compile-time evaluation
|
| 104 |
+
* Trait bounds
|
| 105 |
+
|
| 106 |
+
### Go
|
| 107 |
+
|
| 108 |
+
Examples test areas including:
|
| 109 |
+
|
| 110 |
+
* `select` operand evaluation
|
| 111 |
+
* Typed nil values inside interfaces
|
| 112 |
+
* Slice range semantics
|
| 113 |
+
* Generic type sets
|
| 114 |
+
* Named return values and `defer`
|
| 115 |
+
* Channel synchronization and happens-before
|
| 116 |
+
* Method sets
|
| 117 |
+
* Buffered-channel synchronization
|
| 118 |
+
* Deferred argument evaluation
|
| 119 |
+
* Slice capacity
|
| 120 |
+
* Approximation elements such as `~int`
|
| 121 |
+
* Closed-channel receive semantics
|
| 122 |
+
* Untyped constants and representability
|
| 123 |
+
|
| 124 |
+
### C
|
| 125 |
+
|
| 126 |
+
Examples address ISO C semantics such as:
|
| 127 |
+
|
| 128 |
+
* Object representation and byte size
|
| 129 |
+
* `CHAR_BIT`
|
| 130 |
+
* Relational comparison of pointers
|
| 131 |
+
* Integer promotions
|
| 132 |
+
* Unsigned arithmetic
|
| 133 |
+
* Pointer representation and object-pointer sizes
|
| 134 |
+
|
| 135 |
+
### C++
|
| 136 |
+
|
| 137 |
+
Examples cover:
|
| 138 |
+
|
| 139 |
+
* Mutable lambda captures
|
| 140 |
+
* Guaranteed copy elision
|
| 141 |
+
* Deleted copy constructors
|
| 142 |
+
* Overload resolution
|
| 143 |
+
* Character literal types
|
| 144 |
+
|
| 145 |
+
### Zig
|
| 146 |
+
|
| 147 |
+
Examples cover:
|
| 148 |
+
|
| 149 |
+
* Bit size versus ABI size
|
| 150 |
+
* Pointer constness coercion
|
| 151 |
+
* Typed shifts
|
| 152 |
+
* Tagged-union active-field rules
|
| 153 |
+
|
| 154 |
+
### V
|
| 155 |
+
|
| 156 |
+
Examples cover:
|
| 157 |
+
|
| 158 |
+
* String byte length
|
| 159 |
+
* Mutability of struct fields and bindings
|
| 160 |
+
* Array slicing
|
| 161 |
+
* `if` expressions
|
| 162 |
+
|
| 163 |
+
### CUDA
|
| 164 |
+
|
| 165 |
+
Examples cover:
|
| 166 |
+
|
| 167 |
+
* Warp shuffle operations
|
| 168 |
+
* Memory fences versus execution synchronization
|
| 169 |
+
* Kernel launch cardinality
|
| 170 |
+
* Block-level versus grid-level barriers
|
| 171 |
+
|
| 172 |
+
## Version-Specific Reasoning
|
| 173 |
+
|
| 174 |
+
Questions explicitly state the relevant language or toolchain version where the answer depends on version-specific semantics.
|
| 175 |
+
|
| 176 |
+
Examples include:
|
| 177 |
+
|
| 178 |
+
* **Rust 1.85.0, edition 2021**
|
| 179 |
+
* **Go 1.23**
|
| 180 |
+
* **ISO C17**
|
| 181 |
+
* **ISO C++20**
|
| 182 |
+
* **Zig 0.13.0**
|
| 183 |
+
* **V 0.4.10**
|
| 184 |
+
* **CUDA 12.x**
|
| 185 |
+
|
| 186 |
+
Evaluations should therefore be performed against the assumptions stated in each individual item rather than against an unspecified "latest" language version.
|
| 187 |
+
|
| 188 |
+
## Evaluation
|
| 189 |
+
|
| 190 |
+
The `rubric` field contains the expected evaluation criteria.
|
| 191 |
+
|
| 192 |
+
Rubrics generally distinguish between:
|
| 193 |
+
|
| 194 |
+
1. **The final conclusion** — whether code compiles, what it prints, whether behavior is defined, etc.
|
| 195 |
+
2. **The decisive reasoning** — whether the answer identifies the particular language rule responsible for that conclusion.
|
| 196 |
+
|
| 197 |
+
For example, a benchmark item may require both:
|
| 198 |
+
|
| 199 |
+
* the exact output; and
|
| 200 |
+
* an explanation of why evaluation order, borrowing, synchronization, or destructor timing produces that output.
|
| 201 |
+
|
| 202 |
+
This makes the dataset suitable for evaluating **reasoning quality**, not merely final-answer accuracy.
|
| 203 |
+
|
| 204 |
+
### Example
|
| 205 |
+
|
| 206 |
+
A Rust item concerning a reborrow expects the answer to recognize that the program compiles because the reborrow's lifetime ends at its last use under non-lexical lifetimes, rather than incorrectly rejecting the program merely because two mutable references appear in the same scope.
|
| 207 |
+
|
| 208 |
+
## Intended Uses
|
| 209 |
+
|
| 210 |
+
The dataset can be used for:
|
| 211 |
+
|
| 212 |
+
* Evaluating LLM coding and reasoning models
|
| 213 |
+
* Testing language-semantics competence
|
| 214 |
+
* Comparing models across programming languages
|
| 215 |
+
* Building automated benchmark/evaluation pipelines
|
| 216 |
+
* Studying hallucination and specification-reasoning errors
|
| 217 |
+
* Evaluating whether models provide decisive explanations rather than unsupported conclusions
|
| 218 |
+
|
| 219 |
+
## Recommended Evaluation Protocol
|
| 220 |
+
|
| 221 |
+
For each item:
|
| 222 |
+
|
| 223 |
+
1. Provide the `prompt` to the model under the assumptions stated in the prompt.
|
| 224 |
+
2. Preserve the relevant language/toolchain version.
|
| 225 |
+
3. Evaluate the response against the associated `rubric`.
|
| 226 |
+
4. Score the requested conclusion separately from the supporting reasoning where the rubric provides separate criteria.
|
| 227 |
+
5. Do not award correctness merely because a model happens to give the expected output without explaining the semantic rule when the rubric explicitly requires that explanation.
|
| 228 |
+
|
| 229 |
+
## Data Integrity
|
| 230 |
+
|
| 231 |
+
The supplied corpus contains:
|
| 232 |
+
|
| 233 |
+
* **100** benchmark items
|
| 234 |
+
* **7** language/platform categories
|
| 235 |
+
* An empty `expected_deliverables` field for every item
|
| 236 |
+
* An empty `reference_files` field for every item
|
| 237 |
+
|
| 238 |
+
The benchmark is therefore self-contained at the example/rubric level; no external reference files are specified by the dataset entries themselves.
|
| 239 |
+
|
| 240 |
+
## License
|
| 241 |
+
|
| 242 |
+
Open Data Attribution Training Disclosure License (ODATL‑1.0)
|