File size: 1,986 Bytes
99c148d
 
 
 
 
 
 
 
 
 
 
 
 
a6ba59e
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
---
license: cc-by-nc-sa-4.0
---

This repository contains the `C2Rust-Bench` dataset that is a minimized set of representative C functions for C-to-Rust transpilation. The `C2Rust-Bench` dataset is proposed for evaluating the C-to-Rust transpilers. This repo contains two files as following:

### 1. `benchmark.json`
This file contains a description of the `C2Rust-Bench` dataset, which includes:
- 2,905 C functions and
- detailed metadata about each of them.

### 2. `Benchmark.tar`
The `Benchmark.tar` file contains the C and Rust files used in the experiments. The `Benchmark` folder located in `Benchmark.tar` file contains following subfolders:
- **`microbenchmark_set`**: This folder contains a small set of C and Rust functions transpiled using 9 different LLMs. This microbenchmarking set is used for a preliminary experiment.
- **`large_set`**: This folder contains 15,503 C functions derived from 65 different programs and corresponding Rust functions transpiled using the selected LLM.
- **`C2Rust-Bench`**: This folder contains the proposed C2Rust-Bench and includes the following subfolders:
  - `C_functions`: This folder contains C code for the selected C functions obtained after segmentation, with one individual function per C file. These individual C funtions are used in transpilation to obtain corresponding Rust functions under `Rust_functions` folder. Note that these C files may not be individually compilable. 
  - `C_files`: This folder contains the original C files after preprocessing and before the segmentation process. These C files contain additional C code (such as other functions, global variables, struct definitions etc.) in addition to the C code for the selected function. The C files are named the same as their corresponding file in the `C_functions` folder. These C files are individually compilable. 
  - `Rust_functions`: This folder contains the individual Rust functions obtained from transpilation of C functions in `C_functions` folder.