A Study on the Optimization of C++ Program Using the Class Hierarchies Slicing

클래스 계층구조 슬라이싱을 이용한 C++프로그램 최적화에 관한 연구

  • 김운용 (광운대학교 대학원 전자계산학과) ;
  • 정계동 (광운대학교 대학원 전자계산학과) ;
  • 최영근 (광운대학교 전자계산학과)
  • Published : 1999.06.01

Abstract

This paper proposes an algorithm for class hierarchies which can optimize member data and member function. This algorithm considers single/multiple inheritance, static/dynamic binding, overloading/overriding, pure virtual/virtual function, and constructor on the hierarchy of C++ class. We need to eliminate unused function that possesses many component element, because the program uses a limited of function in class hierarchies. Previous works on slicing mainly focused on selecting output data and including the related program statement. It was consists of structured programming language and also centralized on error detection, maintenance, and flexible testing. In this paper, we extend to the object-oriented language, makes a linked-table for objects to raise the efficiency of information management, and proposes necessary algorithm for optimizing system Through this process, we can obtain the simplification of program code and the progress of system performance by eliminating unused member data and member function.

본 논문에서는 C++ 클래스 계층구조(상속관계를 가진 클래스들의 모음)를 대상으로 객체 지향 언어의 특성인 단일/다중 상속, 정적/동적 바인딩, 함수중복/함수재정의(Overloading & Overriding), 순수가상/가상함수, 생성자 문제를 고려하여 멤버데이터와 멤버함수를 최적화 할 수 있는 알고리즘을 제안한다. 프로그램 계층 구조와 그 계층 구조를 사용하는 프로그램은 일반적으로 클래스 계층 구조의 부분적인 기능만을 사용하기 때문에 많은 구성요소를 포함하는 클래스들에서 불필요한 기능을 제거하는 것이 필요하게 되었다. 지금까지 연구되어 왔던 고전적인 슬라이싱이나 다른 변형된 슬라이싱은 출력데이터를 선택하고 그와 관련된 프로그램 문장을 포함하는데 초점을 맞추고 있다. 그 대상은 대부분 구조적 프로그램 언어로 이루어졌으며 이러한 슬라이싱은 주로 오류 검출, 소프트웨어의 유지보수, 유연한 테스팅을 위한 주제로 연구가 되어 왔다. 본 논문에서는 그 대상 범위를 객체 지향 언어로 확장시키고, 분석단계에서 테이블 구성형태를 링크형태로 구성함으로써 보다 정보관리의 효율을 높일 수 있고, 이 테이블을 이용한 최적화 시스템 구현을 통해 필요한 알고리즘을 제시하였다. 이러한 과정을 통해 불필요한 멤버데이터, 멤버함수, 클래스 상속관계를 제거함으로 프로그램 코드의 간소화, 시스템 성능의 향상을 가져올 수 있다.

Keywords