닫기
216.73.216.142
216.73.216.142
close menu
변수-변수 관련성을 이용한 동적 프로그램 조각 추출 알고리즘
An Extraction Algorithm of Dynamic Program Slice Using Variable-Variable Relationships
김태희(Kim Tae Hee),김병기(Kim Byung Ki)
UCI I410-ECN-0102-2009-000-007508823

프로그램 조각화 기법은 프로그램을 이해하기 쉬운 조각 단위로 분해하여 소프트웨어 개발자나 유지보수자가 프로그램을 쉽게 이해할 수 있도록 지원하는 방법이다. 본 논문에서는 변수-변수 관련성을 이용하여 정확하고 수행 가능한 프로그램 조각을 추출하는 동적 프로그램 조각 추출 알고리즘을 제안한다. 각 문장에서 변경되는 변수와 참조되는 변수로 나누어서 변수 집합을 계산하고, 선언부에 있는 문장에 대해 변수-변수 관련성을 계산한다. 변수-변수 관련성을 계산할 때는 선언부의 변수가 다른 문장에서 변경되는 변수로 사용된 경우와 참조되는 변수로 사용된 경우를 별도로 조사하여 변경되는 변수 집합은 무조건 관련 집합에 포함시키고, 문장에서 참조되는 변수들은 문장들을 다시 비교하여 기준 변수와 관련된 문장만을 추출하여 관련 집합에 포함시킨다. 제안한 알고리즘을 C 언어를 대상으로 실험한 결과 정확하고 수행 가능한 동적 조각을 추출하였고, 기존의 방법들보다 관련 문장을 찾기 위한 문장의 비교횟수를 평균 42%까지 감소시켰다. 기준 변수가 많을수록 기준 변수와 관련이 없는 변수가 많을수록 문장의 비교 횟수가 현저하게 감소하였다.

Program slicing is a method that supports software developer or maintainer to readily understand the program by decomposing it into several slices. In this paper we propose a dynamic program slice extraction algorithm that extracts the smallest and accurate program slice using variable-variable relationships. In this algorithm, we first define a set of variables from the left variable and the right variables in each sentence. Then, the variable-variable relationships is defined for the sentence in the declaration part. When we defined the variable-variable relationships in the declaration part, the sentences with the left variable defined in the set are always included in the related set. On the other hand, if the variable in the set is a right variable, only the sentences that are related with the criterion variable are included in the related set after the sentences are compared and evaluated against other sentences. Proposed algorithms is found to extract accurate and executable dynamic slice when applied to C language. When searching for the related sentences, it also reduced the number of sentence comparisons up to 42% compared to existing methods. Reduction of the number of comparisons is marked as the number of criterion variables is increased and as the number of comparison variables that are not related with the criterion variable is increased.

[자료제공 : 네이버학술정보]
×