csapp-tasks-v1 / README.md
eltociear's picture
Upload README.md with huggingface_hub
86af458 verified
|
Raw
History Blame Contribute Delete
2.79 kB
---
license: mit
task_categories:
- text-generation
tags:
- computer-systems
- csapp
- bit-manipulation
- floating-point
- cache
- code
- rl-environment
size_categories:
- n<1K
---
# csapp-tasks-v1
40 machine-level computer-systems tasks for the
[`csapp-env`](https://app.primeintellect.ai/dashboard/environments/eltociear/csapp-env) RL
environment — two's complement, integer overflow, IEEE-754, bit manipulation, struct layout and
caches, on the topics of *Computer Systems: A Programmer's Perspective* (Bryant & O'Hallaron).
| field | meaning |
|---|---|
| `task_id` | `cs-000``cs-039` |
| `category` | integers / floats / bits / memory / cache |
| `prompt` | the question and the exact shape of the answer |
| `api_description` | the shared preamble (available imports, how to emulate C's fixed widths) |
| `expected_output` | JSON `{"rows": [...]}`, **computed by executing a reference solution** |
Categories: integers 12, floats 10, bits 6, memory 6, cache 6.
No dependencies — every task is answered with `struct` and `math`.
## Original problems, not the book's exercises
Nothing here is copied from CS:APP. Every task is written fresh on the topics the book teaches.
That is a copyright decision and the stronger evaluation choice: the book's exercises and their
worked solutions are all over the public web, so a model can **recall** them instead of
computing. Original problems with executed answer keys cannot be recalled.
## The answer keys are executed, never typed
Every expected output is produced by running a reference implementation, so a key cannot drift
from the instruction beside it. That rule caught four defects in this dataset's own first
draft:
- a task that said *"show that float32 addition is not associative"* where **both groupings came
out `0.0`** — the values chosen did not demonstrate it;
- a row-major vs column-major cache comparison where **both orders tied at 8**, because the
cache was large enough to hold the array;
- a hit/miss trace that was **five misses and no hits**, so answering `0` five times scored
full marks;
- struct offsets that were **four typed constants** instead of a computed layout.
All four are now asserted in the builder, so the dataset fails to build if any of them recurs.
## Grading
Exact — no tolerance anywhere. Every answer is an integer, a bit pattern, a boolean or a float
read back from its own bit pattern, so there is nothing for a tolerance to absorb, and on a
question about exact bit patterns a tolerance would only let wrong answers through. `1` does
not pass for `True`, and `"0x2a"` does not pass for `42`.
Verify with `python environments/csapp_env/build_tasks.py --verify` (40/40).
Source: <https://github.com/eltociear/my-molt-agent/tree/main/environments/csapp_env>