Attention, Compilation, and Solver-based Symbolic Analysis are All You Need

06/11/2023
by   Prithwish Jana, et al.
0

In this paper we present a Java-to-Python (J2P) and Python-to-Java (P2J) back-to-back code translation method, and associated tool called CoTran, based on large language models (LLMs). Our method leverages the attention mechanism of LLMs, compilation, and symbolic execution-based test generation for equivalence testing between the input and output programs. More precisely, we modify the typical LLM training loop to incorporate compiler and symbolic execution loss. Via extensive experiments comparing CoTran with 10 other transpilers and LLM-based translation tools over a benchmark of more than 57,000 Java-Python equivalent pairs, we show that CoTran outperforms them on relevant metrics such as compilation and runtime equivalence accuracy. For example, our tool gets 97.43 equivalence accuracy for J2P translation, whereas the nearest competing tool only gets 96.44

READ FULL TEXT
research
02/05/2018

Shadow Symbolic Execution with Java PathFinder

Regression testing ensures that a software system when it evolves still ...
research
12/16/2017

Enhancing Symbolic Execution of Heap-based Programs with Separation Logic for Test Input Generation

Symbolic execution is a well established method for test input generatio...
research
08/01/2020

The test set for the TransCoder system

The TransCoder system translates source code between Java, C++, and Pyth...
research
02/27/2021

NEUROSPF: A tool for the Symbolic Analysis of Neural Networks

This paper presents NEUROSPF, a tool for the symbolic analysis of neural...
research
09/13/2017

Deadlock detection of Java Bytecode

This paper presents a technique for deadlock detection of Java programs....
research
01/08/2020

Comparing Python, Go, and C++ on the N-Queens Problem

Python currently is the dominant language in the field of Machine Learni...
research
01/09/2023

SantaCoder: don't reach for the stars!

The BigCode project is an open-scientific collaboration working on the r...

Please sign up or login with your details

Forgot password? Click here to reset