A Study on Static Type Assignment for Static Single Assignment Form

정적 단일 배정 형태를 위한 정적 타입 배정에 관한 연구

  • 김기태 (인하대학교 컴퓨터공학부) ;
  • 유원희 (인하대학교 컴퓨터공학부)
  • Published : 2006.02.01

Abstract

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. First control flow of the bytecode should be analyzed, after which information is required regarding where the variables are defined and used to conduct data flow analysis and optimization. There may be cases where variables with an identical name contain different values at a different location during the execution according to the value assigned to a 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 do so, the variables can be expressed using a static single assignment form. After the transformation into a static single assignment form, the type information of each node expressed by each variable and expression must be configured to perform static analysis and optimization. Based on the basic type information, this paper proposes a method for finding related equivalent nodes, setting the nodes with strongly connection components and efficiently assigning each node the type.

자바 바이트코드는 많은 장점을 갖지만 수행 속도가 느리고 분석이 어렵다는 단점을 갖는다 이를 극복하기 위해 바이트코드에 대한 분석과 최적화가 수행되어야 한다. 우선 바이트코드에 대한 제어 흐름 분석을 수행한다. 제어 흐름 분석 후 데이터 흐름 분석과 최적화를 위해서 변수가 어디서 정의되고 어디서 사용되는지에 대한 정보가 필요하다. 각 위치에서 변수에 배정되는 값에 따라 동일한 이름의 변수가 다른 위치에서 다른 값을 가지는 경우가 발생한다. 따라서 정적으로 값과 타입을 결정하기 위해서 변수는 배정되는 것에 따라 분리되어야 한다. 이를 위해 단일 배정 형태를 이용하여 표현할 수 있다. 정적 단일 배정형태(SSA Form)로 변경한 후 정적 분석과 최적화를 위해서는 각 변수와 표현식이 나타내는 각각의 노드에 타입 정보를 설정해야 한다. 본 논문은 타입에 대한 기본 정보를 바탕으로 관련된 동등한 노드를 발견하고 강 결합 요소로 설정한 후 각 노드에 타입을 효율적으로 설정하는 방법을 제안한다

Keywords