KR20140125949A - Sequence diagram generating method and system - Google Patents

Sequence diagram generating method and system Download PDF

Info

Publication number
KR20140125949A
KR20140125949A KR1020130043573A KR20130043573A KR20140125949A KR 20140125949 A KR20140125949 A KR 20140125949A KR 1020130043573 A KR1020130043573 A KR 1020130043573A KR 20130043573 A KR20130043573 A KR 20130043573A KR 20140125949 A KR20140125949 A KR 20140125949A
Authority
KR
South Korea
Prior art keywords
call tree
call
node
tree
sequence diagram
Prior art date
Application number
KR1020130043573A
Other languages
Korean (ko)
Other versions
KR101488188B1 (en
Inventor
박수용
민성현
윤성혜
박수진
Original Assignee
서강대학교산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 서강대학교산학협력단 filed Critical 서강대학교산학협력단
Priority to KR20130043573A priority Critical patent/KR101488188B1/en
Publication of KR20140125949A publication Critical patent/KR20140125949A/en
Application granted granted Critical
Publication of KR101488188B1 publication Critical patent/KR101488188B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/10Requirements analysis; Specification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention relates to a method for generating a sequence diagram and a system thereof. More specifically, the method includes: a step where an input unit receives input of source code and execution-tracing log data of software for maintenance; a step where a preprocessor removes unnecessary objects from the source code and execution-tracing log data; a step where a call tree generation unit detects a method call relation among nodes from the source code and execution-tracing log data and generates a static call tree and a dynamic call tree based on the detected call relation; a step where a pruning processing unit removes at least a node which has method data unnecessary for a functional flow in the generated static and dynamic call trees; a step where a call tree integration unit integrates the static and dynamic call trees from which the node having the unnecessary method data is removed into one call tree; and a step where a sequence diagram generation unit converts the integrated call tree to generate a sequence diagram. Accordingly, by generating a sequence diagram presenting the functional flow of software to be maintained, the method for generating a sequence diagram and the system thereof given in the present invention are able to execute the software quickly and easily through analysis of the generated sequence diagram.

Description

시퀀스 다이어그램의 생성 방법 및 시스템{Sequence diagram generating method and system} [0001] The present invention relates to a method and system for generating a sequence diagram,

본 발명은 시퀀스 다이어그램의 생성 방법 및 시스템에 관한 것으로, 특히 유지보수를 수행하고자 하는 소프트웨어의 시퀀스 다이어그램을 생성하여 이를 통해 상기 소프트웨어의 기능 흐름을 용이하게 파악할 수 있는 시퀀스 다이어그램의 생성 방법 및 시스템에 관한 것이다.
The present invention relates to a method and system for generating a sequence diagram, and more particularly, to a method and system for generating a sequence diagram of software to perform maintenance, will be.

IT 기술의 급격한 발달로 인하여 소프트웨어의 규모는 커지고 복잡성은 점차 증가하였다. 이로 인해, 소프트웨어의 유지보수 비용이 증가하게 되는데, 일반적으로 소프트웨어의 전체 생명 주기 중 유지보수 단계에서의 소요 비용은 전체 소프트웨어 개발 비용의 약 60%를 차지한다. 따라서, 비용의 관점에서 본다면, 전체 소프트웨어의 개발 비용을 감소시키기 위해서는 유지보수에 소요되는 비용을 감소시키는 방법이 반드시 이루어져야 한다. Due to the rapid development of IT technology, the scale of the software has increased and the complexity has increased gradually. This increases the maintenance cost of the software, which typically accounts for about 60% of the total software development cost during the maintenance phase of the entire life cycle of the software. Therefore, from a cost point of view, in order to reduce the development cost of the entire software, a method for reducing the maintenance cost must be performed.

소프트웨어의 유지보수 작업을 수행하기 위해서는 먼저, 기존의 시스템을 이해하는 것이 선행되어야 한다. 왜냐하면, 유지보수 작업을 수행하기 위해 개발자가 기존의 시스템을 변경하거나, 확장하는 과정에서, 특정 기능의 변경이 전체 시스템에 미치는 영향을 정확하게 파악하고 있어야 하기 때문이다. In order to perform software maintenance, it is necessary to understand the existing system. This is because, in order to perform the maintenance work, the developer must accurately understand the effect of the change of the specific function on the entire system in the process of changing or expanding the existing system.

그럼에도 불구하고, 유지보수 단계에서의 시스템에 대한 이해 및 검토작업은 실제 소프트웨어 개발현장에서는 개발자들의 모델링에 대한 거부감 및 모델링 기술의 습득이 부족하는 등의 요인으로 인하여 원활히 수행되지 않는 실정이다. 이에 따라, 소프트웨어 설계 모델의 부재로 인해, 유지보수 대상이 되는 시스템을 파악하는 것이 시스템 전체의 유지보수 시간의 약 30%가 소요되고 있는 문제점이 발생했다. Nevertheless, understanding and reviewing the system at the maintenance stage is not performed smoothly due to lack of understanding of modeling and lack of modeling skill in the actual software development site. Accordingly, due to the absence of the software design model, it took about 30% of the maintenance time of the entire system to grasp the system to be maintained.

상술한 바와 같이, 시퀀스 다이어그램의 생성 방법 및 시스템에 대한 선행기술을 살펴보면 다음과 같다. 선행기술 1은 한국공개특허 제2004-0024923호(2004.03.24)로서, 소프트웨어 유지보수성 측정 방법 및 시스템에 관한 것이다. 이러한 선행기술 1은 내장형, 반내장형 및 도립형의 소프트웨어를 절차지향, 객체지향, 컴포넌기반 개발방식, 또는 고급 프로그래밍언어에 의한 산출물을 기반으로 소프트웨어 유지보수성을 측정 또는 예측하는 방법 및 시스템에 있어서, 소프트웨어의 유지보수성을 자동적으로 측정하기 위한 대상 및 환경변수 입력부; 소프트웨어 요구사항 명세서를 분석하고 측정정보를 추출하는 소프트웨어 요구사항 명세서 분석엔진; 소프트웨어 유지보수성 측정기준을 계획, 생성, 관리 및 제공하는 소프트웨어 유지보수성 측정기준 데이터베이스; 상기 소프트웨어 유지보수성 측정기준 데이터베이스를 이용하고, 상기 소프트웨어 요구사항 명세서 분석엔진으로 부터의 추출된 정보에 기초하여 소프트웨어 유지보수성 측정기준을 설정하는 소프트웨어 유지보수성 측정기준 설정엔진; 소프트웨어의 유지보수성을 예측하는데 이용되는 통계적 또는 수리적 소프트웨어 유지보수성 예측모델을 계획, 생성, 관리, 제공하는 소프트웨어 유지보수성 예측모델베이스; 소프트웨어 규모 및 복잡도 측정결과 데이터베이스, 소프트웨어 기능 측정결과 데이터베이스, 소프트웨어 신뢰성 측정결과 데이터베이스에서 제공된 정보를 적용하고, 설정된 기준, 선정된 예측모델, 추출된 측정정보에 의하여 소프트웨어의 유지보수성을 측정하는 소프트웨어 유지보수성 측정엔진; 측정결과를 출력하는 측정결과 출력부를 포함하여 구성됨으로써, 다양한 소프트웨어 응용분야, 개발방법 및 프로그래밍언어의 환경에서도 소프트웨어의 유지보수성을 사용자가 원하는 형식으로 편리하게 자동적으로 측정하여 소요시간 및 경제적 손실을 최소화하는 효과가 있다. 또한, 본 발명은 편리하고 정확한 소프트웨어 유지보수성 측정결과를 제공하여 사업관리 및 엔지니어링의 보다 체계적인고 과학적인 접근을 가능하게 하고자 함이다. 또한, 본 발명의 용도 또는 적용분야는 기업경영, 엔지니어링 및 프로젝트 관리이며, 생산성, 품질, 비용, 기간, 위험, 인력 및 자원을 측정 또는 예측함에 효과가 있다.As described above, a method and system for generating a sequence diagram will be described as follows. Prior Art 1 is Korean Patent Publication No. 2004-0024923 (Mar. 24, 2004), which relates to a method and system for measuring software maintenanceability. This prior art 1 is a method and system for measuring or predicting software maintenanceability based on a procedure-oriented, object-oriented, component-based development method, or an output based on an advanced programming language, An object and environment variable input unit for automatically measuring maintenance of the software; A software requirements specification analysis engine that analyzes the software requirements specification and extracts measurement information; A software maintainability metric database that plans, creates, manages, and provides software maintainability metrics; A software maintainability metric setting engine that uses the software maintainability metric database and sets a software maintainability metric based on information extracted from the software requirements specification analysis engine; A software maintenance predictive model base that plans, generates, manages, and provides statistical or numerical software maintenance predictive models that are used to predict the maintainability of the software; Software scale and complexity measurement result database, software function measurement result database, software reliability measurement result software maintenance information by applying the information provided in the database and measuring the maintainability of the software by the set criteria, the selected prediction model and the extracted measurement information Measuring engine; And a measurement result output unit for outputting measurement results, thereby automatically and conveniently measuring the maintainability of the software in a format desired by the user in various software application fields, development methods, and programming language environments, thereby minimizing the time and economic loss . The present invention also provides a systematic and scientific approach to business management and engineering by providing convenient and accurate software maintenance measurement results. Further, the use or application of the invention is enterprise management, engineering and project management and is effective in measuring or predicting productivity, quality, cost, duration, risk, manpower and resources.

또한, 선행기술 2는 한국공개특허 제2003-0018720호(2003.03.06)로서, 소프트웨어 유지보수를 위한 소스 코드 브라우저 자동생성 방법 및 시스템에 관한 것이다. 이러한 선행기술 2는 소프트웨어 유지 보수를 위한 소스 코드 브라우저 생성 방법에 있어서, 소스 코드에 대해 컴파일 및 번역을 수행하고 상기 소스 코드 브라우저 생성에 필요한 파일 및 함수 정보를 추출하는 제1단계; 상기 소스 코드를 파싱(parsing)하는 제2단계; 상기 파싱된 소스 코드로부터 키워드를 추출하여 하이라이팅하는 제3단계; 상기 파싱된 소스 코드로부터 주석문을 추출하여 하이라이팅하는 제4단계; 상기 추출된 파일 및 함수 정보를 기초로 상기 소스 코드의 전역변수/매크로/자료구조와 상기 전역변수/매크로/자료구조에 각각 대응하는 정보간에 하이퍼 링크를 생성하는 제5단계; 및 사용자로부터 입력된 블럭의 시작점을 기초로 소스 코드의 블록 구조를 분석하는 제6단계;를 포함함으로써, 소스 코드의 판독성 및 추적성이 용이한 고품질의 소스 코드 브라우저를 통해 프로그램 유지 보수자에게 소스코드에 대한 하이라이팅(highlighting)기능뿐만 아니라, 사용자 정의 변수의 정보를 이용하여 보다 편리하게 하이퍼(hyper)기능을 제공할 수 있어 사용자의 프로그램 이해도를 높일수 있으며, 블록의 시작과 끝을 쉽게 구분할수 있도록 실시간적으로 검색해 줄수 있어 프로그램을 유지 보수 하는데 있어, 시각적으로 이해도를 높일 뿐만 아니라, 각 파일 또는 함수내의 소스 크기(size)를 이용하여 토탈 라인, 주석 라인, 공백라인, 실행 라인 등의 소프트웨어 메트릭(metric) 정보를 제공함으로써 유지보수되어야 할 소스 코드를 분석하는데 용이하게 사용됨으로써, 프로그램의 유지보수 작업에 필요한 시간과 노력 및 비용을 최소화할 수 있으며, 다양한 형태를 갖는 소스 코드 브라우저를 자동 생성할 수 있는 효과가 있다.
Prior Art 2 is Korean Patent Publication No. 2003-0018720 (Mar. 2003), which relates to a method and system for automatically generating a source code browser for software maintenance. The prior art 2 is a method for generating a source code browser for software maintenance, comprising: a first step of performing compilation and translation on a source code and extracting file and function information necessary for generating the source code browser; A second step of parsing the source code; Extracting a keyword from the parsed source code and highlighting it; Extracting a comment from the parsed source code and highlighting it; A fifth step of generating a hyperlink between the global variable / macro / data structure of the source code and the information corresponding to the global variable / macro / data structure based on the extracted file and function information; And analyzing the block structure of the source code based on the starting point of the block input from the user, the method comprising the steps of: In addition to the highlighting function for the code, it is possible to provide more convenient hyper function by using the information of the user-defined variable, thereby improving the understanding of the user's program and easily distinguishing the start and end of the block In addition to increasing visibility in the maintenance of programs as they can search in real time, software metrics (total lines, comment lines, blank lines, execution lines, etc.) metric) to analyze the source code to be maintained The time, effort, and cost required for the maintenance work of the program can be minimized, and the source code browser having various forms can be automatically generated.

상기와 같은 종래 기술의 문제점을 해결하기 위해, 본 발명은 유지보수를 수행하고자 하는 소프트웨어에 대한 시퀀스 다이어그램을 생성함으로써, 생성된 시퀀스 다이어그램을 통해 상기 소프트웨어의 기능 흐름에 대한 분석을 빠르고 용이하게 할 수 있는 시퀀스 다이어그램의 생성 방법 및 시스템을 제공하고자 한다.
In order to solve the problems of the related art as described above, the present invention can quickly and easily analyze the function flow of the software through the generated sequence diagram by generating a sequence diagram for the software to be maintained And to provide a method and system for generating a sequence diagram.

위와 같은 과제를 해결하기 위한 본 발명의 한 실시 예에 따른 시퀀스 다이어그램의 생성 방법은 입력부가 유지 또는 보수를 수행하고자 하는 소프트웨어에 대한 소스코드와 실행 추적 로그정보를 입력받는 단계; 전처리부가 입력받은 상기 소스코드와 실행 추적 로그정보에 대하여 불필요한 오브젝트를 제거하는 단계; 호출트리생성부가 상기 소스코드와 실행 추적 로그정보로부터 노드간 메소드 호출 관계를 검출하고, 검출된 호출관계에 기초하여 정적 호출 트리 및 동적 호출 트리를 생성하는 단계; 프루닝처리부가 생성된 상기 정적 호출 트리와 동적 호출 트리 내 기능 흐름에 불필요한 메소드 정보를 갖는 적어도 하나의 노드를 제거하는 단계; 호출트리통합부가 노드가 제거된 상기 정적 호출 트리와 동적 호출 트리를 하나의 호출 트리로 통합하는 단계; 및 시퀀스 다이어그램 생성부가 통합된 하나의 호출 트리를 변환하여 시퀀스 다이어그램을 생성하는 단계;를 포함한다. According to an aspect of the present invention, there is provided a method of generating a sequence diagram, the method comprising: receiving input source code and execution trace log information for software to perform maintenance or repair; Removing unnecessary objects from the source code and execution trace log information received by the preprocessor; The call tree generating unit detects a method call relationship between nodes from the source code and execution trace log information, and generates a static call tree and a dynamic call tree based on the detected call relationship; Removing at least one node having the static call tree in which the pruning processing section is created and the method information unnecessary in the function flow in the dynamic call tree; Integrating the static call tree and dynamic call tree into which the call tree integration side node has been removed into one call tree; And converting the one call tree in which the sequence diagram generating unit is integrated to generate the sequence diagram.

특히, 상기 소스코드로부터 획득한 노드간 메소드의 호출 관계를 검출하고, 검출된 호출관계에 기초하여 정적 호출 트리를 생성하는 호출트리생성부가 정적 호출 트리 및 동적 호출 트리를 생성하는 단계를 포함할 수 있다. In particular, the method may include generating a static call tree and a dynamic call tree, wherein the call tree generator for detecting a call relationship of the inter-node method obtained from the source code and generating a static call tree based on the detected call relationship have.

특히, 상기 실행 추적 로그정보로부터 획득한 노드간 메소드의 호출 관계를 검출하고, 검출된 호출관계에 기초하여 동적 호출 트리를 생성하는 상기 호출트리생성부가 정적 호출 트리 및 동적 호출 트리를 생성하는 단계를 포함할 수 있다.In particular, the step of generating a static call tree and a dynamic call tree by the call tree generating unit for detecting a call relationship of the inter-node method obtained from the execution trace log information and generating a dynamic call tree based on the detected call relationship .

특히, 상기 실행 추적 로그정보로부터 획득한 노드간 메소드에 대하여 상기 메소드의 수행 시작 지점과 종료 지점을 기록하는 로그정보를 이용하여 동적 호출 트리를 생성하는 상기 호출트리생성부가 정적 호출 트리 및 동적 호출 트리를 생성하는 단계를 포함할 수 있다.In particular, the call tree generating unit for generating a dynamic call tree using log information for recording a start point and an end point of execution of the method with respect to inter-node methods obtained from the execution trace log information includes a static call tree and a dynamic call tree For example.

보다 바람직하게는 미리 정해진 속성값을 반환하거나, 범용적으로 사용되거나, 반복 수행되는 메소드를 기능 흐름에 불필요한 메소드로 판단하는 상기 프루닝처리부가 상기 정적 호출 트리와 동적 호출 트리 내 기능 흐름에 불필요한 메소드 정보를 갖는 적어도 하나의 노드를 제거하는 단계를 포함할 수 있다. More preferably, the pruning processing unit for returning a predetermined property value, judging a method that is commonly used or repeatedly executed as an unnecessary method in a function flow, And removing at least one node having information.

보다 바람직하게는 통합된 호출 트리의 구조로부터 메소드의 호출 순서 정보를 획득하고, 획득한 메소드의 호출 순서정보에 기초하여 상기 메소드를 시퀀스 다이어그램으로 변환하는 상기 시퀀스 다이어그램 생성부가 통합된 하나의 호출 트리를 변환하여 시퀀스 다이어그램을 생성하는 단계를 포함할 수 있다.More preferably, the sequence diagram generator for obtaining the call sequence information of the method from the structure of the integrated call tree and converting the method to the sequence diagram based on the call sequence information of the obtained method, And generating a sequence diagram by transforming the sequence diagram.

위와 같은 과제를 해결하기 위한 본 발명의 다른 실시 예에 따른 시퀀스 다이어그램의 생성 시스템은 유지보수를 수행하고자 하는 소프트웨어에 대한 소스코드와 실행 추적 로그정보를 입력받는 입력부; 입력받은 상기 소스코드와 실행 추적 로그정보에 대하여 불필요한 오브젝트를 제거하는 전처리부; 상기 소스코드와 실행 추적 로그정보로부터 노드간 메소드 호출 관계를 검출하고, 검출된 호출관계에 기초하여 정적 호출 트리 및 동적 호출 트리를 생성하는 호출트리생성부; 생성된 상기 정적 호출 트리와 동적 호출 트리 내 기능 흐름에 불필요한 메소드 정보를 갖는 적어도 하나의 노드를 제거하는 프루닝처리부; 노드가 제거된 상기 정적 호출 트리와 동적 호출 트리를 하나의 호출 트리로 통합하는 호출트리통합부; 및 통합된 하나의 호출 트리를 변환하여 시퀀스 다이어그램을 생성하는 시퀀스다이어그램생성부;를 포함한다. According to another aspect of the present invention, there is provided a system for generating a sequence diagram, the system including: an input unit for receiving source code and execution trace log information for software to be maintained; A preprocessor for removing unnecessary objects from the input source code and execution trace log information; A call tree generation unit that detects a method call relationship between nodes from the source code and execution trace log information, and generates a static call tree and a dynamic call tree based on the detected call relationship; A pruning processing unit for removing the generated static call tree and at least one node having unnecessary method information in the function flow in the dynamic call tree; A call tree integration unit for integrating the static call tree and the dynamic call tree in which nodes are removed into one call tree; And a sequence diagram generation unit for generating a sequence diagram by converting one integrated call tree.

특히, 하나의 루트노드를 포함하여 메소드를 호출하는 복수 개의 노드 집합, 한 방향으로 호출이 이루어지는 메소드의 집합 및 반복 호출이 이루어지는 메소드의 집합 중 적어도 하나를 포함하도록 이루어지는 호출 트리의 구조를 포함할 수 있다. In particular, it may include a structure of a call tree that includes at least one of a set of nodes that invoke a method including a single root node, a set of methods in which calls are made in one direction, and a set of methods in which iterative calls are made have.

특히, 클래스의 이름, 메소드 이름, 반환값의 매개변수, 메소드의 호출 시 수행되는 명령어 집합, 현재 호출 상황 중 적어도 하나를 포함하는 노드를 포함할 수 있다.In particular, it may include a node including at least one of a class name, a method name, a parameter of a return value, a set of instructions to be executed when a method is invoked, and a current call state.

특히, 상기 소스코드로부터 획득한 노드간 메소드의 호출 관계를 검출하고, 검출된 호출관계에 기초하여 정적 호출 트리를 생성하는 호출트리생성부를 포함할 수 있다. In particular, it may include a call tree generation unit that detects a call relationship of the inter-node method obtained from the source code, and generates a static call tree based on the detected call relationship.

특히, 상기 실행 추적 로그정보로부터 획득한 노드간 메소드의 호출 관계를 검출하고, 검출된 호출관계에 기초하여 동적 호출 트리를 생성하는 호출트리생성부를 포함할 수 있다. In particular, it may include a call tree generation unit that detects a call relationship of the inter-node method obtained from the execution trace log information, and generates a dynamic call tree based on the detected call relationship.

특히, 상기 실행 추적 로그정보로부터 획득한 노드간 메소드에 대하여 상기 메소드의 수행 시작 지점과 종료 지점을 기록하는 로그정보를 이용하여 동적 호출 트리를 생성하는 호출트리생성부를 포함할 수 있다.In particular, the method may include a call tree generation unit that generates a dynamic call tree using log information that records a start point and an end point of execution of the method with respect to inter-node methods obtained from the execution trace log information.

특히, 미리 정해진 속성값을 반환하거나, 범용적으로 사용되거나, 반복 수행되는 메소드를 기능 흐름에 불필요한 메소드로 판단하는 프루닝처리부를 포함할 수 있다.In particular, it may include a pruning processing unit that returns a predetermined property value, or uses a general-purpose or repeatedly-performed method as an unnecessary method in a function flow.

보다 바람직하게는 통합된 호출 트리의 구조로부터 메소드의 호출 순서 정보를 획득하고, 획득한 메소드의 호출 순서정보에 기초하여 상기 메소드를 시퀀스 다이어그램으로 변환하는 시퀀스 다이어그램 생성부를 포함할 수 있다.
More preferably, it may include a sequence diagram generator for obtaining call sequence information of the method from the structure of the integrated call tree, and converting the method to the sequence diagram based on the call sequence information of the obtained method.

본 발명의 시퀀스 다이어그램의 생성 방법 및 시스템은 유지보수를 수행하고자 하는 소프트웨어의 기능의 흐름을 나타내는 시퀀스 다이어그램을 생성함으로써, 생성된 시퀀스 다이어그램을 분석하여 상기 소프트웨어의 기능 흐름을 빠르고 용이하게 분석할 수 있는 효과가 있다. The method and system for generating the sequence diagram of the present invention can generate a sequence diagram indicating the flow of the function of the software to perform maintenance so as to analyze the generated sequence diagram and analyze the function flow of the software quickly and easily It is effective.

또한, 본 발명의 시퀀스 다이어그램의 생성 방법 및 시스템은 유지보수를 수행하고자 하는 소프트웨어의 기능 흐름을 시퀀스 다이어그램의 분석을 통해 빠르게 분석함으로써, 상기 소프트웨어의 분석시간을 감소시킴에 따라 상기 소프트웨어의 유지보수에 소요되는 시간 및 비용을 감소시킬 수 있는 효과가 있다.
Also, the method and system for generating the sequence diagram of the present invention can quickly analyze the function flow of the software to perform maintenance through the analysis of the sequence diagram, reduce the analysis time of the software, The time and cost required can be reduced.

도 1은 본 발명의 일 실시 예에 따른 시퀀스 다이어그램의 생성 시스템의 블록도이다.
도 2는 본 발명의 다른 실시 예에 따른 시퀀스 다이어그램의 생성 방법의 순서도이다.
도 3은 정적 호출 트리 구조의 예를 나타낸 도면이다.
도 4는 제2 통합규칙을 적용하여 호출 트리의 통합 과정을 나타낸 도면이다.
도 5는 제3 통합규칙을 적용하여 호출 트리의 통합 과정을 나타낸 도면이다.
도 6은 제4 통합규칙을 적용하여 호출 트리의 통합 과정을 나타낸 도면이다.
도 7은 제5 통합규칙을 적용하여 호출 트리의 통합 과정을 나타낸 도면이다.
도 8은 본 발명의 시퀀스 다이어그램의 생성을 구현한 툴을 나타낸 블록도이다.
도 9는 실행 추적 로그정보와 제거할 메시지를 나타내는 도면이다.
도 10은 생성된 시퀀스 다이어그램을 나타낸 도면이다.
도 11은 프루닝처리부의 푸르닝(Pruning) 처리 알고리즘을 나타낸 도면이다.
도 12는 호출 트리의 통합 과정 알고리즘을 나타낸 도면이다.
도 13은 본 발명을 실험한 대상의 시스템 정보를 나타낸 도면이다.
도 14는 호출 트리의 노드 수를 비교한 도면이다.
1 is a block diagram of a generation system of a sequence diagram according to an embodiment of the present invention.
2 is a flowchart of a method of generating a sequence diagram according to another embodiment of the present invention.
3 is a diagram showing an example of a static call tree structure.
4 is a diagram illustrating an integration process of a call tree by applying a second aggregation rule.
5 is a diagram illustrating an integration process of a call tree by applying a third integration rule.
6 is a diagram illustrating an integration process of a call tree by applying a fourth integration rule.
FIG. 7 is a diagram illustrating an integration process of a call tree by applying a fifth integration rule. FIG.
8 is a block diagram illustrating a tool that implements the generation of the sequence diagram of the present invention.
9 is a view showing execution trace log information and a message to be removed.
10 is a diagram showing a generated sequence diagram.
11 is a diagram showing a pruning processing algorithm of the pruning processing unit.
12 is a diagram illustrating an algorithm for the integration process of a call tree.
13 is a diagram showing system information of an object of the present invention.
14 is a diagram comparing the number of nodes in the call tree.

이하, 본 발명을 바람직한 실시 예와 첨부한 도면을 참고로 하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며, 여기에서 설명하는 실시 예에 한정되는 것은 아니다. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT Hereinafter, the present invention will be described in detail with reference to preferred embodiments and accompanying drawings, which will be easily understood by those skilled in the art. The present invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein.

이하, 도 1을 참조하여, 본 발명의 일 실시 예에 따른 시퀀스 다이어그램의 생성 시스템에 대하여 자세히 살펴보도록 한다. Hereinafter, a system for generating a sequence diagram according to an embodiment of the present invention will be described in detail with reference to FIG.

도 1은 본 발명의 일 실시 예에 따른 시퀀스 다이어그램의 생성 시스템의 블록도이다.1 is a block diagram of a generation system of a sequence diagram according to an embodiment of the present invention.

도 1에 도시된 바와 같이, 본 발명의 시퀀스 다이어그램의 생성 시스템(100)은 입력부(110), 전처리부(120), 호출트리생성부(130), 프루닝처리부(140), 호출트리통합부(150) 및 시퀀스 다이어그램 생성부(160)를 포함한다. 1, the generation system 100 of the sequence diagram of the present invention includes an input unit 110, a preprocessing unit 120, a call tree generation unit 130, a pruning processing unit 140, (150) and a sequence diagram generator (160).

입력부(110)는 유지보수를 수행하고자 하는 소프트웨어에 대한 소스코드와 실행 추적 로그정보를 입력받는다. The input unit 110 receives the source code and execution trace log information for the software to be maintained.

전처리부(120)는 입력받은 상기 소스코드와 실행 추적 로그정보에 대하여 불필요한 오브젝트를 제거한다.The preprocessing unit 120 removes unnecessary objects from the input source code and execution trace log information.

호출트리생성부(130)는 상기 소스코드와 실행 추적 로그정보로부터 노드간 메소드 호출 관계를 검출하고, 검출된 호출관계에 기초하여 정적 호출 트리 및 동적 호출 트리를 생성한다. 이와 같이, 생성된 정적 또는 동적 호출 트리의 구조는 하나의 루트노드(root node)를 포함하여 메소드를 호출하는 복수 개의 노드 집합, 한 방향으로 호출이 이루어지는 메소드의 집합 및 반복 호출이 이루어지는 메소드의 집합 중 적어도 하나를 포함하도록 이루어진다. 이때, 메소드를 호출하는 상기 노드는 클래스의 이름, 메소드의 이름, 반환값의 매개변수, 메소드의 호출 시 수행되는 명령어 집합, 현재 호출 상황 중 적어도 하나를 포함할 수 있다. 이러한 호출트리생성부(130)는 상기 소스코드로부터 획득한 메소드의 호출 관계를 검출하고, 검출된 호출관계에 기초하여 정적 호출 트리를 생성하는데, 이때, 이클립스의 AST 파서(Parser)로 생성한 AST(Abstract Syntax Tree)를 이용하여 정적 호출 트리를 생성한다. 또한 상기 호출트리생성부(130)는 상기 실행 추적 로그정보로부터 획득한 메소드의 호출 관계를 검출하고, 검출된 호출관계에 기초하여 동적 호출 트리를 생성한다. 특히, 상기 호출트리생성부(130)는 상기 실행 추적 로그정보로부터 획득한 호출된 메소드에 대하여 상기 메소드의 수행 시작 지점과 종료 지점을 기록하는 로그정보를 이용하여 동적 호출 트리를 생성하는데, 이때, 오픈 소스인 Btrace 툴을 이용하여 동적 호출 트리를 생성한다.The call tree generation unit 130 detects a method call relationship between nodes from the source code and execution trace log information, and generates a static call tree and a dynamic call tree based on the detected call relationship. Thus, the structure of the generated static or dynamic call tree is composed of a plurality of node sets that call a method including one root node, a set of methods in which calls are made in one direction, and a set of methods in which repeated calls are made As shown in FIG. At this time, the node that calls a method may include at least one of a name of a class, a name of a method, a parameter of a return value, a set of instructions to be executed when a method is called, and a current call state. The call tree generation unit 130 detects a calling relationship of the method obtained from the source code and generates a static call tree based on the detected calling relationship. At this time, the AST (Parser) generated by the Eclipse's AST parser (Abstract Syntax Tree) to generate a static call tree. Also, the call tree generation unit 130 detects a call relationship of the method obtained from the execution trace log information, and generates a dynamic call tree based on the detected call relationship. In particular, the call tree generating unit 130 generates a dynamic call tree by using log information that records a start point and an end point of execution of the method with respect to the called method obtained from the execution trace log information. At this time, Use the open source Btrace tool to create a dynamic call tree.

프루닝처리부(140)는 생성된 상기 정적 호출 트리와 동적 호출 트리 내 기능 흐름에 불필요한 메소드 정보를 갖는 노드를 제거한다. 이러한 프루닝처리부(140)는 미리 정해진 속성값을 반환하거나, 널리 범용적으로 사용되거나, 수행되는 메소드를 기능 흐름에 불필요한 메소드로 판단한다. The pruning processing unit 140 removes the generated static call tree and nodes having unnecessary method information in the function flow in the dynamic call tree. The pruning processing unit 140 returns a predetermined property value, or widely used method, or determines a method to be performed as an unnecessary method in a function flow.

호출트리통합부(150)는 노드가 제거된 상기 정적 호출 트리와 동적 호출 트리를 하나의 호출 트리로 통합한다. The call tree integration unit 150 integrates the static call tree and the dynamic call tree from which the node has been removed into one call tree.

시퀀스 다이어그램 생성부(160)는 통합된 하나의 호출 트리를 변환하여 시퀀스 다이어그램을 생성한다. 이러한 시퀀스 다이어그램 생성부(160)는 통합된 호출 트리의 구조로부터 메소드의 호출 순서정보를 획득하고, 획득한 메소드의 호출 순서정보에 기초하여 메소드를 시퀀스 다이어그램으로 변환한다. The sequence diagram generation unit 160 generates a sequence diagram by transforming one integrated call tree. The sequence diagram generator 160 obtains the call sequence information of the method from the structure of the integrated call tree and converts the method into the sequence diagram based on the call sequence information of the obtained method.

이하, 도 2를 참조하여, 본 발명의 다른 실시 예에 따른 시퀀스 다이어그램의 생성 방법에 대하여 자세히 살펴보도록 한다. Hereinafter, a method of generating a sequence diagram according to another embodiment of the present invention will be described in detail with reference to FIG.

도 2는 본 발명의 다른 실시 예에 따른 시퀀스 다이어그램의 생성 방법의 순서도이다.2 is a flowchart of a method of generating a sequence diagram according to another embodiment of the present invention.

도 2에 도시된 바와 같이, 본 발명의 시퀀스 다이어그램의 생성 방법은 먼저, 입력부(110)가 유지보수를 수행하고자 하는 소프트웨어에 대한 소스코드와 실행 추적 로그정보를 입력받는다(S210).As shown in FIG. 2, in the method of generating the sequence diagram of the present invention, the input unit 110 receives source code and execution trace log information for software to be maintained (S210).

전처리부(120)가 입력받은 상기 소스코드와 실행 추적 로그정보에 대하여 불필요한 오브젝트를 제거한다(S220). The preprocessing unit 120 removes unnecessary objects from the source code and the execution trace log information (S220).

특히, 종래의 시퀀스 다이어그램은 메소드의 호출 깊이 즉, 처음 호출되는 메소드로부터 몇 단계까지 호출되는 메소드를 포함할 것인지에 따라 시퀀스 다이어그램의 복잡도가 크게 차이가 나며, 소스코드로 구현되어 있는 클래스 외에 자바 표준 라이브러리, 프레임워크의 사용 등으로 참조가 되는 오브젝트를 모두 포함하게 되어 복잡도가 상승한다. 또한, 소스코드 상에 존재하는 모든 내용이 반영되는 경우에 시퀀스 다이어그램의 복잡도가 매우 커지게 된다. 따라서, 추후 생성되는 시퀀스 다이어그램의 복잡도를 감소시키고, 대상 소프트웨어의 분석 범위를 설정하기 위해, 소프트웨어의 초기 생성 시 참조되는 오브젝트를 사용자가 지정한 패키지로 한정하고, 시퀀스 다이어그램에 표현되는 오브젝트의 수준을 메모리 상에서 생성되는 모든 오브젝트를 구별하지 않고, 오브젝트의 타입인 클래스 수준으로 추상화하여 시퀀스 다이어그램에 표현한다. 이와 더불어, 사용자에 의해 선택되지 않은 자바 표준 라이브러리 또는 상용 라이브러리 등을 제외함으로써, 자동으로 내포 수준 또한 제한된다. Particularly, the conventional sequence diagram has a great difference in the complexity of the sequence diagram depending on the calling depth of the method, ie, how many steps are called from the first method to be called. In addition to the class implemented in the source code, , The use of the framework, and the like, all of the objects to be referred to include the complexity. In addition, the complexity of the sequence diagram becomes very large when all the contents existing in the source code are reflected. Therefore, in order to reduce the complexity of the sequence diagram to be generated later and to set the analysis range of the target software, the object to be referred to at the time of initial creation of the software is limited to the package designated by the user, and the level of the object represented in the sequence diagram is stored in the memory All objects created on the object are abstracted at the class level, which is an object type, and are expressed in a sequence diagram. In addition, by excluding Java standard libraries or commercial libraries that are not selected by the user, the level of nesting is also automatically limited.

호출트리생성부(130)가 상기 소스코드와 실행 추적 로그정보로부터 메소드 호출 관계를 검출하고, 검출된 메소드 호출관계에 기초하여 정적 호출 트리 및 동적 호출 트리를 생성하는데(S230), 이때, 호출트리생성부(130)가 상기 소스코드로부터 획득한 메소드의 호출 관계를 검출하고, 검출된 호출관계에 기초하여 정적 호출 트리를 생성한다. 또는 상기 호출트리생성부(130)가 상기 실행 추적 로그정보로부터 획득한 메소드의 호출 관계를 검출하고, 검출된 호출관계에 기초하여 동적 호출 트리를 생성한다. The call tree generation unit 130 detects a method call relationship from the source code and the execution trace log information, and generates a static call tree and a dynamic call tree based on the detected method call relationship (S230). At this time, The generation unit 130 detects the calling relation of the method obtained from the source code, and generates the static calling tree based on the detected calling relation. Alternatively, the call tree generating unit 130 detects a call relation of a method obtained from the execution trace log information, and generates a dynamic call tree based on the detected call relationship.

특히, 상기 호출트리생성부(130)가 상기 실행 추적 로그정보로부터 획득한 호출된 메소드에 대하여 상기 메소드의 수행 시작 지점과 종료 지점을 기록하는 로그정보를 이용하여 동적 호출 트리를 생성한다. In particular, the call tree generating unit 130 generates a dynamic call tree using log information that records the start and end points of execution of the method for the called method obtained from the execution trace log information.

즉, 대상 소프트웨어의 각 기능을 수행하는 메소드의 호출이 이루어지는 흐름이 호출 트리 형태로 표현될 수 있다. 이러한 호출 트리의 구조는 메소드의 호출관계를 도식화한 것으로서, 메소드를 노드로 호출하는 관계를 에지(edge)로 표현한 그래프의 일종이다. 이러한 호출 트리의 구조는 일반적인 그래프와 달리 메소드로부터 다른 메소드까지 한 방향성만을 가지며, 메소드간 순환관계는 갖지 않는다. 또한, 상기 호출 트리 구조는 하나의 메소드에 대하여 호출의 시작을 나타내는 루트 노드(root node)를 가짐으로써, 모든 노드가 하나의 루트 노드와 거리를 나타내는 레벨(단계)를 갖는다. 이에 따라, 메소드 호출 순서를 중점적으로 나타내는 시퀀스 다이어그램과 달리, 호출 트리는 호출하는 메소드(caller)와 호출되는 메소드(callee)의 관계에 대하여 초점을 맞춤으로써, 특정 메소드로부터 시작되는 내부 흐름을 파악하는데 매우 유용하다. That is, a flow in which a call of a method performing each function of the target software is performed can be expressed in the form of a call tree. The structure of such a call tree is a graphical representation of the calling relationship of a method, and is a kind of graph that expresses a relation of calling a method to a node as an edge. Unlike a normal graph, the structure of such a call tree has only one direction from a method to another method, and does not have a circular relationship between methods. In addition, the call tree structure has a root node indicating the start of a call for one method, so that all nodes have a level (step) indicating a distance from one root node. Thus, unlike a sequence diagram that focuses on the method invocation order, the call tree focuses on the relationship between the invoking method (caller) and the invoked method (callee) useful.

이하, 도 3을 참조하여 호출 트리 구조 중 정적 호출 트리 구조를 자세히 살펴보면 다음과 같다. Hereinafter, the static call tree structure of the call tree structure will be described in detail with reference to FIG.

도 3은 정적 호출 트리 구조의 예를 나타낸 도면이다.3 is a diagram showing an example of a static call tree structure.

도 3에 도시된 바와 같이, 정적 호출 트리를 구성하는 각각의 노드는 사각형으로 표현되며, 이때 노드에서 표현되는 A.a는 클래스 A에 속한 메소드 a를 나타낸다. 특히, 정적 호출 트리를 생성하기 위해 사용되는 AST는 호출하는 메소드의 클래스를 알 수 없기 때문에 이클립스의 프로젝트 탐색기의 트리 구조로부터 호출하는 메소드의 클래스 정보를 획득한다. 이때, 각각의 노드는 클래스와의 관계와 메소드의 시그니처를 속성으로서 갖는다. 특히, 반복적으로 나타나는 메소드의 호출 감소를 나타내기 위해, 반복적으로 나타나는 메소드를 '반복 메소드 블록'으로서 정의하고, 사각형으로 표시한 후, 순환하는 화살표로서 표시된다. 즉, 도 3에 도시된 바와 같이, 상기 노드 C.c와 노드 F.f를 하나의 사각형으로 묶고, 이러한 사각형에 순환하는 화살표를 표시함으로써, 노드 C.c와 노드 F.f가 반복적으로 나타나는 노드인 것을 표시하였다. As shown in FIG. 3, each node constituting the static call tree is represented by a rectangle. At this time, A.a represented in the node represents a method a belonging to the class A. In particular, since the AST used to create the static call tree does not know the class of the calling method, it obtains the class information of the calling method from the tree structure of Eclipse's project explorer. At this time, each node has a relation with the class and a signature of the method as an attribute. In particular, in order to indicate the reduction in the recursion of the method that appears repeatedly, the iterative method is defined as a 'iterative method block', displayed as a rectangle, and then displayed as a circular arrow. That is, as shown in FIG. 3, the node C.c and the node F.f are grouped into a single rectangle, and an arrow circulating in the rectangle is displayed to indicate that the node C.c and the node F.f are repetitive nodes.

더불어, 정적 호출 트리 상에서 두 번 이상 나타나는 메소드 노드가 존재하는 경우에는 해당하는 메소드 노드의 중복된 자식 노드의 표현을 생략하고, 해당하는 메소드 노드에 *을 추가로 표시한다. 즉, 도 3에 도시된 바와 같이, 노드 B.b가 두 번 출현하였으므로, 상기 노드 B.b의 두 번째 출현 시, 상기 노드 B.b의 자식 노드인 D.d와, 노드 E.e의 표기를 생략하고, *이 추가로 표시한다.In addition, if there is a method node appearing more than once in the static call tree, the representation of the duplicated child node of the corresponding method node is omitted, and * is additionally displayed in the corresponding method node. That is, as shown in FIG. 3, since the node Bb appears twice, the notation of the child node Dd and the node Ee of the node Bb is omitted at the time of the second appearance of the node Bb, do.

더불어, 소스코드로부터 획득한 호출 관계에 따른 호출트리와의 매핑관계를 살펴보도록 한다. In addition, let's look at the mapping relation with the call tree according to the call relation acquired from the source code.

프루닝처리부(140)가 생성된 상기 정적 호출 트리와 동적 호출 트리 내 기능 흐름에 불필요한 메소드 정보를 갖는 노드를 제거한다(S240). 이러한 프루닝처리부(140)가 미리 정해진 속성값을 반환하거나, 범용적으로 사용되는 메소드를 기능 흐름에 불필요한 메소드로 판단하고, 이와 같이 불필요하다고 판단한 메소드 정보를 갖는 노드를 상기 정적 호출 트리 또는 동적 호출 트리로부터 제거한다. The pruning processing unit 140 removes the static call tree from which the static call tree is generated and the node having unnecessary method information in the function flow in the dynamic call tree at step S240. The pruning processing unit 140 may return a predetermined property value or determine a general-purpose method as an unnecessary method in the function flow, and send a node having the method information determined to be unnecessary as the static call tree or dynamic call Remove from the tree.

이하, 상기 불필요한 메소드에 대하여 자세히 살펴보도록 한다. Hereinafter, the unnecessary methods will be described in detail.

예를 들어, Getter method 는 미리 정해진 attribute의 값을 반환하도록 만들어진 메소드로 값을 읽기 위해, attribute에 접속하는 것을 제외하고, 시스템의 기능에 영향을 미치지 않는 메소드를 말한다. 또한, Utility method 는 특정 기능에 한정되는 것이 아닌 시스템의 다양한 부분에서 공통적으로 사용될 수 있는 메소드를 나타내는 것으로서, 많은 소프트웨어 시스템에서는 시스템의 기능을 구현하기 위해 도움을 주는 유틸리티를 사용하며, 이러한 유틸리티는 서브루틴 또는 서브시스템 또는 별도로 구현되는 클래스가 될 수 있다. For example, a getter method is a method that is designed to return a predefined attribute value, a method that does not affect the functionality of the system, except to access the attribute to read the value. Utility methods are not limited to specific functions but represent methods that can be used in various parts of the system. Many software systems use utilities to help implement the functions of the system, A routine or subsystem, or a separately implemented class.

이와 같이 상술한 메소드를 기능 흐름에 불필요하다고 판단하고, 이러한 메소드의 정보를 갖는 노드를 정적 호출 트리 또는 동적 호출 트리로부터 제거할 수 있다. In this manner, it is possible to determine that the above-described method is unnecessary for the function flow, and to remove the node having the information of the method from the static call tree or the dynamic call tree.

따라서, 추후 생성되는 시퀀스 다이어그램에 포함되는 메시지 수를 줄임으로써, 시퀀스 다이어그램의 크기를 줄이고, 불필요한 정보를 제거하여 기능의 흐름을 최대한 단순하고 명료하게 나타낼 수 있다. Therefore, by decreasing the number of messages included in the sequence diagram to be generated later, the size of the sequence diagram can be reduced, and unnecessary information can be removed, so that the function flow can be represented simply and clearly.

호출트리통합부(150)가 불필요한 메소드 정보를 갖는 노드가 제거된 상기 정적 호출 트리와 동적 호출 트리를 하나의 호출 트리로 통합한다(S250). The call tree integration unit 150 integrates the static call tree and the dynamic call tree from which nodes having unnecessary method information are removed into one call tree at step S250.

이러한 호출 트리의 통합과정은 미리 설정된 제1 내지 제5 통합규칙에 기초하여 이루어진다.The integration process of the call tree is performed based on the first to fifth integration rules set in advance.

먼저, 제1 통합규칙은 정적 호출 트리와 동적 호출 트리간 공통된 메소드 노드를 식별한다.First, the first aggregation rule identifies a common method node between the static call tree and the dynamic call tree.

즉, 동적 호출 트리 TD의 현재 메소드 노드인 M(i, d)와 정적 호출 트리 TS의 현재 메소드 노드 M(j, d)가 동일한 메소드 노드인 경우에는 통합 호출 트리 TC에 M(i, d)를 추가한다. That is, it is a dynamic call tree current method nodes of T D M (i, d) and the static call tree T S of the present method the node M (j, d) are the same when the method nodes integrated call tree T C M (i , d) are added.

또한, 제2 통합규칙은 메시지 호출 시퀀스의 중복을 제거한다.In addition, the second aggregation rule eliminates duplication of the message invocation sequence.

예를 들어, 정적 호출 트리 TS의 현재 메소드 노드 M(j, d)가 반복 메소드 블록에 해당하는 경우에, 동적 호출 트리 TD의 d 번째 깊이에서 동일한 메소드의 반복이 존재하는지 검색하고, 반복적으로 동일한 메소드 노드들의 시퀀스가 존재한다면 통합 호출 트리 TC에 정적 호출 트리 TS의 반복 메소드 블록을 추가한다. For example, if the current method node M (j, d) of the static call tree T S corresponds to an iterative method block, it is searched whether there is an iteration of the same method at the dth depth of the dynamic call tree T D , , The iterative method block of the static call tree T S is added to the unified call tree T C.

도 4는 제2 통합규칙을 적용하여 호출 트리의 통합 과정을 나타낸 도면이다.4 is a diagram illustrating an integration process of a call tree by applying a second aggregation rule.

도 4(a)에 도시된 바와 같이, 정적 호출 트리 TS에 반복 메소드 블록(C.c, D,d) 이 존재하고, 동적 호출 트리 TD에 동일한 메소드들의 반복 시퀀스(C.c → D.d → C.c → D.d)가 존재하는 것을 알 수 있다. 이에 따라, 상기 제2 통합규칙을 적용하여 정적 호출 트리 TS와 동적 호출 트리 TD를 통합하면, 통합 호출 트리 TC는 반복 메소드 블록 C.c, D.d 를 가지게 된다. As shown in Fig. 4 (a), there are repeated method blocks Cc, D, d in the static call tree T S and a repetition sequence of the same methods in the dynamic call tree T D (Cc → Dd → Cc → Dd ) Is present in the region. Accordingly, by integrating the static call tree T S and the dynamic call tree T D by applying the second integration rule, the integrated call tree T C has the repeated method blocks Cc and Dd.

특히, 도 4(b)는 이후, 동적 호출 트리 TD로부터 생성되는 시퀀스 다이어그램을 나타내고, 도 4(c)는 이후, 통합 호출 트리 TC로부터 생성되는 시퀀스 다이어그램을 나타낸다. 도 4(c)에 도시된 바와 같이, 반복 메소드 블록이 루프 프레임으로 표현됨에 따라, 도 4(b)에 도시된 시퀀스 다이어그램과 비교하여 보다 컴팩트하게 만들 수 있게 한다. Specifically, FIG. 4 (b) then shows the sequence diagram generated from the dynamic call tree T D , and FIG. 4 (c) shows the sequence diagram generated from the integrated call tree T C afterwards. As shown in Fig. 4 (c), the repetitive method block is represented as a loop frame, making it possible to make it more compact as compared with the sequence diagram shown in Fig. 4 (b).

더불어, 제3 통합규칙은 실제로 참여하는 오브젝트를 식별하는 것이다.In addition, the third unified rule is to identify the objects that actually participate.

예를 들어, 동적 호출 트리 TD의 현재 메소드 노드 M(i, d)와 정적 호출 트리 TS의 현재 메소드 노드 M(j, d)가 동일한 시그니처를 갖지만, 상기 두 메소드 노드가 속하는 클래스가 서로 다른 경우에는 상기 두 메소드 노드간에 관계를 검색한다. 이어서, 동적 호출 트리 TD의 현재 메소드 노드 M(i, d)의 클래스가 정적 호출 트리 TS의 현재 메소드 노드 M(j, d)의 클래스의 자식 클래스에 해당하는 경우, 통합 호출 트리 Tc에 상기 동적 호출 트리 TD의 현재 메시지 노드 M(i, d)를 추가한다. For example, if the current method node M (i, d) of the dynamic call tree T D and the current method node M (j, d) of the static call tree T S have the same signature, In other cases, the relationship between the two method nodes is retrieved. Then, the dynamic call tree T D of the current method, the node M if (i, d) classes are available for the children of the class's static call tree T S Current methods node M (j, d) as in the integrated call tree Tc Adds the current message node M (i, d) of the dynamic call tree T D.

도 5는 제3 통합규칙을 적용하여 호출 트리의 통합 과정을 나타낸 도면이다.5 is a diagram illustrating an integration process of a call tree by applying a third integration rule.

도 5에 도시된 바와 같이, 정적 호출 트리의 노드 D.d 와 동적 호출 트리 TD의 노드 E.d에 있는 메소드 d()가 식별되었고, 클래스 E는 클래스 D의 자식 클래스이므로, 동적 호출 트리 TD의 노드 E.d가 상기 제3 통합규칙에 의해 통합 호출 트리 TC에 추가된다. 이에 따라, 추후 생성되는 시퀀스 다이어그램에서는 실제 호출된 클래스 E의 d()가 메시지로 나타나고, 동적 호출 트리 TD로부터 생성된 시퀀스 다이어그램과 비교하면, 통합 호출 트리 TC로부터 생성된 시퀀스 다이어그램은 실행시점에 실제로 참여하는 클래스를 지정하여 시스템 행위를 보다 명확하게 이해할 수 있도록 한다.Since the, was identified by the method d () in the node Ed node Dd and dynamic call tree T D of the static call tree, class E, class D child class 5, the dynamic call tree T D of the node Ed is added to the unified call tree T C by the third unified rule. Accordingly, in the sequence diagram to be generated later, d () of the actually called class E appears as a message, and when compared with the sequence diagram generated from the dynamic call tree T D , the sequence diagram generated from the integrated call tree T C , You can specify a class that actually participates in the system so that you can understand system behavior more clearly.

이와 더불어, 제4 통합규칙은 실행되지 않은 메소드를 식별하는 것이다.In addition, the fourth union rule identifies unexecuted methods.

예를 들어, 정적 호출 트리 Ts의 현재 메소드 노드 M(i, d)와 동적 호출 트리 TD의 현재 메소드 노드 M(j, d)를 상호 비교하여, 상기 동적 호출 트리 TD의 현재 메소드 노드 M(j, d)가 null이면, 상기 정적 호출 트리 Ts의 현재 메소드 노드 M(i, d)를 통합 호출 트리 Tc에 추가한다. For example, current methods node of the static call tree Ts M (i, d) and a dynamic call tree T D of the current method, the node M (j, d) for the cross-comparison, the dynamic call tree T D the current method the node M of (j, d) is null, adds the current method node M (i, d) of the static call tree Ts to the unified call tree Tc.

하지만 이와 달리, 상기 동적 호출 트리 TD의 현재 메소드 노드 M(j, d)가 null이 아니고, 노드 M(i, d)와 다르다면, 상기 정적 호출 트리 Ts의 M(i, d)는 동적 호출 트리 TD의 다음 노드 M(j+1, d)와 다시 비교한다.Alternatively, if the current method node M (j, d) of the dynamic call tree T D is not null and is different from the node M (i, d), M (i, d) And again with the next node M (j + 1, d) of the call tree T D.

이에 따라, 상기 노드 M(j+1, d)가 노드 M(i, d)와 다르거나 null 이면, 통합 호출 트리 Tc에 노드 M(i, d)를 추가한다. Accordingly, if the node M (j + 1, d) is different or null from the node M (i, d), the node M (i, d) is added to the integrated call tree Tc.

이후, 상기 정적 호출 트리 Ts의 메소드 노드 M(i, d)는 생성된 시퀀스 다이어그램에서 옵션 프레임의 메시지로 표시된다. Then, the method node M (i, d) of the static call tree Ts is displayed as a message of the option frame in the generated sequence diagram.

도 6은 제4 통합규칙을 적용하여 호출 트리의 통합 과정을 나타낸 도면이다.6 is a diagram illustrating an integration process of a call tree by applying a fourth integration rule.

도 6에 도시된 바와 같이, 정적 호출 트리 Ts의 메소드 노드 D.d는 동적 호출 트리 TD에서는 존재하지 않는데, 이는 클래스 D의 d()메소드는 구현이 되었지만 실행추적로그를 생성할 때 실행되지 않았기 때문이다. 이처럼, 제4 통합규칙을 이용하여 통합 호출 트리 TC에 메소드 노드 D.d가 추가됨으로써, 결과적으로 동적 호출 트리 TD로부터 생성된 시퀀스 다이어그램에서는 누락된 메소드 d()가 Tc로부터 생성된 시퀀스 다이어그램에서 나타내고 있어, 역공학의 커버리지를 향상시킬 수 있다. As shown in Figure 6, the method node Dd of the static call tree Ts does not exist in the dynamic call tree T D because the d () method of class D is implemented but not executed when generating the execution trace log to be. As a result, the method node Dd is added to the integrated call tree T C using the fourth integration rule, so that in the sequence diagram generated from the dynamic call tree T D , the missing method d () is shown in the sequence diagram generated from Tc And can improve the coverage of reverse engineering.

마지막으로, 제5 통합규칙은 지연 바인딩 행위를 식별하는 것이다. Finally, the fifth unification rule is to identify the late binding behavior.

예를 들어, 동적 호출 트리 TD의 현재 메소드 노드 M(j, d)와 정적 호출 트리 Ts의 현재 메소드 노드 M(i, d)를 상호 비교한다. For example, the current method node M (j, d) of the dynamic call tree T D is compared with the current method node M (i, d) of the static call tree Ts.

상기 정적 호출 트리 Ts의 현재 메소드 노드 M(i, d)가 null이면, 소스코드로부터 동적 호출 트리 TD의 현재 메소드 노드 M(j,d)를 루트 노드로 갖는 신규 정적 호출 트리 Ts' 생성하고, 생성된 신규 정적 호출 트리 Ts' 의 루트노드를 이전 정적 호출 트리 Ts의 M(i,d) 노드의 다음 이웃 노드로 추가한다.If the current method node M (i, d) of the static call tree Ts is null, a new static call tree Ts' having the current method node M (j, d) of the dynamic call tree T D as the root node is generated from the source code , And adds the root node of the generated new static call tree Ts' to the next neighbor node of the M (i, d) node of the previous static call tree Ts.

이때, 상기 M(i, d)가 null이 아니고, M(j, d)와도 다른 경우에는 동적 호출 트리 TD의 현재 메소드 노드 M(j, d) 와 다음 이웃 노드 M(i+1, d)를 상호 비교한다.If the M (i, d) is not null and is different from M (j, d), the current method node M (j, d) of the dynamic call tree T D and the next neighboring node M (i + ).

상기 다음 이웃노드 M(i+1, d)가 현재 메소드 노드 M(j, d)와 다른 노드이거나, 또는 null 이면, 신규 정적 호출 트리 Ts' 를 생성하고, 생성된 신규 정적 호출 트리 Ts' 의 루트 노드를 이전 정적 호출 트리 Ts의 현재 메소드 노드 M(i, d)의 다음 이웃 노드로 추가한다.If the next neighboring node M (i + 1, d) is a different node from the current method node M (j, d) or null, a new static call tree Ts' Add the root node to the next neighbor node of the current method node M (i, d) of the previous static call tree Ts.

이후, 상기 동적 호출 트리 TD의 현재 메소드 노드 M(j, d)와 정적 호출 트리 Ts의 현재 메소드 노드 M(i, d)에서부터 비교를 다시 시작한다.Then, the comparison is restarted from the current method node M (j, d) of the dynamic call tree T D and the current method node M (i, d) of the static call tree Ts.

도 7은 제5 통합규칙을 적용하여 호출 트리의 통합 과정을 나타낸 도면이다.FIG. 7 is a diagram illustrating an integration process of a call tree by applying a fifth integration rule. FIG.

도 7에 도시된 바와 같이, 동적 호출 트리 TD의 노드 D.d의 메소드 d()는 정적 호출 트리 Ts에서 식별되지 않는 것을 통해 메소드 d()가 동적 바인딩이 되었음을 알 수 있다. 상기 정적 호출 트리 Ts로부터 생성된 시퀀스 다이어그램은 A.a, B.b, C.c 의 세 가지 메소드 호출들로만 이루어져 있으며, 앞서 설명한 제5 통합규칙을 적용하여 생성된 통합 호출 트리 Tc 로부터 생성된 시퀀스 다이어그램은 메소드 D.d 뿐만 아니라, 다른 메소드 호출들 E.e, F.f, G.g 까지 포함하고 있다. 특히, 정적 호출 트리와 동적 호출 트리의 지속적인 비교과정을 통해 통합 호출 트리 Tc에 제1 통합규칙 및 제4 통합규칙 또한 적용되었으며, 결과적으로 도 10(c)와 같은 최종적인 통합 호출 트리를 확인할 수 있다.As shown in Fig. 7, the method d () of the node Dd of the dynamic call tree T D can know that the method d () is dynamically bound through what is not identified in the static call tree Ts. The sequence diagram generated from the static call tree Ts consists of only three method calls Aa, Bb, and Cc. The sequence diagram generated from the integrated call tree Tc generated by applying the fifth integration rule described above includes not only the method Dd , And other method calls Ee, Ff, and Gg. Particularly, the first integrated rule and the fourth integrated rule are also applied to the integrated call tree Tc through the continuous comparison process between the static call tree and the dynamic call tree. As a result, the final integrated call tree as shown in FIG. 10 (c) have.

이와 같이, 생성된 시퀀스 다이어그램은 정적 호출 트리와 동적 호출 트리가 통합된 호출 트리를 기반으로 함에 따라, 정적 호출 트리가 갖는 기능 흐름의 단절 문제가 해결되는 것을 알 수 있다. 더불어, 정적 호출 트리를 기반으로 시스템 문맥 정보를 반영함으로써 동적 호출 트리가 갖는 누락되는 기능 흐름에 대한 문제 역시 해결되는 것을 알 수 있다. Thus, it can be seen that the generated sequence diagram is solved based on the call tree in which the static call tree and the dynamic call tree are integrated, thereby solving the problem of disconnecting the function flow of the static call tree. In addition, it can be seen that the problem of the missing function flow of the dynamic call tree is solved by reflecting the system context information based on the static call tree.

이하, 도 8 내지 도 14를 통해 본 발명에 따라 시퀀스 다이어그램을 실제로 구현한 예에 대하여 자세히 살펴보도록 한다. Hereinafter, an actual implementation of the sequence diagram according to the present invention will be described in detail with reference to FIG. 8 through FIG.

먼저, 본 실험에서는 이클립스(Eclipse) 프로젝트에서 운용중인 Rich Client Platform(RCP)을 사용하여 개발을 진행하였다. 상기 Rich Client란 스스로 다량의 데이터를 처리하는 클라이언트로서, 서버에 의지하지 않는 프로그램을 말한다. 또한, Graphical Editing Framework을 사용하여 통합된 호출 트리의 정보를 시퀀스 다이어그램의 형태로 생성되도록 하였다.First, we developed the Rich Client Platform (RCP) in the Eclipse project. The Rich Client is a client that processes a large amount of data on its own, and does not depend on the server. Also, by using Graphical Editing Framework, information of integrated call tree is generated in the form of sequence diagram.

본 도구의 기반이 된 RCP의 특징과 해당 도구의 시스템 아키텍처를 구성하는 컴포넌트 중 Rich Client Platform(RCP)은 Java 기반의 플랫폼 독립 실행이 가능하며, 기본적인 사용자 인터페이스를 제공하며, Graphical Editing Framework(GEF)는 시각 기반의 고품질 에디터 및 뷰를 쉽게 만들 수 있게 지원하는 이클립스 프레임워크로서, 이클립스 워크벤치 사용자 인터페이스와 통합성을 제공한다.The Rich Client Platform (RCP), which is a component of the system architecture of the RCP that is the basis of this tool, and the component architecture of the tool, is Java-based platform-independent, provides a basic user interface and supports Graphical Editing Framework (GEF) Is an Eclipse framework that makes it easy to create high-quality, time-based editors and views, and provides integration with the Eclipse workbench user interface.

도 8은 본 발명의 시퀀스 다이어그램의 생성을 구현한 툴(Tool)을 나타낸 블록도이다.8 is a block diagram showing a tool that implements the generation of the sequence diagram of the present invention.

도 8에 도시된 바와 같이, 로그 리더(Log Reader)는 실행 추적 로그와 Java Parser를 통해 소스코드로부터 추출된 호출관계 로그를 분석 데이터로 전환한다. As shown in Fig. 8, the log reader converts the call relationship log extracted from the source code into analysis data through execution trace log and Java parser.

Call tree Builder는 분석 데이터를 소스코드 기반의 호출 트리와, 실행 추적 기반의 동적 트리 형태로 생성한다. The Call Tree Builder generates the analysis data in the form of a call tree based on source code and a dynamic tree based on execution trace.

Call tree pruner는 생성된 두 개의 호출 트리에서 불필요한 메소드 정보와 그 하위 흐름을 제거 한다. Call tree pruner removes unnecessary method information and its subflows from the two generated call trees.

Call tree combiner는 생성된 두 개의 호출 트리를 규칙에 따라 하나의 호출 트리로 통합한다. The call tree combiner combines the two generated call trees into one call tree according to the rules.

Sequence diagram Combiner는 통합된 호출 트리를 읽어 시퀀스 다이어그램의 형태로 변환한다. Sequence diagram The combiner reads and translates the integrated call tree into a sequence diagram.

Model Editor는 생성된 시퀀스 다이어그램의 정보를 읽어 화면에 표시한다. The Model Editor reads the information of the created sequence diagram and displays it on the screen.

Project Manager는 여러 개의 시퀀스 다이어그램을 포함하는 대상 시스템에 대해 하나의 프로젝트 단위로 관리한다.The Project Manager manages a single project unit for a target system that contains multiple sequence diagrams.

상술한 시퀀스 다이어그램 툴의 기능 중 유저 인터페이스(UI) 부분에 대하여 자세히 살펴보도록 한다. The user interface (UI) portion of the functions of the above-described sequence diagram tool will be described in detail.

도 9는 실행 추적 로그정보와 제거할 메시지를 나타내는 도면이다.9 is a view showing execution trace log information and a message to be removed.

도 9에 도시된 바와 같이, 먼저 1번 부분은 생성되는 시퀀스 다이어그램을 관리하는 프로젝트를 보여 주는 부분이다. 2번 부분은 시퀀스 다이어그램의 이름과 함께 Java Parser를 이용하여 소스코드로부터 추출한 호출 관계 정보를 담고 있는 로그, 자바 프로파일링(Java Profiling) 도구를 이용하여 시스템 실행 시 수행되는 메소드의 정보를 담고 있는 로그를 입력 받는 부분이다. 마지막으로 3번 부분은 입력받은 로그를 기반으로 현재 포함되는 모든 메소드의 정보를 나타낸다. 표시되는 메소드 중 사용자는 제거할 메소드를 선택할 수 있으며, 선택된 정보는 별도의 필터 파일로 저장하여 이후에 다시 사용할 수 있다.As shown in FIG. 9, the first part is a part showing a project managing the generated sequence diagram. The second part is a log containing the name of the sequence diagram, a log containing the call relationship information extracted from the source code by using Java Parser, a log containing information of the method executed by the system using the Java Profiling tool . Finally, section 3 shows information of all the currently included methods based on the input log. Among the displayed methods, the user can select the method to be removed, and the selected information can be saved as a separate filter file for later use.

이하, 도 10을 참조하여, 시퀀스 다이어그램의 생성화면에 대하여 살펴보도록 한다. Hereinafter, a generation screen of the sequence diagram will be described with reference to FIG.

도 10은 생성된 시퀀스 다이어그램을 나타낸 도면이다.10 is a diagram showing a generated sequence diagram.

도 10에 도시된 바와 같이, 로그파일이 모두 입력되고 제거할 메소드를 선택하고 나면 시퀀스 다이어그램이 생성된다. 1번은 생성된 시퀀스 다이어그램을 나타낸다. 2번은 해당 시퀀스 다이어그램 내에 포함된 오브젝트들을 간략하게 나타내고, 3번은 전체 시퀀스 다이어그램을 작게 나타내며, 마지막으로 4번은 시퀀스 다이어그램 내의 오브젝트와 메시지의 속성 정보를 나타낸다. 생성된 시퀀스 다이어그램은 프로젝트에 포함된다.As shown in FIG. 10, a sequence diagram is generated after all the log files are input and a method to be removed is selected. 1 shows the generated sequence diagram. 2 shows briefly the objects included in the corresponding sequence diagram, 3 shows the entire sequence diagram small, and 4 shows the attribute information of objects and messages in the sequence diagram. The generated sequence diagram is included in the project.

두 개의 호출 트리를 통합하기 앞서, 사용자가 선택한 메소드 정보를 담고 있는 노드를 제거한다.Before merging the two call trees, remove the node containing the method information you selected.

이하, 해당 노드를 제거하기 위한 알고리즘을 도 14를 참조하여 살펴보도록 한다. Hereinafter, an algorithm for removing the node will be described with reference to FIG.

도 11은 프루닝처리부의 푸르닝(Pruning) 처리 알고리즘을 나타낸 도면이다.11 is a diagram showing a pruning processing algorithm of the pruning processing unit.

도 11에 도시된 바와 같이, 해당 노드를 제거하기 위한 알고리즘은 수식 1과 같다.As shown in FIG. 11, the algorithm for removing the corresponding node is expressed by Equation 1.

사용자가 선택한 메소드는 filter라는 형태의 데이터로 저장된다(1). 필터에 저장된 모든 메소드에 대해 현재 노드가 가지고 있는 메소드 정보와 동일한지 검사하여(2), 동일한 경우에는 해당 노드를 트리에서 제거한다(3~5). 만약 현재의 노드가 필터에 저장된 메소드 정보들과 동일하지 않을 경우, 탐색은 현재 노드의 자식 노드들로 내려가며, 이를 위해 해당 메소드는 재귀적으로 호출된다(10).The method selected by the user is stored as data of type filter (1). (2) if all the methods stored in the filter are the same as the method information of the current node, and if they are the same, remove the node from the tree (3-5). If the current node is not the same as the method information stored in the filter, the search goes down to the current node's child nodes, and the method is recursively called (10).

이하에서는 도 12를 참조하여 호출 트리의 통합 과정에 대한 알고리즘에 대하여 살펴보도록 한다.Hereinafter, an algorithm for the integration process of the call tree will be described with reference to FIG.

도 12는 호출 트리의 통합 과정 알고리즘을 나타낸 도면이다. 12 is a diagram illustrating an algorithm for the integration process of a call tree.

도 12에 도시된 바와 같이, 프루닝 과정을 통해 정제된 두 개의 호출 트리는 하나의 호출 트리로 통합된다. As shown in FIG. 12, the two call trees refined through the pruning process are integrated into one call tree.

먼저, 정적 호출 트리와 동적 호출 트리에서 각각 선택된 노드의 자식 노드들은 S, D의 노드 타입의 배열에 저장되며(1), 두 개의 배열은 하나의 배열로 통합된다. 이때, 상기 통합은 S의 노드들을 기준으로 D의 노드들을 덧붙이는 방법으로 이루어진다. 따라서, D의 모든 노드가 순서대로 S에 통합될 때까지 통합 과정은 반복된다(3). 먼저, D의 노드와 일치하는 노드를 S에서 찾아 해당 노드의 index를 lastIndex에 저장한다(6). lastIndex는 이미 통합이 완료된 지점을 의미한다. 만약 D[1]가 S[3]과 일치 한다면 lastIndex는 3이 되며, 이는 S[0]~ S[2]는 이미 D[1] 이전에 이미 호출 된 메소드로 D[2]의 통합을 고려할 때 살펴볼 필요가 없는 것을 의미한다. 만약 D[id]와 일치하는 노드가 S에 있을 경우(5) 해당 lastIndex를 업데이트하고 해당 노드들의 자식노드들에 대한 통합을 진행하기 위해 통합 메소드를 재귀적으로 호출한다(6). First, the child nodes of the node selected in the static call tree and the dynamic call tree are stored in the array of node types of S and D (1), and the two arrays are integrated into one array. At this time, the merging is performed by adding nodes of D based on the nodes of S. Thus, the integration process is repeated until all the nodes of D are merged into S in order (3). First, the node matching the node of D is found in S and the index of that node is stored in lastIndex (6). lastIndex indicates the point where the integration is already completed. If D [1] matches S [3], then lastIndex is 3, which means that S [0] through S [2] already consider the integration of D [2] It means you do not need to look at it. (5) If the node corresponding to D [id] is in S (5), it updates the corresponding lastIndex and invokes the integration method recursively to proceed with the integration of the child nodes of the nodes (6).

만약 일치하는 노드가 없을 경우에는 오버라이딩의 관계를 갖는 노드가 존재하는지를 탐색한다(9). 그 다음 오버라이딩 관계를 갖는 노드가 반복 statement를 가질 경우에는 다음 통합 과정을 위해 해당노드의 앞에(12~14), 그렇지 않을 경우에는 해당 노드를 지우고 그 자리를 D[id]가 대체한다(16). If there is no matching node, it is checked whether a node having an overriding relation exists (9). If a node with an overriding relationship has a repeating statement, then it is preceded by a corresponding node (12 to 14) for the next merging process, otherwise the corresponding node is replaced by D [id] (16 ).

만약 대응되는 노드가 없다면 D[id]를 S의 맨 끝에 붙여 통합한다(19~20). If there is no corresponding node, add D [id] to the end of S (19-20).

통합 과정은 현재 대상 노드의 자식 노드들로 내려가며, 이를 위해 해당 메소드는 재귀적으로 호출 된다(22).The merging process goes down to the child nodes of the current node, and the corresponding method is recursively called (22).

본 발명의 효용성을 평가하기 위해 오픈소스 모델링 프로그램인 REQ_Modeler 와 페인팅 프로그램인TerpPaint, 연구용으로 개발된 명세서 및 소스코드 자동생성 도구인 Spec Generator를 대상으로 사례연구를 진행하였으며, 대상 시스템의 정보는 도 13과 다음과 같다.In order to evaluate the utility of the present invention, a case study was conducted on REQ_Modeler, which is an open source modeling program, TerpPaint, a painting program, and Spec Generator, a specification and a source code automatic generation tool for research, And the following.

도 13은 본 발명을 실험한 대상의 시스템 정보를 나타낸 도면이다.13 is a diagram showing system information of an object of the present invention.

본 발명을 통해 생성된 시퀀스 다이어그램을 활용하는데 있어서, 주로 발생하는 문제점이 동적 호출과 외부 프레임 워크 및 외부 라이브러리의 사용으로 인한 흐름의 불완전성과 시퀀스 다이어그램의 크기였다. 이러한 이유로 실험 대상은 이러한 동적 호출이 빈번하게 발생하는 사용자 인터페이스(UI)의 처리가 중요한 시스템 혹은 외부 라이브러리를 주로 활용하는 것으로 선택하였으며. 실험을 위해 구현된 도구인 Reverse Sequence Diagram Tool에서 분석 가능한 Java로 개발된 것을 선정하였다. 또한 실험의 객관성을 확보하기 위해 REQ_Modeler와 TerpPaint는 실행 가능한 형태로 배포된 프로그램 중 기능을 추출할 근거가 될 수 있는 사용자 매뉴얼과 소스코드가 함께 공개 되어있는 오픈 소스 프로그램들 중 서로 다른 카테고리에서 선정되었다. In exploiting the sequence diagram generated by the present invention, the main problem that arises is the incompleteness of flow due to the use of dynamic calls and external frameworks and external libraries, and the size of the sequence diagram. For this reason, the experimental subjects chose to utilize mainly the system or the external library which processes the user interface (UI) in which the dynamic call frequently occurs. We have selected the developed Java based analysis tool from Reverse Sequence Diagram Tool which is implemented for the experiment. In addition, in order to secure the objectivity of the experiment, REQ_Modeler and TerpPaint were selected in different categories among the open source programs in which the user manual and the source code are disclosed together as a basis for extracting functions among the programs distributed in the executable form .

실험을 위해, 대상 시스템에서 대표성을 갖는 기능들을 대상으로 정적 분석 도구인 Togeter와 동적 분석 도구인 TPTP, 그리고 본 연구에서 제안한 방식으로 생성한 시퀀스 다이어그램을 비교 분석하였다.For the experiment, we compare and analyze the representative functions in the target system with the static analysis tool Together, the dynamic analysis tool TPTP, and the sequence diagram generated by the proposed method.

도 14는 호출 트리의 노드 수를 비교한 도면이다.14 is a diagram comparing the number of nodes in the call tree.

도 14에 도시된 바와 같이, 선정 기능들을 대상으로 본 발명에 따라, 생성된 정적 호출 트리, 동적 호출 트리, 통합 트리의 크기를 알 수 있다.As shown in Fig. 14, the sizes of the generated static call tree, the dynamic call tree, and the integration tree can be determined according to the present invention with respect to the selection functions.

실험을 위해, REQ_Modeler는 사용 매뉴얼을 기반으로 16개의 기능을 추출했으며, 그 중 시나리오가 유사한 기능에 대해 하나의 대표 기능, 즉, 클래스 생성, 유스 케이스 생성, 액터 생성과 같이 화면상에 오브젝트가 생성되는 기능에 대해서는 클래스 생성 기능을 대표 기능으로 하여 8개의 대표 기능(1~7)을 추출하였다. 동일한 방법으로 TerpPaint에서도 5개의 기능(8~12)을 추출하였으며, Spec Generator에서는 2개의 기능(13~14)를 추출하여 실험을 수행하였다. ①열은 정적 호출 트리의 크기를 나타내고, ②열은 동적 호출 트리의 크기를 나타낸다. 상기 ③열은 ①, ②의 호출 트리를 규칙에 따라 통합한 트리의 크기이다. 이러한 트리 크기의 비교는 크게 세가지로 분류할 수 있다. For the experiment, REQ_Modeler extracts 16 functions based on the usage manual. Among them, one representative function for similar functions, namely, class creation, use case generation, actor creation, And 8 representative functions (1 to 7) were extracted with the class generation function as a representative function. In the same way, five functions (8 ~ 12) were extracted in TerpPaint and two functions (13 ~ 14) were extracted in Spec Generator. The columns show the size of the static call tree, and the column shows the size of the dynamic call tree. The column ③ is the size of the tree which integrates the call tree of ① and ② according to the rule. The comparison of these tree sizes can be roughly classified into three kinds.

먼저, 정적 호출 트리의 흐름의 단절된 경우에는, 기능의 실행에 소스 코드만으로는 파악할 수 없는 동적 호출 흐름이 존재한다. REQ_Modeler와 TerpPaint는 사용자 인터페이스(UI) 관련 로직들이 동적 호출로 구성되어 있고 대부분의 기능이 상기 로직을 거치기 때문에 이러한 수치가 두드러지게 나타난 것을 알 수 있다. First, when the flow of the static call tree is disconnected, there is a dynamic call flow that can not be understood by the source code alone in execution of the function. REQ_Modeler and TerpPaint show that the user-interface (UI) -related logic consists of dynamic calls and that most of the functionality goes through the logic, so these figures are prominent.

두 번째, 동적 호출 트리의 흐름의 누락된 경우에는 실행 추적만으로는 파악되지 않았던 다양한 시스템 문맥에 의한 흐름이 존재한다. 예를 들어, REQ_Modeler의 클래스 이동, 삭제, 연결 등(4,5,6)에서 이러한 경우가 나타나는데, 기능이 수행될 때, 클래스의 상태에 따라 기능상의 여러 흐름 중 특정 흐름만 실행되었기 때문이다. Second, when the flow of the dynamic call tree is missing, there is a flow by various system contexts that were not recognized only by execution trace. For example, this happens in REQ_Modeler class move, delete, connection, etc. (4,5,6) because when a function is executed, only certain flows among functional flows are executed according to the state of the class.

세 번째, 동적 호출 트리의 중복된 메소드 포함된 경우에는 반복문 등으로 인해 특정 로직의 반복이 나타난 경우이다. 특정 정보를 반복적으로 읽어와 변환하는 SpecGenerator(13,14)에서 나타났으며, 마우스를 드래그 하는 동안의 동작을 계속 보여주기 위해, 특정 메소드를 계속 호출하는 TerpPaint의 드래그(8,9)와 정해진 영역을 일정한 색으로 채우기 위해 해당 픽셀 수 만큼 메소드를 호출하는 TerpPaint의 페인트통(11)의 경우에서 나타났다. Third, when a duplicate method of a dynamic call tree is included, iteration of certain logic occurs due to loops and so on. In the SpecGenerator (13, 14), which repeatedly reads and transforms specific information, dragging (8, 9) of TerpPaint which continuously calls a specific method to continue showing the operation while dragging the mouse, In the case of a paint bucket 11 of TerpPaint that calls methods as many times as there are corresponding pixels to fill a certain color.

상술한 세 가지 경우 가운데, 첫 번째의 경우는 주로 정적 분석 기반에서, 두 번째와 세 번째 경우는 동적 분석 기반에서 나타나는 문제로서, 수많은 연구에서 지적되어 왔으며, 본 발명에 따른 통합된 트리가 상술한 3가지 유형의 문제를 해결한 것을 알 수 있다.Among the above three cases, the first case is mainly based on static analysis, the second and third cases are problems on dynamic analysis basis, and it has been pointed out in a lot of studies, and the integrated tree according to the present invention It can be seen that three types of problems are solved.

또한, 이러한 시퀀스 다이어그램의 생성 방법 및 시스템은 컴퓨터로 실행하기 위한 프로그램이 기록된 컴퓨터 판독가능 기록매체에 저장될 수 있다. 이때, 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록 장치를 포함한다. 컴퓨터가 읽을 수 있는 기록 장치의 예로는 ROM, RAM, CD-ROM, DVD±ROM, DVD-RAM, 자기 테이프, 플로피 디스크, 하드 디스크(hard disk), 광데이터 저장장치 등이 있다. 또한, 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 장치에 분산되어 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.In addition, the method and system for generating such a sequence diagram may be stored in a computer-readable recording medium on which a program for execution by a computer is recorded. At this time, the computer-readable recording medium includes all kinds of recording apparatuses in which data that can be read by a computer system is stored. Examples of the computer readable recording medium include ROM, RAM, CD-ROM, DVD 占 ROM, DVD-RAM, magnetic tape, floppy disk, hard disk, optical data storage, and the like. In addition, the computer-readable recording medium may be distributed to network-connected computer devices so that computer-readable codes can be stored and executed in a distributed manner.

본 발명의 시퀀스 다이어그램의 생성 방법 및 시스템은 유지보수를 수행하고자 하는 소프트웨어의 기능의 흐름을 나타내는 시퀀스 다이어그램을 생성함으로써, 생성된 시퀀스 다이어그램을 분석하여 상기 소프트웨어의 기능 흐름을 빠르고 용이하게 분석할 수 있는 효과가 있다. The method and system for generating the sequence diagram of the present invention can generate a sequence diagram indicating the flow of the function of the software to perform maintenance so as to analyze the generated sequence diagram and analyze the function flow of the software quickly and easily It is effective.

또한, 본 발명의 시퀀스 다이어그램의 생성 방법 및 시스템은 유지보수를 수행하고자 하는 소프트웨어의 기능 흐름을 시퀀스 다이어그램의 분석을 통해 빠르게 분석함으로써, 상기 소프트웨어의 분석시간을 감소시킴에 따라 상기 소프트웨어의 유지보수에 소요되는 시간 및 비용을 감소시킬 수 있는 효과가 있다. Also, the method and system for generating the sequence diagram of the present invention can quickly analyze the function flow of the software to perform maintenance through the analysis of the sequence diagram, reduce the analysis time of the software, The time and cost required can be reduced.

상기에서는 본 발명의 바람직한 실시 예에 대하여 설명하였지만, 본 발명은 이에 한정되는 것이 아니고 본 발명의 기술 사상 범위 내에서 여러 가지로 변형하여 실시하는 것이 가능하고 이 또한 첨부된 특허청구범위에 속하는 것은 당연하다.
While the present invention has been described in connection with what is presently considered to be practical exemplary embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, but, on the contrary, Do.

110: 입력부 120: 전처리부
130: 호출트리 생성부 140: 프루닝처리부
150: 호출트리 통합부 160: 시퀀스 다이어그램 생성부
110: input unit 120: preprocessing unit
130: call tree generation unit 140: pruning processing unit
150: call tree integration unit 160: sequence diagram generation unit

Claims (15)

입력부가 유지보수를 수행하고자 하는 소프트웨어에 대한 소스코드와 실행 추적 로그정보를 입력받는 단계;
전처리부가 입력받은 상기 소스코드와 실행 추적 로그정보에 대하여 불필요한 오브젝트를 제거하는 단계;
호출트리생성부가 상기 소스코드와 실행 추적 로그정보로부터 노드간 메소드 호출 관계를 검출하고, 검출된 호출관계에 기초하여 정적 호출 트리 및 동적 호출 트리를 생성하는 단계;
프루닝처리부가 생성된 상기 정적 호출 트리와 동적 호출 트리 내 기능 흐름에 불필요한 메소드 정보를 갖는 적어도 하나의 노드를 제거하는 단계;
호출트리통합부가 불필요한 메소드 정보를 갖는 노드가 제거된 상기 정적 호출 트리와 동적 호출 트리를 하나의 호출 트리로 통합하는 단계; 및
시퀀스 다이어그램 생성부가 통합된 하나의 호출 트리를 변환하여 시퀀스 다이어그램을 생성하는 단계;
를 포함하는 시퀀스 다이어그램의 생성 방법.
Receiving input source code and execution trace log information for software whose input unit is to perform maintenance;
Removing unnecessary objects from the source code and execution trace log information received by the preprocessor;
The call tree generating unit detects a method call relationship between nodes from the source code and execution trace log information, and generates a static call tree and a dynamic call tree based on the detected call relationship;
Removing at least one node having the static call tree in which the pruning processing section is created and the method information unnecessary in the function flow in the dynamic call tree;
Integrating the static call tree and the dynamic call tree into which a node having unnecessary method information has been removed, into a call tree; And
Generating a sequence diagram by transforming one call tree into which the sequence diagram generating unit is integrated;
≪ / RTI >
제1항에 있어서,
상기 호출트리생성부가 정적 호출 트리 및 동적 호출 트리를 생성하는 단계는
상기 소스코드로부터 획득한 노드간 메소드의 호출 관계를 검출하고, 검출된 호출관계에 기초하여 정적 호출 트리를 생성하는 것을 특징으로 하는 시퀀스 다이어그램의 생성 방법.
The method according to claim 1,
The step of the call tree generating unit generating the static call tree and the dynamic call tree
Detecting a call relationship of the inter-node method obtained from the source code, and generating a static call tree based on the detected call relationship.
제1항에 있어서,
상기 호출트리생성부가 정적 호출 트리 및 동적 호출 트리를 생성하는 단계는
상기 실행 추적 로그정보로부터 획득한 노드간 메소드의 호출 관계를 검출하고, 검출된 호출관계에 기초하여 동적 호출 트리를 생성하는 것을 특징으로 하는 시퀀스 다이어그램의 생성 방법.
The method according to claim 1,
The step of the call tree generating unit generating the static call tree and the dynamic call tree
Detecting a call relationship of the inter-node method obtained from the execution trace log information, and generating a dynamic call tree based on the detected call relationship.
제3항에 있어서,
상기 호출트리생성부가 정적 호출 트리 및 동적 호출 트리를 생성하는 단계는
상기 실행 추적 로그정보로부터 획득한 노드간 메소드에 대하여 상기 메소드의 수행 시작 지점과 종료 지점을 기록하는 로그정보를 이용하여 동적 호출 트리를 생성하는 것을 특징으로 하는 시퀀스 다이어그램의 생성 방법.
The method of claim 3,
The step of the call tree generating unit generating the static call tree and the dynamic call tree
Wherein the dynamic call tree is generated by using log information for recording a start point and an end point of execution of the method with respect to inter-node methods obtained from the execution trace log information.
제1항에 있어서,
상기 프루닝처리부가 상기 정적 호출 트리와 동적 호출 트리 내 기능 흐름에 불필요한 메소드 정보를 갖는 적어도 하나의 노드를 제거하는 단계는
미리 정해진 속성값을 반환하거나, 범용적으로 사용되거나, 반복 수행되는 메소드를 기능 흐름에 불필요한 메소드로 판단하는 것을 특징으로 하는 시퀀스 다이어그램의 생성 방법.
The method according to claim 1,
Wherein the pruning processing unit removes at least one node having unnecessary method information in the static call tree and the function flow in the dynamic call tree
A method for returning a predetermined property value, a method used universally, or a method repeatedly performed is determined as an unnecessary method in a function flow.
제1항에 있어서,
상기 시퀀스 다이어그램 생성부가 통합된 하나의 호출 트리를 변환하여 시퀀스 다이어그램을 생성하는 단계는
통합된 호출 트리의 구조로부터 메소드의 호출 순서 정보를 획득하고, 획득한 메소드의 호출 순서정보에 기초하여 상기 메소드를 변환하여 시퀀스 다이어그램을 생성하는 것을 특징으로 하는 시퀀스 다이어그램의 생성 방법.
The method according to claim 1,
Wherein the step of generating a sequence diagram by converting one call tree integrated with the sequence diagram generating unit
Acquiring call order information of a method from a structure of an integrated call tree, and converting the method based on call order information of the obtained method to generate a sequence diagram.
제1항 내지 제6항 중 어느 한 항에 따른 방법을 컴퓨터로 실행하기 위한 프로그램이 기록된 컴퓨터 판독가능 기록매체.
A computer-readable recording medium on which a program for executing the method according to any one of claims 1 to 6 is recorded.
유지보수를 수행하고자 하는 소프트웨어에 대한 소스코드와 실행 추적 로그정보를 입력받는 입력부;
입력받은 상기 소스코드와 실행 추적 로그정보에 대하여 불필요한 오브젝트를 제거하는 전처리부;
상기 소스코드와 실행 추적 로그정보로부터 노드간 메소드 호출 관계를 검출하고, 검출된 호출관계에 기초하여 정적 호출 트리 및 동적 호출 트리를 생성하는 호출트리생성부;
생성된 상기 정적 호출 트리와 동적 호출 트리 내 기능 흐름에 불필요한 메소드 정보를 갖는 적어도 하나의 노드를 제거하는 프루닝처리부;
노드가 제거된 상기 정적 호출 트리와 동적 호출 트리를 하나의 호출 트리로 통합하는 호출트리통합부; 및
통합된 하나의 호출 트리를 변환하여 시퀀스 다이어그램을 생성하는 시퀀스다이어그램생성부;
를 포함하는 시퀀스 다이어그램의 생성 시스템.
An input unit for receiving source code and execution trace log information for software to be maintained;
A preprocessor for removing unnecessary objects from the input source code and execution trace log information;
A call tree generation unit that detects a method call relationship between nodes from the source code and execution trace log information, and generates a static call tree and a dynamic call tree based on the detected call relationship;
A pruning processing unit for removing the generated static call tree and at least one node having unnecessary method information in the function flow in the dynamic call tree;
A call tree integration unit for integrating the static call tree and the dynamic call tree in which nodes are removed into one call tree; And
A sequence diagram generation unit for generating a sequence diagram by converting an integrated call tree;
/ RTI > of the sequence diagram.
제8항에 있어서,
상기 호출 트리의 구조는
하나의 루트노드(root node)를 포함하여 메소드를 호출하는 복수 개의 노드 집합, 한 방향으로 호출이 이루어지는 메소드의 집합 및 반복 호출이 이루어지는 메소드의 집합 중 적어도 하나를 포함하도록 이루어지는 것을 특징으로 하는 시퀀스 다이어그램의 생성 시스템.
9. The method of claim 8,
The structure of the call tree is
Wherein the at least one node set includes at least one of a plurality of node sets including a root node to call a method, a set of methods in which calls are made in one direction, and a set of methods in which repeated calls are made. Gt;
제9항에 있어서,
상기 노드는
클래스의 이름, 메소드 이름, 반환값의 매개변수, 메소드의 호출 시 수행되는 명령어 집합, 현재 호출 상황 중 적어도 하나를 포함하는 것을 특징으로 하는 시퀀스 다이어그램의 생성 시스템.
10. The method of claim 9,
The node
A name of a class, a method name, a parameter of a return value, a set of instructions to be executed when a method is called, and a current call state.
제8항에 있어서,
상기 호출트리생성부는
상기 소스코드로부터 획득한 노드간 메소드의 호출 관계를 검출하고, 검출된 호출관계에 기초하여 정적 호출 트리를 생성하는 것을 특징으로 하는 시퀀스 다이어그램의 생성 시스템.
9. The method of claim 8,
The call tree generating unit
Detecting a call relationship of the inter-node method obtained from the source code, and generating a static call tree based on the detected call relationship.
제8항에 있어서,
상기 호출트리생성부는
상기 실행 추적 로그정보로부터 획득한 노드간 메소드의 호출 관계를 검출하고, 검출된 호출관계에 기초하여 동적 호출 트리를 생성하는 것을 특징으로 하는 시퀀스 다이어그램의 생성 시스템.
9. The method of claim 8,
The call tree generating unit
Detecting a call relationship of the inter-node method obtained from the execution trace log information, and generating a dynamic call tree based on the detected call relationship.
제16항에 있어서,
상기 호출트리생성부는
상기 실행 추적 로그정보로부터 획득한 노드간 메소드에 대하여 상기 메소드의 수행 시작 지점과 종료 지점을 기록하는 로그정보를 이용하여 동적 호출 트리를 생성하는 것을 특징으로 하는 시퀀스 다이어그램의 생성 시스템.
17. The method of claim 16,
The call tree generating unit
Wherein the dynamic call tree is generated using log information that records a start point and an end point of execution of the method with respect to inter-node methods obtained from the execution trace log information.
제8항에 있어서,
상기 프루닝처리부는
미리 정해진 속성값을 반환하거나, 범용적으로 사용되거나, 반복 수행되는 메소드를 기능 흐름에 불필요한 메소드로 판단하는 것을 특징으로 하는 시퀀스 다이어그램의 생성 시스템.
9. The method of claim 8,
The pruning processor
A method for returning a predetermined property value, a method used universally, or a method repeatedly determined as an unnecessary method in a function flow.
제11항에 있어서,
상기 시퀀스 다이어그램 생성부는
통합된 호출 트리의 구조로부터 메소드의 호출 순서 정보를 획득하고, 획득한 메소드의 호출 순서정보에 기초하여 상기 메소드를 변환하여 시퀀스 다이어그램을 생성하는 것을 특징으로 하는 시퀀스 다이어그램의 생성 시스템.
12. The method of claim 11,
The sequence diagram generation unit
Acquiring call order information of a method from a structure of an integrated call tree, and converting the method based on call order information of the obtained method to generate a sequence diagram.
KR20130043573A 2013-04-19 2013-04-19 Sequence diagram generating method and system KR101488188B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR20130043573A KR101488188B1 (en) 2013-04-19 2013-04-19 Sequence diagram generating method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR20130043573A KR101488188B1 (en) 2013-04-19 2013-04-19 Sequence diagram generating method and system

Publications (2)

Publication Number Publication Date
KR20140125949A true KR20140125949A (en) 2014-10-30
KR101488188B1 KR101488188B1 (en) 2015-02-06

Family

ID=51995461

Family Applications (1)

Application Number Title Priority Date Filing Date
KR20130043573A KR101488188B1 (en) 2013-04-19 2013-04-19 Sequence diagram generating method and system

Country Status (1)

Country Link
KR (1) KR101488188B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107644103A (en) * 2017-10-16 2018-01-30 北京锐安科技有限公司 It is a kind of can tracing information source information storage method and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5203806B2 (en) 2008-06-06 2013-06-05 インターナショナル・ビジネス・マシーンズ・コーポレーション Sequence diagram creation apparatus, sequence diagram creation method, and computer program
KR101085357B1 (en) * 2010-01-29 2011-11-22 서강대학교산학협력단 Method and Apparatus for generating requirement specifications based on state of system
KR101180784B1 (en) * 2010-12-28 2012-09-07 전자부품연구원 apparatus for automatically creating operation sequence diagram of program based on component

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107644103A (en) * 2017-10-16 2018-01-30 北京锐安科技有限公司 It is a kind of can tracing information source information storage method and system

Also Published As

Publication number Publication date
KR101488188B1 (en) 2015-02-06

Similar Documents

Publication Publication Date Title
Systä et al. Shimba—an environment for reverse engineering Java software systems
US8630824B1 (en) Comprehending waveforms of a circuit design
Tonella et al. Reverse engineering of the interaction diagrams from C++ code
US10915302B2 (en) Identification and visualization of associations among code generated from a model and sources that affect code generation
Hamou-Lhadj et al. A metamodel for the compact but lossless exchange of execution traces
Angerer et al. Change impact analysis for maintenance and evolution of variable software systems
US20210263833A1 (en) Code Generation Platform with Debugger
CN115639980A (en) Draggable front-end logic arrangement method and device for low-code platform
CN114020246A (en) Navigation caliper H5 page layout method, device, equipment and medium
US9298858B1 (en) System and method for reducing models based on a criterion
Borowski et al. Graph Buddy—an interactive code dependency browsing and visualization tool
Gawade et al. Stethoscope: a platform for interactive visual analysis of query execution plans
Soetens et al. Circumventing refactoring masking using fine-grained change recording
KR101488188B1 (en) Sequence diagram generating method and system
Alsarraj et al. Designing and implementing a tool to transform source code to UML diagrams
Singh Transformation of source code into UML diagrams through visualization tool
Zhang et al. Identifying use cases in source code
Drago et al. QVTR2: A Rational and Performance-Aware Extension to the Relations Language.
Szvetits et al. Enhancing root cause analysis with runtime models and interactive visualizations
Dolques et al. Fixing Generalization Defects in UML Use Case Diagrams.
Couto et al. MapIt: A model based pattern recovery tool
Zhang et al. Java source code static check eclipse plug-in based on common design pattern
Vianna et al. Squid: an extensible infrastructure for analyzing software product line implementations
García-Díaz et al. MCTest: towards an improvement of match algorithms for models
Hojaji et al. Towards a tracing framework for model-driven software systems

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
FPAY Annual fee payment

Payment date: 20180102

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20190107

Year of fee payment: 5