Datasets:

Languages:
English
ArXiv:
License:
Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed
Error code:   DatasetGenerationError
Exception:    ArrowInvalid
Message:      JSON parse error: Column(/src/[]) changed from string to number in row 0
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 174, in _generate_tables
                  df = pandas_read_json(f)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 38, in pandas_read_json
                  return pd.read_json(path_or_buf, **kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/pandas/io/json/_json.py", line 815, in read_json
                  return json_reader.read()
                File "/src/services/worker/.venv/lib/python3.9/site-packages/pandas/io/json/_json.py", line 1025, in read
                  obj = self._get_object_parser(self.data)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/pandas/io/json/_json.py", line 1051, in _get_object_parser
                  obj = FrameParser(json, **kwargs).parse()
                File "/src/services/worker/.venv/lib/python3.9/site-packages/pandas/io/json/_json.py", line 1187, in parse
                  self._parse()
                File "/src/services/worker/.venv/lib/python3.9/site-packages/pandas/io/json/_json.py", line 1403, in _parse
                  ujson_loads(json, precise_float=self.precise_float), dtype=None
              ValueError: Trailing data
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1815, in _prepare_split_single
                  for _, table in generator:
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 177, in _generate_tables
                  raise e
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 151, in _generate_tables
                  pa_table = paj.read_json(
                File "pyarrow/_json.pyx", line 308, in pyarrow._json.read_json
                File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
                File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
              pyarrow.lib.ArrowInvalid: JSON parse error: Column(/src/[]) changed from string to number in row 0
              
              The above exception was the direct cause of the following exception:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1456, in compute_config_parquet_and_info_response
                  parquet_operations = convert_to_parquet(builder)
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1055, in convert_to_parquet
                  builder.download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 894, in download_and_prepare
                  self._download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 970, in _download_and_prepare
                  self._prepare_split(split_generator, **prepare_split_kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1702, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1858, in _prepare_split_single
                  raise DatasetGenerationError("An error occurred while generating the dataset") from e
              datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

label_file
string
code_file
string
pid
string
sid
string
funname
string
start
int64
end
int64
dataset
string
language
string
src
int64
dst
int64
groundtruth
bool
task_id
string
prompt
string
category
string
src_transformed
dict
dst_transformed
dict
codenet_p00496_s700056700_main_12_40.yaml
codenet_p00496_s700056700_main_12_40.c
p00496
s700056700
main
12
40
codenet
C
30
33
true
control_codenet_p00496_s700056700_main_12_40_k_33_1
[INSTRUCTIONS] You are a program-analysis assistant. Your task is to statically analyze the control dependence of a given code snippet. ## 1. Control Dependence Definition Control dependence captures the influence of control-flow decisions on the execution of statements. A statement `S2` is control-dependent on...
trace
{ "line": 30 }
{ "line": 33 }
codenet_p00496_s700056700_main_12_40.yaml
codenet_p00496_s700056700_main_12_40.c
p00496
s700056700
main
12
40
codenet
C
31
33
true
control_codenet_p00496_s700056700_main_12_40_k_33_2
[INSTRUCTIONS] You are a program-analysis assistant. Your task is to statically analyze the control dependence of a given code snippet. ## 1. Control Dependence Definition Control dependence captures the influence of control-flow decisions on the execution of statements. A statement `S2` is control-dependent on...
trace
{ "line": 31 }
{ "line": 33 }
codenet_p00496_s700056700_main_12_40.yaml
codenet_p00496_s700056700_main_12_40.c
p00496
s700056700
main
12
40
codenet
C
23
33
false
control_codenet_p00496_s700056700_main_12_40_k_33_3
[INSTRUCTIONS] You are a program-analysis assistant. Your task is to statically analyze the control dependence of a given code snippet. ## 1. Control Dependence Definition Control dependence captures the influence of control-flow decisions on the execution of statements. A statement `S2` is control-dependent on...
trace
{ "line": 23 }
{ "line": 33 }
codenet_p00496_s700056700_main_12_40.yaml
codenet_p00496_s700056700_main_12_40.c
p00496
s700056700
main
12
40
codenet
C
34
33
false
control_codenet_p00496_s700056700_main_12_40_k_33_4
[INSTRUCTIONS] You are a program-analysis assistant. Your task is to statically analyze the control dependence of a given code snippet. ## 1. Control Dependence Definition Control dependence captures the influence of control-flow decisions on the execution of statements. A statement `S2` is control-dependent on...
trace
{ "line": 34 }
{ "line": 33 }
codenet_p00736_s631138606_F_3_85.yaml
codenet_p00736_s631138606_F_3_85.c
p00736
s631138606
F
3
85
codenet
C
42
50
true
control_codenet_p00736_s631138606_F_3_85_fit_50_1
[INSTRUCTIONS] You are a program-analysis assistant. Your task is to statically analyze the control dependence of a given code snippet. ## 1. Control Dependence Definition Control dependence captures the influence of control-flow decisions on the execution of statements. A statement `S2` is control-dependent on...
trace
{ "line": 42 }
{ "line": 50 }
codenet_p00736_s631138606_F_3_85.yaml
codenet_p00736_s631138606_F_3_85.c
p00736
s631138606
F
3
85
codenet
C
41
50
true
control_codenet_p00736_s631138606_F_3_85_fit_50_2
[INSTRUCTIONS] You are a program-analysis assistant. Your task is to statically analyze the control dependence of a given code snippet. ## 1. Control Dependence Definition Control dependence captures the influence of control-flow decisions on the execution of statements. A statement `S2` is control-dependent on...
trace
{ "line": 41 }
{ "line": 50 }
codenet_p00736_s631138606_F_3_85.yaml
codenet_p00736_s631138606_F_3_85.c
p00736
s631138606
F
3
85
codenet
C
43
50
true
control_codenet_p00736_s631138606_F_3_85_fit_50_3
[INSTRUCTIONS] You are a program-analysis assistant. Your task is to statically analyze the control dependence of a given code snippet. ## 1. Control Dependence Definition Control dependence captures the influence of control-flow decisions on the execution of statements. A statement `S2` is control-dependent on...
trace
{ "line": 43 }
{ "line": 50 }
codenet_p00736_s631138606_F_3_85.yaml
codenet_p00736_s631138606_F_3_85.c
p00736
s631138606
F
3
85
codenet
C
46
50
true
control_codenet_p00736_s631138606_F_3_85_fit_50_4
[INSTRUCTIONS] You are a program-analysis assistant. Your task is to statically analyze the control dependence of a given code snippet. ## 1. Control Dependence Definition Control dependence captures the influence of control-flow decisions on the execution of statements. A statement `S2` is control-dependent on...
trace
{ "line": 46 }
{ "line": 50 }
codenet_p00736_s631138606_F_3_85.yaml
codenet_p00736_s631138606_F_3_85.c
p00736
s631138606
F
3
85
codenet
C
34
50
false
control_codenet_p00736_s631138606_F_3_85_fit_50_5
[INSTRUCTIONS] You are a program-analysis assistant. Your task is to statically analyze the control dependence of a given code snippet. ## 1. Control Dependence Definition Control dependence captures the influence of control-flow decisions on the execution of statements. A statement `S2` is control-dependent on...
trace
{ "line": 34 }
{ "line": 50 }
codenet_p00736_s631138606_F_3_85.yaml
codenet_p00736_s631138606_F_3_85.c
p00736
s631138606
F
3
85
codenet
C
28
50
false
control_codenet_p00736_s631138606_F_3_85_fit_50_6
[INSTRUCTIONS] You are a program-analysis assistant. Your task is to statically analyze the control dependence of a given code snippet. ## 1. Control Dependence Definition Control dependence captures the influence of control-flow decisions on the execution of statements. A statement `S2` is control-dependent on...
trace
{ "line": 28 }
{ "line": 50 }
codenet_p00736_s631138606_F_3_85.yaml
codenet_p00736_s631138606_F_3_85.c
p00736
s631138606
F
3
85
codenet
C
9
50
false
control_codenet_p00736_s631138606_F_3_85_fit_50_7
[INSTRUCTIONS] You are a program-analysis assistant. Your task is to statically analyze the control dependence of a given code snippet. ## 1. Control Dependence Definition Control dependence captures the influence of control-flow decisions on the execution of statements. A statement `S2` is control-dependent on...
trace
{ "line": 9 }
{ "line": 50 }
codenet_p00736_s631138606_F_3_85.yaml
codenet_p00736_s631138606_F_3_85.c
p00736
s631138606
F
3
85
codenet
C
19
50
false
control_codenet_p00736_s631138606_F_3_85_fit_50_8
[INSTRUCTIONS] You are a program-analysis assistant. Your task is to statically analyze the control dependence of a given code snippet. ## 1. Control Dependence Definition Control dependence captures the influence of control-flow decisions on the execution of statements. A statement `S2` is control-dependent on...
trace
{ "line": 19 }
{ "line": 50 }
codenet_p00736_s631138606_F_3_85.yaml
codenet_p00736_s631138606_F_3_85.c
p00736
s631138606
F
3
85
codenet
C
6
50
false
control_codenet_p00736_s631138606_F_3_85_fit_50_9
[INSTRUCTIONS] You are a program-analysis assistant. Your task is to statically analyze the control dependence of a given code snippet. ## 1. Control Dependence Definition Control dependence captures the influence of control-flow decisions on the execution of statements. A statement `S2` is control-dependent on...
trace
{ "line": 6 }
{ "line": 50 }
codenet_p00736_s631138606_F_3_85.yaml
codenet_p00736_s631138606_F_3_85.c
p00736
s631138606
F
3
85
codenet
C
77
78
true
control_codenet_p00736_s631138606_F_3_85_fit_78_1
[INSTRUCTIONS] You are a program-analysis assistant. Your task is to statically analyze the control dependence of a given code snippet. ## 1. Control Dependence Definition Control dependence captures the influence of control-flow decisions on the execution of statements. A statement `S2` is control-dependent on...
trace
{ "line": 77 }
{ "line": 78 }
codenet_p00736_s631138606_F_3_85.yaml
codenet_p00736_s631138606_F_3_85.c
p00736
s631138606
F
3
85
codenet
C
66
78
true
control_codenet_p00736_s631138606_F_3_85_fit_78_2
[INSTRUCTIONS] You are a program-analysis assistant. Your task is to statically analyze the control dependence of a given code snippet. ## 1. Control Dependence Definition Control dependence captures the influence of control-flow decisions on the execution of statements. A statement `S2` is control-dependent on...
trace
{ "line": 66 }
{ "line": 78 }
codenet_p00736_s631138606_F_3_85.yaml
codenet_p00736_s631138606_F_3_85.c
p00736
s631138606
F
3
85
codenet
C
41
78
true
control_codenet_p00736_s631138606_F_3_85_fit_78_3
[INSTRUCTIONS] You are a program-analysis assistant. Your task is to statically analyze the control dependence of a given code snippet. ## 1. Control Dependence Definition Control dependence captures the influence of control-flow decisions on the execution of statements. A statement `S2` is control-dependent on...
trace
{ "line": 41 }
{ "line": 78 }
codenet_p00736_s631138606_F_3_85.yaml
codenet_p00736_s631138606_F_3_85.c
p00736
s631138606
F
3
85
codenet
C
22
78
false
control_codenet_p00736_s631138606_F_3_85_fit_78_4
[INSTRUCTIONS] You are a program-analysis assistant. Your task is to statically analyze the control dependence of a given code snippet. ## 1. Control Dependence Definition Control dependence captures the influence of control-flow decisions on the execution of statements. A statement `S2` is control-dependent on...
trace
{ "line": 22 }
{ "line": 78 }
codenet_p00736_s631138606_F_3_85.yaml
codenet_p00736_s631138606_F_3_85.c
p00736
s631138606
F
3
85
codenet
C
43
78
false
control_codenet_p00736_s631138606_F_3_85_fit_78_5
[INSTRUCTIONS] You are a program-analysis assistant. Your task is to statically analyze the control dependence of a given code snippet. ## 1. Control Dependence Definition Control dependence captures the influence of control-flow decisions on the execution of statements. A statement `S2` is control-dependent on...
trace
{ "line": 43 }
{ "line": 78 }
codenet_p00736_s631138606_F_3_85.yaml
codenet_p00736_s631138606_F_3_85.c
p00736
s631138606
F
3
85
codenet
C
70
78
false
control_codenet_p00736_s631138606_F_3_85_fit_78_6
[INSTRUCTIONS] You are a program-analysis assistant. Your task is to statically analyze the control dependence of a given code snippet. ## 1. Control Dependence Definition Control dependence captures the influence of control-flow decisions on the execution of statements. A statement `S2` is control-dependent on...
trace
{ "line": 70 }
{ "line": 78 }
End of preview.

CoRe: Benchmarking LLMs’ Code Reasoning Capabilities through Static Analysis Tasks

This repository hosts the CoRe benchmark, designed to evaluate the reasoning capabilities of large language models on program analysis tasks including data dependency, control dependency, and information flow. Each task instance is represented as a structured JSON object with detailed metadata for evaluation and reproduction.

It contains 25k data points (last update: Sep. 24th, 2025).

Each example is a JSON object with the following fields:

{
  "label_file": "codenet_p00496_s700056700_main_12_40.yaml",
  "code_file": "codenet_p00496_s700056700_main_12_40.c",
  "pid": "p00496",
  "sid": "s700056700",
  "funname": "main",
  "start": 12,
  "end": 40,
  "dataset": "codenet",
  "language": "C",
  "src": 30,
  "dst": 33,
  "groundtruth": true,
  "task_id": "control_codenet_p00496_s700056700_main_12_40_k_33_1",
  "prompt": "..."
  "category": trace/all_source
}

🏷 Category Field

The category field specifies the type of prompt associated with each task instance:

  • trace: The prompt asks the model to produce a dependency trace if the answer is yes (e.g., the control or data dependency exists).
  • all_source: The prompt asks the model to enumerate all source elements involved in the dependency.

🧩 Field Descriptions

Field Description
label_file Path to the YAML file containing ground truth annotations for the current task instance.
code_file Path to the corresponding C/Java/Python source code file.
pid Problem ID from the original source dataset (e.g., CodeNet or GCJ).
sid Solution ID identifying the specific program implementation.
funname Name of the target function in which the analysis is conducted.
start, end Line numbers defining the start and end of the target function.
dataset Original dataset source (codenet or gcj).
language Programming language of the source file (C, Java, Python).
src, dst Defines the two program elements queried in this task. In control dependency, these are line numbers. In data dependency and information flow, they are structured as ["varname", line_no], representing variable instances.
groundtruth Boolean indicating whether the specified dependency relationship holds (i.e., true if src has the given dependency on dst).
task_id A unique ID for the task instance. The prefix (control_, data_, infoflow_) identifies the task type.
prompt The prompt string used in the experiment for this task instance. It includes the instruction, examples, query, and code context provided to the LLM. Content-specific fields (e.g., source/target names, line numbers) are filled into a standardized prompt template.

📚 Task Types

The benchmark contains three types of program reasoning tasks:

  • control: Control dependency between lines.
  • data: Data dependency between variables.
  • infoflow: Information flow (explicit or implicit) between variables.

Each instance is designed to assess whether an LLM can understand and reason over static semantics in real-world source code.

🛠 Scripts and Usage

For scripts, evaluation tools, and detailed instructions on running inference over CoRe, please check out our companion GitHub repository:

🔗 Website: https://corebench.github.io/

🔗 Source code: https://github.com/CoReBench/CoRe

🔗 Paper: https://arxiv.org/abs/2507.05269

The github repo includes:

  • Raw annotation data that could be used to generate various static analysis tasks
  • Predefined prompts for each task and language
  • Scripts for invoking models and parsing responses
  • Evaluation scripts for dependency classification, trace generation, and dependency source enumeration

📄 License

Apache License 2.0

Downloads last month
36

Paper for lt-asset/CoRe