一句话:提出 DIRE,用神经概率技术结合反编译所得词法与结构信息恢复变量名,最高 74.3% 与原源码一致。
反编译器是在缺少源码时分析二进制程序的常用工具,它能把二进制还原为高层代码,并重建编译过程中丢失的结构与类型信息,但却无法恢复语义上有意义的变量名,从而损害代码可理解性。本文提出 Decompiled Identifier Renaming Engine(DIRE),一种新的概率化变量名恢复技术,同时利用反编译器恢复出的词法信息与结构信息。为支撑训练与评测,作者还提出了一套自动构造语料的方法,并据此从 GitHub 上挖掘的 C 项目中生成了包含 164,632 个唯一 x86-64 二进制的语料库。实验表明,在该语料上 DIRE 预测的变量名与原始源码中名称完全一致的比例最高可达 74.3%。
The decompiler is one of the most common tools for examining binaries without corresponding source code. It transforms binaries into high-level code, reversing the compilation process. Decompilers can reconstruct much of the information that is lost during the compilation process (e.g., structure and type information). Unfortunately, they do not reconstruct semantically meaningful variable names, which are known to increase code understandability. We propose the Decompiled Identifier Renaming Engine (DIRE), a novel probabilistic technique for variable name recovery that uses both lexical and structural information recovered by the decompiler. We also present a technique for generating corpora suitable for training and evaluating models of decompiled code renaming, which we use to create a corpus of 164,632 unique x86-64 binaries generated from C projects mined from GitHub. Our results show that on this corpus DIRE can predict variable names identical to the names in the original source code up to 74.3% of the time.
DOI 原文 ·
@inproceedings{paperbot5247,
title = {DIRE: A Neural Approach to Decompiled Identifier Naming},
author = {Jeremy Lacomis and Pengcheng Yin and Edward Schwartz and Miltiadis Allamanis and Claire Le Goues and Graham Neubig and Bogdan Vasilescu},
booktitle = {ASE},
year = {2019},
doi = {10.1109/ase.2019.00064}
}