Datasets:
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
task_categories:
|
| 4 |
+
- text-generation
|
| 5 |
+
tags:
|
| 6 |
+
- computer-systems
|
| 7 |
+
- csapp
|
| 8 |
+
- bit-manipulation
|
| 9 |
+
- floating-point
|
| 10 |
+
- cache
|
| 11 |
+
- code
|
| 12 |
+
- rl-environment
|
| 13 |
+
size_categories:
|
| 14 |
+
- n<1K
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# csapp-tasks-v1
|
| 18 |
+
|
| 19 |
+
40 machine-level computer-systems tasks for the
|
| 20 |
+
[`csapp-env`](https://app.primeintellect.ai/dashboard/environments/eltociear/csapp-env) RL
|
| 21 |
+
environment — two's complement, integer overflow, IEEE-754, bit manipulation, struct layout and
|
| 22 |
+
caches, on the topics of *Computer Systems: A Programmer's Perspective* (Bryant & O'Hallaron).
|
| 23 |
+
|
| 24 |
+
| field | meaning |
|
| 25 |
+
|---|---|
|
| 26 |
+
| `task_id` | `cs-000` … `cs-039` |
|
| 27 |
+
| `category` | integers / floats / bits / memory / cache |
|
| 28 |
+
| `prompt` | the question and the exact shape of the answer |
|
| 29 |
+
| `api_description` | the shared preamble (available imports, how to emulate C's fixed widths) |
|
| 30 |
+
| `expected_output` | JSON `{"rows": [...]}`, **computed by executing a reference solution** |
|
| 31 |
+
|
| 32 |
+
Categories: integers 12, floats 10, bits 6, memory 6, cache 6.
|
| 33 |
+
No dependencies — every task is answered with `struct` and `math`.
|
| 34 |
+
|
| 35 |
+
## Original problems, not the book's exercises
|
| 36 |
+
|
| 37 |
+
Nothing here is copied from CS:APP. Every task is written fresh on the topics the book teaches.
|
| 38 |
+
|
| 39 |
+
That is a copyright decision and the stronger evaluation choice: the book's exercises and their
|
| 40 |
+
worked solutions are all over the public web, so a model can **recall** them instead of
|
| 41 |
+
computing. Original problems with executed answer keys cannot be recalled.
|
| 42 |
+
|
| 43 |
+
## The answer keys are executed, never typed
|
| 44 |
+
|
| 45 |
+
Every expected output is produced by running a reference implementation, so a key cannot drift
|
| 46 |
+
from the instruction beside it. That rule caught four defects in this dataset's own first
|
| 47 |
+
draft:
|
| 48 |
+
|
| 49 |
+
- a task that said *"show that float32 addition is not associative"* where **both groupings came
|
| 50 |
+
out `0.0`** — the values chosen did not demonstrate it;
|
| 51 |
+
- a row-major vs column-major cache comparison where **both orders tied at 8**, because the
|
| 52 |
+
cache was large enough to hold the array;
|
| 53 |
+
- a hit/miss trace that was **five misses and no hits**, so answering `0` five times scored
|
| 54 |
+
full marks;
|
| 55 |
+
- struct offsets that were **four typed constants** instead of a computed layout.
|
| 56 |
+
|
| 57 |
+
All four are now asserted in the builder, so the dataset fails to build if any of them recurs.
|
| 58 |
+
|
| 59 |
+
## Grading
|
| 60 |
+
|
| 61 |
+
Exact — no tolerance anywhere. Every answer is an integer, a bit pattern, a boolean or a float
|
| 62 |
+
read back from its own bit pattern, so there is nothing for a tolerance to absorb, and on a
|
| 63 |
+
question about exact bit patterns a tolerance would only let wrong answers through. `1` does
|
| 64 |
+
not pass for `True`, and `"0x2a"` does not pass for `42`.
|
| 65 |
+
|
| 66 |
+
Verify with `python environments/csapp_env/build_tasks.py --verify` (40/40).
|
| 67 |
+
Source: <https://github.com/eltociear/my-molt-agent/tree/main/environments/csapp_env>
|