毕业设计外文文献—对Java编程语言反编译器功能的分析.docx

上传人:太** 文档编号:95164497 上传时间:2023-08-19 格式:DOCX 页数:6 大小:17.67KB
返回 下载 相关 举报
毕业设计外文文献—对Java编程语言反编译器功能的分析.docx_第1页
第1页 / 共6页
毕业设计外文文献—对Java编程语言反编译器功能的分析.docx_第2页
第2页 / 共6页
点击查看更多>>
资源描述

《毕业设计外文文献—对Java编程语言反编译器功能的分析.docx》由会员分享,可在线阅读,更多相关《毕业设计外文文献—对Java编程语言反编译器功能的分析.docx(6页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、附录A外文翻译一原文部分Analysis of the Java programming language decompiler functionalityAuthor : Constantine Gusarovs Riga technical university, Riga, LatviaISSN 2255-8691 (online)ISSN 2255-8683 (print)December 2018, vol. 23, no. 2, pp. 109-117doi: 10.2478/acss-2018-0014Software development is often about pro

2、ducing new artifacts, converting code written in a programming language into binary distributions, and sometimes performing reverse operations, or reverse engineering. Reverse engineering is the process of extracting knowledge or blueprints from anything man-made. Related to software engineering, th

3、is can be described as extracting source code from binary (compiled) files. While at first glance such a process might seem to run afoul of copyright, it is sometimes necessary to do so. For example, it may be necessary to fix a bug in a program or library that a company developed some time ago, but

4、 lacks any source code for that program or library. Another aspect of software reverse engineering may be the need to extract information from libraries/programs that do not have source code, such as cryptographic keys. Basically, these are valid and legitimate use cases for reverseengineering your

5、own products. The study of computer viruses by the authors of antivirus software is another example of an effective reverse engineering application necessary to understand how malware works and how to take action against it.Based on the TIOBE index, one of the most popular programming languages in e

6、nterprise development is the Java programming language, an object-oriented programming language that USES bytecode instructions executed by stack-based virtual machines. The fact that Java is built around bytecode rather than assembly language provides several advantages for example, if a virtual ma

7、chine implementation exists for the platform described above, code written at once can be executed on different platforms. From a reverse engineering perspective, this means that you only need to deal with bytecode, which contains fewer instructions than assembly languages. Thus, in order to convert

8、 Java bytecode into source code, it is necessary to translate about 200 different instructions to the latest version of Java (10), compared to, for example, an Intel processor assembly instruction set containing about 2,000 different instructions seems a simple task.Such a task can be performed with

9、 software called a ndecomcompiler/ which converts binary artifacts to source code with some precision. Several decomcompilers exist in the Java programming language, and the purpose of this article is to compare them to provide advice to software developers. The structure of this article is as follo

10、ws. The second section presents a selection list of decompilers for the Java programming language. Section 3 provides a brief introduction to the Java programming language binary file format and bytecode instructions. Section 4 gives several examples of Java bytecode decompilation techniques used by

11、 decompilers. The fifth part introduces a test case developed by the author. The sixth part presents the results of test case decompilation and gives a brief analysis of the results. Part 7 describes additional test results and the use of additional criteria defined by the authors of this article to

12、 compare decomcompilers. Finally, the Java decompiler software is summarized and recommended.There are several decompilers for the Java programming language. In order to select the programs to use, it is necessary to compare them. In this section, the authors provide a list of such software. The lis

13、t of decompiled software is built using the authors personal experience with such software and the results of the authors current workplace surveys to determine what other programmers would recommend for such tasks. JD Project is a modular decomcompiler that can be run as a standalone application or

14、 integrated into a development environment, such as Eclipse or Intellij IDEA. CFR is distributed as a library that contains the command line interface (CLI) and can also be used as part of other software. Procyon is a framework that can be integrated into other applications and includes CLI. It has

15、several graphical user interface (GUI) implementations. Fernflower is a Java decompiler used in the Intellij TDEA8 development environment. It is distributed as a library, which also has a CLI interface.The Java virtual machine (JVM) USES a binary.class file that contains the results of the source c

16、ode compilation. These files contain all the necessary information about the compilation unit (basically a Java class or interface), including: generate the compiler version of the given.class file. This allows the JVM to detect whether it should be able to load and execute a given file. constant po

17、ol, containing various strings, class and interface names, field and method names, and other constants used in a given compilation unit access flags to determine the visibility and type of a given compilation unit. This information defines whether and how the actual classes contained in the file can

18、 be instantiated and subclassed. information about the base class and interface of a given compilation unit is inherited from or implemented. lists of fields and methods and their access flags and other modifiers. properties, fields, and methods of a class to determine additional information about t

19、he components of the compilation unit described above. One of the attributes is the actual code for the method, and the other attributes represent different information that can be used at runtime, such as annotations, which are syntactic metadata attached to a given member, or a list of exceptions

20、that may be thrown during the execution of the selected method.This article examines the Java decompiler and its capabilities by analyzing the performance of different test cases, the authorization model, and the ability to extend the decompiler results.To select a Java decompiler for comparison, th

21、e author USES his personal experience and surveys of Java developers. Therefore, four different decomcompilers have been selected, and Fernflower and JD Project are both well-known and recommended for others. Surprisingly, the JD project performed poorly in the test cases developed by the authors an

22、d the Java 7/8 feature decomcompilation. It is also licensed under the GNU GPLv3 license, which may limit its use in commercial projects. Correspondingly, Fernflower was good enough in the main test case, but not good enough in decomcompiling Java 7 features; However, the Java 8 feature support seem

23、s mature enough.The other two compilers, which were not popular among the surveyed developers, show the following results. CFR cannot decomcompile either the main test case or one of the Java 7 test cases. It works very well in Java 8 test cases and has a commercially friendly license, but it is a c

24、losed source project, which means it can be a challenging task to modify if needed. Procyon can handle both the master test case and the Java 7/8 test case. Only a decomcompiler can override all selected Java 7/8 features, and the results are very close to the original source code. Only the decompil

25、er has an API that allows you to modify the decompiler code. Procyon represents decomcompiled code in the form of an AST tree and allows the visitor pattern to be used to process the tree. Procyon is licensed under the Apache 2.0 license, which allows it to be used in commercial products and allows

26、modification of the source code.Based on the research so far, it may not be easy to suggest which decompiler to choose for the Java language; However, the author himself believes that the Procyon decompiler performs best in this comparison. It works well in all defined test cases and supports additi

27、onal features and a friendly licensing model. Interestingly, the decompiler did not seem to be well known and did not receive many Suggestions during the survey, possibly because the developers were not familiar with it.附录B外文翻译一译文部分对Java编程语言反编译器功能的分析作者:康斯坦丁Gusarovs、里加技术大学,里加,拉脱维亚ISSN 2255-8691 (onli

28、ne)ISSN 2255-8683 (print)December 2018, vol. 23, no. 2, pp. 109-117doi: 10.2478/acss-2018-0014https:content, 软件开发通常是关于产生新的工件,将用某种编程语言编写的代码转换为二 进制分布,有时需要执行反向操作,即反向工程。逆向工程是从任何人造事物中 提取知识或设计蓝图的过程。与软件工程相关,这可以描述为从二进制(编译)文 件中提取源代码。虽然乍一看这样的过程似乎与版权冲突,但有时有必要执行这 样的操作。例如,修复某个公司在一段时间前开发的程序或库中的缺陷可能是必 要的,但是缺少该程序或库

29、的任何源代码。软件逆向工程的另一个方面可能是需 要从没有源代码的库/程序中获取一些信息,例如,密码学密钥等。基本上,这 些与自己产品的逆向工程相关的案例都是有效且合法的用例。反病毒软件的作者 对计算机病毒的研究是另一个有效的反向工程应用的例子,这对于理解恶意软件 如何工作以及如何对其采取行动是必要的。基于TIOBE索引,企业开发中最流行的编程语言之一是Java编程语言,这 是一种面向对象的编程语言,使用由基于堆栈的虚拟机执行的字节码指令。Java 是围绕字节码而不是汇编语言构建的,这一事实提供了几个优势一一例如,如果 上述平台存在虚拟机实现,那么一次编写的代码可以在不同的平台上执行。从逆 向工

30、程的角度来看,这意味着只需要处理字节码,与汇编语言相比,字节码包含 的指令更少。因此,为了将Java字节码转换为源代码,有必要可以变换大约200 个不同的指令给最新的Java版本(10),相比之下,例如,英特尔处理器汇编指令 集包含大约2000个不同的指令似乎是一个简单的任务。这样的任务可以通过名为“反编译器”的软件来执行,它可以将二进制工件 以一定的精度转换成源代码。Java编程语言中存在几种反编译器,本文的目的 是比较这些反编译器,以便为软件开发人员提供建议。本文的结构如下。第二部 分给出了 Java编程语言反编译软件的选择列表。第三节简要介绍了 Java编程语 言二进制文件格式和字节码指

31、令。第四节给出了反编译软件使用的Java字节码 反编译技术的几个例子。第五部分介绍了作者开发的一个测试用例。第六部分给 出了测试用例反编译的结果,并对得到的结果进行了简短的分析。第七部分描述 了附加的测试结果,以及使用本文作者定义的附加标准对反编译器进行比较。最 后,对Java反编译软件进行了总结和建议。有几个针对Java编程语言的反编译程序。为了选择要使用的程序,有必要 对这些程序进行比较。在本节中,作者提供了此类软件的列表。反编译软件的列 表是使用作者个人使用此类软件的经验和作者在当前工作场所进行的调查的结 果来构建的,目的是确定其他程序员会推荐使用什么来解决此类任务。JD Project

32、是一个模块化的反编译器,可以作为独立的应用程序运行,也 可以集成到开发环境中,比如Eclipse或Intellij IDEAoCFR以库的形式分发,库中包含命令行接口(CLI),也可以用作其他软件的 一部分。Procyon是一个可以集成到其他应用程序并包含CLI的框架。它有几个图 形用户界面(GUI)实现。 Fernflower是Intellij IDEA8开发环境中使用的Java反编译器。它以 库的形式分发,库中也有CLI接口。Java虚拟机(JVM)使用二进制.class文件,其中包含源代码编译的结果。这 些文件包含有关编译单元(基本上是一个Java类或接口)的所有必要信息,包括:生成给定

33、.class文件的编译器的版本。这允许JVM检测它是否应该能够加 载和执行给定的文件。常量池,包含在给定编译单元中使用的各种字符串、类和接口名、字段和 方法名以及其他常量 访问标志,确定给定编译单元的可见性和类型。此信息定义了文件中包含 的实际类是否可以实例化和子类化,以及如何实例化和子类化。 给定编译单元的基类和接口的信息继承自或实现。 字段和方法列表以及它们的访问标志和其他修饰符。 类的属性、字段和方法,用于确定关于上述编译单元的组件的附加信息。 其中一个属性是方法的实际代码,其他属性表示可以在运行时中使用的不同信息, 例如注释,它是附加到给定成员的语法元数据,或者是在所选方法执行期间可能

34、 抛出的异常列表。本文通过分析不同测试用例的性能、授权模型和扩展反编译结果的能力,对 Java反编译器及其功能进行了研究。为了选择Java反编译器进行比较,作者使用了自己的个人经验和对Java开 发人员的调查。因此,选择了四种不同的反编译器,Femflower和JD Project 都非常有名,并推荐其他人使用。令人惊讶的是,JD项目在作者开发的测试用例 和Java 7/8特性反编译中表现得非常糟糕。它还根据GNU GPLv3许可协议获得 许可,这可能会限制它在商业项目中的使用。相应地,Fernflower在主测试用例 中表现得足够好,但是在反编译Java 7特性时不够精确;然而,Java 8

35、特性支 持似乎已经足够成熟。另外两个编译器在受调查的开发人员中并不受欢迎,它们显示了以下结果。 CFR无法对主测试用例和Java 7测试用例之一进行反编译。它在Java 8测试用 例中表现得非常好,并且具有商业使用友好许可证,但是它是一个封闭源代码的 项目,这意味着如果需要的话,它的修改可能是一个具有挑战性的任务。Procyon 能够同时处理主测试用例和Java 7/8测试用例。只有反编译器才能覆盖所有选 择的Java 7/8特性,生成的结果与原始源代码非常接近。只有反编译器具有允 许修改反编译代码的API。Procyon以AST树的形式表示反编译代码,并允许使 用访问者模式来处理这棵树。Procyon是在Apache 2.0许可下获得许可的,这 使得它可以用于商业产品并允许修改源代码。仅根据目前的研究结果,为Java语言选择哪个反编译器提供建议可能并不 容易;然而,作者本人认为Procyon反编译器在这里的比较中表现最好。它在所 有定义的测试用例中都表现得很好,并且支持附加特性和友好的许可模型。有趣 的是,这个反编译器似乎不太为人所知,在调查期间也没有收到很多建议,这可 能是因为开发人员对它不够熟悉。

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 应用文书 > 解决方案

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁