Translating software between programming languages is a challenging task, for which automated techniques have been elusive and hard to scale up to larger programs. A key difficulty in cross-language translation is that one has to re-express the intended behavior of the source program into idiomatic constructs of a different target language. This task needs abstracting away from the source language-specific details, while keeping the overall functionality the same. In this work, we propose a novel and systematic approach for making such translation amenable to automation based on a framework we call program skeletons. A program skeleton retains the high-level structure of the source program by abstracting away and effectively summarizing lower-level concrete code fragments, which can be mechanically translated to the target programming language. A skeleton, by design, permits many different ways of filling in the concrete implementation for fragments, which can work in conjunction with existing data-driven code synthesizers. Most importantly, skeletons can conceptually enable sound decomposition, i.e., if each individual fragment is correctly translated, taken together with the mechanically translated skeleton, the final translated program is deemed to be correct as a whole. We present a prototype system called SKEL embodying the idea of skeleton-based translation from Python to JavaScript. Our results show promising scalability compared to prior works. For 9 real-world Python programs, some with more than about 1k lines of code, $95$% of their code fragments can be automatically translated, while about $5$% require manual effort. All the final translations are correct with respect to whole-program test suites.
Thu 19 JunDisplayed time zone: Seoul change
10:30 - 12:10 | Software EngineeringPLDI Research Papers at Orchid Chair(s): Steve Blackburn Google and Australian National University | ||
10:30 20mTalk | Fast Direct Manipulation Programming with Patch-Reconciliation Correspondence PLDI Research Papers Parker Ziegler University of California at Berkeley, Justin Lubin University of California at Berkeley, Sarah E. Chasins University of California at Berkeley DOI | ||
10:50 20mTalk | An Interactive Debugger for Rust Trait Errors PLDI Research Papers DOI Pre-print | ||
11:10 20mTalk | Spineless Traversal for Layout Invalidation PLDI Research Papers Marisa Kirisame University of Utah, Tiezhi Wang Tongji University, Pavel Panchekha University of Utah DOI | ||
11:30 20mTalk | DR.FIX: Automatically Fixing Data Races at Industry Scale PLDI Research Papers Farnaz Behrang Uber Technologies, Zhizhou (Chris) Zhang Uber Technologies, Georgian-Vlad Saioc Aarhus University, Peng Liu Uber Technologies, Milind Chabbi Uber Technologies DOI | ||
11:50 20mTalk | Program Skeletons for Automated Program Translation PLDI Research Papers Bo Wang National University of Singapore, Tianyu Li National University of Singapore, Ruishi Li National University of Singapore, Umang Mathur National University of Singapore, Prateek Saxena National University of Singapore DOI Pre-print |