KR102426581B1 - Method and apparatus for analyzing safety of automotive software - Google Patents

Method and apparatus for analyzing safety of automotive software Download PDF

Info

Publication number
KR102426581B1
KR102426581B1 KR1020160109663A KR20160109663A KR102426581B1 KR 102426581 B1 KR102426581 B1 KR 102426581B1 KR 1020160109663 A KR1020160109663 A KR 1020160109663A KR 20160109663 A KR20160109663 A KR 20160109663A KR 102426581 B1 KR102426581 B1 KR 102426581B1
Authority
KR
South Korea
Prior art keywords
risk
software
code
halstead
code module
Prior art date
Application number
KR1020160109663A
Other languages
Korean (ko)
Other versions
KR20170140752A (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
Priority claimed from KR1020160073247A external-priority patent/KR101675986B1/en
Application filed by (주)씽크포비엘 filed Critical (주)씽크포비엘
Priority to KR1020160109663A priority Critical patent/KR102426581B1/en
Publication of KR20170140752A publication Critical patent/KR20170140752A/en
Application granted granted Critical
Publication of KR102426581B1 publication Critical patent/KR102426581B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Abstract

컴퓨터에 의해 수행되는, 전장용 소프트웨어의 안전성 분석 방법이 제공된다. 전장용 소프트웨어의 안전성 분석 방법은, 전장용 소프트웨어를 입력받는 단계; 전장용 소프트웨어를 하나 이상의 코드 모듈로 분할하는 단계; 분석 머신 - 분석 머신은, 차량 기능 안전에 관련된, 복수 개의 위험 메트릭 데이터 세트에 의해 미리 학습되고 훈련된 학습 머신이며, 위험 메트릭 데이터 세트 각각은 복수 개의 위험 메트릭 데이터들을 포함함 - 을 이용하여, 각각의 코드 모듈에 대해, 위험 메트릭 데이터들에 대응하는 위험 메트릭 데이터 값들을 측정하는 단계; 각각의 코드 모듈에 대해, 위험 메트릭 데이터 값들에 기초해서, 분석 머신을 이용하여, 위험 여부를 나타내는 값을 각각 결정하는 단계; 분석 머신을 이용하여, 각각의 코드 모듈에 대해, 측정된 위험 메트릭 데이터 값들 중 하나 이상에 기초하여, 위험 여부를 나타내는 값을 결정하는 단계; 및 각각의 코드 모듈에 대하여 결정된 위험 여부를 나타내는 값을 이용하여, 전장용 소프트웨어의 안전성에 관한 보고서를 작성하는 단계를 포함할 수 있다.Provided is a method for analyzing the safety of an automotive software, performed by a computer. The safety analysis method of the electronic software includes the steps of: receiving an input of the electronic software; dividing the battlefield software into one or more code modules; Using an analysis machine, the analysis machine is a learning machine previously trained and trained by a plurality of risk metric data sets related to vehicle functional safety, each risk metric data set including a plurality of risk metric data, each measuring, for a code module of , risk metric data values corresponding to the risk metric data; determining, for each code module, based on the risk metric data values, respectively, a value indicating whether or not there is a risk, using the analysis machine; determining, using the analysis machine, for each code module, a value indicative of whether or not there is a risk based on one or more of the measured risk metric data values; And by using a value indicating whether or not the determined risk for each code module, it may include the step of creating a report on the safety of the electronic software.

Figure R1020160109663
Figure R1020160109663

Description

전장용 소프트웨어 안전성 분석 방법 및 장치{METHOD AND APPARATUS FOR ANALYZING SAFETY OF AUTOMOTIVE SOFTWARE}Software safety analysis method and device for electric field

본 발명은, 차량 전장용 소프트웨어 안전성 분석 방법 및 장치에 관한 것으로, 보다 구체적으로는 머신러닝에 기초한 차량 전장용 소프트웨어 안전성 분석 방법 및 장치에 관한 것이다.The present invention relates to a method and apparatus for software safety analysis for automotive electrical equipment, and more particularly, to a method and apparatus for software safety analysis for automotive electronic equipment based on machine learning.

최근에는, 차량 전장용 소프트웨어의 다양화 및 고도화와 함께 자동차 전장품 시장도 급격하게 성장하고 있는 추세에 있다. 또한 차량 전장용 소프트웨어의 제조 효율 향상과 결함 방지를 위한 표준화 노력이 지속되고 있다. 예컨대, 많은 자동차 회사들이 ISO 26262 자동차 전기/전자 시스템의 안전인증 규격 및 AUTOSAR 개발 플랫폼 등에 기초하여 각각 전장용 소프트웨어 개발에 나서고 있다.In recent years, along with the diversification and advancement of automotive electronic software, the automotive electronic equipment market is also rapidly growing. In addition, standardization efforts are continuing to improve manufacturing efficiency and prevent defects in automotive software. For example, many automobile companies are developing electronic software based on the ISO 26262 automotive electrical/electronic system safety certification standard and AUTOSAR development platform.

한편, 전장용 소프트웨어는 그 특성상 오류 발생시 회복할 수 없는 피해를 야기할 수 있게 된다. 그리고 전장용 소프트웨어의 오류로 인한 각종 사고 및 사건들은 꾸준히 발생하고 있는데, 그에 따라 전장용 소프트웨어의 안전성에 대한 관심은 날로 증대되어 가고 있다. 또, 전장용 소프트웨어의 고도화 및 다양화에 따라 소프트웨어의 결함 또는 장애로 인한 피해는 점점 더 심각한 수준에 이르고 있는바, 소프트웨어 결함에 의한 사고는 고객의 안전과 자동차 회사의 이미지에 치명적 손상을 줄 수 있다. 따라서, 전장용 소프트웨어의 결함 가능성을 해당 소프트웨어의 수명 초기에 예측하고 이를 신속하게 수정할 수 있도록 하는 것이 중요하며, 표준에 기초하여 작성된 소프트웨어의 경우에도 이러한 결함 가능성의 예측 및 검증은 매우 중요한 이슈이다.On the other hand, due to the nature of the software for the battlefield, when an error occurs, it can cause irreparable damage. In addition, various accidents and incidents due to errors in the electronic software are constantly occurring, and accordingly, interest in the safety of the electronic software is increasing day by day. In addition, with the advancement and diversification of electronic software, the damage caused by software defects or failures is becoming more and more serious. have. Therefore, it is important to predict the possibility of defects in the electronic software at the early stage of the software's lifespan and to be able to fix it quickly, and even in the case of software written based on standards, predicting and verifying the possibility of such defects is a very important issue.

한편, 차량용 소프트웨어를 비롯한 각종 소프트웨어의 결함을 분석하고 예측하는 작업은 지금까지 통상적으로 사람의 손에 의해 수동으로 행하여져 왔다. 예를 들어, 전장용 소프트웨어의 경우, 주로 소프트웨어 전문가가 수동으로 각 소프트웨어 모듈에 대해 MISRA(Motors Industry Software Reliability Association) 지정의 코딩 룰 준수 여부를 확인하는 수준에 머물러 왔다. On the other hand, the work of analyzing and predicting defects of various software, including vehicle software, has been conventionally performed manually by human hands. For example, in the case of automotive software, software experts have been limited to manually checking each software module for compliance with the coding rules specified by the Motors Industry Software Reliability Association (MISRA).

그러나 이러한 수동으로 이루어지는 분석 방법은, 전장용 소프트웨어의 코드 구조의 복잡성이 날로 증가하고 있는 현재 상황에서, 분석 정확도가 낮고 분석의 안정성을 기대하기 어려운 문제가 있다. 또한, 대규모의 전장용 소프트웨어 중에 어느 부분의 결함 보수가 시급한지 식별하는 것이 어려운 문제가 있으며, 소프트웨어 개발/보수 부분에서의 한정된 자원의 효율적 배분(예컨대, 개발/보수 인력의 배분)에 어려움이 있어 왔다. However, such a manual analysis method has a problem in that analysis accuracy is low and analysis stability is difficult to expect in the current situation in which the complexity of the code structure of the electronic software is increasing day by day. In addition, there is a problem in that it is difficult to identify which part of the large-scale electronic software is urgently required to repair defects, and there is a difficulty in the efficient allocation of limited resources in the software development/repair part (eg, allocation of development/maintenance personnel). come.

따라서, 정확하고 안정성 있는, 자동화된 전장용 소프트웨어의 안전성 분석 방법이 필요로 된다. 또, 분석 결과를, 사용자가 직관적으로 인식할 수 있고 이를 즉각적으로 활용하여 추후 전장용 소프트웨어의 결함 보수를 위한 작업의 우선순위 결정 등에 있어서 참고할 수 있도록 하는 방식으로 제공할 필요가 있다.Therefore, there is a need for an accurate and stable, automated safety analysis method for automotive software. In addition, it is necessary to provide the analysis result in such a way that the user can intuitively recognize it and utilize it immediately for reference in prioritizing work for repairing defects in the electronic software in the future.

본 발명의 일 특징에 의하면, 컴퓨터에 의해 수행되는, 전장용 소프트웨어의 안전성 분석 방법이 제공된다. 본 발명에 따른 전장용 소프트웨어의 안전성 분석 방법은, 전장용 소프트웨어를 입력받는 단계; 전장용 소프트웨어를 하나 이상의 코드 모듈로 분할하는 단계; 분석 머신 - 분석 머신은, 차량 기능 안전에 관련된, 복수 개의 위험 메트릭 데이터 세트에 의해 미리 학습되고 훈련된 학습 머신이며, 위험 메트릭 데이터 세트 각각은 복수 개의 위험 메트릭 데이터들을 포함함 - 을 이용하여, 각각의 코드 모듈에 대해, 위험 메트릭 데이터들에 대응하는 위험 메트릭 데이터 값들을 측정하는 단계; 각각의 코드 모듈에 대해, 위험 메트릭 데이터 값들에 기초해서, 분석 머신을 이용하여, 위험 여부를 나타내는 값을 각각 결정하는 단계; 분석 머신을 이용하여, 각각의 코드 모듈에 대해, 측정된 위험 메트릭 데이터 값들 중 하나 이상에 기초하여, 위험 여부를 나타내는 값을 결정하는 단계; 및 각각의 코드 모듈에 대하여 결정된 위험 여부를 나타내는 값을 이용하여, 전장용 소프트웨어의 안전성에 관한 보고서를 작성하는 단계를 포함한다.According to one aspect of the present invention, there is provided a method for analyzing the safety of electronic software, performed by a computer. The safety analysis method of the electronic software according to the present invention comprises the steps of: receiving an input of the electronic software; dividing the battlefield software into one or more code modules; Using an analysis machine, the analysis machine is a learning machine previously trained and trained by a plurality of risk metric data sets related to vehicle functional safety, each risk metric data set including a plurality of risk metric data, each measuring, for a code module of , risk metric data values corresponding to the risk metric data; determining, for each code module, based on the risk metric data values, respectively, a value indicating whether or not there is a risk, using the analysis machine; determining, using the analysis machine, for each code module, a value indicative of whether or not there is a risk based on one or more of the measured risk metric data values; and creating a report on the safety of the electronic software using a value indicating whether or not there is a risk determined for each code module.

본 발명의 일 실시예에 의하면, 위험 메트릭 데이터 값들은, 코드 모듈에 대한 위험 레벨 값을 포함하며, 위험 레벨 값은, 코드 모듈의 심각도 레벨 값, 발생 확률 값, 및 구현 난이도 레벨 값 중 하나 이상에 기초하여 정의되고, 위험 레벨 값은 i개의 위험 레벨 값들 중 하나의 값이고, 구현 난이도 레벨 값은 j개의 구현 난이도 레벨 값들 중 하나의 값이며, i와 j는 2 이상의 정수일 수 있다.According to an embodiment of the present invention, the risk metric data values include a risk level value for a code module, wherein the risk level value includes at least one of a severity level value of the code module, an occurrence probability value, and an implementation difficulty level value. is defined based on , the risk level value is one of i risk level values, the implementation difficulty level value is one of j implementation difficulty level values, and i and j may be integers of 2 or more.

본 발명의 일 실시예에 의하면, 위험 메트릭 데이터 값들은, 코드 모듈에 대한, 총 코드 라인 수(loc), McCabe 순환 복잡도(v(g)), McCabe 필수 복잡도(ev(g)), McCabe 설계 복잡도(iv(g)), Halstead 연산자 및 피연산자 전체 수(n), Halstead 프로그램 볼륨(v), Halstead 프로그램 길이(l), Halstead 프로그램 난이도(d), Halstead Intelligent content(i), Halstead 프로그래밍 노력(e), Halstead 에러 추정(b), Halstead 구현시간 추정(t), Halstead 라인 카운트(lOCode), Halstead 주석 줄 수(lOComment), Halstead 빈 줄 수(lOblank), 코드와 주석을 모두 갖는 라인 수(IOCodeANDComment), 고유한 연산자 수(uniq_Op), 고유한 피연산자 수(uniq_Opnd), 전체 연산자(total_Cp), 전체 피연산자(tatal_Opand), 및 그래프 흐름 수(branchCount) 중 하나 이상의 값을 포함할 수 있다. According to an embodiment of the present invention, the risk metric data values are, for a code module, the total number of lines of code (loc), the McCabe cyclic complexity (v(g)), the McCabe essential complexity (ev(g)), and the McCabe design. Complexity (iv(g)), total number of Halstead operators and operands (n), Halstead program volume (v), Halstead program length (l), Halstead program difficulty (d), Halstead Intelligent content (i), Halstead programming effort ( e), Halstead error estimation (b), Halstead implementation time estimation (t), Halstead line count (lOCode), Halstead comment lines (lOComment), Halstead blank lines (lOblank), lines with both code and comments ( IOCodeANDComment), the number of unique operators (uniq_Op), the number of unique operands (uniq_Opnd), the total operator (total_Cp), the total operands (tatal_Opand), and the number of graph flows (branchCount).

본 발명의 일 실시예에 의하면, 각각의 코드 모듈에 대하여 결정된 위험 여부를 나타내는 값을 이용하여, 전장용 소프트웨어의 안전성에 관한 보고서를 작성하는 단계는. 코드 모듈의 로컬 위험 지수를 계산하는 단계를 포함할 수 있다.According to an embodiment of the present invention, the step of creating a report on the safety of the electronic software by using the value indicating whether the risk is determined for each code module. calculating a local risk index of the code module.

본 발명의 일 실시예에 의하면,According to one embodiment of the present invention,

코드 모듈에 대한 로컬 위험 지수는, The local risk index for the code module is:

로컬 위험 지수 = (코드 모듈의 구현 난이도 레벨 값 + 코드 모듈의 위험 레벨 값) / (i + j)Local risk factor = (value of implementation difficulty level of code module + value of risk level of code module) / (i + j)

에 의해 결정될 수 있다.can be determined by

본 발명의 일 실시예에 의하면, 코드 모듈에 대하여 결정된 위험 여부를 나타내는 값을 이용하여, 전장용 소프트웨어의 안전성에 관한 보고서를 작성하는 단계는. 전장용 소프트웨어의 총 위험 지수를 계산하는 단계를 포함할 수 있다.According to an embodiment of the present invention, the step of creating a report on the safety of the electronic software using a value indicating whether the code module is determined to be dangerous is. calculating a total risk index of the battlefield software.

본 발명의 일 실시예에 의하면, 전장용 소프트웨어를 하나 이상의 코드 모듈로 분할하는 단계는 전장용 소프트웨어를 n개의 코드 모듈로 분할하는 단계를 포함하고, 전장용 소프트웨어의 총 위험 지수는 According to an embodiment of the present invention, the step of dividing the dedicated software into one or more code modules includes dividing the dedicated software into n code modules, and the total risk index of the dedicated software is

총 위험 지수 =

Figure 112016083550024-pat00001
로컬 위험 지수i *100Total Risk Index =
Figure 112016083550024-pat00001
Local risk index i *100

에 의해 결정될 수 있다.can be determined by

본 발명의 일 실시예에 의하면, 전장용 소프트웨어의 안전성에 관한 보고서를 작성하는 단계는. 하나 이상의 코드 모듈 중 위험 코드의 위치 표시, 위험 코드의 보완 방안, 및 예상 투입 노력에 관한 정보를 이용하여 보고서를 작성하는 단계를 포함할 수 있다.According to an embodiment of the present invention, the step of creating a report on the safety of the electronic software is. The method may include generating a report using information about the indication of the location of the risk code among the one or more code modules, the supplementation plan for the risk code, and the expected input effort.

본 발명의 다른 특징에 의하면, 전술한 전장용 소프트웨어의 안전성 분석 방법들 중 어느 하나의 방법을 실행하도록 동작 가능한 컴퓨터 장치가 제공된다.According to another aspect of the present invention, there is provided a computer device operable to execute any one of the above-described safety analysis methods for electric vehicle software.

본 발명의 또 다른 특징에 의하면, 하나 이상의 명령어가 저장된 컴퓨터 판독 가능한 저장 매체로서, 하나 이상의 명령어는 컴퓨터에 의해 실행되는 경우, 컴퓨터로 하여금 전술한 전장용 소프트웨어의 안전성 분석 방법들 중 어느 하나의 방법을 실행하게 하는, 컴퓨터 판독 가능한 저장 매체가 제공된다.According to another feature of the present invention, as a computer-readable storage medium storing one or more instructions, when the one or more instructions are executed by a computer, the computer causes the computer to use any one of the above-described methods for safety analysis of electronic software. A computer-readable storage medium for executing the

본 발명에 의하면, 머신러닝 또는 딥러닝 기술에 기초하여, 정확하고 안전성 있는 전장용 소프트웨어의 안전성 분석 방법이 제공될 수 있다. 본 발명에 의하면, 전장용 소프트웨어의 안전성 분석의 결과가, 사용자가 직관적으로 인식할 수 있고 이를 즉각적으로 활용하여 추후 전장용 소프트웨어의 결함 보수를 위한 작업의 우선순위 결정 등에 있어서 참고할 수 있도록 하는 방식으로, 제공될 수 있다.According to the present invention, based on machine learning or deep learning technology, an accurate and safe safety analysis method of electronic software can be provided. According to the present invention, the result of the safety analysis of the electronic software can be intuitively recognized by the user and can be used immediately for reference in determining the priority of the task for repairing the defects of the electric vehicle software in the future. , can be provided.

도 1은, 본 발명의 일 실시예에 따른, 전장용 소프트웨어의 신뢰도 및 안전성 자동 분석을 위한 분석 머신의 생성 및 활용 과정을 개략적으로 보여주는 흐름 블록도이다.
도 2는, 본 발명의 일실시예에 따른, 분석 머신의 생성 및 훈련에서 입력 값으로서 이용될 위험 데이터 메트릭들의 예시적 집합을 도시한 도면이다.
도 3은, 분석 머신의 신뢰도 또는 안전성 분석에 사용될 메트릭 데이터들을 민감한 메트릭 데이터들로 감축하는 예시적 과정에서 사용될 수 있는 Sn 데이터들의 예를 보여주는 표이다.
도 4는, 본 발명의 일 실시예에 따른, 소프트웨어 신뢰도 및 안전성 분석 머신(400)의 기능 블록도이다.
1 is a flow block diagram schematically showing a process of generating and using an analysis machine for automatic analysis of reliability and safety of electronic software, according to an embodiment of the present invention.
2 is a diagram illustrating an exemplary set of risk data metrics to be used as input values in the creation and training of an analytics machine, in accordance with an embodiment of the present invention.
3 is a table showing examples of S n data that may be used in an exemplary process of reducing metric data to be used for reliability or safety analysis of an analysis machine into sensitive metric data.
4 is a functional block diagram of a software reliability and safety analysis machine 400, in accordance with an embodiment of the present invention.

이하, 첨부 도면을 참조하여 본 발명의 실시예에 관하여 상세히 설명한다. 이하에서는, 본 발명의 요지를 불필요하게 흐릴 우려가 있다고 판단되는 경우, 이미 공지된 기능 및 구성에 관한 구체적인 설명을 생략한다. 또한, 이하에서 설명하는 내용은 어디까지나 본 발명의 일 실시예에 관한 것일 뿐 본 발명이 이로써 제한되는 것은 아님을 알아야 한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. Hereinafter, when it is determined that there is a risk of unnecessarily obscuring the gist of the present invention, detailed descriptions of already known functions and configurations will be omitted. In addition, it should be understood that the contents described below are only related to one embodiment of the present invention, and the present invention is not limited thereto.

본 명세서에서 사용되는 용어는 단지 특정한 실시예를 설명하기 위해 사용되는 것으로 본 발명을 한정하려는 의도에서 사용된 것이 아니다, 예를 들면, 단수로 표현된 구성요소는 문맥상 명백하게 단수만을 의미하지 않는다면 복수의 구성요소를 포함하는 개념으로 이해되어야 한다. 또한, 본 발명의 명세서에서, '포함하다' 또는 '가지다' 등의 용어는 명세서 상에 기재된 특징, 숫자, 단계, 동작, 구성 요소, 부분품 또는 이들을 조합한 것이 존재함을 지정하려는 것일 뿐이고, 이러한 용어의 사용에 의해 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성 요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 배제하려는 것은 아니다.The terminology used herein is only used to describe specific embodiments and is not intended to limit the present invention. For example, elements expressed in the singular are plural unless the context clearly means only the singular. It should be understood as a concept including components. In addition, in the specification of the present invention, terms such as 'comprise' or 'have' are only intended to designate that the features, numbers, steps, operations, components, parts, or combinations thereof described in the specification exist, and such The use of the term is not intended to exclude the possibility of the presence or addition of one or more other features or numbers, steps, operations, components, parts, or combinations thereof.

본 명세서에 기재된 실시예에 있어서 '블록' 또는 '부'는 적어도 하나의 기능이나 동작을 수행하는 기능적 부분을 의미하며, 하드웨어 또는 소프트웨어로 구현되거나 하드웨어와 소프트웨어의 결합으로 구현될 수 있다, 또한, 복수의 '블록' 또는 '부'는, 특정한 하드웨어로 구현될 필요가 있는 '블록' 또는 '부'를 제외하고는, 적어도 하나의 소프트웨어 모듈로 일체화되어 적어도 하나의 프로세서로 구현될 수 있다.In the embodiments described herein, 'block' or 'unit' means a functional part that performs at least one function or operation, and may be implemented as hardware or software or a combination of hardware and software. A plurality of 'blocks' or 'units' may be integrated into at least one software module and implemented by at least one processor, except for 'blocks' or 'units' that need to be implemented with specific hardware.

덧붙여, 달리 정의되지 않는 한 기술적 또는 과학적인 용어를 포함하여, 본 명세서에서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 일반적으로 사용되는 사전에 정의된 용어들은, 관련 기술의 문맥상 의미와 일치하는 의미를 갖는 것으로 해석되어야 하며, 본 발명의 명세서에서 명백하게 달리 정의하지 않는 한 과도하게 제한 또는 확장하여 해석되지 않는다는 점을 알아야 한다.In addition, unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It should be noted that commonly used terms defined in the dictionary should be interpreted as having meanings consistent with the meanings in the context of the related art, and are not to be interpreted in an unduly limited or expanded manner unless explicitly defined otherwise in the specification of the present invention. should know

이하, 첨부된 도면을 참조하여, 본 발명의 실시예에 대해 구체적으로 설명하기로 한다.Hereinafter, with reference to the accompanying drawings, an embodiment of the present invention will be described in detail.

도 1은, 본 발명의 일 실시예에 따른, 전장용 소프트웨어의 신뢰도 및 안전성 자동 분석을 위한 분석 머신의 생성 및 활용 과정을 개략적으로 보여주는 흐름 블록도이다.1 is a flow block diagram schematically showing a process of generating and using an analysis machine for automatic analysis of reliability and safety of electronic software, according to an embodiment of the present invention.

도시된 바에 의하면, 블록(102)에서는, 전장용 소프트웨어 분석 머신의 생성을 위한 기초 과정으로서, 차량 기능 안전에 관련된 요소들, 예컨대 ISO 26262에서 정의된 기능 안전성 요소나 AUTOSAR에서 정의된 기능 안전성 요소들을 포함한 각종 차량 기능 안전성에 관한 요소들이 수집되고, 그에 따라 추후 분석 머신의 생성 및 훈련에서 입력으로서 이용될 기능 안전성 요소의 위험 데이터 메트릭들이 선택될 수 있다. 이러한 기능 안전성에 관한 위험 데이터 메트릭들의 선택은 다양한 방식으로 이루어질 수 있으며, 예컨대 도메인 전문가의 활용이나 인터뷰 등의 방식에 의해 이루어질 수도 있다. As shown, in block 102, as a basic process for generating an automotive software analysis machine, elements related to vehicle functional safety, for example, functional safety elements defined in ISO 26262 or functional safety elements defined in AUTOSAR are selected. Various vehicle functional safety-related factors are collected, including, and thus risk data metrics of functional safety factors can be selected to be used as input in the generation and training of the later analysis machine. The selection of risk data metrics related to functional safety may be made in various ways, for example, by using a domain expert or by an interview.

본 발명의 일실시예에 따른, 분석 머신의 생성 및 훈련에서 입력 값으로서 이용될 위험 데이터 메트릭들의 예시적 집합이 도 2에 도시되어 있다. 도 2에 도시된 바에 의하면, 분석 머신의 생성 및 훈련을 위한 입력 값은 코드 모듈에 관한 22개의 위험 데이터 메트릭들을 포함한 것일 수 있다.An exemplary set of risk data metrics to be used as input values in the creation and training of an analytics machine, according to an embodiment of the present invention, is shown in FIG. 2 . As shown in FIG. 2 , an input value for generating and training an analysis machine may include 22 risk data metrics for a code module.

구체적으로, 도시된 바에 의하면, 분석 머신의 생성 및 훈련에 이용될 위험 데이터 메트릭들로는, 예컨대 총 코드 라인 수(loc), McCabe 순환 복잡도(v(g)), McCabe 필수 복잡도(ev(g)), McCabe 설계 복잡도(iv(g)), Halstead 연산자 및 피연산자 전체 수(n), Halstead 프로그램 볼륨(v), Halstead 프로그램 길이(l), Halstead 프로그램 난이도(d), Halstead Intelligent content(i), Halstead 프로그래밍 노력(e), Halstead 에러 추정(b), Halstead 구현시간 추정(t), Halstead 라인 카운트(lOCode), Halstead 주석 줄 수(lOComment), Halstead 빈 줄 수(lOblank), 코드와 주석을 모두 갖는 라인 수(IOCodeANDComment), 고유한 연산자 수(uniq_Op), 고유한 피연산자 수(uniq_Opnd), 전체 연산자(total_Cp), 전체 피연산자(tatal_Opand), 그래프 흐름 수(branchCount), 및 코드 모듈 위험 레벨(Risk Level)의 위험 데이터 메트릭이 포함될 수 있다. 본 발명의 실시예에 따르면, 위험 레벨이란, 주어진 각 코드 모듈의 명세에 따라 정의되는 위험 레벨로서, 예컨대 각 코드 모듈의 오류가 얼마나 심각한 피해를 발생시키는지를 나타내는 심각도 레벨, 그러한 코드 모듈의 오류에 의한 피해가 발생할 확률이 얼마나 되는지를 나타내는 발생 확률, 해당 코드 모듈을 구현하는데에 있어서의 난이도 레벨 등에 의해 미리 정의되어 있는 값일 수 있다. 코드 모듈의 특성상 해당 코드 모듈의 오류가 발생할 경우 발생할 수 있는 피해가 심각한 생명의 위험을 일으키는 경우라면, 오류가 발생하더라도 사소한 피해나 경상을 일으키는데 그치는 코드 모듈에 비해서는 심각도 레벨이 높은 값일 수 있다. 또, 심각도 레벨이 높은 값을 갖는 코드 모듈이라도 그러한 코드 모듈의 발생 확률이 매우 낮은 경우라면 전체 위험 레벨은 낮은 값일 수 있다. 아래 표는 위험 레벨을 구분하는 방법을 예시적으로 보여주기 위한 것일 뿐, 본 발명이 이로써 제한되는 것은 아니다. 당업자라면, 각 코드 모듈의 특성을 고려하여 다양한 형태로 위험 레벨을 분류하는 방법을 생각해낼 수 있을 것이다.Specifically, as shown, the risk data metrics to be used in the generation and training of the analytic machine include, for example, the total number of lines of code (loc), McCabe cyclic complexity (v(g)), McCabe essential complexity (ev(g)) , McCabe design complexity (iv(g)), Halstead operator and total number of operands (n), Halstead program volume (v), Halstead program length (l), Halstead program difficulty (d), Halstead Intelligent content (i), Halstead Programming effort (e), Halstead error estimation (b), Halstead implementation time estimation (t), Halstead line count (lOCode), Halstead comment lines (lOComment), Halstead blank lines (lOblank), having both code and comments Number of lines (IOCodeANDComment), number of distinct operators (uniq_Op), number of distinct operands (uniq_Opnd), total operators (total_Cp), total operands (tatal_Opand), number of graph flows (branchCount), and code module risk level (Risk Level) of risk data metrics may be included. According to an embodiment of the present invention, the risk level is a risk level defined according to the specification of each code module given, for example, a severity level indicating how serious damage is caused by a failure of each code module, and the error level of such code module. It may be a value that is predefined by the occurrence probability indicating how probable the damage is caused, the level of difficulty in implementing the corresponding code module, and the like. Due to the nature of the code module, if the damage that can occur in the event of an error in the corresponding code module is a serious risk to life, the severity level may be higher than that of the code module, which only causes minor damage or minor injuries even if an error occurs. Also, even if the code module has a high severity level, if the probability of occurrence of such a code module is very low, the overall risk level may be low. The table below is for illustrative purposes only, and the present invention is not limited thereto. Those skilled in the art may come up with a method of classifying risk levels in various forms in consideration of the characteristics of each code module.

D1D1 D2 D2 D3D3 S1


S1


E1E1 00 00 00
E2E2 00 00 00 E3E3 00 00 1One E4E4 00 1One 22 S2


S2


E1E1 00 00 00
E2E2 00 00 1One E3E3 00 1One 22 E4E4 1One 22 33 S3


S3


E1E1 00 00 1One
E2E2 00 1One 22 E3E3 1One 22 33 E4E4 22 33 44 <심각도 레벨>
S1=경상; S2=중상; S3=심각한 생명의 위험

<발생 확률>
E1=매우 낮은 확률; E2=낮은 확률; E3=중간 확률; E4=높은 확률

<구현 난이도>
D1=쉬움; D2=중간; D3=어려움
<severity level>
S1 = light; S2=severe; S3=serious life threatening

<Probability of occurrence>
E1 = very low probability; E2=low probability; E3 = medium probability; E4=high probability

<Implementation Difficulty>
D1=easy; D2=medium; D3=difficult

당업자라면, 전술한 위험 레벨 이외에, 도 2에 도시된 그외 다른 위험 데이터 메트릭 각각의 의미에 대해 잘 알 것이며, 여기서는 구체적인 설명을 생략하기로 한다. 또한, 당업자라면, 도 2에 도시된 데이터 메트릭은 본 발명의 일 실시예일 뿐이며, 본 발명이 이로써 제한되는 것은 아님을 알 것이다.A person skilled in the art will be familiar with the meaning of each of the other risk data metrics shown in FIG. 2 in addition to the risk level described above, and detailed descriptions thereof will be omitted herein. In addition, those skilled in the art will appreciate that the data metric shown in FIG. 2 is only one embodiment of the present invention, and the present invention is not limited thereto.

다시 도 1로 돌아가서, 블록(104)에서는, 블록(102)에서 정의된 각 위험 데이터 메트릭의 정의에 기초하여, 분석 머신의 생성에 이용될 구체적인 학습 및 훈련 데이터가 준비될 수 있다. 본 발명의 일 실시예에 의하면, 예컨대 NASA 제공의 시험 데이터 집합이 이용될 수 있으나, 본 발명이 이로써 제한되는 것은 아니다.Returning again to FIG. 1 , at block 104 , based on the definition of each risk data metric defined at block 102 , specific learning and training data may be prepared to be used in the creation of the analytics machine. According to an embodiment of the present invention, for example, a test data set provided by NASA may be used, but the present invention is not limited thereto.

블록(106)에서는, 전장용 소프트웨어의 신뢰도 및 안전성 자동 분석을 위한 분석 머신(딥러닝 머신)이 초기 설계되고, 블록(104)에서 준비된 학습 데이터를 이용하여 분석 머신이 초기 학습될 수 있다. 본 발명의 일 실시예에 의하면, 인공 신경망(ANN)이나 서포트 벡터 머신(SVM) 기법에 따라 분석 머신이 설계될 수 있으나, 본 발명이 이로써 제한되는 것은 아니다. 당업자라면, 그외 다양한 딥러닝 방식에 의하여 분석 머신이 구현될 수 있음을 알 것이다. In block 106 , an analysis machine (deep learning machine) for automatic analysis of reliability and safety of the battlefield software is initially designed, and the analysis machine may be initially trained using the training data prepared in block 104 . According to an embodiment of the present invention, an analysis machine may be designed according to an artificial neural network (ANN) or a support vector machine (SVM) technique, but the present invention is not limited thereto. Those skilled in the art will know that the analysis machine may be implemented by various other deep learning methods.

블록(108)에서는, 초기 학습 완료된 분석 머신이, 블록(104)에서 준비된 테스트 데이터를 이용하여 테스트되고 테스트 결과에 따른 분석 머신의 오차율 분석이 행하여지며, 오차율 분석 결과는 다시 블록(106)으로 피드백 입력될 수 있다. 이와 같이, 블록(108)에서의 분석 머신의 테스트 결과는 블록(106)의 머신 설계 및 학습 단계로 반복하여 피드백 입력될 수 있고 그에 따라 분석 머신이 수정될 수 있다. 이러한 블록(106) 및 블록(108)에 따른 반복적 머신 수정의 과정이 행하여짐에 따라 코드 안전성 분석 머신의 작성이 완료될 수 있다.In block 108 , the initially trained analysis machine is tested using the test data prepared in block 104 , and error rate analysis of the analysis machine according to the test result is performed, and the error rate analysis result is fed back to block 106 . can be entered. As such, the test results of the analysis machine at block 108 may be fed back iteratively into the machine design and learning phase of block 106 and the analysis machine may be modified accordingly. As this process of iterative machine modifications according to blocks 106 and 108 is performed, the creation of the code safety analysis machine may be completed.

한편, 본 발명의 일 실시예에 따른 전장용 소프트웨어의 신뢰도 및 안전성 자동 분석을 위한 분석 머신과 관련하여, 해당 분석 머신에 의한 소프트웨어 분석에서 사용될 코드 모듈의 위험 데이터 메트릭들의 수가 지나치게 많은 경우 입력 값의 차원을 높여서 분석 결과 값으로의 정확하고 효율적인 모델링이 어려울 수 있다. 반대로, 사용될 코드 모듈의 위험 데이터 메트릭들의 수가 지나치게 적은 경우 입력과 분석 결과 간의 정확한 연관 관계를 찾는 것이 곤란할 수 있다. 따라서, 분석 머신의 분석에 이용될 각 코드 모듈의 위험 데이터 메트릭들을 해당 코드 모듈의 신뢰도 및 안전성과 관련이 깊은 중요하고 민감한 데이터 메트릭들로 제한하여 사용하는 것이 더 바람직할 수 있다. 즉, 분석 머신이 분석에 사용할 수 있는 위험 메트릭 데이터들 중에서 어느 위험 메트릭 데이터가 그 값이 약간만 변화해도 분석 결과에 크게 영향을 미치는지를 찾아내고, 그러한 민감한 데이터들을 분석 머신에 사용되도록 제한할 수 있다.On the other hand, in relation to the analysis machine for automatic analysis of reliability and safety of electronic software according to an embodiment of the present invention, when the number of risk data metrics of the code module to be used in software analysis by the corresponding analysis machine is too large, It can be difficult to accurately and efficiently model the analysis result value by increasing the dimension. Conversely, if the number of risk data metrics of the code module to be used is too small, it may be difficult to find an accurate correlation between the input and the analysis result. Therefore, it may be more preferable to limit the risk data metrics of each code module to be used for analysis of the analysis machine to important and sensitive data metrics closely related to the reliability and safety of the corresponding code module. That is, among the risk metric data that the analysis machine can use for analysis, it is possible to find out which risk metric data greatly affects the analysis result even if its value changes even slightly, and to restrict such sensitive data to be used in the analysis machine. .

예를 들어, 분석 머신의 초기 생성에 이용된 전체 메트릭 데이터의 수가 d개이고, 각각 d개의 입력 데이터 집합을 가지는 훈련 데이터 세트가 i개인 경우, 전체 i개 세트의 샘플의 각 n번째(1≤n≤d) 위치의 입력 값(위험 메트릭 데이터 값)이 분석 결과에 미치는 민감도는 다음 방식에 따라 판정될 수 있다. For example, if the total number of metric data used in the initial generation of the analysis machine is d, and there are i training data sets each having d input data sets, each nth (1≤n ≤d) The sensitivity of the location input value (risk metric data value) to the analysis result may be determined according to the following method.

Sn=

Figure 112016083550024-pat00002
DSk S n =
Figure 112016083550024-pat00002
DS k

DSk=O(Ik)-O(Ikkn)DS k =O(I k )-O(I kkn )

Ik: k번째 입력 샘플 집합I k : the kth input sample set

O(Ik): k번째 입력 샘플 집합의 훈련된 머신 출력 값O(I k ): the trained machine output of the kth input sample set

Ikkn: k번째 입력 샘플 집합에서, 그 k번째 입력 샘플 집합의 n번째 값에 작은 상수값 Δ을 더한 입력 샘플 집합I kkn : In the kth input sample set, the input sample set obtained by adding a small constant value Δ to the nth value of the kth input sample set

O(Ikkn): k번째 입력 샘플 집합에서, 그 k번째 입력 샘플 집합의 n번째 값에 작은 상수값 Δ을 더한 입력 샘플 집합에 대하여 훈련된 머신 출력 값O(I kkn ): In the kth input sample set, the value of the machine output trained on the input sample set plus the nth value of the kth input sample set plus a small constant value Δ

위 식에 따르면, 입력 샘플 집합에 속한 각 위험 데이터 메트릭들 중 Sn 값이 소정 값 이상인 것, 즉 주어진 값이 약간만 변하더라도 분석 머신의 출력 결과 값에 크게 영향을 미치는 민감한 위험 데이터 메트릭이 어느 것인지를 찾을 수 있다.According to the above formula, among the risk data metrics belonging to the input sample set, which of the sensitive risk data metrics has a S n value greater than or equal to a predetermined value, that is, a sensitive risk data metric that greatly affects the output result value of the analysis machine even if the given value changes slightly? can be found

다시 도 1로 돌아가서, 블록(110)에서는, 분석 머신을 이용한 전장용 소프트웨어의 안전성 분석이 수행된다. 구체적으로 도시되지는 않았으나, 본 발명의 일 실시예에 의하면, 블록(108)에서의 소프트웨어의 안전성 분석 결과는 블록(106)으로 피드백 입력되어 분석 머신을 업데이트할 수 있다. 구체적인 전장용 소프트웨어의 안전성 분석 과정에 대해서는, 이하 도 4를 참조하여 좀 더 자세히 설명하기로 한다.Returning again to FIG. 1 , at block 110 , a safety analysis of the automotive software using the analysis machine is performed. Although not specifically shown, according to an embodiment of the present invention, the safety analysis result of the software at block 108 may be fed back into block 106 to update the analysis machine. A specific safety analysis process of the electronic software will be described in more detail with reference to FIG. 4 below.

블록(112)에서는, 블록(110)에서 분석 머신에 의해 수행된 분석의 결과가, 사용자에게 유용하고 직관적인 방식으로 리포팅될 수 있다. 예컨대, 분석 결과의 리포팅에는, 분석 결과의 도식화, 달성 목표와 그에 대비한 현재 수준의 표시, 달성 목표에 따른 추후의 액션 플랜 등이 포함될 수 있다.At block 112 , the results of the analysis performed by the analysis machine at block 110 may be reported in a manner useful and intuitive to the user. For example, the reporting of the analysis result may include schematization of the analysis result, display of an achievement goal and a current level in preparation for it, a future action plan according to the achievement goal, and the like.

도 3은, 전술한 바에 따라, 분석 머신의 신뢰도 또는 안전성 분석에 사용될 메트릭 데이터들을 민감한 메트릭 데이터들로 감축하는 예시적 과정에서 사용될 수 있는 Sn 데이터들의 예를 보여주는 표이다. 도 3에 따른 본 발명의 실시예의 경우, 분석 머신의 생성에 이용된 입력 데이터의 각 위험 데이터 메트릭들의 수는 21개(도 2의 위험 데이터 메트릭들 중 위험 레벨을 제외한 것과 같음)이며, 상수값 Δ는 0.1 이라고 가정하고, Sn의 값이 0.1 이상인 데이터만을 민감한 데이터라고 정하기로 한다. 그러한 경우, 도시된 표에 기초하여 다시 입력 데이터 메트릭 세트에 포함되도록 선택되는 데이터들은 14개로 감축될 수 있다(즉, loc, branchCount, iv(g), v, lOCodeAndComment, lOCode, uniq_Opnd, d, lOComment, e, v(g), n, total_Opnd, uniq_Op). 이러한 감축은 분석 결과와 상관 관계가 높은 값들로 입력을 제한하여 더욱 효율적이고 정확한 분석이 가능하게 할 수 있다.3 is a table showing examples of S n data that may be used in an exemplary process of reducing metric data to be used for reliability or safety analysis of an analysis machine into sensitive metric data, as described above. In the case of the embodiment of the present invention according to Fig. 3, the number of each risk data metrics of the input data used for generation of the analysis machine is 21 (the same as the risk level among the risk data metrics of Fig. 2), a constant value It is assumed that Δ is 0.1, and only data in which the value of S n is 0.1 or more is designated as sensitive data. In such a case, the data selected to be included in the input data metric set again based on the shown table may be reduced to 14 (ie, loc, branchCount, iv(g), v, lOCodeAndComment, lOCode, uniq_Opnd, d, lOComment). , e, v(g), n, total_Opnd, uniq_Op). This reduction can enable more efficient and accurate analysis by limiting the input to values highly correlated with the analysis result.

도 4는, 본 발명의 일 실시예에 따른, 소프트웨어 신뢰도 및 안전성 분석 머신(400)의 기능 블록도이다. 도시된 바에 의하면, 분석 머신(400)은 입력부(402), 위험 데이터 메트릭 측정부(404), 위험 분석부(406) 및 보고서 작성부(408)를 포함한다. 4 is a functional block diagram of a software reliability and safety analysis machine 400, in accordance with an embodiment of the present invention. As shown, the analysis machine 400 includes an input unit 402 , a risk data metric measurement unit 404 , a risk analysis unit 406 , and a report creation unit 408 .

본 발명의 일 실시예에 의하면, 입력부(402)에서는, 작성된 전장용 소프트웨어의 코드 입력이 수신될 수 있다. 입력되는 소프트웨어는 작성 완료된 것이거나 개발 중에 있는 전장용 소프트웨어일 수 있다. 소프트웨어는 하나 또는 둘 이상의 코드 모듈을 포함하는 것일 수 있다. 입력부(402)에서는 또한 입력된 소프트웨어가 하나 또는 둘 이상의 코드 모듈, 예컨대 하나 또는 둘 이상의 함수 등으로 분할될 수 있다.According to an embodiment of the present invention, the input unit 402 may receive a code input of the written electronic software. The input software may be written or developed for battlefield software. Software may include one or more code modules. In the input unit 402, the inputted software may also be divided into one or more code modules, such as one or more functions, and the like.

본 발명의 일 실시예에 의하면, 위험 데이터 메트릭 측정부(404)에서는, 입력부(402)에서 입력되고 분할된 소프트웨어의 각 코드 모듈(예컨대, 각 함수 단위)에 대하여, 도 1의 블록(102)에서 선택되어 분석 머신 작성에 이용된 기능 안전 요소의 위험 데이터 메트릭들 각각의 값(또는 분석에 사용될 위험 데이터 메트릭들이 민감한 데이터들로 제한된 경우에는 그러한 제한된 민감한 메트릭 데이터들의 값)이 측정될 수 있다. 예컨대, 위험 데이터 메트릭 측정부(404)에서는, 입력된 소프트웨어의 각 코드 모듈에 대한, 총 코드 라인 수(loc), McCabe 순환 복잡도(v(g)), McCabe 필수 복잡도(ev(g)), McCabe 설계 복잡도(iv(g)), Halstead 연산자 및 피연산자 전체 수(n), Halstead 프로그램 볼륨(v), Halstead 프로그램 길이(l), Halstead 프로그램 난이도(d), Halstead Intelligent content(i), Halstead 프로그래밍 노력(e), Halstead 에러 추정(b), Halstead 구현시간 추정(t), Halstead 라인 카운트(lOCode), Halstead 주석 줄 수(lOComment), Halstead 빈 줄 수(lOblank), 코드와 주석을 모두 갖는 라인 수(IOCodeANDComment), 고유한 연산자 수(uniq_Op), 고유한 피연산자 수(uniq_Opnd), 전체 연산자(total_Cp), 전체 피연산자(tatal_Opand), 그래프 흐름 수(branchCount), 및 위험 레벨(Rist Level) 등의 위험 데이터 메트릭 값들 중 하나 이상의 값이 자동으로 측정될 수 있다. According to an embodiment of the present invention, in the risk data metric measurement unit 404, for each code module (eg, each function unit) of the software input and divided in the input unit 402, block 102 of FIG. The value of each of the risk data metrics of the functional safety element selected from and used to create the analysis machine (or the value of the limited sensitive metric data when the risk data metrics to be used for analysis are limited to sensitive data) may be measured. For example, in the risk data metric measurement unit 404, for each code module of the inputted software, the total number of code lines (loc), McCabe cyclic complexity (v(g)), McCabe essential complexity (ev(g)), McCabe design complexity (iv(g)), Halstead operators and total number of operands (n), Halstead program volume (v), Halstead program length (l), Halstead program difficulty (d), Halstead Intelligent content (i), Halstead programming Effort (e), Halstead error estimate (b), Halstead implementation time estimate (t), Halstead line count (lOCode), Halstead comment lines (lOComment), Halstead blank lines (lOblank), lines with both code and comments Risks such as count (IOCodeANDComment), number of distinct operators (uniq_Op), number of distinct operands (uniq_Opnd), total operator (total_Cp), total operand (tatal_Opand), number of graph flows (branchCount), and risk level (Rist Level) One or more of the data metric values may be automatically measured.

본 발명의 일 실시예에 의하면, 위험 분석부(406)에서는, 각 코드 모듈에 대해 측정된 위험 레벨 값을 비롯한, 위험 데이터 메트릭 측정부(404)에서 측정된 각 코드 모듈의 위험 데이터 메트릭들을 이용하여 각 코드 모듈 별로 위험 여부가 분석된다. 분석된 결과는, 각 코드 모듈별로 해당 모듈이 위험 여부를 나타내는 True 또는 False의 값으로 출력될 수 있다.According to an embodiment of the present invention, the risk analysis unit 406 uses the risk data metrics of each code module measured by the risk data metric measurement unit 404, including the risk level value measured for each code module. Therefore, the risk is analyzed for each code module. The analyzed result may be output as a value of True or False indicating whether the corresponding module is dangerous for each code module.

본 발명의 일 실시예에 의하면, 보고서 작성부(408)에서는, 입력된 소프트웨어의 위험 여부에 관한 보고서가 자동으로 작성될 수 있다. 본 발명의 일 실시예에 의하면, 보고서 작성부(408)에서는, 위험 여부 분석부(406)에서 얻어진 각 코드 모듈의 위험 여부 분석 결과(즉, 각 코드 모듈에 관한 True 또는 False 값)와 함께, 위험 데이터 메트릭 측정부(404)에서 측정된 입력 소프트웨어의 각 코드 모듈의 위험 레벨 값 및 그 위험 레벨 값을 측정하는데 이용된 구현 난이도 값을 이용하여 보고서를 작성할 수 있다. 본 발명의 일 실시예에 의하면, 보고서 작성부(408)에서는, 소프트웨어의 각 코드 모듈의 위험 지수(로컬 위험 지수)와 전체 소프트웨어의 위험 지수(총 위험 지수)가 각 정해진 방식에 의해 계산되고, 계산된 로컬 위험 지수 및 총 위험 지수를 포함하여 입력 소프트웨어의 위험 여부에 관한 보고서가 작성될 수 있다. According to an embodiment of the present invention, the report creation unit 408 may automatically create a report on whether the inputted software is at risk. According to an embodiment of the present invention, in the report preparation unit 408, the risk analysis result of each code module obtained by the risk analysis unit 406 (that is, True or False values for each code module) together with, A report may be created using the risk level value of each code module of the input software measured by the risk data metric measuring unit 404 and the implementation difficulty value used to measure the risk level value. According to an embodiment of the present invention, in the report creation unit 408, the risk index (local risk index) of each code module of the software and the risk index (total risk index) of the entire software are calculated by each predetermined method, A report can be made on whether the input software is at risk, including a calculated local risk index and a total risk index.

예를 들어, 각 코드 모듈의 로컬 위험 지수 및 총 위험 지수 각각은, 아래 식에 의해 계산할 수 있다.For example, each of the local risk index and the total risk index of each code module can be calculated by the following formula.

로컬 위험 지수 = (코드 모듈 구현 난이도 값 + 코드 모듈 위험 레벨 값) / (전체 구현 난이도 레벨 수 + 전체 위험 레벨 수)Local Risk Index = (Code Module Implementation Difficulty Value + Code Module Risk Level Value) / (Total Number of Implementation Difficulty Levels + Total Number of Risk Levels)

예를 들어, 표 1과 관련하여 전술한 실시예에서와 같이, 전체 구현 난이도 레벨이 3개인 경우에 어느 특정 코드 모듈이 두번째 단계, 즉 두번째로 난이도가 높은 단계(예컨대 D2)이고, 전체 위험 레벨이 5개인 경우에 해당 특정 코드 모듈이 3번째 위험 단계(예컨대, 2)인 경우, 해당 특정 코드 모듈에 대한 로컬 위험 지수는 (2+3)/(3+5)=0.625 일 수 있다. For example, as in the embodiment described above with reference to Table 1, when the overall implementation difficulty level is three, a certain code module is the second stage, that is, the second highest difficulty stage (eg D2), and the overall risk level In these five cases, if the specific code module is the third risk level (eg, 2), the local risk index for the specific code module may be (2+3)/(3+5)=0.625.

또한, 어느 소프트웨어 코드에 속한 각 코드 모듈의 각 로컬 위험 지수를 평균하여 전체 소프트웨어 코드에 관한 총 위험 지수를 계산할 수 있다. In addition, it is possible to calculate a total risk index for the entire software code by averaging each local risk index of each code module belonging to a certain software code.

총 위험 지수 =

Figure 112016083550024-pat00003
로컬 위험 지수i *100Total Risk Index =
Figure 112016083550024-pat00003
Local risk index i *100

예컨대, 입력된 소프트웨어가 3개의 코드 모듈을 포함하고, 각 코드 모듈의 로컬 위험 지수가 0.73, 0, 및 1인 경우, 총 위험 지수는 1/3(0.73+0+1)*100 = 57.7%가 될 수 있다. For example, if the input software includes three code modules, and the local risk index of each code module is 0.73, 0, and 1, the total risk index is 1/3(0.73+0+1)*100 = 57.7% can be

전술한 위험 지수를 계산하는 방법은 본 발명의 일 실시예일 뿐이며, 본 발명이 이로써 제한되는 것은 아님을 알아야 한다. 이렇게 계산된 각 코드 모듈의 로컬 위험 지수와 전체 소프트웨어에 관한 총 위험 지수는, 보고서 작성부(408)에 의해, 전술한 바와 같이 해당 소프트웨어의 위험 여부에 관한 보고서 작성에 이용될 수 있다. 본 발명의 일 실시예에 의하면, 보고서 작성에는, 전술한 정보, 예컨대 각 코드 모듈의 위험 여부 분석 결과, 각 코드 모듈의 로컬 위험 지수, 및/또는 전체 소프트웨어의 총 위험 지수와 함께, 위험 코드의 위치 표시, 보완 방안, 및 예상 투입 노력 등에 관한 정보가 더 포함될 수 있다.It should be understood that the method for calculating the above-described risk index is only one embodiment of the present invention, and the present invention is not limited thereto. The local risk index of each code module calculated in this way and the total risk index of the entire software may be used by the report writing unit 408 to prepare a report on whether or not the corresponding software is at risk, as described above. According to an embodiment of the present invention, in the report creation, the risk code is generated along with the above-mentioned information, for example, the risk analysis result of each code module, the local risk index of each code module, and/or the total risk index of the entire software. Information regarding location indications, supplementary measures, and expected input efforts may be further included.

당업자라면 알 수 있듯이 본 발명은 본 명세서에서 기술된 예시에 한정되는 것이 아니라 본 발명의 범주를 벗어나지 않는 범위 내에서 다양하게 변형, 재구성 및 대체될 수 있다. 예를 들어, 본원에 기술된 다양한 기술들은 하드웨어 또는 소프트웨어, 또는 하드웨어와 소프트웨어의 조합에 의해 구현될 수 있다. 따라서, 본원에 따른 소프트웨어 안전성 분석을 위한 분석 머신의 특정한 양태나 부분은 범용 또는 전용 마이크로프로세서, 마이크로-컨트롤러 등에 의해 실행 가능한 하나 이상의 컴퓨터 프로그램으로 구현될 수 있다. 본 발명의 일 실시예에 따른 컴퓨터 프로그램은, 컴퓨터 프로세서 등에 의해 판독 가능한 저장 매체, 예컨대 EPROM, EEPROM, 플래시 메모리장치와 같은 비휘발성 메모리, 내장형 하드 디스크와 착탈식 디스크 같은 자기 디스크, 광자기 디스크, 및 CDROM 디스크 등을 포함한 다양한 유형의 저장 매체에 저장된 형태로 구현될 수 있다. 또한, 프로그램 코드(들)는 어셈블리어나 기계어로 구현될 수 있고, 전기 배선이나 케이블링, 광섬유, 또는 기타 임의의 다른 형태의 전송 매체를 통해 전송되는 형태로 구현될 수도 있다. As will be appreciated by those skilled in the art, the present invention is not limited to the examples described herein, and various modifications, reconstructions and substitutions can be made without departing from the scope of the present invention. For example, the various techniques described herein may be implemented by hardware or software, or a combination of hardware and software. Accordingly, certain aspects or portions of the analysis machine for software safety analysis according to the present disclosure may be implemented as one or more computer programs executable by a general purpose or dedicated microprocessor, micro-controller, or the like. A computer program according to an embodiment of the present invention includes a storage medium readable by a computer processor or the like, for example, nonvolatile memory such as EPROM, EEPROM, flash memory device, magnetic disk such as built-in hard disk and removable disk, magneto-optical disk, and It may be implemented in a form stored in various types of storage media including a CDROM disk and the like. In addition, the program code(s) may be implemented in assembly language or machine language, and may be implemented in a form transmitted through electric wiring, cabling, optical fiber, or any other type of transmission medium.

본 명세서에서는, 소프트웨어 위험성 분석의 예시적인 실시예에 대해 다양한 도면를 참조하여 주로 기술했지만, 다른 유사한 실시예들이 이용될 수 있다. 본 발명의 진정한 사상 및 범주에 속하는 모든 변형 및 변경을 이하의 특허청구범위에 의해 모두 포괄하고자 한다.Although this specification has primarily been described with reference to various figures for exemplary embodiments of software risk analysis, other similar embodiments may be utilized. All modifications and variations falling within the true spirit and scope of the present invention are intended to be encompassed by the following claims.

402: 입력부
404: 위험 데이터 메트릭 측정부
406: 위험 분석부
408: 보고서 작성부
402: input unit
404: Risk Data Metric Measure Unit
406: risk analysis unit
408: report writing unit

Claims (10)

컴퓨터에 의해 수행되는, 전장용 소프트웨어의 안전성 분석 방법으로서,
전장용 소프트웨어를 입력받는 단계;
상기 전장용 소프트웨어를 하나 이상의 코드 모듈로 분할하는 단계;
분석 머신을 이용하여, 각각의 상기 코드 모듈에 대해, 위험 메트릭 데이터들에 대응하는 위험 메트릭 데이터 값들을 측정하는 단계;
각각의 상기 코드 모듈에 대해, 상기 위험 메트릭 데이터 값들에 기초해서, 상기 분석 머신을 이용하여, 위험 여부를 나타내는 값을 각각 결정하는 단계;
상기 분석 머신을 이용하여, 각각의 상기 코드 모듈에 대해, 상기 측정된 위험 메트릭 데이터 값들 중 하나 이상에 기초하여, 위험 여부를 나타내는 값을 결정하는 단계; 및
각각의 상기 코드 모듈에 대하여 결정된 상기 위험 여부를 나타내는 값을 이용하여, 상기 전장용 소프트웨어의 안전성에 관한 보고서를 작성하는 단계를 포함하고,
상기 분석 머신은, 차량 기능 안전성 요소를 수집하고 복수 개의 위험 메트릭 데이터를 선택하는 단계, 상기 복수 개의 위험 메트릭 데이터를 포함하는 복수 개의 위험 메트릭 데이터 세트에 대해 학습 및 훈련을 준비하는 단계, 설계 및 학습 단계로서 딥러닝 방식에 의하여 머신을 설계하고 상기 복수 개의 위험 메트릭 데이터 세트를 이용하여 학습하는 단계, 및 상기 머신을 테스트하고 오차율을 분석하여 상기 설계 및 학습 단계로 피드백하는 단계를 포함하여 생성된 것이고,
상기 위험 메트릭 데이터 값들은, 상기 코드 모듈에 대한 위험 레벨 값을 포함하며, 상기 위험 레벨 값은 상기 코드 모듈의 심각도 레벨 값, 발생 확률 값, 및 구현 난이도 레벨 값 중 하나 이상에 기초하여 정의되고, 상기 위험 레벨 값은 i개의 위험 레벨 값들 중 하나의 값이고, 상기 구현 난이도 레벨 값은 j개의 구현 난이도 레벨 값들 중 하나의 값이며, i와 j는 2 이상의 정수이고,
상기 보고서를 작성하는 단계는, 상기 코드 모듈의 로컬 위험 지수를 계산하는 단계를 포함하고, 상기 코드 모듈에 대한 상기 로컬 위험 지수는,
상기 로컬 위험 지수 = (상기 코드 모듈의 상기 구현 난이도 레벨 값 + 상기 코드 모듈의 상기 위험 레벨 값) / (i + j)
에 의해 결정되는,
전장용 소프트웨어 안전성 분석 방법.
A method for safety analysis of software for an electric vehicle, performed by a computer, comprising:
receiving an input of the battlefield software;
dividing the electronic software into one or more code modules;
measuring, using an analysis machine, for each said code module, risk metric data values corresponding to risk metric data;
determining, for each of the code modules, a value indicative of whether or not there is a risk, respectively, using the analysis machine, based on the risk metric data values;
determining, using the analysis machine, for each of the code modules, a value indicative of whether or not there is a risk, based on one or more of the measured risk metric data values; and
Comprising the step of creating a report on the safety of the electronic software by using the value indicating whether the risk determined for each of the code module,
The analysis machine comprises the steps of: collecting vehicle functional safety factors and selecting a plurality of risk metric data; preparing learning and training on a plurality of risk metric data sets including the plurality of risk metric data; designing and learning As a step, designing a machine by a deep learning method and learning using the plurality of risk metric data sets, and testing the machine and analyzing the error rate are generated including the steps of feeding back to the design and learning step ,
the risk metric data values include a risk level value for the code module, the risk level value being defined based on one or more of a severity level value, an occurrence probability value, and an implementation difficulty level value of the code module; the risk level value is one of i risk level values, the implementation difficulty level value is one of j implementation difficulty level values, i and j are integers of 2 or more,
generating the report includes calculating a local risk index for the code module, wherein the local risk index for the code module includes:
The local risk index = (the implementation difficulty level value of the code module + the risk level value of the code module) / (i + j)
determined by
Software safety analysis method for battlefield.
삭제delete 제1항에 있어서,
상기 위험 메트릭 데이터 값들은, 상기 코드 모듈에 대한, 총 코드 라인 수(loc), McCabe 순환 복잡도(v(g)), McCabe 필수 복잡도(ev(g)), McCabe 설계 복잡도(iv(g)), Halstead 연산자 및 피연산자 전체 수(n), Halstead 프로그램 볼륨(v), Halstead 프로그램 길이(l), Halstead 프로그램 난이도(d), Halstead Intelligent content(i), Halstead 프로그래밍 노력(e), Halstead 에러 추정(b), Halstead 구현시간 추정(t), Halstead 라인 카운트(lOCode), Halstead 주석 줄 수(lOComment), Halstead 빈 줄 수(lOblank), 코드와 주석을 모두 갖는 라인 수(IOCodeANDComment), 고유한 연산자 수(uniq_Op), 고유한 피연산자 수(uniq_Opnd), 전체 연산자(total_Cp), 전체 피연산자(tatal_Opand), 및 그래프 흐름 수(branchCount) 중 하나 이상의 값을 포함하는, 전장용 소프트웨어 안전성 분석 방법.
According to claim 1,
The risk metric data values are, for the code module, total number of lines of code (loc), McCabe cyclic complexity (v(g)), McCabe essential complexity (ev(g)), McCabe design complexity (iv(g)) , Halstead operator and total number of operands (n), Halstead program volume (v), Halstead program length (l), Halstead program difficulty (d), Halstead Intelligent content (i), Halstead programming effort (e), Halstead error estimation ( b), Halstead implementation time estimate (t), Halstead line count (lOCode), Halstead comment lines (lOComment), Halstead blank lines (lOblank), lines with both code and comments (IOCodeANDComment), unique operators (uniq_Op), number of unique operands (uniq_Opnd), total operator (total_Cp), total operands (tatal_Opand), and graph flow count (branchCount).
삭제delete 삭제delete 제1항에 있어서,
상기 코드 모듈에 대하여 결정된 상기 위험 여부를 나타내는 값을 이용하여, 상기 전장용 소프트웨어의 안전성에 관한 보고서를 작성하는 단계는. 상기 전장용 소프트웨어의 총 위험 지수를 계산하는 단계를 포함하는, 전장용 소프트웨어 안전성 분석 방법.
According to claim 1,
The step of creating a report on the safety of the electric vehicle software by using the value indicating whether the code module is at risk. Comprising the step of calculating the total risk index of the battlefield software, the safety analysis method for automotive software.
제6항에 있어서,
상기 전장용 소프트웨어를 하나 이상의 코드 모듈로 분할하는 단계는 상기 전장용 소프트웨어를 n개의 코드 모듈로 분할하는 단계를 포함하고, 상기 전장용 소프트웨어의 총 위험 지수는
총 위험 지수 =
Figure 112016083550024-pat00004
로컬 위험 지수i *100
에 의해 결정되는, 전장용 소프트웨어 안전성 분석 방법.
7. The method of claim 6,
The step of dividing the dedicated software into one or more code modules includes dividing the dedicated software into n code modules, and the total risk index of the dedicated software is
Total Risk Index =
Figure 112016083550024-pat00004
Local risk index i *100
Determined by the battlefield software safety analysis method.
제1항에 있어서,
상기 전장용 소프트웨어의 안전성에 관한 보고서를 작성하는 단계는. 하나 이상의 상기 코드 모듈 중 위험 코드의 위치 표시, 위험 코드의 보완 방안, 및 예상 투입 노력에 관한 정보를 이용하여 상기 보고서를 작성하는 단계를 포함하는, 전장용 소프트웨어 안전성 분석 방법.
According to claim 1,
The step of creating a report on the safety of the electronic software is. Comprising the step of generating the report by using the information about the location indication of the dangerous code among the one or more code modules, the supplementary method of the dangerous code, and the expected input effort, the battlefield software safety analysis method.
컴퓨터 장치로서, 제1항, 제3항 및 제6항 내지 제8항 중 어느 한 항의 방법을 실행하도록 동작 가능한 컴퓨터 장치.9. A computer device operable to carry out the method of any one of claims 1, 3 and 6 to 8. 하나 이상의 명령어가 저장된 컴퓨터 판독 가능한 저장 매체로서, 상기 하나 이상의 명령어는 컴퓨터에 의해 실행되는 경우, 컴퓨터로 하여금 제1항, 제3항 및 제6항 내지 제8항 중 어느 한 항의 방법을 실행하게 하는, 컴퓨터 판독 가능한 저장 매체.A computer readable storage medium having one or more instructions stored thereon, wherein the one or more instructions, when executed by a computer, cause the computer to execute the method of any one of claims 1, 3 and 6 to 8. a computer-readable storage medium.
KR1020160109663A 2016-06-13 2016-08-27 Method and apparatus for analyzing safety of automotive software KR102426581B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020160109663A KR102426581B1 (en) 2016-06-13 2016-08-27 Method and apparatus for analyzing safety of automotive software

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020160073247A KR101675986B1 (en) 2016-06-13 2016-06-13 Method and apparatus for analyzing safety of automotive software
KR1020160109663A KR102426581B1 (en) 2016-06-13 2016-08-27 Method and apparatus for analyzing safety of automotive software

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020160073247A Division KR101675986B1 (en) 2016-06-13 2016-06-13 Method and apparatus for analyzing safety of automotive software

Publications (2)

Publication Number Publication Date
KR20170140752A KR20170140752A (en) 2017-12-21
KR102426581B1 true KR102426581B1 (en) 2022-07-29

Family

ID=82606667

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020160109663A KR102426581B1 (en) 2016-06-13 2016-08-27 Method and apparatus for analyzing safety of automotive software

Country Status (1)

Country Link
KR (1) KR102426581B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102066868B1 (en) * 2018-03-21 2020-01-16 (주)씽크포비엘 Method and apparatus for simulating safety of automotive software to obtain a goal reliability index
KR102399597B1 (en) * 2020-11-26 2022-05-19 주식회사 브이웨이 Intelligent safety analysis technology using AI

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012234401A (en) * 2011-05-02 2012-11-29 Kddi Corp Application analysis device and program
KR101432712B1 (en) * 2013-03-05 2014-08-25 충북대학교 산학협력단 Methods of code refactoring for software safety

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7975257B2 (en) * 2006-06-13 2011-07-05 Microsoft Corporation Iterative static and dynamic software analysis
KR101418340B1 (en) * 2012-06-13 2014-07-15 경북대학교 산학협력단 Apparatus and method of formal verification of automotive operating system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012234401A (en) * 2011-05-02 2012-11-29 Kddi Corp Application analysis device and program
KR101432712B1 (en) * 2013-03-05 2014-08-25 충북대학교 산학협력단 Methods of code refactoring for software safety

Also Published As

Publication number Publication date
KR20170140752A (en) 2017-12-21

Similar Documents

Publication Publication Date Title
US10261870B2 (en) Risk formula for erroneous software components detection
US9824002B2 (en) Tracking of code base and defect diagnostic coupling with automated triage
US10372872B2 (en) Providing early warning and assessment of vehicle design problems with potential operational impact
US20150370685A1 (en) Defect localization in software integration tests
US9256512B1 (en) Quality analysis for embedded software code
KR102097953B1 (en) Failure risk index estimation device and failure risk index estimation method
Antinyan et al. Mythical unit test coverage
US20150025872A1 (en) System, method, and apparatus for modeling project reliability
KR101547247B1 (en) Moulde and method for masuring quality of software, and computer readable recording medium having program the method
KR102461180B1 (en) Method and apparatus for analyzing safety of software
KR101547248B1 (en) Moulde and method for producting total quality score of software, and computer readable recording medium having program the method
KR100898748B1 (en) Testing method for software safety evaluation of train control system
KR102426581B1 (en) Method and apparatus for analyzing safety of automotive software
Kanashiro et al. Predicting software flaws with low complexity models based on static analysis data
CN116245074A (en) Chip verification method, device and storage medium
KR101675986B1 (en) Method and apparatus for analyzing safety of automotive software
KR101834247B1 (en) Method and apparatus for analyzing safety of automotive software
US20150378802A1 (en) Supporting Global Effect Analysis
Muthusamy et al. Effectiveness of test case prioritization techniques based on regression testing
KR20190128457A (en) Testing method and apparatus of target function incluede in target program
KR102066868B1 (en) Method and apparatus for simulating safety of automotive software to obtain a goal reliability index
KR100987124B1 (en) Apparatus and Method for Software Faults Prediction using Metrics
KR101734872B1 (en) Method and apparatus for analyzing safety of software
JP6747161B2 (en) Software quality judgment method
EP3070611A1 (en) Statistical model-based test design for effective test case generation

Legal Events

Date Code Title Description
A107 Divisional application of patent
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant