AVATAR: A Parallel Corpus for Java-Python Program Translation
- URL: http://arxiv.org/abs/2108.11590v2
- Date: Thu, 4 May 2023 20:22:25 GMT
- Title: AVATAR: A Parallel Corpus for Java-Python Program Translation
- Authors: Wasi Uddin Ahmad, Md Golam Rahman Tushar, Saikat Chakraborty, Kai-Wei
Chang
- Abstract summary: Program translation refers to migrating source code from one language to another.
We present AVATAR, a collection of 9,515 programming problems and their solutions written in two popular languages, Java and Python.
- Score: 77.86173793901139
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Program translation refers to migrating source code from one programming
language to another. It has tremendous practical value in software development,
as porting software across languages is time-consuming and costly. Automating
program translation is of paramount importance in software migration, and
recently researchers explored unsupervised approaches due to the unavailability
of parallel corpora. However, the availability of pre-trained language models
for programming languages enables supervised fine-tuning with a small number of
labeled examples. Therefore, we present AVATAR, a collection of 9,515
programming problems and their solutions written in two popular languages, Java
and Python. AVATAR is collected from competitive programming sites, online
platforms, and open-source repositories. Furthermore, AVATAR includes unit
tests for 250 examples to facilitate functional correctness evaluation. We
benchmark several pre-trained language models fine-tuned on AVATAR. Experiment
results show that the models lack in generating functionally accurate code.
Related papers
- CRUXEval-X: A Benchmark for Multilingual Code Reasoning, Understanding and Execution [50.7413285637879]
The CRUXEVAL-X code reasoning benchmark contains 19 programming languages.
It comprises at least 600 subjects for each language, along with 19K content-consistent tests in total.
Even a model trained solely on Python can achieve at most 34.4% Pass@1 in other languages.
arXiv Detail & Related papers (2024-08-23T11:43:00Z) - Can Large Language Models Write Parallel Code? [0.5317767988097261]
Large language models are increasingly becoming a popular tool for software development.
In this paper, we study the capabilities of state-of-the-art language models to generate parallel code.
arXiv Detail & Related papers (2024-01-23T08:25:12Z) - AdaCCD: Adaptive Semantic Contrasts Discovery Based Cross Lingual
Adaptation for Code Clone Detection [69.79627042058048]
AdaCCD is a novel cross-lingual adaptation method that can detect cloned codes in a new language without annotations in that language.
We evaluate the cross-lingual adaptation results of AdaCCD by constructing a multilingual code clone detection benchmark consisting of 5 programming languages.
arXiv Detail & Related papers (2023-11-13T12:20:48Z) - A Static Evaluation of Code Completion by Large Language Models [65.18008807383816]
Execution-based benchmarks have been proposed to evaluate functional correctness of model-generated code on simple programming problems.
static analysis tools such as linters, which can detect errors without running the program, haven't been well explored for evaluating code generation models.
We propose a static evaluation framework to quantify static errors in Python code completions, by leveraging Abstract Syntax Trees.
arXiv Detail & Related papers (2023-06-05T19:23:34Z) - Syntax and Domain Aware Model for Unsupervised Program Translation [23.217899398362206]
We propose SDA-Trans, a syntax and domain-aware model for program translation.
It leverages the syntax structure and domain knowledge to enhance the cross-lingual transfer ability.
The experimental results on function translation tasks between Python, Java, and C++ show that SDA-Trans outperforms many large-scale pre-trained models.
arXiv Detail & Related papers (2023-02-08T06:54:55Z) - Natural Language to Code Translation with Execution [82.52142893010563]
Execution result--minimum Bayes risk decoding for program selection.
We show that it improves the few-shot performance of pretrained code models on natural-language-to-code tasks.
arXiv Detail & Related papers (2022-04-25T06:06:08Z) - JavaBERT: Training a transformer-based model for the Java programming
language [1.599072005190786]
We introduce a data retrieval pipeline for software code and train a model upon Java software code.
The resulting model, JavaBERT, shows a high accuracy on the masked language modeling task.
arXiv Detail & Related papers (2021-10-20T06:49:41Z) - Zero-Shot Cross-lingual Semantic Parsing [56.95036511882921]
We study cross-lingual semantic parsing as a zero-shot problem without parallel data for 7 test languages.
We propose a multi-task encoder-decoder model to transfer parsing knowledge to additional languages using only English-Logical form paired data.
Our system frames zero-shot parsing as a latent-space alignment problem and finds that pre-trained models can be improved to generate logical forms with minimal cross-lingual transfer penalty.
arXiv Detail & Related papers (2021-04-15T16:08:43Z) - SCELMo: Source Code Embeddings from Language Models [33.673421734844474]
We introduce a new set of deep contextualized word representations for computer programs based on language models.
We show that even a low-dimensional embedding trained on a relatively small corpus of programs can improve a state-of-the-art machine learning system for bug detection.
arXiv Detail & Related papers (2020-04-28T00:06:25Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.