发明名称 Method and system for register clearing in data flow analysis in decompilation
摘要 A method and a system for register clearing in data flow analysis in decompilation are provided. The method includes: reading all function statements in a code file; sequentially judging each of the read function statements, and creating a binary tree and inputting the function statement into the binary tree in a case that the function statement includes a register name; sequentially judging each of the function statements including the register name, and performing an elimination process on the created binary tree to remove the register name from the binary tree in a case that the function statement includes a right child end tag of the binary tree, to generate a simplest binary tree; and generating a function statement in high-level language based on the simplest binary tree. All function statements can be read at a time and multiple reading and writing are avoided in the invention. In addition, a binary tree is created based on the read function statement and an elimination process is performed on the binary tree, so the function statement not including the register name can be obtained conveniently and quickly, which improves the execution efficiency.
申请公布号 US9405519(B2) 申请公布日期 2016.08.02
申请号 US201214125881 申请日期 2012.11.23
申请人 Electric Power Research Institute of State Grid Zhejiang Electric Power Company;State Grid Corporation of China 发明人 Zhu Jiong;Yao Li;Li Shaoteng;Lou Yi;Hu Yingjun;Wu Xing
分类号 G06F9/44;G06F9/45;G06F9/30 主分类号 G06F9/44
代理机构 Faegre Baker Daniels LLP 代理人 Faegre Baker Daniels LLP
主权项 1. A method for register clearing in data flow analysis in decompilation, comprising: opening a code file in assembly language before the register clearing, and reading all function statements in the code file; performing judgment on each of the read function statements sequentially to judge whether the function statement comprises a register name, and in a case that the function statement comprises the register name, creating a binary tree and inputting the function statement into the binary tree; and performing judgment on each of the function statements comprising the register name sequentially to judge whether the function statement comprises a right child end tag of the binary tree, and in a case that the function statement comprises the right child end tag of the binary tree, performing an elimination process on the created binary tree to remove the register name from the binary tree, to generate a simplest binary tree, and generating a function statement in high-level language based on the simplest binary tree; and in a case that the function statement comprises no right child end tag of the binary tree, judging whether a next function statement comprises a register name.
地址 Hangzhou, Zhejiang CN