File size: 7,726 Bytes
18e9a33 | 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 | ---
license: other
license_name: open-data-attribution-training-disclosure-license-odatl-1.0
license_link: LICENSE
language:
- en
tags:
- benchmark
- bench
- corpus
- coding
- code
- english
---
# Coding-Corpus-Bench
A benchmark dataset for evaluating language-semantics reasoning across systems programming and low-level programming languages.
## Overview
**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.
The benchmark covers:
* Rust
* Go
* C
* C++
* Zig
* V
* CUDA
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.
Each example provides both a question and a rubric describing the reasoning and conclusion expected from a high-quality answer.
## Dataset Statistics
| Language | Examples |
| --------- | -------: |
| Rust | 15 |
| Go | 15 |
| C | 14 |
| C++ | 14 |
| Zig | 14 |
| V | 14 |
| CUDA | 14 |
| **Total** | **100** |
## Dataset Format
The dataset is provided as **JSONL**. Each line represents one benchmark item.
```json
{
"id_aa": "rust_001",
"title": "GAT higher-ranked implied static",
"category": "Rust",
"prompt": "...",
"system_prompt": "...",
"rubric": "...",
"expected_deliverables": "",
"reference_files": ""
}
```
### Fields
| Field | Description |
| ----------------------- | ------------------------------------------------------------------------------------------------------ |
| `id_aa` | Unique identifier for the benchmark item. |
| `title` | Short description of the semantic issue being tested. |
| `category` | Programming language or platform category. |
| `prompt` | The question presented to the model, often including a code fragment and explicit version assumptions. |
| `system_prompt` | Task-specific instruction describing the required reasoning perspective. |
| `rubric` | Evaluation criteria for judging the answer. |
| `expected_deliverables` | Reserved field for expected deliverables; currently empty for all examples. |
| `reference_files` | Reserved field for supporting references; currently empty for all examples. |
## What the Benchmark Tests
The corpus emphasizes questions where a superficially plausible answer can be wrong without precise knowledge of the language specification.
### Rust
Examples cover topics such as:
* Generic associated types and higher-ranked trait bounds
* Lifetime inference and implied `'static` requirements
* Drop timing
* Wildcard patterns
* Method-call receiver adjustment and autoref
* Closure capture and closure traits
* Two-phase borrows
* Trait coherence
* `ManuallyDrop`
* Type validity and undefined behavior
* Trait-object method dispatch
* `Self: Sized` and dyn compatibility
* Non-lexical lifetimes
* Borrowing through `ref` patterns
* Compile-time evaluation
* Trait bounds
### Go
Examples test areas including:
* `select` operand evaluation
* Typed nil values inside interfaces
* Slice range semantics
* Generic type sets
* Named return values and `defer`
* Channel synchronization and happens-before
* Method sets
* Buffered-channel synchronization
* Deferred argument evaluation
* Slice capacity
* Approximation elements such as `~int`
* Closed-channel receive semantics
* Untyped constants and representability
### C
Examples address ISO C semantics such as:
* Object representation and byte size
* `CHAR_BIT`
* Relational comparison of pointers
* Integer promotions
* Unsigned arithmetic
* Pointer representation and object-pointer sizes
### C++
Examples cover:
* Mutable lambda captures
* Guaranteed copy elision
* Deleted copy constructors
* Overload resolution
* Character literal types
### Zig
Examples cover:
* Bit size versus ABI size
* Pointer constness coercion
* Typed shifts
* Tagged-union active-field rules
### V
Examples cover:
* String byte length
* Mutability of struct fields and bindings
* Array slicing
* `if` expressions
### CUDA
Examples cover:
* Warp shuffle operations
* Memory fences versus execution synchronization
* Kernel launch cardinality
* Block-level versus grid-level barriers
## Version-Specific Reasoning
Questions explicitly state the relevant language or toolchain version where the answer depends on version-specific semantics.
Examples include:
* **Rust 1.85.0, edition 2021**
* **Go 1.23**
* **ISO C17**
* **ISO C++20**
* **Zig 0.13.0**
* **V 0.4.10**
* **CUDA 12.x**
Evaluations should therefore be performed against the assumptions stated in each individual item rather than against an unspecified "latest" language version.
## Evaluation
The `rubric` field contains the expected evaluation criteria.
Rubrics generally distinguish between:
1. **The final conclusion** — whether code compiles, what it prints, whether behavior is defined, etc.
2. **The decisive reasoning** — whether the answer identifies the particular language rule responsible for that conclusion.
For example, a benchmark item may require both:
* the exact output; and
* an explanation of why evaluation order, borrowing, synchronization, or destructor timing produces that output.
This makes the dataset suitable for evaluating **reasoning quality**, not merely final-answer accuracy.
### Example
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.
## Intended Uses
The dataset can be used for:
* Evaluating LLM coding and reasoning models
* Testing language-semantics competence
* Comparing models across programming languages
* Building automated benchmark/evaluation pipelines
* Studying hallucination and specification-reasoning errors
* Evaluating whether models provide decisive explanations rather than unsupported conclusions
## Recommended Evaluation Protocol
For each item:
1. Provide the `prompt` to the model under the assumptions stated in the prompt.
2. Preserve the relevant language/toolchain version.
3. Evaluate the response against the associated `rubric`.
4. Score the requested conclusion separately from the supporting reasoning where the rubric provides separate criteria.
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.
## Data Integrity
The supplied corpus contains:
* **100** benchmark items
* **7** language/platform categories
* An empty `expected_deliverables` field for every item
* An empty `reference_files` field for every item
The benchmark is therefore self-contained at the example/rubric level; no external reference files are specified by the dataset entries themselves.
## License
Open Data Attribution Training Disclosure License (ODATL‑1.0) |