Lune

OOPSLA2022顶会

Automated transpilation of imperative to functional code using neural-guided program synthesis

Benjamin Mariano, Yanju Chen, Yu Feng, Greg Durrett, Isil Dillig

摘要

While many mainstream languages such as Java, Python, and C# increasingly incorporate functional APIs to simplify programming and improve parallelization/performance, there are no effective techniques that can be used to automatically translate existing imperative code to functional variants using these APIs. Motivated by this problem, this paper presents a transpilation approach based on inductive program synthesis for modernizing existing code. Our method is based on the observation that the overwhelming majority of source/target programs in this setting satisfy an assumption that we call trace-compatibility: not only do the programs share syntactically identical low-level expressions, but these expressions also take the same values in corresponding execution traces. Our method leverages this observation to design a new neural-guided synthesis algorithm that (1) uses a novel neural architecture called cognate grammar network (CGN) and ( 2) leverages a form of concolic execution to prune partial programs based on intermediate values that arise during a computation. We have implemented our approach in a tool called NGST2 and use it to translate imperative Java and Python code to functional variants that use the Stream and functools APIs respectively. Our experiments show that NGST2 significantly outperforms several baselines and that our proposed neural architecture and pruning techniques are vital for achieving good results.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 11 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Verified Code Transpilation with LLMs 引用了 Unsupervised Translation of Programming Languages
  • Control-Flow Deobfuscation using Trace-Informed Compositional Program Synthesis 引用了 Programming-by-Demonstration for Long-Horizon Robot Tasks
  • Multilingual Code Co-evolution using Large Language Models 引用了 Unsupervised Translation of Programming Languages
  • Programming-by-Demonstration for Long-Horizon Robot Tasks 引用了 Web question answering with neurosymbolic program synthesis
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper11

  1. Verified Code Transpilation with LLMsSahil Bhatia, Jie Qiu, Niranjan Hasabnis, Sanjit A. Seshia 等NeurIPS 2024 · 36 次引用
  2. Multilingual Code Co-evolution using Large Language ModelsJiyang Zhang, Pengyu Nie, Junyi Jessy Li, Milos GligoricFSE 2023 · 34 次引用
  3. Programming-by-Demonstration for Long-Horizon Robot TasksNoah Patton, Kia Rahmani, Meghana Missula, Joydeep Biswas 等POPL 2024 · 11 次引用
  4. Control-Flow Deobfuscation using Trace-Informed Compositional Program SynthesisBenjamin Mariano, Ziteng Wang, Shankara Pailoor, Christian S. Collberg 等OOPSLA 2024 · 5 次引用
  5. SIRO: Empowering Version Compatibility in Intermediate Representations via Program SynthesisBowen Zhang, Wei Chen, Peisen Yao, Chengpeng Wang 等ASPLOS 2024 · 4 次引用

它引用的 Paper4

  1. Unsupervised Translation of Programming LanguagesBaptiste Rozière, Marie-Anne Lachaux, Lowik Chanussot, Guillaume LampleNeurIPS 2020 · 606 次引用
  2. Learning Compositional Rules via Neural Program SynthesisMaxwell I. Nye, Armando Solar-Lezama, Josh Tenenbaum, Brenden M. LakeNeurIPS 2020 · 120 次引用
  3. Web question answering with neurosymbolic program synthesisQiaochu Chen, Aaron Lamoreaux, Xinyu Wang, Greg Durrett 等PLDI 2021 · 25 次引用
  4. Demystifying Loops in Smart ContractsBenjamin Mariano, Yanju Chen, Yu Feng, Shuvendu K. Lahiri 等ASE 2020 · 20 次引用

相关 Paper

  1. Automated Translation of Functional Big Data Queries to SQLGuoqiang Zhang, Benjamin Mariano, Xipeng Shen, Isil DilligOOPSLA 2023 · 5 次引用
  2. User-Customizable Transpilation of Scripting LanguagesBo Wang, Aashish Kolluri, Ivica Nikolic, Teodora Baluta 等OOPSLA 2023 · 13 次引用
  3. Top-Down Synthesis for Library LearningMatthew Bowers, Theo X. Olausson, Lionel Wong, Gabriel Grand 等POPL 2023 · 32 次引用
  4. Differentiable Synthesis of Program ArchitecturesGuofeng Cui, He ZhuNeurIPS 2021 · 20 次引用
  5. Terra: Imperative-Symbolic Co-Execution of Imperative Deep Learning ProgramsTaebum Kim, Eunji Jeong, Geon-Woo Kim, Yunmo Koo 等NeurIPS 2021 · 7 次引用
黄昏的海面,两侧是细线勾勒的悬崖