Publications

Detailed Information

레퍼런스 흐름에 기반한 디자인 패턴 분석 : Design Pattern Analysis based on Reference Flow

Cited 0 time in Web of Science Cited 0 time in Scopus
Authors

유찬우

Advisor
우치수
Major
전기·컴퓨터공학부
Issue Date
2012-02
Publisher
서울대학교 대학원
Abstract
소프트웨어는 종종 건물에 비유된다. 오래된 건물이 유지보수가 필요하듯이, 소프트웨어 역시 시간이 지남에 따라 건물처럼 노후되어 유지 보수를 필요로 하게 된다. 하지만 소프트웨어는 건물과 달리, 유지 보수에 필요한 설계 문서가 반드시 존재하지는 않는다. 이 경우, 건물을 촬영하여 구조도를 만들어내는 것과 같이, 소프트웨어를 분석하여 설계 정보를 얻어낼 필요가 있다.

디자인 패턴은 일종의 마이크로 아키텍처로, 아키텍처보다는 그 크기가 작고 단일 클래스보다는 그 규모가 커, 설계를 이해하기에 적합한 단위이다. 이에 많은 연구들이 기존 소프트웨어에서 디자인 패턴을 식별해 내기 위해 노력해 왔다. 기존 연구들의 문제는 디자인 패턴 식별 자체에 주력하여, 디자인 패턴을 통해 설계를 이해하는데 필요한 정보를 제공하는 데에는 소홀했다는 것이다.

건물이 지진이나 강한 바람에도 견딜 수 있으려면 건물을 유연한 구조로 설계해야 한다. 소프트웨어 역시 변경에 강한 특성을 가지기 위해서는 유연한 구조로 설계되어야 한다. 디자인 패턴은 유연한 구조의 설계를 모아놓은 집합으로, 적용시에 소프트웨어를 변경에 강하게 만든다. 그리고 유연한 구조의 설계를 만들기 위해 디자인 패턴에서 가장 많이 사용되는 관계가 인터페이스 타입에 대한 구성 관계이다. 인터페이스 타입에 대한 구성 관계란, 구체적인 구현에 의존하지 않고 인터페이스 타입의 객체를 사용하는 관계를 말한다. 총 23개의 GoF 디자인 패턴 중 18개의 패턴이 인터페이스 타입에 대한 구성 관계를 사용하고 있다.

본 논문은 인터페이스 타입에 대한 구성 관계를 중심으로 기존 디자인 패턴에 대한 분석을 시도하고 있다. 디자인 패턴이 유연한 구조의 설계를 만들기 위해 가장 많이 사용하는 관계가 인터페이스 타입에 대한 구성 관계라면, 그 관계를 중심으로 분석을 시도할 때 디자인 패턴을 더 잘 이해할 수 있다고 보았다.

본 논문에서는 인터페이스 타입의 객체가 생성된 후 사용되기까지의 과정을 레퍼런스 흐름으로 정의하였다. 그리고 기존 소프트웨어에 대해 레퍼런스 흐름을 추출하는 정적 분석 방법을 제시하였다. 또한, 레퍼런스 흐름 상에서 설계 분석에 중요한 의미를 가지는 역할들을 정의하였으며, 이 역할들을 중심으로 기존 디자인 패턴을 분석하였다. 그리고 패턴 분석의 결과가 기존 디자인 패턴의 정의에 부합함을 증명을 통해 보였다.

이와 같은 분석의 유효성을 보이기 위해, 분석 결과를 이용하여 기존 소프트웨어에 존재하는 디자인 패턴의 식별을 시도하였다. 그 결과 기존 연구에 비해 향상된 정확도를 나타내었다. 또한, 디자인 패턴의 인스턴스와 관련된 레퍼런스 흐름을 수집할 수 있었다. 이와 같이 수집된 레퍼런스 흐름은 패턴 인스턴스 주위의 설계 정보를 제공하여, 설계에 대한 이해를 돕게 된다.

본 논문에서 제시한 레퍼런스 흐름 분석 방법과, 디자인 패턴 분석 결과를 이용하면 기존 소프트웨어의 디자인 패턴을 보다 정확히 찾아낼 수 있다. 또한, 패턴과 함께 패턴 인스턴스 주위의 설계 정보를 레퍼런스 흐름의 형태로 얻음으로써, 소프트웨어의 설계를 보다 잘 이해할 수 있다.
Software is compared to a building. They have common that they are getting old and need maintenance work. But there is a different thing between them. There is not a design document of software always unlike the building. It needs to get some design information of software for the maintenance.

Design pattern is a kind of micro architecture. Its granularity is smaller than an architecture, and is bigger than a single class. There have been many researches to identify design patterns in software because they are useful to understand the software design. They have a tendency to focus on the identification itself and not to provide the design information around the detected pattern instance.

Architects often use flexible structures to construct a building endurable against earthquake and strong wind. There are also flexible structures make software durable against changes in software development. Design patterns are a set of those flexible structures, and composition is the most popular structure among them. There are 18 patterns based on compositions among all 23 GoF design patterns.

In this thesis, we present a design pattern analysis method focuses on composition relationships. We assume that composition relationships are a key to understand design patterns because they make design patterns flexible. Composition here means an inter-object relationship which is dependent on an interface, not an implementation.

A reference flow is defined as a path which a reference goes through from the creation site to the call site of the reference. We describe a static analysis method to get reference flows. We also define important roles on a reference flow, and analyze design patterns based on the roles. It is shown that the analysis result is compliant with the definitions of design patterns.

We perform an identification of design patterns in open source software using our analysis. As a result, we observe a better precision than related work in the pattern identification. In the identification process, reference flows around pattern instances are attained, and they are useful because they provide the design information around the instances.

It is expected that design pattern analysis based on reference flows increases the precision of the design pattern identification. It also provides more design information as a form of reference flows, which are useful for understanding the software design.
Language
kor
URI
https://hdl.handle.net/10371/156633

http://dcollection.snu.ac.kr:80/jsp/common/DcLoOrgPer.jsp?sItemId=000000001126
Files in This Item:
There are no files associated with this item.
Appears in Collections:

Altmetrics

Item View & Download Count

  • mendeley

Items in S-Space are protected by copyright, with all rights reserved, unless otherwise indicated.

Share