초록
본 논문에서는 자바 바이트코드를 분석하고 변환할 수 있는 새로운 도구인 CTOC 프레임워크를 설계하고 구현한다. CTOC는 자바 바이트코드의 분석과 코드 변환을 수행할 수 있는 도구로, 바이트코드 분석과 변환 과정을 효율적으로 구현하기 위해 확장된 제어 흐름 그래프인 eCFG(extended Control Flow Graph)와 바이트코드를 효과적으로 처리할 수 있는 중간 코드인 E-Tree(Expression-Tree)를 사용한다. eCFG와 E-Tree를 자바 바이트코드에 대한 분석과 최적화 코드 변환 과정에 적용하여 CTOC의 유용성과 확장 가능성을 보인다.
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.