Teaching Machines to Code: Smart Contract Translation with LLMs
Not on the map. Why?
Abstract (arXiv)
The advent of large language models (LLMs) has marked a significant milestone in the realm of artificial intelligence, with their capabilities often matching or surpassing human expertise in various domains. Among these achievements, their adeptness in translation tasks stands out, closely mimicking the intricate and preliminary processes undertaken by human translators to ensure the fidelity and quality of the translated content. Despite the advancements in utilizing LLMs for translating programming code across different languages, the domain of smart contract translation, particularly into languages not previously encountered by the LLM, remains largely unexplored. In our research, we present a pioneering approach, SolMover, which harnesses the synergy of two distinct LLMs within a unified framework. This framework is designed to grasp coding principles and apply this understanding to the translation of code into an unfamiliar language. Our study delves into the capacity of LLMs to mimic human learning processes, offering an in-depth evaluation of our methodology for converting smart contracts written in Solidity to Move, a language with limited resources. The framework employs one LLM to decipher coding conventions for the new language, creating a blueprint for the second LLM, which, lacking planning abilities, possesses coding expertise. The empirical evidence from our experiments suggests that SolMover substantially enhances performance compared to gpt-3.5-turbo-1106, and achieves superior results over competitors such as Palm2 and Mixtral-8x7B-Instruct. Additionally, our analysis highlights the efficacy of our bug mitigation strategy in elevating code quality across all models, even outside the SolMover framework.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 23 of its 62 references that are in the map. First posted on arXiv 13 Mar 2024.
Builds on
23 of 62 references.
References · 23
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2018Representation Learning with Contrastive Predictive Codingcited by 7,662
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,779
- 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
- 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2023Textbooks Are All You Needcited by 561
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2023Prompting Large Language Model for Machine Translation: A Case Studycited by 247
11 more
- 2022In-context Examples Selection for Machine Translationcited by 172
- 2022Prompting PaLM for Translation: Assessing Strategies and Performancecited by 144
- 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 117
- 2018Tree-to-tree Neural Networks for Program Translationcited by 93
- 2021Leveraging Automated Unit Tests for Unsupervised Code Translationcited by 82
- 2023ChatGPT or Grammarly? Evaluating ChatGPT on Grammatical Error Correction Benchmarkcited by 77
- 2023Boosting Theory-of-Mind Performance in Large Language Models via Promptingcited by 64
- 2022Compilable Neural Code Generation with Compiler Feedbackcited by 46
- 2023Measuring The Impact Of Programming Language Distributioncited by 32
- 2023An Empirical Study of AI-based Smart Contract Creationcited by 4
- 2022Lessons Learned from Blockchain Applications of Trusted Execution Environments and Implications for Future Researchcited by 3
Built on by
Citing papers per year: 2024: 2; 2025: 1.
3 papers.