Automatically Testing Functional Properties of Code Translation Models
Not on the map. Why?
Abstract (arXiv)
Large language models are becoming increasingly practical for translating code across programming languages, a process known as transpiling. Even though automated transpilation significantly boosts developer productivity, a key concern is whether the generated code is correct. Existing work initially used manually crafted test suites to test the translations of a small corpus of programs; these test suites were later automated. In contrast, we devise the first approach for automated, functional, property-based testing of code translation models. Our general, user-provided specifications about the transpiled code capture a range of properties, from purely syntactic to purely semantic ones. As shown by our experiments, this approach is very effective in detecting property violations in popular code translation models, and therefore, in evaluating model quality with respect to given properties. We also go a step further and explore the usage scenario where a user simply aims to obtain a correct translation of some code with respect to certain properties without necessarily being concerned about the overall quality of the model. To this purpose, we develop the first property-guided search procedure for code translation models, where a model is repeatedly queried with slightly different parameters to produce alternative and potentially more correct translations. Our results show that this search procedure helps to obtain significantly better code translations.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 17 of its 20 references that are in the map. First posted on arXiv 7 Sep 2023.
Builds on
17 of 20 references.
References · 17
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
- 2023StarCoder: may the source be with you!cited by 790
- 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 402
- 2020Unsupervised Translation of Programming Languagescited by 262
- 2021Constrained Language Models Yield Few-Shot Semantic Parserscited by 162
- 2022Multi-lingual Evaluation of Code Generation Modelscited by 158
- 2022Synchromesh: Reliable code generation from pre-trained language modelscited by 156
- 2022Prompting Is Programming: A Query Language for Large Language Modelscited by 110
- 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 100
5 more
- 2021Leveraging Automated Unit Tests for Unsupervised Code Translationcited by 82
- 2020Metamorphic Testing: A New Approach for Generating Next Test Casescited by 71
- 2021DOBF: A Deobfuscation Pre-Training Objective for Programming Languagescited by 68
- 2022Code Translation with Compiler Representationscited by 42
- 2022Specifying and Testing k-Safety Properties for Machine-Learning Modelscited by 5
Built on by
Citing papers per year: 2025: 3.
3 papers.
- 2025PyVeritas: On Verifying Python via LLM-Based Transpilation and Bounded Model Checking for Ccited by 4
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluationcited by 3
- 2025SoK: Understanding (New) Security Issues Across AI4Code Use Casescited by 0
- 2025SoK: Understanding (New) Security Issues Across AI4Code Use Cases20 Dec 2025
- 2025PyVeritas: On Verifying Python via LLM-Based Transpilation and Bounded Model Checking for C11 Aug 2025
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluation27 Jan 2025