paper-with-me

홈 › Papers

Automatically Testing Functional Properties of Code Translation Models

2023-09-07 · Hasan Ferit Eniser, Valentin Wüstholz, Maria Christakis

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.

📄 PDF Abstract BibTeX arXiv:2309.12813

Code (1)

rigorous-software-engineering/nomos 공식 구현

Tasks

Code TranslationTranslation

Similar Papers 제목 키워드 기반

CoTran: An LLM-based Code Translator using Reinforcement Learning with Feedback from Compiler and Symbolic Execution

2023-06-11 · Prithwish Jana, Piyush Jha, Haoyang Ju, Gautham Kishore 외

In this paper, we present an LLM-based code translation method and an associated tool called CoTran, that translates whole-programs from one high-level programming language to another. Existing LLM-based code translation…

Code TranslationTranslation

Testing Untestable Neural Machine Translation: An Industrial Case

2018-07-06 · Wujie Zheng, Wenyu Wang, Dian Liu, Changrong Zhang 외

Neural Machine Translation (NMT) has been widely adopted recently due to its advantages compared with the traditional Statistical Machine Translation (SMT). However, an NMT system still often produces translation failure…

Machine TranslationNMTTranslationvalid

Specifying and Testing $k$-Safety Properties for Machine-Learning Models

2022-06-13 · Maria Christakis, Hasan Ferit Eniser, Jörg Hoffmann, Adish Singla 외

Machine-learning models are becoming increasingly prevalent in our lives, for instance assisting in image-classification or decision-making tasks. Consequently, the reliability of these models is of critical importance a…

BIG-bench Machine LearningDecision MakingFairnessimage-classification+1

On the Properties of Neural Machine Translation: Encoder-Decoder Approaches

2014-09-03 · Kyunghyun Cho, Bart van Merrienboer, Dzmitry Bahdanau, Yoshua Bengio

Neural machine translation is a relatively new approach to statistical machine translation based purely on neural networks. The neural machine translation models often consist of an encoder and a decoder. The encoder ext…

DecoderMachine TranslationSentenceTranslation

Guaranteed Guess: A Language Modeling Approach for CISC-to-RISC Transpilation with Testing Guarantees

2025-06-17 · Ahmed Heakl, Sarim Hashmi, Chaimaa Abi, Celine Lee 외

The hardware ecosystem is rapidly evolving, with increasing interest in translating low-level programs across different instruction set architectures (ISAs) in a quick, flexible, and correct way to enhance the portabilit…

Code TranslationHumanEvalLanguage ModelingLanguage Modelling+2