| --- |
| 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) |