• Title/Summary/Keyword: bytecode

Search Result 90, Processing Time 0.024 seconds

Implementation of Java Bytecode Framework (자바 바이트코드 프레임워크 구현)

  • Kim, Ki-Tae;Kim, Je-Min;Yoo, Weon-Hee
    • The Journal of the Korea Contents Association
    • /
    • v.10 no.3
    • /
    • pp.122-131
    • /
    • 2010
  • In this paper, we design and implement CTOC, a new bytecode analysis and translation tool. We also propose E-Tree, a new intermediate code, to efficiently deal with intermediate codes translated from bytecodes. E-Tree is expressed in a tree form by combining relevant bytecode instructions in basic blocks of eCFG to overcome the weaknesses of bytecodes such as complexity and analytical difficulty. To demonstrate the usefulness and possible extensibility of CTOC, we show the creation process of eCFG and E-Tree through practical bytecode analysis and translation and shows the optimization process of a bytecode program as an example of possible extensibility.

Static Dalvik Bytecode Optimization for Android Applications

  • Kim, Jeehong;Kim, Inhyeok;Min, Changwoo;Jun, Hyung Kook;Lee, Soo Hyung;Kim, Won-Tae;Eom, Young Ik
    • ETRI Journal
    • /
    • v.37 no.5
    • /
    • pp.1001-1011
    • /
    • 2015
  • Since just-in-time (JIT) has considerable overhead to detect hot spots and compile them at runtime, using sophisticated optimization techniques for embedded devices means that any resulting performance improvements will be limited. In this paper, we introduce a novel static Dalvik bytecode optimization framework, as a complementary compilation of the Dalvik virtual machine, to improve the performance of Android applications. Our system generates optimized Dalvik bytecodes by using Low Level Virtual Machine (LLVM). A major obstacle in using LLVM for optimizing Dalvik bytecodes is determining how to handle the high-level language features of the Dalvik bytecode in LLVM IR and how to optimize LLVM IR conforming to the language information of the Dalvik bytecode. To this end, we annotate the high-level language features of Dalvik bytecode to LLVM IR and successfully optimize Dalvik bytecodes through instruction selection processes. Our experimental results show that our system with JIT improves the performance of Android applications by up to 6.08 times, and surpasses JIT by up to 4.34 times.

Applet Control using Java Bytecode Modification on the Internet Communication (인터넷 통신상에서 자바 바이트 코드 수정을 이용한 애플릿 제어)

  • 김광준;나상동;배용근
    • Journal of the Korea Institute of Information and Communication Engineering
    • /
    • v.7 no.1
    • /
    • pp.90-99
    • /
    • 2003
  • Java applets are downloaded from web server through internet and executed in Java Virtual Machine of clients' browser. Before execution of java applets, JVM checks bytecode program with bytecode verifier and performs runtime tests with interpreter. However, these tests will not protect against undesirable runtime behavior of java applets, such as denial of service attack, email forging attack, URL spoofing attack, and annoying sound attack. In order to protect malicious applets, a technique used in this paper is java bytecode modification. This technique is used to restrict applet behavior or insert code appropriate to profiling or other monitoring efforts. Java byte modification is divided into two general forms, class-level modification involving subclassing non-final classes and method-level modification used when control over objects from final classes or interface. This paper showed that malicious applets are controlled by java bytecode modification using proxy server. This implementation does not require any changes in the web sever, JVM or web browser.

Java Class File Optimization (자바 클래스 파일 최적화)

  • 홍경표;이야리;오세만
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 2001.04a
    • /
    • pp.55-57
    • /
    • 2001
  • 자바언어는 이질적인 네트워크 환경에서 프로그램 개발이 적합하도록 설계된 언어이다. 자바언어의 특징은 소프트웨어를 쉽게 개발하는데 유용한 것은 사실이지만, 성능상 제약이 따르게 된다. 즉 자바는 클래스 파일이 이동하여 JVM 환경에서 인터프리팅 되는 시스템이므로, 클래스 파일이 이동하며 실행되는 동안의 성능의 저하 없이 자바의 특징을 이용하려면 복잡한 최적화와 실행 시스템이 요구된다. 본 논문은 네트워크 상에서 동적으로 다운로드 되는 클래스 파일의 최적화에 있다. 클래스 파일이 인터프리팅 되는 시스템이 보다 적은 네트워크 로드를 가지고 실행할 수 있도록 하며, 효율적인 실행 속도를 보이도록 하는 것이다. 여기서는 Class Field Optimizer는 내부적으로 Bytecode Optimizer와 ClassGen을 이용하여 실행시간을 개선하고 전체 클래스 파일의 크기를 줄이게 된다. Bytecode Optimizer는 peephole 최적화를 수행하고, bytecode 의존적 최적화, 그리고 전역최적화를 행하게 된다. ClassGen은 클래스 파일의 포맷에 따라 bytecode를 분석하고 본래의 클래스 파일보다 작은 크기의 클래스 파일을 생성하게 된다. 최적화된 클래스 파일은 부분적으로 클래스 파일의 최적화를 가져와 전체 클래스 파일의 크기를 줄이고, 인터프리터를 통하여 실행될 때 수행 속도면에서 좀더 빠른 실행 속도를 가지게 된다.

Design and Implementation of a Java Bytecode-to-SAF Translator for the Ubiquitous Game Platform (유비쿼터스 게임 플랫폼을 위한 Java Bytecode-to-SAF 번역기의 설계 및 구현)

  • Park, Sang-Hoon;Lee, Yang-Sun
    • Proceedings of the Korea Information Processing Society Conference
    • /
    • 2007.05a
    • /
    • pp.1512-1515
    • /
    • 2007
  • 본 연구팀은 유비쿼터스 환경에서 다양한 분야의 콘텐츠를 보다 쉽게 개발하고 실행할 수 있는 통합 소프트웨어 개발 솔루션인 유비쿼터스 게임 플랫폼(Ubiquitous Game Platform)을 개발하였다. 유비쿼터스 게임 플랫폼은 C/C++ 언어와 자바 언어를 모두 지원하며, 가상기계 방식이기 때문에 여러 임베디드 기기에서 독립적으로 수행이 가능하다는 장점이 있다. 본 논문에서는 유비쿼터스 게임 플랫폼에서 자바 언어로 작성된 콘텐츠를 실행할 수 있도록 하기 위해 자바 바이트코드를 유비쿼터스 게임 플랫폼의 중간언어 형식인 SAF(Standard Assembly Format)로 변환해주는 Java Bytecode-to-SAF 번역기를 설계하고 구현하였다. Java Bytecode-to-SAF 번역기를 통해 C/C++ 콘텐츠뿐만 아니라 자바 콘텐츠도 하나의 플랫폼에서 실행이 가능해져서 개발자에게 효율적이며, 능률적인 개발 환경을 제공하고, 한번 개발한 콘텐츠를 타 기종으로 이식하기 위한 시간과 비용 소모를 줄여 생산성을 높일 수 있다.

A Study on the Pentium Code Generation using Retargetable Code Generation Technique from Bytecode (Bytecode로부터 재목적 코드 생성 기법을 이용한 Pentium 코드 생성에 관한 연구)

  • Jeong, Seong-Ok;Go, Gwang-Man;Lee, Seong-Ju
    • Journal of the Institute of Electronics Engineers of Korea CI
    • /
    • v.37 no.4
    • /
    • pp.1-8
    • /
    • 2000
  • The massive growth of the internet and the world-wide-web leads us to research the programming languages for the development of applications in heterogeneous, network-wide distributed environments. Java is an object-oriented language for such a environment and the Java programming language environment provides a portable, interpreted, high-performance, simple programming language. Bytecode is an intermediate code for Java language and it enables the development of applications on multiple platform in heterogeneous, distributed networks. But it takes much time to execute Bytecode because of using an interpretation method. In this paper, we design and implement a retargetable code generation system which can be systematically reconfigured to generate code for a variety of distinct target computers. From the system, we realize the code generation system which translates the Bytecode being produced by Java compiler into Pentium target code. We use ACK code generation system to do the work easily.

  • PDF

Static Type Inference Based on Static Single Assignment for Bytecode (바이트코드를 위한 정적 단일 배정문 기반의 정적 타입 추론)

  • Kim Ji-Min;Kim Ki-Tea;Kim Je-Min;Yoo Weon-Hee
    • Journal of the Korea Society of Computer and Information
    • /
    • v.11 no.4 s.42
    • /
    • pp.87-96
    • /
    • 2006
  • Although bytecode has many good features, it has slow execution speed and it is not an ideal representation for program analysis or optimization. For analysises and optimizations. bytecode must be translated to a Static Single Assignment Form(SSA Form) But when bytecode is translated a SSA Form it has lost type informations of son variables. For resolving these problem in this paper, we create extended control flow graph on bytecode. Also we convert the control flow graph to SSA Form for static analysis. Calculation about many informations such as dominator, immediate dominator. dominance frontier. ${\phi}$-Function. renaming are required to convert to SSA Form. To obtain appropriate type for generated SSA Form, we proceed the followings. First. we construct call graph and derivation graph of classes. And the we collect information associated with each node. After finding equivalence nodes and constructing Strongly Connected Component based on the collected informations. we assign type to each node.

  • PDF

Static Type Assignment for SSA Form in CTOC

  • Kim, Ki-Tae;Yoo, Weon-Hee
    • Journal of Information Processing Systems
    • /
    • v.3 no.1
    • /
    • pp.26-32
    • /
    • 2007
  • Although the Java bytecode has numerous advantages, it also has certain shortcomings such as its slow execution speed and difficulty of analysis. In order to overcome such disadvantages, a bytecode analysis and optimization must be performed. The control flow of the bytecode should be analyzed; next, information is required regarding where the variables are defined and used to conduct a dataflow analysis and optimization. There may be cases where variables with an identical name contain different values at different locations during execution, according to the value assigned to a given variable in each location. Therefore, in order to statically determine the value and type, the variables must be separated according to allocation. In order to achieve this, variables can be expressed using a static single assignment form. After transformation into a static single assignment form, the type information of each node expressed by each variable and expression must be configured to perform a static analysis and optimization. Based on the basic type information, this paper proposes a method for finding the related equivalent nodes, setting nodes with strong connection components, and efficiently assigning each node type.

Intermediate Language Translator for Execution of Java Programs in .NET Platform

  • Lee, Yang-Sun;Na, Seung-Won;Hwang, Dae-Hoon
    • Journal of Korea Multimedia Society
    • /
    • v.7 no.6
    • /
    • pp.824-831
    • /
    • 2004
  • This paper presents the java bytecode-to-.NET MSIL intermediate language translator which enables the execution of the java program in .NET environments without JVM(java Virtual Machine), translating bytecodes produced by compiling java programs into MSIL codes. Java, one of the most widely used programming languages recently, is the language invented by James Gosling at Sun Microsystems, which is the next generation language independent of operating systems and hardware platforms. Java source code is compiled into bytecode as intermediate code independent of each platform by compiler, and also executed by JVM. .NET language such as C# and .NET platform in Microsoft Corp. has been developed to meet the needs of programmers, and cope with Java and JVM platform of Sun Microsystems. After compiling, a program written in .NET language is converted to MSIL code, and also executed by .NET platform but not in JVM platform. For this reason, we designed and implemented the java bytecode-to-.NET MSIL translator system for programs written in java language to be executed in the. NET platform without JVM. This work improves the execution speed of programs, enhances the productivity, and provides a environment for programmers to develop application programs without limitations of programming languages.

  • PDF

Static Single Assignment Form for Java Bytecodes in CTOC (CTOC에서 자바 바이트코드를 위한 정적 단일 배정 형태)

  • Kim, Ki-Tae;Yoo, Weon-Hee
    • The KIPS Transactions:PartD
    • /
    • v.13D no.7 s.110
    • /
    • pp.939-946
    • /
    • 2006
  • Although the Java bytecode has numerous advantages, there are also shortcomings such as slow execution speed and difficulty in analysis. In order to overcome such disadvantages, bytecode analysis and optimization must be performed. We implements CTOC for optimized codes. An extended CFG must be first created in order to analyze and optimize a bytecode. Due to unique bytecode properties, the existing CFG must be expanded according to the bytecode. Furthermore, the CFG must be converted into SSA Form for a static analysis, for which calculation is required for various information such as the dominate relation, dominator tree, immediate dominator, $\phi$-function, rename, and dominance frontier. This paper describes the algorithm and the process for converting the existing CFG into the SSA From. The graph that incorporates the SSA Form is later used for type inference and optimization.