REVIEW 5 major objections 6 minor 27 references
C2RUST-BENCH: A Minimized, Representative Dataset for C-to-Rust Transpilation Evaluation
T0 review · 5 major / 6 minor · reviewed 2026-08-16 · deepseek-v4-flash
Pith's one-line read A 2,905-function benchmark claims to capture the full range of C-to-Rust transpilation difficulty across 15,503 real-world functions.
desk verdict Useful dataset and selection pipeline, but the representativeness claim rests on a circular validation on the same microbenchmark with no random baseline. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The mechanism is the four-metric binning and systematic sampling pipeline. Maintainability Index, a composite of cyclomatic complexity, Halstead volume, and source lines of code, measures code complexity; the two Rust-specific metrics add memory-operation and type-system difficulty that generic code metrics miss. Partitioning each metric into equal-width intervals forms multidimensional bins, PCA reduces the four metrics to one ordering score per bin, and systematic sampling spreads the choice across each bin. This combination is what lets a small set claim to cover the variety of transpilation challenges in the large set.
What would settle it
Take a transpiler or LLM not among the nine studied, transpile all 15,503 functions and the 2,905-function benchmark, then compare the two sets on a difficulty measure that is not compilation-error fixing attempts, such as semantic equivalence test pass rate or idiomaticity score. If the benchmark's distribution diverges from the full pool's on that measure, or if transpiler rankings on the benchmark disagree with rankings on the full pool, the representativeness claim is refuted.
Extended reading notes
Core claim
The central discovery is a selection procedure that reduces a 15,503-function C program pool to 2,905 functions while preserving the shape of transpilation difficulty, operationalized as the number of compilation-error fixing attempts an LLM needs. Each function is scored on four complexity metrics: the Maintainability Index of the original C code, the Maintainability Index of the LLM-transpiled Rust code, the average number of statements inside Rust unsafe blocks, and the number of unique data types in the Rust output. Functions are binned by partitioning each metric's range, ordered within each bin by a PCA complexity score, and sampled systematically so every bin contributes. The paper validates the result by comparing the compilation-error fixing attempt distribution of the selected set with that of the full pool and reports that the selected functions remain representative across nine different LLMs, not just the one used during selection.
Load-bearing premise
The whole representativeness claim rests on assuming that the distribution of compilation-error fixing attempts is a valid and sufficient proxy for C-to-Rust transpilation difficulty, and that matching that distribution on the selected set implies the set is representative for the full pool and for other LLMs.
Editorial extensions
If this is right
- Evaluating a C-to-Rust transpiler on C2Rust-Bench should produce results that transfer to the 15,503-function pool, so researchers can skip the full run.
- Transpilation evaluation time drops by roughly 79 percent, from 246 hours to 52 hours on the authors' setup.
- The benchmark gives competing transpilation tools a common data set, making their reported results directly comparable.
- The selection procedure is reusable: given a function pool and a transpiler, the same four-metric binning and sampling steps can produce a custom minimized evaluation set.
Reading between the lines
- The same selection pipeline could plausibly be applied to other migration tasks, such as C++ to Rust or C to memory-safe variants, but the proxy metric would need to be revalidated for each target language.
- The compilation-error proxy says nothing directly about whether transpiled code is semantically correct, idiomatic, or memory-safe; a benchmark built on it may need to be paired with execution-based or verification-based tests to capture those dimensions.
- A natural stress test is to rebuild the benchmark from a different large program pool or with a different base LLM; if the selected functions change substantially, generalizing the current 2,905 functions beyond this pool would be risky.
Signed reviews
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper introduces C2Rust-Bench, a dataset of 2,905 C functions selected from a pool of 15,503 functions drawn from 65 real-world programs, intended to be a minimized yet representative benchmark for evaluating C-to-Rust transpilation. The selection method defines four complexity metrics: Maintainability Index of the C code, Maintainability Index of the corresponding Rust code, an unsafe-code complexity metric, and a data-type complexity metric. Functions are placed into multidimensional bins by partitioning each metric axis, and systematic sampling is applied within bins after ordering by a PCA-based complexity score. A transpilation tool with a compilation-error-fixing loop and a local LLM (qwen2.5-coder:32b) is used to obtain Rust code and to produce a distribution of compilation-error fixing attempts. The paper tunes two hyperparameters (number of partitions and sampling ratio) on a 1,573-function microbenchmark set, then evaluates the resulting selections on the same set across nine LLMs by comparing normalized compilation-error fixing attempt distributions using a relative-difference score. The central claim is that the final 2,905-function set is representative of C-to-Rust transpilation difficulty for the full 15,503-function pool.
Significance. If the representativeness claim were established, C2Rust-Bench would fill a genuine gap in the C-to-Rust transpilation literature: a standardized, smaller evaluation set that saves significant LLM inference time while still covering the range of transpilation difficulty. The paper contributes a concrete dataset artifact and open-source selection code, and the cross-LLM evaluation in §5.4 is a useful step toward showing that the selection is not purely idiosyncratic to one model. The reduction numbers are also meaningful: 81.3% fewer functions and 78.9% less transpilation time. However, the current validation is self-referential: the same microbenchmark set and the same relative-difference metric are used for hyperparameter tuning and for the representativeness claim, and no random-sampling or alternative-method baseline is provided. The proxy itself (compilation-error fixing attempts) covers only compilability, not semantic correctness, idiomaticity, or memory safety, which are central to the stated use case. The final 2,905-function selection is never validated against the full pool.
major comments (5)
- [§5.3–§5.4] The representativeness validation is in-sample and self-referential. In §5.3, the hyperparameters (number_of_partition=9, ratio_of_sampling=0.166) are chosen by minimizing the relative-difference score of Eq. (3) on the 1,573-function microbenchmark set. In §5.4, the same score on the same set is then used to claim that the selected functions are representative. This means the evaluation metric is exactly the objective that was optimized, and the data are exactly the data used for optimization. The cross-LLM results in Figure 2 show that the proxy ranking is not unique to qwen2.5-coder:32b, but they do not break the tuning-evaluation coupling. Please add an out-of-sample evaluation, for example by holding out a portion of the microbenchmark set during tuning, or by validating the final selection from the full pool against the full pool.
- [§5.4–§5.5] The final C2Rust-Bench set is never validated. Section 5.4 performs selection only on the microbenchmark set, not on the full 15,503-function pool, and reports relative-difference scores between the selected functions and the microbenchmark set. Section 5.5 then presents the final 2,905-function selection from the full pool without any representativeness score against that pool. Since the abstract and introduction claim representativeness for the final 2,905 functions selected from 15,503, the paper must either report the relative-difference (or an equivalent metric) for the final selection against the full pool, or explicitly justify why the microbenchmark-based validation transfers to the large-set selection.
- [§5.3] No random-sampling baseline or alternative selection method is compared. The paper reports that the tuned selection achieves a relative-difference score of 11.2% and that other LLMs yield scores between roughly 15% and 35%, but without a baseline it is not established that the partitioning-based method outperforms a random subset of the same size. Subset size, binning, and the normalization in Eq. (3) could by themselves produce low scores. Please add a random-sampling baseline (with multiple seeds) and, ideally, a stratified-sampling baseline, and report the distribution of relative-difference scores under those baselines.
- [§3.2, §5.3] The representativeness claim rests entirely on the assumption that the distribution of compilation-error fixing attempts is a valid and sufficient proxy for C-to-Rust transpilation difficulty. This proxy measures only compilability of the transpiled Rust code; it does not capture semantic correctness, idiomaticity, or memory safety, all of which are central to the transpilation evaluation use case described in §1 and §2.2. The paper should either provide evidence that this proxy correlates with those properties (e.g., by comparing the proxy against semantic-equivalence or memory-safety metrics on a sample) or qualify the representativeness claim to compilability-based difficulty and adjust the wording in the abstract accordingly.
- [§5.1] The construction of the microbenchmark set is underspecified. The text states only that "we sample ~10% of the functions in the large dataset" and obtains 1,573 functions. The sampling method is not described (uniform random, stratified, seeded), and no comparison is given between the metric distributions of the microbenchmark set and the large set. Since the microbenchmark set is used both for hyperparameter tuning and for the main validation, its representativeness is load-bearing. Please specify the sampling procedure and demonstrate that the microbenchmark set reflects the large set's distribution on the four complexity metrics.
minor comments (6)
- [§5.3, Eq. (3)] Equation (3) divides by expected_value_i for each i from 0 to 20; if any expected count is zero, the score is undefined. The paper does not state how zero-count bins are handled; please clarify.
- [§4.1] There is a typo in §4.1: "preprare" should be "prepare".
- [Figure 3] The y-axis label in Figure 3 reads "Fuctions," which should be "Functions." There is also a typo in §5.4: "microbencmark" should be "microbenchmark."
- [§1] The introduction refers to the "US White House Office of National Cyber Directory" and cites ONCD; the correct name is the "Office of the National Cyber Director."
- [References] Reference [1] is dated 2025 in the bibliography, but the cited CISA article "The Urgent Need for Memory Safety in Software Products" was published in December 2023. Please correct the date.
- [Table 1] The program name "json.h" in Table 1 appears to be a file name rather than a program name; please clarify what this entry represents.
Circularity Check
Representativeness is tuned and evaluated with the same compilation-attempt distribution on the same microbenchmark, making the chosen-LLM validation in-sample; the final 2,905-function set is never scored against the full pool.
-
fitted input called prediction
[§5.3 (Eq. 3) and §5.4 'Cross-LLM Evaluation' Methodology]
"To select best hyperparameters, we look for minimizing the relative difference score. The combination (9, 0.166), placed at the index of 883, which is marked by the red dashed line in Figure 1, has the lowest relative difference score of 11.2%. ... To evaluate the selected functions, we use the compilation error fixing attempt from the transpilation process as in §5.3."
The representativeness score in §5.4 is Equation 3, the relative difference of compilation-error fixing attempt distributions. This is exactly the objective minimized during hyperparameter tuning in §5.3, and it is computed on the same 1,573-function microbenchmark with the same qwen2.5-coder:32b feedback. Therefore the low relative-difference score reported for qwen2.5-coder:32b is the tuned value or a re-computation of it, not an independent confirmation: the fitting metric and the validation metric coincide on the same data. The final 2,905-function C2Rust-Bench is never scored against the full 15,503-function pool, so the only direct evidence for representativeness with the chosen LLM is in-sample.
full rationale
The dataset construction itself is largely independent: the selection uses complexity metrics (Maintainability Index, unsafe-code complexity, data-type complexity) and PCA-based systematic sampling, none of which are derived from the compilation-attempt feedback used for validation. However, the paper's validation of representativeness is partially self-referential. In §5.3 the two selection hyperparameters are chosen by minimizing the relative-difference score on the microbenchmark set, and in §5.4 the same score on the same microbenchmark set is presented as evidence that the selected functions are representative. For qwen2.5-coder:32b, the model used for selection and tuning, this is an in-sample evaluation of the optimized objective. The cross-LLM results in §5.4 are genuinely informative for other models, since those scores were not minimized during tuning. Still, the paper provides no random-sampling baseline and never measures the representativeness of the final 2,905-function benchmark against the full 15,503-function pool. These gaps weaken the support for the central claim but do not make the construction itself circular, so a moderate score is appropriate.
Assumptions & free parameters
free parameters (2)
- number_of_partition =
9
- ratio_of_sampling =
0.166
assumptions (7)
- domain assumption Maintainability Index of C and Rust code is a valid complexity proxy for C-to-Rust transpilation difficulty.
- domain assumption Unsafe-code density in transpiled Rust reflects transpilation complexity.
- domain assumption Number of unique data types in transpiled Rust reflects transpilation complexity.
- ad hoc to paper The distribution of compilation-error fixing attempts is a valid and sufficient proxy for representativeness of transpilation difficulty.
- domain assumption The ~10% microbenchmark sample is representative of the large dataset.
- domain assumption Segmenting C files into individual functions preserves the features relevant to transpilation.
- standard math PCA score ordering and systematic sampling yield a diverse, representative sample within each bin.
Cite this review
Pith. "Pith review of C2RUST-BENCH: A Minimized, Representative Dataset for C-to-Rust Transpilation Evaluation." pith.science (2026). https://pith.science/paper/DHM6DERP
@misc{pith2026250415144,
author = {Pith},
title = {Pith review of: C2RUST-BENCH: A Minimized, Representative Dataset for C-to-Rust Transpilation Evaluation},
year = {2026},
howpublished = {\url{https://pith.science/paper/DHM6DERP}},
note = {Machine review of arXiv:2504.15144}
}
read the original abstract
Despite the effort in vulnerability detection over the last two decades, memory safety vulnerabilities continue to be a critical problem. Recent reports suggest that the key solution is to migrate to memory-safe languages. To this end, C-to-Rust transpilation becomes popular to resolve memory-safety issues in C programs. Recent works propose C-to-Rust transpilation frameworks; however, a comprehensive evaluation dataset is missing. Although one solution is to put together a large enough dataset, this increases the analysis time in automated frameworks as well as in manual efforts for some cases. In this work, we build a method to select functions from a large set to construct a minimized yet representative dataset to evaluate the C-to-Rust transpilation. We propose C2RUST-BENCH that contains 2,905 functions, which are representative of C-to-Rust transpilation, selected from 15,503 functions of real-world programs.
Figures
Reference graph
Works this paper leans on
-
[1]
The Urgent Need for Memory Safety in Software Products
2025. The Urgent Need for Memory Safety in Software Products. https://www. cisa.gov/news-events/news/urgent-need-memory-safety-software-products
work page 2025
-
[2]
2025. Fact Sheet: ONCD Report Calls for Adoption of Memory Safe Programming Languages and Addressing the Hard Research Problem of Software Measura- bility. https://bidenwhitehouse.archives.gov/oncd/briefing-room/2024/02/26/ memory-safety-fact-sheet/
work page 2025
-
[3]
TRACTOR: Translating All C to Rust
2025. TRACTOR: Translating All C to Rust. https://www.darpa.mil/research/ programs/translating-all-c-to-rust
work page 2025
-
[4]
Mehmet Emre, Ryan Schroeder, Kyle Dewey, and Ben Hardekopf. 2021. Trans- lating C to safer Rust. Proceedings of the ACM on Programming Languages 5, OOPSLA (2021), 1–29
work page 2021
-
[5]
Hanliang Zhang, Cristina David, Yijun Yu, and Meng Wang. 2023. Ownership guided C to Rust translation. In International Conference on Computer Aided Verification. Springer, 459–482
2023
-
[6]
Aidan ZH Yang, Yoshiki Takashima, Brandon Paulsen, Josiah Dodds, and Daniel Kroening. 2024. VERT: Verified equivalent rust transpilation with large language models as few-shot learners. arXiv preprint arXiv:2404.18852 (2024)
arXiv 2024
-
[7]
Jaemin Hong and Sukyoung Ryu. 2024. Don’t Write, but Return: Replacing Output Parameters with Algebraic Data Types in C-to-Rust Translation. Proceedings of the ACM on Programming Languages 8, PLDI (2024), 716–740
2024
-
[8]
Momoko Shiraishi and Takahiro Shinagawa. 2024. Context-aware Code Segmen- tation for C-to-Rust Translation using Large Language Models. arXiv preprint arXiv:2409.10506 (2024)
arXiv 2024
Show all 27 references
-
[9]
Brendan Dolan-Gavitt, Patrick Hulin, Engin Kirda, Tim Leek, Andrea Mambretti, Wil Robertson, Frederick Ulrich, and Ryan Whelan. 2016. Lava: Large-scale automated vulnerability addition. In 2016 IEEE symposium on security and privacy (SP). IEEE, 110–121
2016
-
[10]
Ahmad Hazimeh, Adrian Herrera, and Mathias Payer. 2020. Magma: A ground- truth fuzzing benchmark. Proceedings of the ACM on Measurement and Analysis of Computing Systems 4, 3 (2020), 1–29
2020
-
[11]
Olivier Bachem, Mario Lucic, and Andreas Krause. 2017. Practical coreset con- structions for machine learning. arXiv preprint arXiv:1703.06476 (2017)
2017 arXiv
-
[12]
Ozan Sener and Silvio Savarese. 2017. Active learning for convolutional neural networks: A core-set approach. arXiv preprint arXiv:1708.00489 (2017)
2017 arXiv
-
[13]
Georgii Novikov, Maxim Panov, and Ivan Oseledets. 2021. Dataset Reduction via Bias-Variance Minimization. In 2021 5th Scientific School Dynamics of Complex Networks and their Applications (DCNA) . IEEE, 143–146
2021
-
[14]
Hojun Lee, Suyoung Kim, Junhoo Lee, Jaeyoung Yoo, and Nojun Kwak. 2024. Coreset selection for object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition . 7682–7691
2024
-
[15]
Haohao Song, Qiao Xiang, and Jiwu Shu. 2025. Leave No Stone Unturned: Optimizing Subpattern Information Entropy for Coreset Selection. In ICASSP 2025-2025 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 1–5
2025
-
[16]
Don Coleman, Dan Ash, Bruce Lowther, and Paul Oman. 1994. Using metrics to evaluate software system maintainability. Computer 27, 8 (1994), 44–49
1994
-
[17]
Thomas J McCabe. 1976. A complexity measure. IEEE Transactions on software Engineering 4 (1976), 308–320
1976
-
[18]
Maurice H Halstead. 1977. Elements of Software Science (Operating and program- ming systems series). Elsevier Science Inc
1977
-
[19]
immunant. 2025. c2rust. https://github.com/immunant/c2rust
2025
-
[20]
Dokyung Song, Julian Lettner, Prabhu Rajasekaran, Yeoul Na, Stijn Volckaert, Per Larsen, and Michael Franz. 2019. SoK: Sanitizing for security. In 2019 IEEE Symposium on Security and Privacy (SP) . IEEE, 1275–1295
2019
-
[21]
Paul Oman and Jack Hagemeister. 1992. Metrics for assessing a software system’s maintainability. In Proceedings Conference on Software Maintenance 1992 . IEEE Computer Society, 337–338
1992
-
[22]
Jarod42. 2025. ccccc. https://github.com/Jarod42/ccccc
2025
-
[23]
Luca Ardito, Luca Barbato, Marco Castelluccio, Riccardo Coppola, Calixte Denizet, Sylvestre Ledru, and Michele Valsesia. 2020. rust-code-analysis: A Rust library to analyze and extract maintainability information from source codes. SoftwareX 12 (2020), 100635
2020
-
[24]
immunant. 2025. c2rust. https://github.com/immunant/c2rust/tree/master/ examples
2025
-
[25]
J Arturo Olvera-López, J Ariel Carrasco-Ochoa, J Francisco Martínez-Trinidad, and Josef Kittler. 2010. A review of instance selection methods. Artificial Intelli- gence Review 34 (2010), 133–143
2010
-
[26]
Sariel Har-Peled and Akash Kushal. 2005. Smaller coresets for k-median and k-means clustering. In Proceedings of the twenty-first annual symposium on Com- putational geometry. 126–134
2005
-
[27]
Ivor W Tsang, James T Kwok, Nello Cristianini, et al. 2005. Core vector machines: Fast SVM training on very large data sets. Journal of machine Learning research 6, 4 (2005). A IMPLEMENTATION DETAILS A.1 Transpilation of C Functions into Rust Behave like you are an expert of C...
2005
Reviewed August 16, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.