egor-bogomolov commited on
Commit
4773457
·
verified ·
1 Parent(s): e2e2c3b

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -1,60 +1 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.avro filter=lfs diff=lfs merge=lfs -text
4
- *.bin filter=lfs diff=lfs merge=lfs -text
5
- *.bz2 filter=lfs diff=lfs merge=lfs -text
6
- *.ckpt filter=lfs diff=lfs merge=lfs -text
7
- *.ftz filter=lfs diff=lfs merge=lfs -text
8
- *.gz filter=lfs diff=lfs merge=lfs -text
9
- *.h5 filter=lfs diff=lfs merge=lfs -text
10
- *.joblib filter=lfs diff=lfs merge=lfs -text
11
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
12
- *.lz4 filter=lfs diff=lfs merge=lfs -text
13
- *.mds filter=lfs diff=lfs merge=lfs -text
14
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
15
- *.model filter=lfs diff=lfs merge=lfs -text
16
- *.msgpack filter=lfs diff=lfs merge=lfs -text
17
- *.npy filter=lfs diff=lfs merge=lfs -text
18
- *.npz filter=lfs diff=lfs merge=lfs -text
19
- *.onnx filter=lfs diff=lfs merge=lfs -text
20
- *.ot filter=lfs diff=lfs merge=lfs -text
21
- *.parquet filter=lfs diff=lfs merge=lfs -text
22
- *.pb filter=lfs diff=lfs merge=lfs -text
23
- *.pickle filter=lfs diff=lfs merge=lfs -text
24
- *.pkl filter=lfs diff=lfs merge=lfs -text
25
- *.pt filter=lfs diff=lfs merge=lfs -text
26
- *.pth filter=lfs diff=lfs merge=lfs -text
27
- *.rar filter=lfs diff=lfs merge=lfs -text
28
- *.safetensors filter=lfs diff=lfs merge=lfs -text
29
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
30
- *.tar.* filter=lfs diff=lfs merge=lfs -text
31
- *.tar filter=lfs diff=lfs merge=lfs -text
32
- *.tflite filter=lfs diff=lfs merge=lfs -text
33
- *.tgz filter=lfs diff=lfs merge=lfs -text
34
- *.wasm filter=lfs diff=lfs merge=lfs -text
35
- *.xz filter=lfs diff=lfs merge=lfs -text
36
- *.zip filter=lfs diff=lfs merge=lfs -text
37
- *.zst filter=lfs diff=lfs merge=lfs -text
38
- *tfevents* filter=lfs diff=lfs merge=lfs -text
39
- # Audio files - uncompressed
40
- *.pcm filter=lfs diff=lfs merge=lfs -text
41
- *.sam filter=lfs diff=lfs merge=lfs -text
42
- *.raw filter=lfs diff=lfs merge=lfs -text
43
- # Audio files - compressed
44
- *.aac filter=lfs diff=lfs merge=lfs -text
45
- *.flac filter=lfs diff=lfs merge=lfs -text
46
- *.mp3 filter=lfs diff=lfs merge=lfs -text
47
- *.ogg filter=lfs diff=lfs merge=lfs -text
48
- *.wav filter=lfs diff=lfs merge=lfs -text
49
- # Image files - uncompressed
50
- *.bmp filter=lfs diff=lfs merge=lfs -text
51
- *.gif filter=lfs diff=lfs merge=lfs -text
52
- *.png filter=lfs diff=lfs merge=lfs -text
53
- *.tiff filter=lfs diff=lfs merge=lfs -text
54
- # Image files - compressed
55
- *.jpg filter=lfs diff=lfs merge=lfs -text
56
- *.jpeg filter=lfs diff=lfs merge=lfs -text
57
- *.webp filter=lfs diff=lfs merge=lfs -text
58
- # Video files - compressed
59
- *.mp4 filter=lfs diff=lfs merge=lfs -text
60
- *.webm filter=lfs diff=lfs merge=lfs -text
 
1
+ *.jsonl filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md ADDED
@@ -0,0 +1,270 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ task_categories:
4
+ - text-generation
5
+ - question-answering
6
+ language:
7
+ - en
8
+ - code
9
+ tags:
10
+ - code
11
+ - program-analysis
12
+ - runtime-behavior
13
+ - execution-traces
14
+ - code-reasoning
15
+ - python
16
+ pretty_name: "REval: Reasoning Evaluation"
17
+ size_categories:
18
+ - n<1K
19
+ dataset_info:
20
+ - config_name: problems
21
+ features:
22
+ - name: task_id
23
+ dtype: string
24
+ - name: code
25
+ dtype: string
26
+ - name: entry_point
27
+ dtype: string
28
+ - name: test
29
+ dtype: string
30
+ - name: inputs
31
+ sequence: string
32
+ - name: outputs
33
+ sequence: string
34
+ splits:
35
+ - name: test
36
+ num_examples: 154
37
+ - config_name: tasks
38
+ features:
39
+ - name: task_id
40
+ dtype: string
41
+ - name: idx
42
+ dtype: int32
43
+ - name: tasks
44
+ dtype: string
45
+ splits:
46
+ - name: test
47
+ num_examples: 154
48
+ - config_name: executions
49
+ features:
50
+ - name: task_id
51
+ dtype: string
52
+ - name: idx
53
+ dtype: int32
54
+ - name: input_idx
55
+ dtype: int32
56
+ - name: problem_type
57
+ dtype: string
58
+ - name: input
59
+ dtype: string
60
+ - name: expected_output
61
+ dtype: string
62
+ - name: actual_output
63
+ dtype: string
64
+ - name: status
65
+ dtype: string
66
+ - name: trace
67
+ sequence: int32
68
+ - name: coverage
69
+ sequence: int32
70
+ - name: num_states
71
+ dtype: int32
72
+ - name: code_hash
73
+ dtype: string
74
+ - name: error
75
+ dtype: string
76
+ splits:
77
+ - name: test
78
+ num_examples: 694
79
+ - config_name: states
80
+ features:
81
+ - name: task_id
82
+ dtype: string
83
+ - name: idx
84
+ dtype: int32
85
+ - name: input_idx
86
+ dtype: int32
87
+ - name: states
88
+ dtype: string
89
+ splits:
90
+ - name: test
91
+ num_examples: 694
92
+ configs:
93
+ - config_name: problems
94
+ data_files:
95
+ - split: test
96
+ path: "data/problems.jsonl"
97
+ default: true
98
+ - config_name: tasks
99
+ data_files:
100
+ - split: test
101
+ path: "data/tasks.jsonl"
102
+ - config_name: executions
103
+ data_files:
104
+ - split: test
105
+ path: "data/executions.jsonl"
106
+ - config_name: states
107
+ data_files:
108
+ - split: test
109
+ path: "data/states.jsonl"
110
+ ---
111
+
112
+ # REval: Reasoning Runtime Behavior of a Program with LLM
113
+
114
+ REval is a benchmark for evaluating Large Language Models' ability to reason about the **runtime behavior** of Python programs.
115
+
116
+ > **Reasoning Runtime Behavior of a Program with LLM: How Far Are We?**
117
+ > Junkai Chen, Zhiyuan Pan, Xing Hu, Zhenhao Li, Ge Li, Xin Xia
118
+ > ICSE 2025
119
+ > [Paper](https://doi.org/10.1109/ICSE55347.2025.00087) | [GitHub](https://github.com/r-eval/REval/)
120
+
121
+ ## Dataset Summary
122
+
123
+ | | |
124
+ |---|---|
125
+ | **Problems** | 154 (85 HumanEval + 69 ClassEval) |
126
+ | **Test-case executions** | 694 (with full execution traces) |
127
+ | **Reasoning tasks** | Coverage, Path, State, Output, Consistency |
128
+ | **Ground truth** | Line coverage, execution traces, variable states at every step |
129
+ | **License** | MIT |
130
+
131
+ ## Reasoning Tasks
132
+
133
+ 1. **Coverage** -- Predict whether a specific line of code is executed for a given input
134
+ 2. **Path** -- Determine the next line that will be executed after a given line
135
+ 3. **State** -- Infer variable values at specific execution points
136
+ 4. **Output** -- Complete test code based on expected execution behavior
137
+ 5. **Consistency** -- Combined score measuring consistency across all four tasks
138
+
139
+ ## Configurations
140
+
141
+ | Config | Records | Description |
142
+ |--------|---------|-------------|
143
+ | `problems` (default) | 154 | Problem definitions: code, inputs, expected outputs |
144
+ | `tasks` | 154 | Task specifications: which lines/variables to query per input |
145
+ | `executions` | 694 | Execution traces and line coverage per (problem, input) pair |
146
+ | `states` | 694 | Variable states at each executed line |
147
+
148
+ ## Usage
149
+
150
+ ```python
151
+ from datasets import load_dataset
152
+
153
+ # Load problem definitions (default config)
154
+ problems = load_dataset("r-eval/REval", "problems", split="test")
155
+ print(f"{len(problems)} problems")
156
+ print(problems[0]["task_id"]) # "DREval/0"
157
+ print(problems[0]["entry_point"]) # "has_close_elements"
158
+
159
+ # Load execution traces
160
+ executions = load_dataset("r-eval/REval", "executions", split="test")
161
+ print(executions[0]["trace"]) # [11, 12, 13, 12, 13, 14, 15, ...]
162
+ print(executions[0]["coverage"]) # [11, 12, 13, 14, 15, 16]
163
+
164
+ # Load variable states (states field is a JSON string -- parse it)
165
+ import json
166
+ states = load_dataset("r-eval/REval", "states", split="test")
167
+ state_list = json.loads(states[0]["states"])
168
+ # Each state: {"lineno": 0, "locals": {"var": {"__type__": "int", "__value__": 1}}}
169
+
170
+ # Load task specifications (tasks field is a JSON string)
171
+ tasks = load_dataset("r-eval/REval", "tasks", split="test")
172
+ task_list = json.loads(tasks[0]["tasks"])
173
+ # Each task: {"input_idx": 0, "task": [{"lineno": 17, "var": "distance"}, ...], "output_pred": "..."}
174
+ ```
175
+
176
+ ## Data Fields
177
+
178
+ ### `problems` config
179
+
180
+ | Field | Type | Description |
181
+ |-------|------|-------------|
182
+ | `task_id` | string | Unique identifier, e.g. `"DREval/0"` |
183
+ | `code` | string | Complete Python source code (signature + docstring + solution) |
184
+ | `entry_point` | string | Function or class name |
185
+ | `test` | string or null | Unittest code for ClassEval problems; null for HumanEval |
186
+ | `inputs` | list[string] | Test inputs as Python expressions |
187
+ | `outputs` | list[string] | Expected outputs as strings |
188
+
189
+ **Problem types:**
190
+ - **HumanEval** (idx 0--84): Standalone functions. `test` is null, `outputs` is non-empty.
191
+ - **ClassEval** (idx 85--153): OOP classes. `test` contains unittest code, `outputs` is empty.
192
+
193
+ ### `tasks` config
194
+
195
+ | Field | Type | Description |
196
+ |-------|------|-------------|
197
+ | `task_id` | string | Unique identifier |
198
+ | `idx` | int | Problem index |
199
+ | `tasks` | string (JSON) | JSON-encoded list of per-input task definitions |
200
+
201
+ Each entry in the parsed `tasks` list contains:
202
+ - `input_idx` (int): Index into the problem's inputs/outputs arrays
203
+ - `task` (list[object]): Variable queries -- each has `lineno` (1-indexed) and `var` (variable name)
204
+ - `output_pred` (string): Output prediction template (e.g. `"assert func(args) == ??"`)
205
+
206
+ ### `executions` config
207
+
208
+ | Field | Type | Description |
209
+ |-------|------|-------------|
210
+ | `task_id` | string | Problem identifier |
211
+ | `idx` | int | Problem index |
212
+ | `input_idx` | int | Which test input was used |
213
+ | `problem_type` | string | `"humaneval"` or `"classeval"` |
214
+ | `input` | string | The specific input expression |
215
+ | `expected_output` | string | Expected output |
216
+ | `actual_output` | string | Actual output from execution |
217
+ | `status` | string | `"ok"` or `"error"` |
218
+ | `trace` | list[int] | 0-indexed line execution sequence |
219
+ | `coverage` | list[int] | Sorted unique executed lines (0-indexed) |
220
+ | `num_states` | int | Number of state snapshots captured |
221
+ | `code_hash` | string | SHA-256 of the source code |
222
+ | `error` | string or null | Error message if `status="error"`, null otherwise |
223
+
224
+ ### `states` config
225
+
226
+ | Field | Type | Description |
227
+ |-------|------|-------------|
228
+ | `task_id` | string | Problem identifier |
229
+ | `idx` | int | Problem index |
230
+ | `input_idx` | int | Which test input was used |
231
+ | `states` | string (JSON) | JSON-encoded list of state objects |
232
+
233
+ Each state object in the parsed list:
234
+ - `lineno` (int): 0-indexed line number
235
+ - `locals` (dict): Variable name to typed value envelope (`{"__type__": "int", "__value__": 42}`)
236
+ - `return` (optional): Return value in the same envelope format
237
+ - `exception` (optional): Exception info if one was raised
238
+
239
+ **Supported value types in envelopes:** `int`, `float`, `bool`, `str`, `NoneType`, `list`, `tuple`, `set`, `dict`, `Nil` (uninitialized), `numpy.ndarray`, `datetime.datetime`, and custom objects. Special float values: `"nan"`, `"inf"`, `"-inf"`.
240
+
241
+ ## Line Number Conventions
242
+
243
+ - **`executions` config** (`trace`, `coverage`): **0-indexed** line numbers
244
+ - **`states` config** (`lineno`): **0-indexed** line numbers
245
+ - **`tasks` config** (`lineno` in task queries): **1-indexed** line numbers (for use in prompts)
246
+
247
+ ## Known Issues
248
+
249
+ - Problems `DREval/117` and `DREval/149` import `gensim` (not included in dependencies). Their ground truth records have `status="error"` with empty traces.
250
+ - Arrows to the next executed lines for ClassEval do not take into account test code.
251
+
252
+ ## Citation
253
+
254
+ If you use this dataset, please cite:
255
+
256
+ ```bibtex
257
+ @inproceedings{chen2025reval,
258
+ title = {Reasoning Runtime Behavior of a Program with LLM: How Far Are We?},
259
+ author = {Junkai Chen and Zhiyuan Pan and Xing Hu and Zhenhao Li and Ge Li and Xin Xia},
260
+ booktitle = {Proceedings of the 47th IEEE/ACM International Conference on Software Engineering (ICSE)},
261
+ year = {2025},
262
+ doi = {10.1109/ICSE55347.2025.00087}
263
+ }
264
+ ```
265
+
266
+ ## Source
267
+
268
+ - **Repository:** [github.com/r-eval/REval](https://github.com/r-eval/REval/)
269
+ - **Paper:** [Reasoning Runtime Behavior of a Program with LLM: How Far Are We?](https://doi.org/10.1109/ICSE55347.2025.00087) (ICSE 2025)
270
+ - **License:** MIT
data/executions.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
data/problems.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
data/states.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:870be679a3be5197ac8eeb0ab5cb6a83e195374d864cf6710fb06edebf86928f
3
+ size 55318056
data/tasks.jsonl ADDED
The diff for this file is too large to render. See raw diff