• Title/Summary/Keyword: CTOC

Search Result 26, Processing Time 0.033 seconds

A Study on Control Flow Analysis Using Java Bytecodes in CTOC (CTOC에서 자바 바이트코드를 이용한 제어 흐름 분석에 관한 연구)

  • Yoo Weon-Hee;Kim Ki-Tae
    • The Journal of the Korea Contents Association
    • /
    • v.6 no.1
    • /
    • pp.160-169
    • /
    • 2006
  • This paper describes the data structure for program analysis and optimization of bytecode level. First we create an extended CFG(Control Flow Graph). Because of the special properties of bytecode, we must adaptively extend the existing control flow analysis techniques. We build basic blocks to create the CFG and create various data that can be used for optimization. The created CFG can be tested for comprehension and maintenance of Java bytecode, and can also be used for other analyses such as data flow analysis. This paper implements CTOC's CTOC-BR(CTOC-Bytecode tRanslator) for control flow analysis of bytecode level. CTOC(Classes To Optimized Classes) is a Java bytecode framework for optimization and analysis. This paper covers the first part of the CTOC framework. CTOC-BR is a tool that converts the bytecode into tree form for easy optimization and analysis of bytecode in CTOC.

  • PDF

Split Local Variables Using Static Single Assignment Form in CTOC (CTOC에서 정적 단일 배정문 형태를 이용한 지역 변수 분리)

  • Lee Kab-Lae;Yoo Weon-Hee;Kim Ki-Tae
    • The Journal of the Korea Contents Association
    • /
    • v.5 no.3
    • /
    • pp.73-81
    • /
    • 2005
  • CTOC(Classes To Optimized Classes) is a Java bytecode framework for optimization and analysis. Although Java bytecode has a significant amount of type information embedded in it, there are no explicit types for local variables. However, knowing types for local variables is very useful for both program optimization and analysis. This paper is a first part of CTOC framework. In this paper, we present methods for inferring static types for local variables in a 3-address, stackless, representation of Java bytecode. We use SSA Form(Single Static Assignment Form) for spliting local variables. Splited local variables will use to prepare for static type inference.

  • PDF

Design of Translator for Efficient Intermediated Code from Stack Based Codes in CTOC (CTOC에서 스택 기반 코드를 효율적인 중간코드로 변환기 설계)

  • Kim Kyung-Soo;Kim Ki-Tae;Jo Sun-Moon;Yoo Weon-Hee
    • Proceedings of the Korea Information Processing Society Conference
    • /
    • 2004.11a
    • /
    • pp.429-432
    • /
    • 2004
  • 자바 언어는 객체지향 언어이며 효율적인 애플리케이션을 개발하기 위해 설계되었다. 특히 다양한 개발 환경과 이식성에 맞는 언어로써 각광을 받고 있다. 하지만 자바 언어로 애플리케이션을 개발하면 다른 언어로 작성하는 것 보다 실행이 느리다는 단점을 가지고 있다. 이러한 자바 실행 속도를 극복하기 위해 많은 연구가 되고 있는데, 그 중에서도 JIT방식과 네이티브 코드로 변환 방식이 있다. 본 논문은 스택기반의 자바 바이트코드에서 3-주소 형태로 변환하여 최적화하는 CTOC중에서 바이트코드에서 3-주소 형태 즉 CTOC-T의 중간 표현인 CTOC-B를 설계하려 한다. CTOC-B는 스택기반의 중간표현으로써 자바 바이트코드보다 코드의 변환과 분석이 용이하게 만든 형태의 표현이다. 본 논문에서는 자바 바이트코드에서 스택기반 중간코드인 CTOC-B 코드로의 효율적인 변환기를 설계하며, CTOC-B의 특징을 분석해 본다.

  • PDF

Design of Translator for Efficient Bytecodes from Intermediated Codes in CTOC (CTOC에서 중간 코드에서 효율적인 바이트코드로의 변환기 설계)

  • Kim Young-Kook;Jo Sun-Moon;Kim Ki-Tae;Yoo Weon-Hee
    • Proceedings of the Korea Information Processing Society Conference
    • /
    • 2004.11a
    • /
    • pp.445-448
    • /
    • 2004
  • 자바는 자바 가상기계를 사용해서 플랫폼에 독립적으로 사용할 수 있는 장점을 가진다. 그러나 자바가상머신은 인터프리터 방식을 이용하기 때문에 다른 컴파일언어에 비해서 수행속도가 느리다는 단점을 가진다. 이런 단점을 극복하기 위해서 많은 최적화나 JIT컴파일러 그리고 네이티브 코드로의 변환과 같은 연구들이 많이 연구되었다. 이전의 연구들은 한계성을 가지고 있어서 자바에서 수행시간의 문제는 지금도 문제로 남아있다. 이전의 문제점 해결의 극복의 대안으로 바이트코드를 최적화하는 프레임워크인 CTOC를 설명하고, CTOC에서 사용하는 중간코드로 사용하는 3-주소형식의 CTOC-T를 바이트코드로 변환하고, CTOC-T에서 바이트코드형식으로 변환할 때 생기는 과다한 load/store의 문제점을 해결한다.

  • PDF

Implementation of Loop Peeling in CTOC (CTOC에서 루프 벗기기 구현)

  • Kim, Ki-Tae;Kim, Je-Min;Yoo, Weon-Hee
    • Journal of the Korea Society of Computer and Information
    • /
    • v.13 no.5
    • /
    • pp.27-35
    • /
    • 2008
  • The CTOC framework was implemented to efficiently perform analysis and optimization of the Java bytecode that is often being used lately. In order to analyze and optimize the bytecode from the CTOC, the eCFG was first generated. Due to the bytecode characteristics of difficult analysis, the existing bytecode was expanded to be suitable for control flow analysis. and the control flow graph was drawn. We called eCFG(extended Control Flow Graph). Furthermore, the eCFG was converted into the SSA Form for a static analysis. Many loops were found in the conversion program. The previous CTOC performed conversion directly into the SSA Form without processing the loops. However, processing the loops prior to the SSA Form conversion allows more efficient generation of the SSA Form. This paper examines the process of finding the loops prior to converting the eCFG into the SSA Form In order to efficiently process the loops, and exhibits the procedures for generating the loop tree.

  • PDF

Constructing A Loop Tree in CTOC (CTOC에서 루프 트리 구성하기)

  • Kim, Ki-Tae;Kim, Je-Min;Yoo, Weong-Hee
    • The KIPS Transactions:PartD
    • /
    • v.15D no.2
    • /
    • pp.197-206
    • /
    • 2008
  • The CTOC framework was implemented to efficiently perform analysis and optimization of the Java bytecode that is often being used lately. In order to analyze and optimize the bytecode from the CTOC, the eCFG was first generated. Due to the bytecode characteristics of difficult analysis, the existing bytecode was expanded to be suitable for control flow analysis, and the control flow graph was drawn. We called eCFG(extended Control Flow Graph). Furthermore, the eCFG was converted into the SSA Form for a static analysis. Many loops were found in the conversion program. The previous CTOC performed conversion directly into the SSA Form without processing the loops. However, processing the loops prior to the SSA Form conversion allows more efficient generation of the SSA Form. This paper examines the process of finding the loops prior to converting the eCFG into the SSA Form in order to efficiently process the loops, and exhibits the procedures for generating the loop tree.

Implementation of SSA Form for Array in CTOC (CTOC에서 배열을 위한 SSA Form 의 구현)

  • Kim, Je-Min;Kim, Ki-Tae;Yoo, Weon-Hee
    • Proceedings of the Korea Information Processing Society Conference
    • /
    • 2007.05a
    • /
    • pp.1531-1534
    • /
    • 2007
  • 자바 바이트코드는 인터넷에서 바로 내려 받아 사용할 수 있는 형태로서 많이 사용된다. 따라서 그것에 대한 최적화가 중요하다. 따라서 이를 효율적으로 수행하기 위한 CTOC 프레임워크를 구현하였다. CTOC 에서 자바 바이트코드에 대한 스칼라 변수에 대한 최적화는 이미 많이 존재하지만, 배열에 대한 최적화는 그렇지 않다. 이 논문에서는 기존의 CTOC 에서의 배열 최적화를 위한 SSA form 에 대한 적용과 구현을 위해 기존에 있는 Array SSA form 과 Region Array SSA 의 사용을 보다 간단하게 하는 방법을 제안한다.

  • PDF

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.

Processing of Code Optimization in CTOC (CTOC에서 코드 최적화 수행)

  • Kim, Ki-Tae;Yoo, Weon-Hee
    • Journal of Korea Multimedia Society
    • /
    • v.10 no.5
    • /
    • pp.687-697
    • /
    • 2007
  • Although the Java bytecode has numerous advantages, there are also shortcomings such as slow execution speed and difficulty in analysis. Therefore, in order for the Java class file to be effectively executed under the execution environment such as the network, it is necessary to convert it into optimized code. We implemented CTOC for transforming to optimized code. In Optimization, SSA Form that distinguish variable by assignment is used to determine value and type statically. Copy propagation, dead code elimination optimization is applied to SSA Form. However, existing SSA Form is related to variable than expression. Therefore, in this paper, to performing optimization to SSA Form expression, after performing copy propagation and dead code elimination, in addition to that, partial redundant expression elimination is performed

  • PDF

Implementation of Dead Code Elimination in CTOC (CTOC에서 죽은 코드 제거 구현)

  • Kim, Ki-Tae;Kim, Je-Min;Yoo, Won-Hee
    • Journal of the Korea Society of Computer and Information
    • /
    • v.12 no.2 s.46
    • /
    • pp.1-8
    • /
    • 2007
  • Although the Java bytecode has numerous advantages, there are also shortcomings such as slow execution speed and difficulty in analysis. Therefore, in order for the Java class file to be effectively executed under the execution environment such as the network, it is necessary to convert it into optimized code. We implements CTOC. In order to statically determine the value and type, CTOC uses the SSA Form which separates the variable according to assignment. Also, it uses a Tree Form for statements. But, due to insertion of the $\phi$-function in the process of conversion into the SSA Form, the number of nodes increased. This paper shows the dead code elimination to obtain a more optimized code in SSA Form. We add new live field in each node and achieve dead code elimination in tree structures. We can confirm after dead code elimination though test results that nodes decreases.

  • PDF