Automatically Testing Functional Properties of Code Translation Models
Hasan Ferit Eniser, Valentin W\"ustholz, Maria Christakis

TL;DR
This paper introduces an automated, property-based testing approach for evaluating and improving code translation models, ensuring correctness with respect to user-defined properties and enhancing translation quality through property-guided search.
Contribution
It presents the first automated, property-based testing framework for code translation models and a novel search method to improve translation correctness based on properties.
Findings
Effective detection of property violations in translation models
Property-guided search improves translation correctness
Framework evaluates model quality with respect to specified properties
Abstract
Large language models are becoming increasingly practical for translating code across programming languages, a process known as . 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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Testing and Debugging Techniques · Software System Performance and Reliability
