C2Rust-Bench
收藏资源简介:
C2Rust-Bench数据集是一个为评估C到Rust语言转换工具而设计的最小化代表性C函数集合。该数据集包括两个文件:`benchmark.json`,包含了数据集的描述和每个函数的详细元数据;`Benchmark.tar`,包含了实验中使用的C和Rust文件。数据集分为三个子集:`microbenchmark_set`,用于初步实验的小型C和Rust函数集合;`large_set`,包含来自65个不同程序的15,503个C函数及其对应的Rust转换函数;`C2Rust-Bench`,包含选定的C函数和相应的Rust函数,进一步分为`C_functions`(包含选定的C函数代码),`C_files`(包含原始C文件),和`Rust_functions`(包含从C函数转换得到的Rust函数)。
The C2Rust-Bench dataset is a minimal representative collection of C functions designed for evaluating C-to-Rust language translation tools. This dataset comprises two files: `benchmark.json`, which contains the dataset description and detailed metadata for each function; and `Benchmark.tar`, which holds the C and Rust files utilized in the experiments. The dataset is divided into three subsets: `microbenchmark_set`, a compact collection of C and Rust functions for preliminary experiments; `large_set`, which contains 15,503 C functions and their corresponding Rust-translated counterparts from 65 distinct programs; and `C2Rust-Bench`, which includes selected C functions and their matching Rust functions and is further subdivided into `C_functions` (containing the code of selected C functions), `C_files` (holding the original C source files), and `Rust_functions` (containing the Rust functions translated from the selected C functions).
C2Rust-Bench 数据集概述
数据集简介
- 目的:用于评估C到Rust的转译工具
- 授权许可:CC-BY-NC-SA 4.0
- 核心内容:包含经过最小化处理的代表性C函数集合
文件构成
1. benchmark.json
- 包含2,905个C函数的详细描述
- 提供每个函数的元数据信息
2. Benchmark.tar
包含以下三个主要子文件夹:
microbenchmark_set
- 小型C和Rust函数集合
- 使用9种不同LLM进行转译
- 用于初步实验
large_set
- 包含15,503个C函数
- 源自65个不同程序
- 包含使用选定LLM转译的对应Rust函数
C2Rust-Bench
包含三个子文件夹:
- C_functions:
- 经过分割处理的单个C函数文件
- 每个文件包含一个独立函数(不可单独编译)
- C_files:
- 预处理后的原始C文件
- 包含额外代码(其他函数、全局变量、结构体定义等)
- 可单独编译
- Rust_functions:
- 从C_functions转译得到的独立Rust函数




