Translated code can compile successfully while behaving differently from the original. An empirical comparison of code-translation techniques found that its strongest method on a class-level BenchmarkA fixed set of tasks with a stated way of scoring them, used to compare models or setups.Full definition → compiled successfully in 89.39% of cases but passed the functional tests in only 24.82%, averaged across the tested translation directions.
A class combines methods, shared data and interfaces, so translation must preserve their relationships as well as individual statements. The study found that this larger unit was substantially harder than translating isolated methods. For software migration, the result explains why compilation and visual similarity are weak substitutes for tests of the translated ProgramA set of instructions stored so that a computer can run it.Full definition →'s behavior.
Terms in this piece · Glossary
Benchmark — A fixed set of tasks with a stated way of scoring them, used to compare models or setups.
Program — A set of instructions stored so that a computer can run it.
Large language model — A model trained on large amounts of data to process and generate language.