KR101675986B1 - 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
KR101675986B1
KR101675986B1 KR1020160073247A KR20160073247A KR101675986B1 KR 101675986 B1 KR101675986 B1 KR 101675986B1 KR 1020160073247 A KR1020160073247 A KR 1020160073247A KR 20160073247 A KR20160073247 A KR 20160073247A KR 101675986 B1 KR101675986 B1 KR 101675986B1
Authority
KR
South Korea
Prior art keywords
risk
software
code
halstead
metric data
Prior art date
Application number
KR1020160073247A
Other languages
Korean (ko)
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 KR1020160073247A priority Critical patent/KR101675986B1/en
Priority to KR1020160109663A priority patent/KR102426581B1/en
Application granted granted Critical
Publication of KR101675986B1 publication Critical patent/KR101675986B1/en
Priority to PCT/KR2017/006036 priority patent/WO2017217701A1/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
    • 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
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N99/00Subject matter not provided for in other groups of this subclass
    • G06N99/005

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

According to the present invention, provided is a method for analyzing safety of automotive software in a computer, capable of providing correctness and safety based on a machine-learning or deep-learning technology. The method comprises the following steps: receiving input of automotive software; dividing the automotive software into one or more code modules; using an analysis machine to measure risk metric data values corresponding to each piece of risk metric data with respect to each code module, wherein the analysis module is a learning machine previously learned and trained by a plurality of risk metric data sets relating to safety of vehicle functions; using the analysis module to determine a value representing risk presence with respect to each code module based on the risk metric data values; using the analysis module to determine a value representing the risk presence with respect to each code module based on one or more of the measured risk metric data values; and using the value representing the risk presence determined to each code module to make a report about safety of the automotive software.

Description

전장용 소프트웨어 안전성 분석 방법 및 장치{METHOD AND APPARATUS FOR ANALYZING SAFETY OF AUTOMOTIVE SOFTWARE}[0001] METHOD AND APPARATUS FOR ANALYZING SAFETY OF AUTOMOTIVE SOFTWARE [0002]

본 발명은, 차량 전장용 소프트웨어 안전성 분석 방법 및 장치에 관한 것으로, 보다 구체적으로는 머신러닝에 기초한 차량 전장용 소프트웨어 안전성 분석 방법 및 장치에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention [0002] The present invention relates to a software safety analysis method and apparatus for a vehicle electric field, and more particularly, to a method and apparatus for software safety analysis for a vehicle electric field based on machine learning.

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

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

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

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

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

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

본 발명의 일 실시예에 의하면, 위험 메트릭 데이터 값들은, 코드 모듈에 대한 위험 레벨 값을 포함하며, 위험 레벨 값은, 코드 모듈의 심각도 레벨 값, 발생 확률 값, 및 구현 난이도 레벨 값 중 하나 이상에 기초하여 정의되고, 위험 레벨 값은 i개의 위험 레벨 값들 중 하나의 값이고, 구현 난이도 레벨 값은 j개의 구현 난이도 레벨 값들 중 하나의 값이며, i와 j는 2 이상의 정수일 수 있다.According to one embodiment of the present invention, the risk metric data values include a risk level value for the code module, and the risk level value is at least one of a severity level value, an occurrence probability value, and an implementation difficulty level value of the code module , The risk level value is a value of one of the i risk level values, the implementation difficulty level value is one of the j implementation difficulty level values, and i and j may be an integer 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 one embodiment of the present invention, the risk metric data values are computed for the code module, the total number of code lines (loc), the McCabe cyclic complexity (v (g)), the McCabe essential complexity (ev (g) Halstead program volume (v), Halstead program length (l), Halstead program difficulty (d), Halstead Intelligent content (i), Halstead programming effort Halstead error estimate (b), Halstead implementation time estimate (t), Halstead line count (lOCode), Halstead annotation count (lOComment), Halstead bin count (lOblank) IOCodeANDComment), the number of unique operators (uniq_Op), the number of unique operands (uniq_Opnd), the total operator (total_Cp), the total operand (tatal_Opand), and the number of graph flows (branchCount).

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

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

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

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

에 의해 결정될 수 있다.Lt; / RTI >

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

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

총 위험 지수 =

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

에 의해 결정될 수 있다.Lt; / RTI >

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

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

본 발명의 또 다른 특징에 의하면, 하나 이상의 명령어가 저장된 컴퓨터 판독 가능한 저장 매체로서, 하나 이상의 명령어는 컴퓨터에 의해 실행되는 경우, 컴퓨터로 하여금 전술한 전장용 소프트웨어의 안전성 분석 방법들 중 어느 하나의 방법을 실행하게 하는, 컴퓨터 판독 가능한 저장 매체가 제공된다.According to another aspect of the present invention there is provided a computer readable storage medium having stored thereon one or more instructions that when executed by a computer causes the computer to perform the method of any of the above- A computer readable storage medium is provided.

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

도 1은, 본 발명의 일 실시예에 따른, 전장용 소프트웨어의 신뢰도 및 안전성 자동 분석을 위한 분석 머신의 생성 및 활용 과정을 개략적으로 보여주는 흐름 블록도이다.
도 2는, 본 발명의 일실시예에 따른, 분석 머신의 생성 및 훈련에서 입력 값으로서 이용될 위험 데이터 메트릭들의 예시적 집합을 도시한 도면이다.
도 3은, 분석 머신의 신뢰도 또는 안전성 분석에 사용될 메트릭 데이터들을 민감한 메트릭 데이터들로 감축하는 예시적 과정에서 사용될 수 있는 Sn 데이터들의 예를 보여주는 표이다.
도 4는, 본 발명의 일 실시예에 따른, 소프트웨어 신뢰도 및 안전성 분석 머신(400)의 기능 블록도이다.
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a flow block diagram schematically illustrating the process of creating and utilizing an analysis machine for automatic reliability and safety analysis of software for electrical field, according to an embodiment of the present invention;
Figure 2 illustrates an exemplary set of risk data metrics to be used as input values in the generation and training of an analysis machine, in accordance with an embodiment of the present invention.
3 is a table showing examples of S n data that can be used in an exemplary process of reducing metric data to be used for reliability or safety analysis of an analysis machine to 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 possibility that the gist of the present invention may be unnecessarily blurred, a detailed description of known functions and configurations will be omitted. In addition, it should be understood that the following description is only an embodiment of the present invention, and the present invention is not limited thereto.

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

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

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

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

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

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

본 발명의 일실시예에 따른, 분석 머신의 생성 및 훈련에서 입력 값으로서 이용될 위험 데이터 메트릭들의 예시적 집합이 도 2에 도시되어 있다. 도 2에 도시된 바에 의하면, 분석 머신의 생성 및 훈련을 위한 입력 값은 코드 모듈에 관한 22개의 위험 데이터 메트릭들을 포함한 것일 수 있다.An exemplary set of risk data metrics to be used as input in the generation and training of an analysis machine, according to one embodiment of the present invention, is shown in FIG. 2, the input values for generation and training of the analysis machine may include 22 hazard data metrics related to the 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 analysis machine include, for example, the total number of lines of code loc, McCabe cyclic complexity v (g), McCabe essential complexity ev (g) , Halstead program volume (v), Halstead program length (l), Halstead program complexity (d), Halstead Intelligent content (i), Halstead Programming effort (e), Halstead error estimation (b), Halstead implementation time estimation (t), Halstead line count (lOCode), Halstead comment line count (lOComment), Halstead blank line count (lOblank) The number of lines (IOCodeANDComment), the number of unique operators (uniq_Op), the number of unique operands (uniq_Opnd), the total operator (total_Cp), the total operand (tatal_Opand), the number of graph flows (branchCount) Of risk data metrics. According to an embodiment of the present invention, the risk level is a risk level defined according to the specification of each given code module, for example, a severity level indicating how serious an error of each code module causes damage, An occurrence probability indicating how much the probability of occurrence of damage caused by the damage occurs, and a difficulty level in implementing the code module. If the damage of the code module causes the risk of serious life, the severity level may be higher than that of the code module which causes minor damage or recurrence even if an error occurs due to the characteristics of the code module. Also, even in a code module having a high level of severity, if the probability of occurrence of such a code module is very low, the overall risk level may be a low value. The table below is intended only to illustrate how to distinguish between levels of risk, but the invention is not so limited. Those skilled in the art will be able to think of ways to classify risk levels in various forms taking into account 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 = normal; S2 = severe injury; S3 = Severe life risk

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

<Implementation difficulty>
D1 = easy; D2 = medium; D3 = difficulty

당업자라면, 전술한 위험 레벨 이외에, 도 2에 도시된 그외 다른 위험 데이터 메트릭 각각의 의미에 대해 잘 알 것이며, 여기서는 구체적인 설명을 생략하기로 한다. 또한, 당업자라면, 도 2에 도시된 데이터 메트릭은 본 발명의 일 실시예일 뿐이며, 본 발명이 이로써 제한되는 것은 아님을 알 것이다.Those 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 above-described risk level, and a detailed description thereof will be omitted here. It will also be appreciated by those skilled in the art that the data metric shown in FIG. 2 is only one embodiment of the present invention, and that the present invention is not so limited.

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

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

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

한편, 본 발명의 일 실시예에 따른 전장용 소프트웨어의 신뢰도 및 안전성 자동 분석을 위한 분석 머신과 관련하여, 해당 분석 머신에 의한 소프트웨어 분석에서 사용될 코드 모듈의 위험 데이터 메트릭들의 수가 지나치게 많은 경우 입력 값의 차원을 높여서 분석 결과 값으로의 정확하고 효율적인 모델링이 어려울 수 있다. 반대로, 사용될 코드 모듈의 위험 데이터 메트릭들의 수가 지나치게 적은 경우 입력과 분석 결과 간의 정확한 연관 관계를 찾는 것이 곤란할 수 있다. 따라서, 분석 머신의 분석에 이용될 각 코드 모듈의 위험 데이터 메트릭들을 해당 코드 모듈의 신뢰도 및 안전성과 관련이 깊은 중요하고 민감한 데이터 메트릭들로 제한하여 사용하는 것이 더 바람직할 수 있다. 즉, 분석 머신이 분석에 사용할 수 있는 위험 메트릭 데이터들 중에서 어느 위험 메트릭 데이터가 그 값이 약간만 변화해도 분석 결과에 크게 영향을 미치는지를 찾아내고, 그러한 민감한 데이터들을 분석 머신에 사용되도록 제한할 수 있다.Meanwhile, regarding the analysis machine for automatic analysis of the reliability and safety of the software for the electric field according to the embodiment of the present invention, when the number of risk data metrics of the code module to be used in software analysis by the analysis machine is excessively large, Accurate and efficient modeling of analytical results can be difficult by increasing dimensionality. Conversely, if the number of risk data metrics in the code module to be used is too small, it may be difficult to find the exact association between the input and the analysis result. Thus, it may be more desirable to limit the risk data metrics of each code module to be used in the analysis of the analysis machine to sensitive and sensitive data metrics related to the reliability and safety of the code module concerned. That is, the analysis machine can find out which of the risk metric data that can be used for the analysis greatly influences the analysis result even if the value is slightly changed, and can 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 each training data set with d input data sets is i, then each nth (1? N The sensitivity of the input value of the position (risk metric data value) to the analysis result can be determined according to the following method.

Sn=

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

DSk=O(Ik)-O(Ikkn) DS k = O (I k) -O (I k + Δ kn)

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

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

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

O(Ikkn): k번째 입력 샘플 집합에서, 그 k번째 입력 샘플 집합의 n번째 값에 작은 상수값 Δ을 더한 입력 샘플 집합에 대하여 훈련된 머신 출력 값O (I k + [Delta] kn ): For the kth input sample set, the trained machine output value for the input sample set plus the small constant value [Delta]

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

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

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

도 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 the analysis machine to 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 metric of the input data used to generate the analysis machine is 21 (equal to the risk level out of the risk data metrics of FIG. 2) Delta] is assumed to be 0.1, and only data having a value of S n of 0.1 or more is defined as sensitive data. In such a case, the data selected to be included in the input data metric set again based on the table shown can be reduced to fourteen (i.e., loc, branchCount, iv (g), v, lOCodeAndComment, lOCode, uniq_Opnd, d, , e, v (g), n, total_Opnd, uniq_Op). These reductions can limit input to values that are highly correlated with the analysis results, enabling more efficient and accurate analysis.

도 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. The analysis machine 400 includes an input unit 402, a risk data metric measurement unit 404, a risk analysis unit 406, and a report generation unit 408.

본 발명의 일 실시예에 의하면, 입력부(402)에서는, 작성된 전장용 소프트웨어의 코드 입력이 수신될 수 있다. 입력되는 소프트웨어는 작성 완료된 것이거나 개발 중에 있는 전장용 소프트웨어일 수 있다. 소프트웨어는 하나 또는 둘 이상의 코드 모듈을 포함하는 것일 수 있다. 입력부(402)에서는 또한 입력된 소프트웨어가 하나 또는 둘 이상의 코드 모듈, 예컨대 하나 또는 둘 이상의 함수 등으로 분할될 수 있다.According to one embodiment of the present invention, in the input unit 402, a code input of the prepared full-length software can be received. The input software may be completed or may be software for a battlefield under development. The software may include one or more code modules. In the input unit 402, the input software may also be divided into one or more code modules, such as one or more functions or 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, the risk data metric measurement unit 404 calculates a risk data metric for each code module (for example, each function unit) (Or the value of such limited sensitive metric data if the risk data metrics to be used in the analysis are limited to sensitive data) of the functional safety elements of the functional safety element used to create the analytic machine. For example, the risk data metric measurer 404 calculates a risk data metric for each code module of the input software by comparing the total code line count loc, McCabe cyclic complexity v (g), McCabe essential complexity ev (g) Halstead program volume (v), Halstead program length (l), Halstead program difficulty (d), Halstead Intelligent content (i), Halstead programming (m), McCabe design complexity (iv (g)), Halstead operator and total number of operands Halstead error estimate (b), Halstead implementation time estimate (t), Halstead line count (lOCode), Halstead comment line count (lOComment), Halstead blank line count (lOblank) Risks such as the number (IOCodeANDComment), the number of unique operators (uniq_Op), the number of unique operands (uniq_Opnd), the total operator (total_Cp), the total operand (tatal_Opand), the number of graph flows (branchCount), and the risk 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 values measured for each code module The risk is analyzed for each code module. The analyzed result can be output as a value of True or False indicating that 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 creating unit 408 can automatically generate a report on the risk of the input software. According to an embodiment of the present invention, the report generating unit 408 generates a risk analysis result of each code module obtained by the risk analysis unit 406 (i.e., a True or False value for each code module) A risk level value of each code module of the input software measured by the risk data metric measurement unit 404 and the implementation difficulty value used to measure the risk level value may be used to generate a report. According to an embodiment of the present invention, in the report generating 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 on the risk of input software, including the calculated local risk index and the total risk index, may be generated.

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

로컬 위험 지수 = (코드 모듈 구현 난이도 값 + 코드 모듈 위험 레벨 값) / (전체 구현 난이도 레벨 수 + 전체 위험 레벨 수)Local Risk Index = (code module implementation difficulty value + code module risk level value) / (total implementation difficulty level number + total risk level number)

예를 들어, 표 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, if the overall implementation difficulty level is 3, then a particular code module is the second stage, i.e., the second most difficult stage (e.g., D2) The local risk index for the particular code module may be (2 + 3) / (3 + 5) = 0.625 when the particular code module is the third risk level (e.g., 2).

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

총 위험 지수 =

Figure 112016056508410-pat00003
로컬 위험 지수i *100Total Risk Index =
Figure 112016056508410-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% .

전술한 위험 지수를 계산하는 방법은 본 발명의 일 실시예일 뿐이며, 본 발명이 이로써 제한되는 것은 아님을 알아야 한다. 이렇게 계산된 각 코드 모듈의 로컬 위험 지수와 전체 소프트웨어에 관한 총 위험 지수는, 보고서 작성부(408)에 의해, 전술한 바와 같이 해당 소프트웨어의 위험 여부에 관한 보고서 작성에 이용될 수 있다. 본 발명의 일 실시예에 의하면, 보고서 작성에는, 전술한 정보, 예컨대 각 코드 모듈의 위험 여부 분석 결과, 각 코드 모듈의 로컬 위험 지수, 및/또는 전체 소프트웨어의 총 위험 지수와 함께, 위험 코드의 위치 표시, 보완 방안, 및 예상 투입 노력 등에 관한 정보가 더 포함될 수 있다.It should be noted that the method of 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 thus calculated and the total risk index of the entire software can be used by the report generating unit 408 to generate a report on the risk of the software as described above. According to an embodiment of the present invention, the report may include at least one of the above-described information, for example, a risk analysis result of each code module, a local risk index of each code module, and / Location indication, supplementary measures, and expected input efforts.

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

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

402: 입력부
404: 위험 데이터 메트릭 측정부
406: 위험 분석부
408: 보고서 작성부
402: Input unit
404: Risk data metric measurement unit
406: Risk Analysis Department
408:

Claims (10)

컴퓨터에 의해 수행되는, 전장용 소프트웨어의 안전성 분석 방법으로서,
전장용 소프트웨어를 입력받는 단계;
상기 전장용 소프트웨어를 하나 이상의 코드 모듈로 분할하는 단계;
분석 머신 - 상기 분석 머신은, 차량 기능 안전에 관련된, 복수 개의 위험 메트릭 데이터 세트에 의해 미리 학습되고 훈련된 학습 머신이며, 상기 위험 메트릭 데이터 세트 각각은 복수 개의 위험 메트릭 데이터들을 포함함 - 을 이용하여, 각각의 상기 코드 모듈에 대해, 상기 위험 메트릭 데이터들에 대응하는 위험 메트릭 데이터 값들을 측정하는 단계;
각각의 상기 코드 모듈에 대해, 상기 위험 메트릭 데이터 값들에 기초해서, 상기 분석 머신을 이용하여, 위험 여부를 나타내는 값을 각각 결정하는 단계;
상기 분석 머신을 이용하여, 각각의 상기 코드 모듈에 대해, 상기 측정된 위험 메트릭 데이터 값들 중 하나 이상에 기초하여, 위험 여부를 나타내는 값을 결정하는 단계; 및
각각의 상기 코드 모듈에 대하여 결정된 상기 위험 여부를 나타내는 값을 이용하여, 상기 코드 모듈의 로컬 위험 지수를 계산하는 단계를 포함하고,
상기 코드 모듈에 대한 상기 로컬 위험 지수는,
상기 로컬 위험 지수 = (상기 코드 모듈의 구현 난이도 레벨 값 + 상기 코드 모듈의 위험 레벨 값) / (i + j)
에 의해 결정되는, 전장용 소프트웨어 안전성 분석 방법.
1. A method for analyzing safety of software for a field, which is performed by a computer,
Receiving software for the battlefield;
Dividing the overall software into one or more code modules;
An analysis machine, wherein the analysis machine is a learning machine previously trained and trained by a plurality of risk metric data sets related to vehicle function safety, each of the risk metric data sets comprising a plurality of risk metric data Measuring, for each of the code modules, the risk metric data values corresponding to the risk metric data;
Determining, for each of the code modules, a value indicative of risk, using the analysis machine, based on the risk metric data values;
Using the analysis machine, for each of the code modules, determining a value indicative of risk based on at least one of the measured risk metric data values; And
Calculating a local risk index of the code module using a value indicating the risk level determined for each of the code modules,
Wherein the local risk index for the code module,
The local risk index = (the implementation difficulty level value of the code module + the critical level value of the code module) / (i + j)
The method comprising the steps of:
제1항에 있어서,
상기 위험 메트릭 데이터 값들은, 상기 코드 모듈에 대한 위험 레벨 값을 포함하며, 상기 위험 레벨 값은, 상기 코드 모듈의 심각도 레벨 값, 발생 확률 값, 및 구현 난이도 레벨 값 중 하나 이상에 기초하여 정의되고, 상기 위험 레벨 값은 i개의 위험 레벨 값들 중 하나의 값이고, 상기 구현 난이도 레벨 값은 j개의 구현 난이도 레벨 값들 중 하나의 값이며, i와 j는 2 이상의 정수인, 전장용 소프트웨어 안전성 분석 방법.
The method according to claim 1,
Wherein the risk metric data values comprise a risk level value for the code module and the risk level value is defined based on at least one of a severity level value, an occurrence probability value, and an implementation difficulty level value of the code module Wherein the danger 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 are an integer of 2 or more.
제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) 중 하나 이상의 값을 포함하는, 전장용 소프트웨어 안전성 분석 방법.
The method according to claim 1,
Wherein the risk metric data values comprise at least one of a total number of lines of code (loc), McCabe cyclic complexity (v (g)), McCabe essential complexity (ev (g)), McCabe design complexity (iv , Halstead Operator and Total Operands (n), Halstead Program Volume (v), Halstead Program Length (l), Halstead Program Difficulty (d), Halstead Intelligent Content (i), Halstead Programming Effort b), Halstead implementation time estimate (t), Halstead line count (lOCode), Halstead comment line count (lOComment), Halstead blank line count (lOblank), Number of lines with both code and comment (IOCodeANDComment) (uniq_Op), unique operand count (uniq_Opnd), total operator (total_Cp), total operand (tatal_Opand), and graph flow count (branchCount).
제1항에 있어서,
상기 방법은,
상기 코드 모듈에 대하여 결정된 상기 위험 여부를 나타내는 값을 이용하여, 전장용 소프트웨어의 안전성에 관한 보고서를 작성하는 단계를 더 포함하는, 전장용 소프트웨어 안전성 분석 방법.
The method according to claim 1,
The method comprises:
Further comprising the step of generating a report on the safety of the software for the field using the value indicating the danger or not determined for the code module.
삭제delete 제4항에 있어서,
상기 코드 모듈에 대하여 결정된 상기 위험 여부를 나타내는 값을 이용하여, 상기 전장용 소프트웨어의 안전성에 관한 보고서를 작성하는 단계는. 상기 전장용 소프트웨어의 총 위험 지수를 계산하는 단계를 포함하는, 전장용 소프트웨어 안전성 분석 방법.
5. The method of claim 4,
The step of generating a report on the safety of the field-use software, using a value indicating the risk level determined for the code module. And calculating a total risk index of the software for the battlefield.
제6항에 있어서,
상기 전장용 소프트웨어를 하나 이상의 코드 모듈로 분할하는 단계는 상기 전장용 소프트웨어를 n개의 코드 모듈로 분할하는 단계를 포함하고, 상기 전장용 소프트웨어의 총 위험 지수는
총 위험 지수 =
Figure 112016056508410-pat00004
로컬 위험 지수i *100
에 의해 결정되는, 전장용 소프트웨어 안전성 분석 방법.
The method according to claim 6,
Wherein dividing the overall software into one or more code modules comprises partitioning the overall software into n code modules,
Total Risk Index =
Figure 112016056508410-pat00004
Local Risk Index i * 100
The method comprising the steps of:
제4항에 있어서,
상기 전장용 소프트웨어의 안전성에 관한 보고서를 작성하는 단계는. 하나 이상의 상기 코드 모듈 중 위험 코드의 위치 표시, 위험 코드의 보완 방안, 및 예상 투입 노력에 관한 정보를 이용하여 상기 보고서를 작성하는 단계를 포함하는, 전장용 소프트웨어 안전성 분석 방법.
5. The method of claim 4,
The step of preparing a report on the safety of the above-mentioned field use software is as follows. Generating the report using the information on the location of the risk code, the risk code supplement, and the expected input effort among at least one of the code modules.
컴퓨터 장치로서, 제1항 내지 제4항 및 제6항 내지 제8항 중 어느 한 항의 방법을 실행하도록 동작 가능한 컴퓨터 장치.A computer device operable to perform the method of any one of claims 1 to 4 and 6 to 8. 하나 이상의 명령어가 저장된 컴퓨터 판독 가능한 저장 매체로서, 상기 하나 이상의 명령어는 컴퓨터에 의해 실행되는 경우, 컴퓨터로 하여금 제1항 내지 제4항 및 제6항 내지 제8항 중 어느 한 항의 방법을 실행하게 하는, 컴퓨터 판독 가능한 저장 매체.15. A computer-readable storage medium having stored thereon one or more instructions, wherein the one or more instructions, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 4 and 6 to 8 &Lt; / RTI &gt;
KR1020160073247A 2016-06-13 2016-06-13 Method and apparatus for analyzing safety of automotive software KR101675986B1 (en)

Priority Applications (3)

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
PCT/KR2017/006036 WO2017217701A1 (en) 2016-06-13 2017-06-09 Method and device for analyzing safety of software for electric device

Applications Claiming Priority (1)

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

Related Child Applications (1)

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

Publications (1)

Publication Number Publication Date
KR101675986B1 true KR101675986B1 (en) 2016-11-23

Family

ID=57541403

Family Applications (1)

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

Country Status (2)

Country Link
KR (1) KR101675986B1 (en)
WO (1) WO2017217701A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180056349A (en) 2016-11-18 2018-05-28 (주)씽크포비엘 Visualization method for tracking analysis of testcase design information, testcase generating apparatus, and computer-readable recording medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11593253B2 (en) * 2019-11-22 2023-02-28 Japan Manned Space Systems Corporation Safety verification system for artificial intelligence system, safety verification method, and safety verification program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090017598A (en) * 2006-06-13 2009-02-18 마이크로소프트 코포레이션 Iterative static and dynamic software analysis
JP2012234401A (en) * 2011-05-02 2012-11-29 Kddi Corp Application analysis device and program
KR20130139608A (en) * 2012-06-13 2013-12-23 경북대학교 산학협력단 Apparatus and method of formal verification of automotive operating system
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
KR20110020520A (en) * 2009-08-24 2011-03-03 한국전력기술 주식회사 Software safety analysis method and system integrated with software develpoment
KR101316185B1 (en) * 2011-07-29 2013-10-08 현대자동차주식회사 Shifting device of mouse-shaped for automatic transmission vehicle

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090017598A (en) * 2006-06-13 2009-02-18 마이크로소프트 코포레이션 Iterative static and dynamic software analysis
JP2012234401A (en) * 2011-05-02 2012-11-29 Kddi Corp Application analysis device and program
KR20130139608A (en) * 2012-06-13 2013-12-23 경북대학교 산학협력단 Apparatus and method of formal verification of automotive operating system
KR101432712B1 (en) * 2013-03-05 2014-08-25 충북대학교 산학협력단 Methods of code refactoring for software safety

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180056349A (en) 2016-11-18 2018-05-28 (주)씽크포비엘 Visualization method for tracking analysis of testcase design information, testcase generating apparatus, and computer-readable recording medium

Also Published As

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

Similar Documents

Publication Publication Date Title
US10372872B2 (en) Providing early warning and assessment of vehicle design problems with potential operational impact
US8140911B2 (en) Dynamic software tracing
US10901401B2 (en) Plan generation apparatus, method and computer readable medium for multi-process production of intermediate product
CN110023967B (en) Fault risk indicator estimation device and fault risk indicator estimation method
CN112149860A (en) Automatic anomaly detection method and system
US20150025872A1 (en) System, method, and apparatus for modeling project reliability
KR102461180B1 (en) Method and apparatus for analyzing safety of software
KR101675986B1 (en) Method and apparatus for analyzing safety of automotive software
KR102066868B1 (en) Method and apparatus for simulating safety of automotive software to obtain a goal reliability index
Kanashiro et al. Predicting software flaws with low complexity models based on static analysis data
KR102426581B1 (en) Method and apparatus for analyzing safety of automotive software
CN106933572B (en) Measurement model based on LLVM intermediate representation program slice
KR101834247B1 (en) Method and apparatus for analyzing safety of automotive software
Muthusamy et al. Effectiveness of test case prioritization techniques based on regression testing
KR102114547B1 (en) Testing method and apparatus of target function incluede in target program
KR101734872B1 (en) Method and apparatus for analyzing safety of software
KR100987124B1 (en) Apparatus and Method for Software Faults Prediction using Metrics
Santos et al. An empirical study on the influence of context in computing thresholds for Chidamber and Kemerer metrics.
CN111382052A (en) Code quality evaluation method and device and electronic equipment
CN111128775A (en) Method and device for positioning integrated circuit process abnormity
CN113987751A (en) Scheme screening method and device, electronic equipment and storage medium
CN111679646A (en) Formalization-based automobile electronic system safety target confirmation method
Zhang et al. A Software Multi-fault Locating Technique based on Space Shrinkage
CN117520032A (en) Security requirement index determination and verification method, device, vehicle and storage medium
CN114090424A (en) Troubleshooting method, troubleshooting device, troubleshooting equipment and computer storage medium

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20190822

Year of fee payment: 4