Program Translation from Conventional Programming Source to Java Bytecode

기존 프로그래밍 원시코드에서 자바 바이트 코드로의 변환

  • Published : 2002.08.01

Abstract

Software reengineering is making various research for solutions against problem of maintain existing systems. Reengineering has a meaning of development of software on exizting systems through the reverse engineering auf forward engineering. Most of the important concepts used in reengineering is composition that is restructuring of the existing objects. Is there a compiler that can compile a program written in a traditional procedural language (like C or Pascal) and generate a Java bytecode, rather than an executable code that runs oかy on the machine it was compiled (such as an a.out file on a Unix machine)\ulcorner This type of compiler may be very handy for today's computing environment of heterogeneous networks. In this paper we present a software system that does this job at the binary-to-binary level. It takes the compiled binary code of a procedural language and translates it into Java bytecode. To do this, we first translate into an assembler code called Jasmin [7] that is a human-readable representation of Java bytecode. Then the Jasmin assembler converts it into real Java bytecode. The system is not a compiler because it does not start at the source level. We believe this kind of translator is even more useful than a compiler because most of the executable code that is available for sharing does not come with source programs. Of course, it works only if the format of the executable binary code is known. This translation process consists of three major stages: (1) analysis stage that identifies the language constructs in the given binary code, (2) initialization stage where variables and objects are located, classified, and initialized, and (3) mapping stage that maps the given binary code into a Jasmin assembler code that is then converted to Java bytecode.

소프트웨어 재공학은 기존 시스템의 유지보수 문제에 대한 해결책으로 많은 연구가 이루어 지고 있다. 재공학은 역공학과 순공학을 이용하여 기존 시스템에 대한 이해와 새로운 시스템의 개발을 의미하며 기존 시스템에서의 컴퍼넌트들로부터 필요한 기능을 가져와 재구성 하는 것이다. 본 논문에서는 기존의 프로시져 언어에 의해 컴파일된 바이너리 코드를 입력으로 받아서 웹 기반 자바 바이트 코드로 변환한다. 즉 바이너리-바이너리 단계에서 수행되는 소프트웨어 시스템을 제안한다. 이를 위해 먼저 Pascal-L 에 의해 작성된 기존의 프로그램 언어를 Jasmin 이라는 어셈블리 코드로 먼저 번역하고 사용자 읽기 가능한 자바 바이트 코드 상태인 Jasmin 어셈블리가 실제 자바 코드로 변환된다. 이 시스템은 결국 기존의 원시코드가 번역기를 통해 실행 가능한 바이너리 코드 형식으로 실행된다. 이 번역과정은 먼저 주어진 바이너리코드에서 언어구조를 식별하는 과정과 변수 객체의 위치를 분석하고 초기화 하는 과정 그리고 주어진 바이너리 코드를 Jasmin 코드로의 매핑하는 단계등으로 구성된다.

Keywords