外文文献翻译--Java虚拟机指令系统的编码
《外文文献翻译--Java虚拟机指令系统的编码》由会员分享,可在线阅读,更多相关《外文文献翻译--Java虚拟机指令系统的编码(15页珍藏版)》请在毕设资料网上搜索。
1、外文资料原文 1 中文 6000 字 Encoding the Java Virtual Machines Instruction Set 1 Introduction The development of programs that parse and analyze Java Bytecode 9 has a long history and new programs are still developed 2,3,4,7,13. When developing such tools, however, a lot of effort is spent to develop a parse
2、r for the bytecode and for (re-) developing standard control- and data-flow analyses which calculate, e.g., the control-flow graph or the data-dependency graph. To reduce these efforts, we have developed a specification language (OPAL SPL) for encoding the instructions of stack-based intermediate la
3、nguages. The idea is thatonce the instruction set is completely specified using OPAL SPLgenerating both bytecode parsers and standard analyses is much easier than their manual development. To support this goal, OPAL SPL supports the specification of both the format of bytecode instructions and the e
4、ffect on the stack and registers these instructions have when executed. An alternative use of an OPAL SPL specification is as input to a generic parser or to generic analyses as illustrated by Fig. 1 Though the language was designed with Java Bytecode specifically in mind and is used to encode the c
5、omplete instruction set of the Java Virtual Machine (JVM) , we have striven for a Java-independent specification language. In particular, OPAL SPL focuses on specifying the instruction set rather than the complete class file format, not only because the formers structure is much more regular than th
6、e latters,but also because a specification of the instruction set promises to be most beneficial. Given the primary focus of OPAL SPLgenerating parsers and facilitating basic analyseswe explicitly designed the language such that it is possible to group related instructions. This makes specifications
7、 more concise and allows analyses to treat similar instructions in nearly the same way. For example, the JVMs iload 5 instruction, which loads the integer value stored in register #5, is a special case of the generic iload instruction where the instructions operand is 5. We also designed OPAL SPL in
8、 such a way that specifications do not prescribe how a framework represents or processes information; i.e., OPAL SPL is representation agnostic. The next section describes the specification language. In Section3we reason about the languages design by discussing the specification of selected JVM inst
9、ructions. In Section4the validation of specifications is discussed. The evaluation of the approach is presented in Section5. The paper ends with a discussion of related work and a conclusion. 外文资料原文 2 2 Specifying Bytecode Instructions The language for specifying bytecode instructions (OPAL SPL) was
10、 primarily designed to enable a concise specification of the JVMs instruction set. OPAL SPL supports the specification of both an instructions format and its effect on the stack and local variables (registers)when the instruction is executed. It is thus possible to specify which kind of values are p
11、opped from and pushed onto the stack as well as which local variables are read or written. Given a specification of the complete instruction set the information required by standard control- and data-flow analyses is then available. However, OPAL SPL is not particularly tied to Java as it abstracts
12、from the particularities of the JVM Specification. For example, the JVMs type system is part of an OPAL SPL specification rather than an integral part of the OPAL SPL language itself. Next, we first give an overview of the language before we discuss its semantics. 2.1 Syntax The OPAL Specification L
13、anguage (OPAL SPL) is an XML-based language. Its grammar is depicted in Fig.2using an EBNF-like format. Non-terminals are written in capital letters (INSTRUCTIONS, TYPES, etc.), the names of XML-elements are written in small letters (types, stack, etc.) and the names of XML-attributes start with (ty
14、pe, var, etc.). We refer to the content of an XML-element using symbols that start with/ (/VALUEEXPRESSION, /EXPECTEDVALUE, etc.). is used to specify nesting of elements. ( ),?,+,*,| have the usual semantics. For example,exceptionsspecifies that the XML-elementexceptionshas one or moreexceptionchild
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中设计图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 外文 文献 翻译 java 虚拟机 指令系统 编码
