CN116414355A - Coupling analysis method and system for airborne software requirements - Google Patents

Coupling analysis method and system for airborne software requirements Download PDF

Info

Publication number
CN116414355A
CN116414355A CN202310437351.8A CN202310437351A CN116414355A CN 116414355 A CN116414355 A CN 116414355A CN 202310437351 A CN202310437351 A CN 202310437351A CN 116414355 A CN116414355 A CN 116414355A
Authority
CN
China
Prior art keywords
variable
variables
coupling
demand
model
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202310437351.8A
Other languages
Chinese (zh)
Inventor
窦霖
王立松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University of Aeronautics and Astronautics
Original Assignee
Nanjing University of Aeronautics and Astronautics
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 Nanjing University of Aeronautics and Astronautics filed Critical Nanjing University of Aeronautics and Astronautics
Priority to CN202310437351.8A priority Critical patent/CN116414355A/en
Publication of CN116414355A publication Critical patent/CN116414355A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/10Requirements analysis; Specification techniques

Abstract

The invention provides a coupling analysis method and a coupling analysis system for airborne software requirements, which use a formalized variable relation model VRM as a formalized requirement model to model in a system requirement level, thereby meeting the related requirements of DO-178C on data coupling, control coupling and software components. Meanwhile, the invention also adopts a coupling measurement method based on the hierarchical dependency relationship among the variables, the relationship among the variables is defined as an n-ary dependency tree structure, the variables are weighted and divided, and the data coupling and control coupling among the software components are measured by constructing a variable matrix, a demand variable dependency tree and other methods. The invention focuses on the coupling analysis of the software demand level, makes up the blind spot and the deficiency of the traditional code hierarchy analysis, ensures that the whole software system is more comprehensively understood, is beneficial to improving the maintainability and the understandability of the software design, and can more accurately reflect the importance and the priority of the system function.

Description

Coupling analysis method and system for airborne software requirements
Technical Field
The invention belongs to the field of software engineering, and particularly relates to a coupling analysis method and a coupling analysis system for airborne software requirements, which are suitable for requirement analysis and design of an airborne software system based on DO-178C standards.
Background
DO-178C is an industry standard that provides security, reliability guidelines for consumer avionics, particularly in software. Compliance with this standard ensures that the aircraft's electronic systems and software meet stringent safety requirements, thereby reducing flight safety risks. The DO-178C standard requires a developer to analyze the data and control couplings between software components and gives the following relevant definitions: data coupling is the dependence of a software component on data that is not placed entirely under the control of the component; control coupling is the manner or degree to which one software component affects the operation of another software component; a component is a self-contained component or combination of components, assemblies, units that performs a distinct function of the system.
In the field of on-board software, coupling analysis is of great importance to ensure the safety, reliability, maintainability, testability and reusability of the software. In particular, in terms of software reliability and security, by reducing the degree of coupling between modules, potential error propagation and fault spread can be reduced, thereby improving the reliability and security of the software. A highly coupled software system may cause the failure of one module to affect the other module, thereby causing a failure of the entire system. In terms of maintainability, a low-coupling software system is easier to maintain because the dependency relationship between modules is simple and the scope of influence of modifying or repairing a certain module is small. In contrast, in highly coupled systems, modifications to one module may cause problems with other modules and higher maintenance costs. In terms of testability, reducing the degree of coupling helps to improve the testability of the software. The low-coupling modules may be tested independently of the unit, while the high-coupling modules may need to be tested sufficiently during the integrated test phase. In addition, in a low-coupling system, the test coverage and the design of the test cases are relatively simple. In terms of reusability, low-coupled software modules are more reusable because of their higher functional independence. This means that these modules can be reused directly in a new project or system, saving development time and costs. In terms of ease of understanding, a low-coupling software system is easier to understand because there are fewer and clear dependencies between modules. The developer can more easily understand the overall structure of the system, thereby improving development efficiency.
Coupling analysis is a technique for analyzing interactions between software components, and in the development process of on-board software, data coupling and control coupling characteristics of the software need to be considered and reasonably constrained to ensure the correctness of interactions and dependency relationships and the integrity of coverage. Conventional coupled analysis techniques typically analyze on a code level basis, whereas for complex systems such as on-board software, if errors occur in the definition of requirements, the subsequent code writing and software testing phases encounter more problems and are more difficult to discover and process, requiring continuous backtracking and even modification of requirements. Moreover, all verification activities in DO-178C are demand-based, and code structure-based coupling analysis is difficult to meet the requirements of the airworthiness. To address these issues, several coupling analysis techniques based on requirements and testing have been proposed. These techniques analyze data coupling and control coupling through static analysis and tools to evaluate whether software requirements in software for data value transactions and function calls are properly fulfilled. However, these techniques have some limitations such as inability to handle hierarchical dependencies in demand, weight without partitioning variables, and so forth. Therefore, there is a need to develop a new demand-based coupling analysis technique to better meet the demands of on-board software development.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a coupling analysis method and a coupling analysis system for the requirements of airborne software, which uses VRM (Variable Relationship Model, formalized variable relation model) as formalized requirement model to model in the system requirement level, thereby meeting the related requirements of DO-178C on data coupling, control coupling and software components; and meanwhile, a coupling measurement method based on hierarchical dependency relationship among variables is provided, the relationship among the variables is defined as an n-ary dependency tree structure, a series of algorithms are used for weighting the variables, and data coupling and control coupling among software components are measured by constructing a variable matrix, a demand variable dependency tree and the like.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
a coupling analysis method facing to the requirements of airborne software is characterized in that: the method comprises the following steps:
step 1: carrying out formal modeling on requirements of airborne software by using a VRM model, and constructing a requirement model; the VRM model consists of a set of model components, wherein the model components comprise state variables and table functions, and the table functions define the requirements of on-board software through the combination and the value of the state variables;
Step 2: dividing the state variables in each model component into a demand variable and a condition variable according to the corresponding relation between the state variables in the demand model and the model components, and constructing a component variable relation matrix for feeding back the dependency relation between the demand variable and the condition variable; wherein the demand variable is a state variable that changes according to a change in a condition variable;
step 3: defining a dependency relationship between state variables in a demand model as a logic form of an n-ary tree, wherein each node represents one state variable, edges between the nodes represent the dependency relationship between the state variables, and establishing a demand variable dependency tree;
step 4: calculating the weight of each node in the demand variable dependency tree to obtain the dependency degree between the state variables;
step 5: filling the dependency degree among the state variables into a component variable relation matrix in a weight mode, and redefining the dependency degree as a component variable coupling matrix;
step 6: and carrying out quantitative analysis on the coupling degree between the two model components according to the component variable coupling matrix, and calculating the data coupling degree and the control coupling degree between the model components.
In order to optimize the technical scheme, the specific measures adopted further comprise:
Further, in step 1, the state variables consist of input variables, output variables, intermediate variables and pattern classes; the table functions include a condition table for describing a data flow of the on-board software, an event table for describing a control flow of the on-board software, and a mode conversion table, the data coupling between the model components being determined by interactions of state variables in the condition table and the event table, and the control coupling between the model components being determined by interactions of state variables in the mode conversion table.
Further, in step 2, the component variable relation matrix is a two-dimensional matrix, in which the first two rows and the first two columns are in a symmetrical relation, the first row and the first column represent model components, the second row and the second column represent state variables subordinate to the model components, the row variables are defined as demand variables, the column variables are defined as condition variables, and the values in the two-dimensional matrix represent the dependency strength between the row vectors and the column vectors.
Further, in step 3, in the requirement variable dependency tree, the father node and its child node form a requirement, the father node is a requirement variable, the child node is a condition variable, the order of the requirement is divided according to the number of layers of the requirement variable in the n-ary tree, and the requirement variable of the current order is also a condition variable of the father node of the previous layer.
Further, the step 4 specifically includes the following steps:
step 4.1: according to the importance degree of the state variables in the airborne software, giving a manually defined coefficient for each state variable;
step 4.2: calculating a variable standard deviation coefficient according to the occurrence times of the state variables in the requirements, wherein the variable standard deviation coefficient is used for measuring the relative importance of the state variables in the airborne software;
step 4.3: according to the orders of the nodes in the demand variable dependency tree, calculating a hierarchy weight coefficient, wherein the hierarchy weight coefficient is used for measuring the dependency degree of the root node on other order state variables;
step 4.4: and synthesizing the artificial definition coefficient, the variable standard deviation coefficient and the hierarchy weight coefficient, and calculating to obtain the dependency degree between the state variables in the demand variable dependency tree.
Further, in step 4.2, the calculation formula of the standard deviation coefficient of the variable is as follows:
Figure BDA0004192668920000031
wherein, SC (i) is a standard deviation coefficient of the state variable i, xi represents the occurrence times of the state variable i in all demands, mu is an average value of the occurrence times of all state variables, and N is the total number of the state variables in all demands;
in step 4.3, the calculation formula of the hierarchical weight coefficient is as follows:
Figure BDA0004192668920000032
Figure BDA0004192668920000033
Figure BDA0004192668920000034
Wherein HC (i) represents the hierarchical weight coefficient of the state variable i, dep (i) represents the distance degree of the state variable i, cmp (i) represents the complexity of the state variable i, F (i) represents the order of the state variable i in the demand variable dependency tree, depth represents the overall depth of the n-ary tree, and L (j) is a function for calculating the j-th order node number in the demand variable dependency tree;
in step 4.4, the calculation formula of the dependency between the state variables is as follows:
Weight(i)=MC(i)×SC(i)×HC(i)
where Weight (i) is the Weight of the state variable i to the root node and MC (i) is the manually defined coefficient of the state variable i.
Further, in step 6, the calculation formula of the data coupling degree is as follows:
Figure BDA0004192668920000041
wherein DC (a, B) represents the degree of data coupling of model part a and model part B, IV (a), OV (a) and TV (a) represent the input variable, output variable and intermediate variable of model part a, respectively, IV (B), OV (B) and TV (B) represent the input variable, output variable and intermediate variable of model part B, respectively, and W (IV), W (OV) and W (TV) represent the weight values of the input variable, output variable and intermediate variable, respectively;
the calculation formula of the control coupling degree is as follows:
Figure BDA0004192668920000042
in the expression, CC (a, B) represents the control coupling degree of model component a and model component B, MC (a) and MC (B) represent the pattern class of model component a and model component B, respectively, and W (MC) represents the weight value of the pattern class MC.
The invention also provides a coupling analysis system facing the requirements of the airborne software, which is characterized in that: comprising the following steps:
the demand modeling and analyzing module is used for formally modeling the demand of the airborne software by using the VRM model and constructing a demand model; the VRM model consists of a set of model components, wherein the model components comprise state variables and table functions, and the table functions define the requirements of on-board software through the combination and the value of the state variables;
the component variable relation matrix construction module is used for dividing the state variables in each model component into demand variables and condition variables according to the corresponding relation between the state variables in the demand model and the model components, and constructing a component variable relation matrix for feeding back the dependency relation between the demand variables and the condition variables; wherein the demand variable is a state variable that changes according to a change in a condition variable;
the system comprises a demand variable dependency tree building module, a demand variable dependency tree building module and a demand variable dependency tree building module, wherein the demand variable dependency tree building module is used for defining the dependency relationship among state variables in a demand model into a logic form of an n-way tree, each node represents one state variable, edges among the nodes represent the dependency relationship among the state variables, and the demand variable dependency tree is built;
The variable weight dividing module is used for calculating the weight of each node in the demand variable dependency tree to obtain the dependency degree between the state variables;
the component variable coupling matrix construction module is used for filling the dependency degree among the state variables into the component variable relation matrix in a weight mode and redefining the dependency degree as the component variable coupling matrix;
and the coupling degree calculation module is used for carrying out quantitative analysis on the coupling degree between the two model components according to the component variable coupling matrix, and calculating the data coupling degree and the control coupling degree between the model components.
The invention also provides a computer readable storage medium storing a computer program, which is characterized in that the computer program causes a computer to execute the coupling analysis method facing to the on-board software requirement.
The invention also proposes an electronic device, characterized by comprising: the system comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to realize the coupling analysis method facing the on-board software requirement.
The beneficial effects of the invention are as follows:
1. the invention focuses on the coupling analysis of the software demand level, makes up the blind spot and the defect of the traditional code-level analysis-based method, and ensures that the whole software system is more comprehensively understood;
2. According to the invention, the dependency relationship among the variables is expressed in an n-ary tree structure form by constructing the demand variable dependency tree, so that the hierarchical dependency relationship among the variables is more clearly revealed, and the maintainability and the understandability of the software design are improved;
3. the invention divides the weight of the variable to distinguish the dependence of the variable with different importance degrees in the system, thereby reflecting the importance and priority of the system function more accurately.
Drawings
FIG. 1 is a model component interaction diagram of a VRM model.
FIG. 2 is a schematic diagram of a component variable relationship matrix.
FIG. 3 is a schematic diagram of a demand variable dependency tree.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings of the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
In an embodiment, the invention provides a coupling analysis method facing to the requirements of airborne software, and the specific coupling analysis steps are as follows.
Step 1: demand modeling and analysis.
The requirements of the on-board software are formally modeled using the VRM model in accordance with the DO-178C standard and related specifications. The VRM model consists of a collection of model components, as shown in FIG. 1, that contain state variables and table functions.
The state variables consist of input variables IV (Input Variables), output variables OV (Output Variables), intermediate variables TV (Intermediate Variables), and a pattern class MC (Mode Class), which can be understood as a state machine whose state is called system pattern, whose transitions are triggered by events; an intermediate variable is a variable formed after any functional mapping of input variables, patterns, or other intermediate variables, which exists to better describe the hierarchy of demands of the system. An event may occur when a system entity changes to a particular value, or from within a particular range to outside of a range.
The Table function is composed of a Condition Table (Condition Table), an Event Table (Event Table), and a schema conversion Table (Mode Transition Table). Table functions are typically manifestations of demand, with functions satisfying the definition of demand through different combinations and values of state variables. The VRM model describes the data flow of the software system through a condition table and an event table, and describes the control flow of the system through a mode conversion table. By parsing the original requirements, the input variables, output variables, intermediate variables and pattern classes required for the coupling analysis can be obtained and distributed into the VRM model components. The data coupling between model components is determined by the interaction of state variables in the condition table and the event table, and the control coupling is determined by the interaction of state variables in the mode conversion table.
The modeling process of the VRM model comprises two aspects, namely, establishing a domain concept library which contains state variables in the system; secondly, normalizing the original requirement and establishing a table function. The state variables consist of input variables, output variables, intermediate variables, and pattern classes. The table function is composed of a condition table, an event table, and a mode conversion table. The condition table contains all possible conditions and their corresponding outputs. The event table contains all possible events and their corresponding outputs. The mode transition table describes the conditions under which the system transitions from one state to another. The data coupling between the model components can be determined through the interactive data information of the state variables in the condition table and the event table; the control coupling between the model components can be determined by interactive control information of the state variables in the mode conversion table.
Step 2: constructing a component variable relation matrix.
And constructing a component variable relation matrix according to the corresponding relation between the state variables obtained in the demand model and the model components. Firstly, each model component and corresponding state variables are determined according to input variables, output variables, intermediate variables and mode classes in the demand model. And then determining the dependency relationship among the variables according to the condition table, the event table and the mode conversion table in the demand model. Finally, constructing a matrix: constructing a component variable relation matrix according to a certain rule. Typically presented in tabular form, the first row and first column of the matrix are model component names, the second row and second column are state variable names, and the model components are in one-to-one or one-to-many relationship with the state variables. The values in the matrix represent the strength of the dependency between the row and column variables, the greater the strength of the dependency, the tighter the dependency between the two variables.
As shown in fig. 2, the component variable relationship matrix is a two-dimensional matrix, the first two rows and the first two columns are in symmetrical relationship, the first row (column) of the matrix represents the model component, and the second row (column) represents the state variable belonging to the model component, and the model component and the state variable are in one-to-one or one-to-many relationship. In the matrix, row variables are defined as demand variables, column variables are defined as condition variables, and the values of the demand variables are different according to the change of the condition variables. As in one requirement: the value of the state variable a should be set to x when the following condition is satisfied: state variable b=y AND state variable c=z. The state variable A in the demand is the demand variable, and the state variable B and the state variable C are the condition variables. The value of the intersection of the rows and the columns in the matrix represents the relation of the state variable in a certain requirement, specifically, the state variable of the model component i (row) is taken as the requirement variable, the state variable of the model component j (column) is taken as the condition variable, the intersection value n of the rows and the columns represents the number of times of occurrence of the condition variable in the requirement, and the larger the number of times is, the larger the dependence of the requirement variable on the condition variable is indicated.
Step 3: and establishing a demand variable dependency tree.
When a software component modifies certain data information or control information, the components coupled to it are also affected because they all use the same piece of data. This dependency may cause a chain reaction of the whole system due to a small change in the components. The dependency relationship between variables may be direct or indirect. Direct dependency means that data is shared directly between components, and indirect dependency means that data is shared through one or more intermediate components. As shown in FIG. 3, the demand variable dependency tree is a tree structure describing hierarchical dependency relationships among variables, and organizes various variables in the system demand according to the dependency relationships, so that analysis and measurement of direct and indirect dependency among the variables are facilitated. In the demand variable dependency tree, each node represents a state variable, and edges between nodes represent dependency relationships between state variables. For each node in the tree, the parent node and its child node form a requirement, where the parent node is the requirement variable defined in step 2 and its child node is the condition variable. The number of required levels is divided according to the number of layers of the required variable in the n-ary tree, and the number of required levels in the dependent tree is consistent with the number of variable nodes of the previous third level. The nodes in the tree are not only the demand variables of the order where the nodes are located, but also the condition variables of the upper layer, namely the father node. Through the dependency relationship between the demand variable and the condition variable, a demand variable dependency tree is formed.
The relation between state variables in the requirement is defined as a logical form of an n-ary tree, and the father node and the child node form a requirement. The parent node depends on its child nodes in the sense that: when the condition that all child nodes of a certain father node are composed is met, the requirement of the father node is met. As shown in FIG. 3, the requirement variable A and the condition variable B, C constitute a first requirement, B-D is a second requirement, C-E-F is a third requirement, and so on. The order of the requirements is then divided according to the number of layers of the n-ary tree, the first layer being a first order requirement, also called root requirement, which is represented symbolically as: when the condition variables B and C are satisfied simultaneously, the requirements in which the a variable is located are fulfilled. Similarly, there are two in total second order requirements: the first is based on the demand of node B (demand B for short) and the second is based on the demand of node C (demand C for short). The implementation condition of the requirement B is that the variable D meets the corresponding condition, while the requirement C requires the variable E and the variable F to meet the corresponding condition at the same time.
The tree model is built by first analyzing the requirements to identify relationships between the state variables, and determining which state variables are required as the requirement variables and which state variables are the condition variables according to the requirements. The tree structure is then initialized, creating an empty n-ary tree structure, setting the root node as a first order requirement variable (root requirement), which is the starting point of the entire tree structure. Then adding child nodes, and adding the condition variable related to each requirement variable into the dependency tree. The sub-nodes may be plural, representing n sub-nodes of an n-ary tree. And finally recursively constructing subtrees, if the child nodes also have own conditional variables, recursively creating subtrees for the child nodes, and continuing to add the child nodes until all requirements are met.
Step 4: variable weights are divided.
Dividing variable weights into three steps, namely manually defining initial weight coefficients of state variables; calculating a variable standard deviation weight coefficient according to the occurrence times of the state variable in each requirement; and finally, dividing the state variables into different levels according to the requirement variable dependency tree, and setting different weight coefficients for the state variables. Combining the three weight coefficients, and calculating the weight of each state variable through integration.
Step 4.1: manually defined coefficients MC (Manual Coefficient), in a VRM model, manually defined coefficients may be defined by: firstly, according to requirements, the state variables are divided into input variables, output variables, intermediate variables and mode classes. Then, for each state variable, an artificial definition coefficient is given according to its importance in the system. This coefficient may be set empirically and expertise, such as for input variables and output variables, and its coefficient may be set according to its impact on system performance; for intermediate variables, the coefficients thereof can be set according to the importance degree of the intermediate variables in the system; for the pattern class, its coefficients can be set according to its effect on system control.
Step 4.2: the standard deviation coefficient SC (Standard Coefficient) of the variable is important for the system by observing the number of occurrences of a state variable in demand, if a state variable occurs relatively more frequently in demand, and is particularly important in coupling analysis if a number of model components use the state variable. For this purpose, the present embodiment proposes a weight definition method based on the number of times a state variable appears in demand, i.e., a variable standard deviation coefficient, whose calculation formula is given below.
Figure BDA0004192668920000081
Where SC (i) is a standard deviation coefficient of the variable i, xi represents the number of occurrences of the variable i in all demands, μ is an average value of the number of occurrences of all the variables, and N is the total number of variables in all the demands. By the calculation method, the standard deviation of the number of state variables in the demand is obtained, and then a higher standard deviation weight coefficient is given to the state variables with more occurrence numbers according to the different occurrence numbers of each state variable.
Step 4.3: the hierarchical weighting coefficients HC (Hierarchical Coefficient) are used for weighting variable nodes of different hierarchies in the demand variable dependency tree. The weight coefficient is inversely related to the depth of the hierarchy and positively related to the number of variable nodes in the hierarchy. According to the weight coefficient, the coupling degree between the root node and other order variables can be calculated, and the specific algorithm comprises the following two parts.
(1) Distance degree: in the demand variable dependency tree, the closer the variable nodes are to the root node, the greater the impact on root demand, because of the tighter dependencies between them and the root node, which also means a higher degree of coupling between these nodes. Conversely, variable nodes farther from the root node have less effect because their dependency relationship with the root node is relatively weak, which also means that the degree of coupling between them is relatively low. Thus, when considering the satisfaction of the demand, the dependency relationship between the state variables and the distance from the root node must be fully considered. The specific formula is as follows:
Figure BDA0004192668920000091
where dep (i) represents the distance between node i and the root node variable, depth is the overall depth of the n-ary tree, and F (i) is the order of node i in the dependency tree.
(2) Complexity: the satisfaction of the demand involves the interaction of a number of condition variables that are considered nodes in the dependency tree, with the hierarchy of the tree representing the hierarchical relationship of the variables. The nodes depend on child nodes in the dependency tree and influence parent nodes, so that the complexity of a certain level increases along with the increase of the number of variable nodes, and the influence of the node on the previous level correspondingly increases. In actual demands, the increase of nodes can lead to the increase of the number of condition variables, thereby increasing the difficulty of meeting the demands. For high complexity levels, the requirements can be better met by adding corresponding weight coefficients. The specific formula is as follows:
Figure BDA0004192668920000092
In the formula, cmp (i) represents the complexity of the order of the node i, F (i) is the order of the node i in the dependency tree, and L (j) is a function for calculating the number of the j-th order nodes in the dependency tree.
Combining the above two points, the weight coefficient of the variable node i in the demand variable dependent tree can be designed by the following formula, which involves calculating the distance and complexity of the nodes and combining them with the order of the tree.
Figure BDA0004192668920000093
In the formula, HC (i) represents a hierarchical weight coefficient of the node i, dep (i) represents a distance degree of the node i, cmp (i) represents complexity of the node i, and F (i) is an order of the node i in the dependency tree.
Step 4.4: the three weight coefficients are combined to obtain the degree of dependence among the variables in the demand variable dependence tree, namely the coupling degree. The specific calculation formula is as follows:
Weight(i)=MC(i)×SC(i)×HC(i)
wherein Weight (i) is the Weight of the inode to the root node, MC (i) is the artificial definition coefficient of the inode i, SC (i) is the variable standard deviation coefficient of the inode i, and HC (i) is the hierarchical Weight coefficient of the inode i.
Step 5: constructing a component variable coupling matrix.
In order to more effectively quantify data coupling and control coupling, the dependency relationship between the variables is weighted based on a component variable relationship matrix. Specifically, the dependency degree between each variable is converted into corresponding weight values, and the weight values are filled in the matrix, so that a new matrix, namely a component variable coupling matrix, is obtained. The elements in the matrix represent the degree of coupling between a variable in a component and other component variables, which is calculated by taking into account the direct and indirect dependencies between the variables. The component variable coupling matrix not only contains the corresponding relation between the component and the variable, but also reflects the dependency degree between the variables.
In step 2, a component variable relationship matrix has been constructed, so that the relationship of each model component to a variable can be determined by querying the information in the matrix. The weight of each variable has been calculated in step 4, so the weight of each variable can be obtained by querying the demand variable dependency tree, and the degree of coupling between the variables is filled into the component variable coupling matrix in the size of the weight value. Specifically, for the variables in each model part, it is necessary to find the relevant variables that it depends on, and then fill the weights of these variables into the row and column corresponding to the model part. During the filling process, if the dependency between two variables is 0, the weight of the position is 0. For example, the state variable x in model component a depends on the state variable y and the state variable z in model component B, and the relative weights of the state variable y and the state variable z to the state variable x are w1 and w2, respectively. The row of the matrix in which the state variable x is located, the column corresponding to the state variable y and the state variable z, may be filled with the corresponding weight values w1 and w2.
Step 6: and calculating the data coupling degree and the control coupling degree.
The degree of coupling between two model components can be quantitatively analyzed according to the component variable coupling matrix, wherein a method of accumulating weight values is adopted to add the related variable weights which belong to the coupling of the two model components. Specifically, the degree of coupling is divided into two categories: data coupling and control coupling. The data coupling degree refers to the degree of information exchange between two model components through input variables, output variables and intermediate variables, and the control coupling degree refers to the degree of control logic and behavior mode interaction between two model components through mode classes. The calculation of the data coupling degree requires the accumulation of the weight values of the corresponding input variable, output variable and intermediate variable in the component variable coupling matrix, and the calculation of the control coupling degree requires the accumulation of the weight values of the mode class.
The degree of data coupling reflects the degree of data interaction between two model components, the computation of which is related to the input variables, the output variables, and the intermediate variables. The degree of control coupling reflects the degree of dependency between control flows, the computation of which is related to the pattern class. According to the component variable coupling matrix, the dependence of the variables between model components can be obtained, and the coupling degree between the model components can be calculated by accumulating the weight values of the phase dependent variables.
Calculating the data coupling degree: for any two model components a and B, their data coupling can be calculated by the following formula:
Figure BDA0004192668920000111
in the formula, IV (a), OV (a), and TV (a) respectively represent an input variable, an output variable, and an intermediate variable of the model component a, IV (B), OV (B), and TV (B) respectively represent an input variable, an output variable, and an intermediate variable of the model component B, and W (IV), W (OV), and W (TV) respectively represent weight values of the input variable IV, the output variable OV, and the intermediate variable TV.
Calculating and controlling the coupling degree: for any two model components a and B, their control coupling can be calculated by the following formula:
Figure BDA0004192668920000112
in the expression, MC (a) and MC (B) represent pattern classes of the model component a and the model component B, respectively, and W (MC) represents a weight value of the pattern class MC.
In another embodiment, the present invention provides a system corresponding to the coupling analysis method for airborne software requirements provided in the first embodiment, that is, a coupling analysis system for airborne software requirements, which specifically includes the following modules:
1. demand modeling and analysis module: the method comprises the steps of performing formal modeling on requirements of airborne software by using a VRM model, and constructing a requirement model; the VRM model consists of a set of model components, wherein the model components comprise state variables and table functions, and the table functions define the requirements of the on-board software through the combination and the value of the state variables.
In the module, the state variables consist of input variables, output variables, intermediate variables and mode classes; the table functions include a condition table, an event table, and a mode conversion table, the condition table and the event table being used to describe a data flow of the on-board software, the mode conversion table being used to describe a control flow of the on-board software, data coupling between model components being determined by interaction of state variables in the condition table and the event table, and control coupling between model components being determined by interaction of state variables in the mode conversion table.
2. Component variable relation matrix construction module: the system comprises a model component, a demand model, a feedback model component and a feedback model component, wherein the model component is used for generating a demand model; wherein the demand variable is a state variable that changes according to a change in the condition variable.
In the module, the state variables consist of input variables, output variables, intermediate variables and mode classes; the table functions include a condition table, an event table, and a mode conversion table, the condition table and the event table being used to describe a data flow of the on-board software, the mode conversion table being used to describe a control flow of the on-board software, data coupling between model components being determined by interaction of state variables in the condition table and the event table, and control coupling between model components being determined by interaction of state variables in the mode conversion table.
3. The demand variable dependency tree building module: the method is used for defining the dependency relationship between the state variables in the demand model into a logic form of an n-ary tree, each node represents one state variable, the edges between the nodes represent the dependency relationship between the state variables, and the demand variable dependency tree is built.
In the module, a father node and a child node form a demand, the father node is a demand variable, the child node is a condition variable, the order of the demand is divided according to the layer number of the demand variable in the n-ary tree, and the demand variable of the current order is also the condition variable of the father node of the previous layer.
4. Variable weight dividing module: and the method is used for calculating the weight of each node in the demand variable dependency tree to obtain the dependency degree among the state variables. The module specifically comprises the following sub-modules.
The manual definition coefficient module is used for giving manual definition coefficients to each state variable according to the importance degree of the state variable in the airborne software;
the variable standard deviation coefficient module is used for calculating a variable standard deviation coefficient according to the occurrence times of the state variable in the requirement, and the variable standard deviation coefficient is used for measuring the relative importance of the state variable in the airborne software;
the hierarchical weight coefficient module is used for calculating a hierarchical weight coefficient according to the orders of the nodes in the demand variable dependency tree, and the hierarchical weight coefficient is used for measuring the dependency degree of the root node on other order state variables;
the dependency calculation module is used for comprehensively and manually defining the coefficient, the variable standard deviation coefficient and the level weight coefficient, and calculating to obtain the dependency among the state variables in the demand variable dependency tree.
5. Component variable coupling matrix construction module: the dependency degree between the state variables is filled in the component variable relation matrix in a weight mode and redefined as a component variable coupling matrix;
6. and the coupling degree calculating module is used for: the method is used for quantitatively analyzing the coupling degree between two model components according to the component variable coupling matrix, and calculating the data coupling degree and the control coupling degree between the model components.
The specific operation of each module is the same as that of the coupling analysis method for on-board software requirements according to the first embodiment, so that the steps are not repeated here.
In another embodiment, the present invention proposes a computer readable storage medium storing a computer program, where the computer program causes a computer to execute the coupling analysis method for on-board software requirements according to the first embodiment.
In another embodiment, the present invention provides an electronic device, including: the coupling analysis method for on-board software requirements according to the first embodiment is implemented when the processor executes the computer program.
In the embodiments disclosed herein, a computer storage medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The computer storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a computer storage medium would include one or more wire-based electrical connections, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above examples, and all technical solutions belonging to the concept of the present invention belong to the protection scope of the present invention. It should be noted that modifications and adaptations to the invention without departing from the principles thereof are intended to be within the scope of the invention as set forth in the following claims.

Claims (10)

1. A coupling analysis method facing to the requirements of airborne software is characterized in that: the method comprises the following steps:
step 1: carrying out formal modeling on requirements of airborne software by using a VRM model, and constructing a requirement model; the VRM model consists of a set of model components, wherein the model components comprise state variables and table functions, and the table functions define the requirements of on-board software through the combination and the value of the state variables;
Step 2: dividing the state variables in each model component into a demand variable and a condition variable according to the corresponding relation between the state variables in the demand model and the model components, and constructing a component variable relation matrix for feeding back the dependency relation between the demand variable and the condition variable; wherein the demand variable is a state variable that changes according to a change in a condition variable;
step 3: defining a dependency relationship between state variables in a demand model as a logic form of an n-ary tree, wherein each node represents one state variable, edges between the nodes represent the dependency relationship between the state variables, and establishing a demand variable dependency tree;
step 4: calculating the weight of each node in the demand variable dependency tree to obtain the dependency degree between the state variables;
step 5: filling the dependency degree among the state variables into a component variable relation matrix in a weight mode, and redefining the dependency degree as a component variable coupling matrix;
step 6: and carrying out quantitative analysis on the coupling degree between the two model components according to the component variable coupling matrix, and calculating the data coupling degree and the control coupling degree between the model components.
2. The coupling analysis method for on-board software requirements according to claim 1, wherein: in the step 1, the state variables consist of input variables, output variables, intermediate variables and mode classes; the table functions include a condition table for describing a data flow of the on-board software, an event table for describing a control flow of the on-board software, and a mode conversion table, the data coupling between the model components being determined by interactions of state variables in the condition table and the event table, and the control coupling between the model components being determined by interactions of state variables in the mode conversion table.
3. The coupling analysis method for on-board software requirements according to claim 1, wherein: in step 2, the component variable relation matrix is a two-dimensional matrix, in the two-dimensional matrix, the first two rows and the first two columns are in symmetrical relation, the first row and the first column represent model components, the second row and the second column represent state variables subordinate to the model components, the row variables are defined as demand variables, the column variables are defined as condition variables, and the values in the two-dimensional matrix represent the dependency relation strength between row vectors and column vectors.
4. The coupling analysis method for on-board software requirements according to claim 1, wherein: in step 3, in the requirement variable dependency tree, a parent node and its child node form a requirement, the parent node is a requirement variable, the child node is a condition variable, the order of the requirement is divided according to the layer number of the requirement variable in the n-ary tree, and the requirement variable of the current order is also a condition variable of the parent node of the previous layer.
5. The coupling analysis method for on-board software requirements according to claim 1, wherein: the step 4 specifically comprises the following steps:
step 4.1: according to the importance degree of the state variables in the airborne software, giving a manually defined coefficient for each state variable;
Step 4.2: calculating a variable standard deviation coefficient according to the occurrence times of the state variables in the requirements, wherein the variable standard deviation coefficient is used for measuring the relative importance of the state variables in the airborne software;
step 4.3: according to the orders of the nodes in the demand variable dependency tree, calculating a hierarchy weight coefficient, wherein the hierarchy weight coefficient is used for measuring the dependency degree of the root node on other order state variables;
step 4.4: and synthesizing the artificial definition coefficient, the variable standard deviation coefficient and the hierarchy weight coefficient, and calculating to obtain the dependency degree between the state variables in the demand variable dependency tree.
6. The coupling analysis method for on-board software requirements as claimed in claim 5, wherein: in step 4.2, the calculation formula of the standard deviation coefficient of the variable is as follows:
Figure FDA0004192668900000021
wherein SC (i) is a standard deviation coefficient of the state variable i, X i Representing the number of occurrences of the state variable i in all demands, μ being the average of the number of occurrences of all state variables, N being the total number of state variables in all demands;
in step 4.3, the calculation formula of the hierarchical weight coefficient is as follows:
Figure FDA0004192668900000022
Figure FDA0004192668900000023
Figure FDA0004192668900000024
wherein HC (i) represents the hierarchical weight coefficient of the state variable i, dep (i) represents the distance degree of the state variable i, cmp (i) represents the complexity of the state variable i, F (i) represents the order of the state variable i in the demand variable dependency tree, depth represents the overall depth of the n-ary tree, and L (j) is a function for calculating the j-th order node number in the demand variable dependency tree;
In step 4.4, the calculation formula of the dependency between the state variables is as follows:
Weight(i)=MC(i)×SC(i)×HC(i)
where Weight (i) is the Weight of the state variable i to the root node and MC (i) is the manually defined coefficient of the state variable i.
7. The coupling analysis method for on-board software requirements according to claim 2, wherein: in step 6, the calculation formula of the data coupling degree is as follows:
Figure FDA0004192668900000025
wherein DC (a, B) represents the degree of data coupling of model part a and model part B, IV (a), OV (a) and TV (a) represent the input variable, output variable and intermediate variable of model part a, respectively, IV (B), OV (B) and TV (B) represent the input variable, output variable and intermediate variable of model part B, respectively, and W (IV), W (OV) and W (TV) represent the weight values of the input variable, output variable and intermediate variable, respectively;
the calculation formula of the control coupling degree is as follows:
Figure FDA0004192668900000031
in the expression, CC (a, B) represents the control coupling degree of model component a and model component B, MC (a) and MC (B) represent the pattern class of model component a and model component B, respectively, and W (MC) represents the weight value of the pattern class MC.
8. The coupling analysis system facing to the requirements of the airborne software is characterized in that: comprising the following steps:
the demand modeling and analyzing module is used for formally modeling the demand of the airborne software by using the VRM model and constructing a demand model; the VRM model consists of a set of model components, wherein the model components comprise state variables and table functions, and the table functions define the requirements of on-board software through the combination and the value of the state variables;
The component variable relation matrix construction module is used for dividing the state variables in each model component into demand variables and condition variables according to the corresponding relation between the state variables in the demand model and the model components, and constructing a component variable relation matrix for feeding back the dependency relation between the demand variables and the condition variables; wherein the demand variable is a state variable that changes according to a change in a condition variable;
the system comprises a demand variable dependency tree building module, a demand variable dependency tree building module and a demand variable dependency tree building module, wherein the demand variable dependency tree building module is used for defining the dependency relationship among state variables in a demand model into a logic form of an n-way tree, each node represents one state variable, edges among the nodes represent the dependency relationship among the state variables, and the demand variable dependency tree is built;
the variable weight dividing module is used for calculating the weight of each node in the demand variable dependency tree to obtain the dependency degree between the state variables;
the component variable coupling matrix construction module is used for filling the dependency degree among the state variables into the component variable relation matrix in a weight mode and redefining the dependency degree as the component variable coupling matrix;
and the coupling degree calculation module is used for carrying out quantitative analysis on the coupling degree between the two model components according to the component variable coupling matrix, and calculating the data coupling degree and the control coupling degree between the model components.
9. A computer-readable storage medium storing a computer program, wherein the computer program causes a computer to perform the on-board software requirement oriented coupling analysis method according to any one of claims 1-7.
10. An electronic device, comprising: memory, a processor and a computer program stored on the memory and executable on the processor, which processor, when executing the computer program, implements the on-board software requirement oriented coupling analysis method according to any of claims 1-7.
CN202310437351.8A 2023-04-21 2023-04-21 Coupling analysis method and system for airborne software requirements Pending CN116414355A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310437351.8A CN116414355A (en) 2023-04-21 2023-04-21 Coupling analysis method and system for airborne software requirements

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310437351.8A CN116414355A (en) 2023-04-21 2023-04-21 Coupling analysis method and system for airborne software requirements

Publications (1)

Publication Number Publication Date
CN116414355A true CN116414355A (en) 2023-07-11

Family

ID=87054488

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310437351.8A Pending CN116414355A (en) 2023-04-21 2023-04-21 Coupling analysis method and system for airborne software requirements

Country Status (1)

Country Link
CN (1) CN116414355A (en)

Similar Documents

Publication Publication Date Title
CN108376221B (en) Software system security verification and evaluation method based on AADL (architecture analysis and design language) model extension
Mathur et al. Advancements in the V-Model
US6789054B1 (en) Geometric display tools and methods for the visual specification, design automation, and control of adaptive real systems
Rushby Quality measures and assurance for ai (artificial intelligence) software
Weißleder Test models and coverage criteria for automatic model-based test generation with UML state machines
Menzies et al. Verification and validation and artificial intelligence
US20160266952A1 (en) Automated Qualification of a Safety Critical System
Winter Model Checking for Abstract State Machines.
US10275548B1 (en) Interactive diagnostic modeling evaluator
Müller et al. Simulation methods
Chen et al. Automatic fault tree derivation from little-jil process definitions
Bozzano et al. Formal Methods for Aerospace Systems: Achievements and Challenges
Nicoletti et al. BFL: a logic to reason about fault trees
Ammar et al. A methodology for risk assessment of functional specification of software systems using colored Petri nets
Winter Model checking abstract state machines
Friedrich et al. Knowledge engineering for configuration systems
Sinha et al. Reliability and availability prediction of embedded systems based on environment modeling and simulation
CN116414355A (en) Coupling analysis method and system for airborne software requirements
Delmas et al. SMT-based architecture modelling for safety assessment
Bernardi et al. Petri nets and dependability
Royce Status report: computer-aided prototyping
Elks et al. Defining and characterizing methods, tools, and computing resources to support pseudo exhaustive testability of software based i&c devices
Voit et al. Verification Method for Diagrammatic Workflow Specifications in Computer-Aided Design
Sheldon et al. Composing, analyzing and validating software models to assess the performability of competing design candidates
Smith et al. A Framework to Expand and Advance Probabilistic Risk Assessment to Support Small Modular Reactors

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination