<div class="csl-bib-body">
<div class="csl-entry">Eniser, H. F., Zhang, H., David, C., Wang, M., Christakis, M., Paulsen, B., Dodds, J., & Kroening, D. (2024). <i>Towards Translating Real-World Code with LLMs: A Study of Translating to Rust</i>. arXiv. https://doi.org/10.48550/arXiv.2405.11514</div>
</div>
-
dc.identifier.uri
http://hdl.handle.net/20.500.12708/200218
-
dc.description.abstract
Large language models (LLMs) show promise in code translation - the task of translating code written in one programming language to another language - due to their ability to write code in most programming languages. However, LLM's effectiveness on translating real-world code remains largely unstudied. In this work, we perform the first substantial study on LLM-based translation to Rust by assessing the ability of five state-of-the-art LLMs, GPT4, Claude 3, Claude 2.1, Gemini Pro, and Mixtral. We conduct our study on code extracted from real-world open source projects. To enable our study, we develop FLOURINE, an end-to-end code translation tool that uses differential fuzzing to check if a Rust translation is I/O equivalent to the original source program, eliminating the need for pre-existing test cases. As part of our investigation, we assess both the LLM's ability to produce an initially successful translation, as well as their capacity to fix a previously generated buggy one. If the original and the translated programs are not I/O equivalent, we apply a set of automated feedback strategies, including feedback to the LLM with counterexamples. Our results show that the most successful LLM can translate 47% of our benchmarks, and also provides insights into next steps for improvements.
en
dc.language.iso
en
-
dc.publisher
arXiv
-
dc.rights.uri
http://creativecommons.org/licenses/by/4.0/
-
dc.subject
LLMs
en
dc.subject
code translation
en
dc.subject
Rust
en
dc.title
Towards Translating Real-World Code with LLMs: A Study of Translating to Rust
en
dc.type
Report
en
dc.type
Bericht
de
dc.rights.license
Creative Commons Namensnennung 4.0 International
de
dc.rights.license
Creative Commons Attribution 4.0 International
en
dc.contributor.affiliation
MPI-SWS, Germany
-
dc.contributor.affiliation
University of Bristol, United Kingdom of Great Britain and Northern Ireland (the)
-
dc.contributor.affiliation
University of Bristol, United Kingdom of Great Britain and Northern Ireland (the)
-
dc.contributor.affiliation
University of Bristol, United Kingdom of Great Britain and Northern Ireland (the)
-
dc.contributor.affiliation
Amazon (United States), United States of America (the)
-
dc.contributor.affiliation
Amazon (United States), United States of America (the)
-
dc.contributor.affiliation
Amazon (United States), United States of America (the)
-
dc.type.category
Working Paper
-
tuw.researchTopic.id
I4
-
tuw.researchTopic.name
Information Systems Engineering
-
tuw.researchTopic.value
100
-
tuw.publication.orgunit
E194-01 - Forschungsbereich Software Engineering
-
tuw.publisher.doi
10.48550/arXiv.2405.11514
-
dc.identifier.libraryid
AC17291016
-
dc.description.numberOfPages
11
-
tuw.author.orcid
0000-0002-9106-934X
-
tuw.author.orcid
0000-0002-2649-1958
-
dc.rights.identifier
CC BY 4.0
de
dc.rights.identifier
CC BY 4.0
en
wb.sciencebranch
Informatik
-
wb.sciencebranch.oefos
1020
-
wb.sciencebranch.value
100
-
item.grantfulltext
open
-
item.openairetype
working paper
-
item.fulltext
with Fulltext
-
item.languageiso639-1
en
-
item.openairecristype
http://purl.org/coar/resource_type/c_8042
-
item.openaccessfulltext
Open Access
-
item.cerifentitytype
Publications
-
item.mimetype
application/pdf
-
crisitem.author.dept
MPI-SWS, Germany
-
crisitem.author.dept
University of Bristol, United Kingdom of Great Britain and Northern Ireland (the)
-
crisitem.author.dept
University of Bristol, United Kingdom of Great Britain and Northern Ireland (the)
-
crisitem.author.dept
University of Bristol, United Kingdom of Great Britain and Northern Ireland (the)
-
crisitem.author.dept
E194-01 - Forschungsbereich Software Engineering
-
crisitem.author.dept
Amazon (United States), United States of America (the)
-
crisitem.author.dept
Amazon (United States), United States of America (the)
-
crisitem.author.dept
Amazon (United States), United States of America (the)
-
crisitem.author.orcid
0000-0002-9106-934X
-
crisitem.author.orcid
0000-0002-2649-1958
-
crisitem.author.parentorg
E194 - Institut für Information Systems Engineering