Method and device for analyzing correctness of data coupling based on low-level requirements of software architecture
Patent Information
- Application Number
- CN202210850143.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-19
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2042-07-19
AI Technical Summary
这就造成了分析未覆盖源代码数据耦合关系时再逐级向上回溯,因此产生了大量额外工作
[0055]Compared with existing technologies, this invention offers the following advantages: It fully utilizes the traceability relationship between source code functions and low-level requirements, as well as the mapping relationship between software functional components and source code functions. Using source code functions as an intermediary, it indirectly obtains the software architecture data flow mapping relationship expressed through low-level requirement interfaces. Therefore, to a certain extent, it eliminates different interpretations and even misunderstandings caused by the lack of definition of the relationship between software functional components and low-level requirements in DO-178C, filling a gap in DO-178C. Furthermore, it confirms the consistency between this mapping relationship and the software architecture data flow mapping relationship expressed through source code interfaces, enabling the evaluation of the correctness of low-level requirement data coupling relationships based on the software architecture.
Smart Images

Figure CN117453180B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software testing and verification, and specifically to a method and apparatus for correctness analysis of low-level requirement data coupling based on software architecture. Background Technology
[0002] Data coupling analysis is one of the most challenging aspects of the 71 objectives defined in DO-178C. Due to the generally low maturity of this technology and the limited universality and constraints of publicly available solutions, it is often necessary to develop targeted solutions that take into account the characteristics of software design.
[0003] The requirement for data coupling coverage analysis in DO-178B / C, "Software Considerations in the Conformity Assessment of Airborne Systems and Equipment," is proposed in the test objectives of software structure coverage analysis. This objective mainly assesses the adequacy of integration testing, and the main evaluation object is the data coupling relationship between different modules in the source code. The evaluation criterion is: whether the data coupling relationship between code modules is covered in the requirements-based testing.
[0004] According to the software lifecycle model, between high-level software requirements and source code / object code lies the software architecture and low-level requirements. While this objective directly assesses the consistency of the data coupling relationship between high-level software requirements and source code, in the engineering implementation process, this data coupling relationship is decomposed and passed down level by level, either from high-level requirements to software architecture, from high-level requirements to low-level requirements, from software architecture to low-level requirements, from software architecture to source code, and from low-level requirements to source code. Therefore, while collecting the data coupling relationships between the covered source code modules during integration testing is a feasible technical approach, the localization and rectification of problems must inevitably trace back to the analysis of data coupling relationships in the software architecture, low-level requirements, and even high-level requirements. It is necessary to confirm at each level whether the source code data coupling relationship conforms to the low-level requirements and software architecture, whether the low-level requirement data coupling relationship conforms to the software architecture and high-level requirements, and whether the software architecture data coupling relationship is compatible with the high-level software requirements.
[0005] Currently, the industry's main focus is on how to collect source code structure data coupling coverage information during testing, methods for calculating data coupling coverage, and methods for identifying source code data coupling pairs. Little attention is paid to the correctness of data coupling relationships passed between high-level software requirements and source code throughout the software lifecycle. This results in a significant amount of extra work being done by backtracking upwards when analyzing uncovered source code data coupling relationships. To reduce the difficulty and enormous workload of post-hoc analysis of software architecture and low-level requirement data coupling relationships, solutions for analyzing software architecture and low-level requirement data coupling relationships are needed. Summary of the Invention
[0006] The following provides a brief overview of one or more aspects to offer a basic understanding of them. This overview is not an exhaustive summary of all conceived aspects, nor is it intended to identify key or decisive elements of all aspects, nor to define the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form to prepare for the more detailed descriptions that follow.
[0007] The purpose of this invention is to solve the above-mentioned problems and provide a method and apparatus for analyzing the correctness of low-level requirement data coupling based on software architecture. This method establishes a mapping relationship between low-level requirements and functional components decomposed from the software architecture, and on this basis, determines the correctness of low-level requirement data coupling based on the software architecture.
[0008] The technical solution of this invention is as follows: This invention discloses a method for correctness analysis of low-level requirement data coupling based on software architecture, the method comprising:
[0009] Step 1: Based on the inclusion relationship between software functional components and source code functions in the software architecture, and the traceability relationship between source code functions and low-level requirements, establish the mapping relationship between software functional components and low-level requirements;
[0010] Step 2: Supplement the information of the components to which the low-level requirements belong in the low-level requirement data coupling analysis results, establish the mapping relationship between software functional components and low-level requirements, and then take the software functional components as objects and the low-level requirement input and output interfaces as data elements to automatically generate the low-level requirement input and output interface variables of each component, and transform the data coupling relationship of low-level requirements into the data coupling relationship between software functional components.
[0011] Step 3: Check the integrity of component data coupling relationships based on low-level requirements from both component and low-level requirements perspectives.
[0012] Step 4: Determine the validity of low-level requirement data coupling pairs between components;
[0013] Step 5: Eliminate invalid low-level requirement data coupling pairs between components;
[0014] Step 6: Generate data coupling relationships between top-level components based on low-level requirement interfaces;
[0015] Step 7: Based on the software architecture, compare and analyze the data flow mapping relationship of the software architecture expressed by the source code interface and the data flow mapping relationship between the software functional components and the low-level requirements. Determine whether the two sets of component data coupling relationships obtained based on the low-level requirements and source code functions are consistent, and evaluate the correctness of the data coupling analysis results of the low-level requirements based on the software architecture.
[0016] According to an embodiment of the software architecture-based low-level requirement data coupling correctness analysis method of the present invention, step 1 further includes:
[0017] In the software functional component function composition information table, two columns of component information are added to the correspondence table between low-level requirement input / output interfaces and function input / output variables, or to the software low-level requirement function composition information table. This is equivalent to converting it into a mapping relationship lookup table between software functional components and low-level requirements. Then, the completeness of the mapping relationship is checked to determine the consistency between low-level requirements and software functional components, which serves as the basis for judging the correctness of low-level requirements. The mapping relationship lookup table between software functional components and low-level requirements includes a software functional component low-level requirement interface correspondence table or a software functional component low-level requirement composition information table. The completeness check of the mapping relationship includes checking whether all low-level requirements have corresponding software functional components and whether all functional components have corresponding low-level requirements.
[0018] According to an embodiment of the software architecture-based low-level requirement data coupling correctness analysis method of the present invention, step 2 further includes:
[0019] Add one column for component name to each of the low-level requirement input / output information table, low-level requirement data "definition" table, and low-level requirement data "usage" table, equivalent to converting them into draft tables for low-level requirement input / output information, low-level requirement data "definition", and low-level requirement data "usage". Add one column for component name to each of the definition and usage columns in the effective low-level requirement data "definition-usage" table, equivalent to converting them into draft tables for low-level requirement data "definition-usage". Add three columns for component name before the low-level requirement entries in the low-level requirement data coupling relationship table, equivalent to converting them into draft tables for low-level requirement data coupling relationships. Based on the software component low-level requirement interface correspondence table or the software component low-level requirement composition information table, fill the newly added columns in the draft tables for low-level requirement input / output information, low-level requirement data "definition", low-level requirement data "usage", low-level requirement data "definition-usage", and low-level requirement data coupling relationships with the component name information corresponding to the low-level requirement entries.
[0020] According to an embodiment of the software architecture-based low-level requirement data coupling correctness analysis method of the present invention, step 3 further includes:
[0021] Check whether the "Component Name" column in the draft tables of component low-level requirement input and output information, component low-level requirement data "Definition" draft table, component low-level requirement data "Use" draft table, and component low-level requirement data "Definition-Use" draft table contains NA information, where NA indicates non-existence. Check whether each component defined in the software component low-level requirement interface correspondence table or software component low-level requirement composition information table can be found in each draft table. If not, record the inconsistency and submit a defect report; if yes, continue the analysis.
[0022] According to an embodiment of the software architecture-based low-level requirement data coupling correctness analysis method of the present invention, step 4 further includes:
[0023] Remove the "Define-Use" pairs between low-level requirement entries within a component from the component's low-level requirement data draft table. Specifically, remove "Define-Use" pairs where the "Component Name" is the same in the "Define" and "Use" columns. Only retain the "Define-Use" pairs between components to form a low-level requirement data "Define-Use" table between components. Review the control flow relationships between all components and analyze the validity of each "Define-Use" pair in Table 5-4-1. Only retain the "Define-Use" pairs that are reachable from the control flow and delete the "Define-Use" pairs that are not reachable from the control flow to form a valid low-level requirement data "Define-Use" pair table between components.
[0024] According to an embodiment of the software architecture-based low-level requirement data coupling correctness analysis method of the present invention, step 5 further includes:
[0025] Based on the valid "Define-Use" table of low-level requirement data between components, delete the entries for data definitions and / or uses that do not exist in the "Define-Use" table of low-level requirement input and output information, the "Define" table of low-level requirement data, the "Use" table of low-level requirement data, and the "Coupling Relationship" table of low-level requirement data of components, respectively, and generate the following tables: Component Low-Level Requirement Input and Output Information Table, Component Low-Level Requirement Data "Define" Table, Component Low-Level Requirement Data "Use" Table, and Component Low-Level Requirement Data Coupling Relationship Table.
[0026] According to an embodiment of the software architecture-based low-level requirement data coupling correctness analysis method of the present invention, step 6 further includes:
[0027] Following the principle of identical "component names", the data with the same component names in the draft table of component low-level requirement data coupling relationship are centrally arranged to obtain the complete input and output interfaces of each component, complete the data coupling relationship analysis between related components, and form the component low-level requirement data coupling relationship table.
[0028] According to an embodiment of the software architecture-based low-level requirement data coupling correctness analysis method of the present invention, step 7 further includes:
[0029] Referring to the correspondence table between low-level requirement input / output interfaces and function input / output variables, or the software low-level requirement function composition information table, software component function composition information table, and software component low-level requirement interface correspondence table, reconfirm whether the information in the component low-level requirement input / output information table expressed by the low-level requirement interface is consistent with the component input / output variable table expressed by the function interface, the component low-level requirement data "definition" table is consistent with the component variable "definition" table, the component low-level requirement data "usage" table is consistent with the component variable "usage" table, and the component low-level requirement data coupling relationship table is consistent with the software component data coupling relationship table. That is, whether the two sets of component data coupling relationships obtained based on the low-level requirements and source code function analysis are consistent. If not, record the inconsistencies and submit a defect report. If yes, the analysis ends, the data coupling analysis results of low-level requirements and software architecture are consistent, and the data coupling analysis results of low-level requirements based on software architecture are correct.
[0030] This invention also discloses a low-level requirement data coupling correctness analysis device based on software architecture, the device comprising:
[0031] The component-to-lower-level requirement mapping module establishes the mapping relationship between software functional components and low-level requirements based on the inclusion relationship between software functional components and source code functions in the software architecture, and the tracing relationship between source code functions and low-level requirements.
[0032] The component and low-level requirement data coupling and transformation module supplements the information of the component to which the low-level requirement belongs in the low-level requirement data coupling analysis results, establishes the mapping relationship between software functional components and low-level requirements, and then automatically generates the low-level requirement input and output interface variables of each component with the software functional components as objects and the low-level requirement input and output interfaces as data elements, transforming the data coupling relationship of low-level requirements into the data coupling relationship between software functional components.
[0033] The component and low-level requirement data integrity check module checks the integrity of the component data coupling relationship based on low-level requirements from two aspects: components and low-level requirements.
[0034] The module for determining the validity of low-level requirement data coupling pairs between components is used to determine the validity of such pairs.
[0035] Remove modules that are ineffective low-level requirement data coupling pairs between components; remove ineffective low-level requirement data coupling pairs between components.
[0036] The associated component data coupling analysis module generates data coupling relationships between top-level components based on lower-level requirement interfaces.
[0037] The consistency judgment module for the data coupling relationship between two sets of components based on low-level requirements and source code compares and analyzes the data flow mapping relationship of the software architecture expressed by the source code interface and the data flow mapping relationship between the software functional components and low-level requirements, based on the software architecture. It judges whether the two sets of component data coupling relationships obtained based on low-level requirements and source code functions are consistent and evaluates the correctness of the data coupling analysis results of low-level requirements based on the software architecture.
[0038] According to an embodiment of the software architecture-based low-level requirement data coupling correctness analysis device of the present invention, the component-low-level requirement mapping module is further configured as follows:
[0039] In the software functional component function composition information table, two columns of component information are added to the correspondence table between low-level requirement input / output interfaces and function input / output variables, or to the software low-level requirement function composition information table. This is equivalent to converting it into a mapping relationship lookup table between software functional components and low-level requirements. Then, the completeness of the mapping relationship is checked to determine the consistency between low-level requirements and software functional components, which serves as the basis for judging the correctness of low-level requirements. The mapping relationship lookup table between software functional components and low-level requirements includes a software functional component low-level requirement interface correspondence table or a software functional component low-level requirement composition information table. The completeness check of the mapping relationship includes checking whether all low-level requirements have corresponding software functional components and whether all functional components have corresponding low-level requirements.
[0040] According to an embodiment of the software architecture-based low-level requirement data coupling correctness analysis device of the present invention, the component and the low-level requirement data coupling transformation module are further configured as follows:
[0041] Add one column for component name to each of the low-level requirement input / output information table, low-level requirement data "definition" table, and low-level requirement data "usage" table, equivalent to converting them into draft tables for low-level requirement input / output information, low-level requirement data "definition", and low-level requirement data "usage". Add one column for component name to each of the definition and usage columns in the effective low-level requirement data "definition-usage" table, equivalent to converting them into draft tables for low-level requirement data "definition-usage". Add three columns for component name before the low-level requirement entries in the low-level requirement data coupling relationship table, equivalent to converting them into draft tables for low-level requirement data coupling relationships. Based on the software component low-level requirement interface correspondence table or the software component low-level requirement composition information table, fill the newly added columns in the draft tables for low-level requirement input / output information, low-level requirement data "definition", low-level requirement data "usage", low-level requirement data "definition-usage", and low-level requirement data coupling relationships with the component name information corresponding to the low-level requirement entries.
[0042] According to an embodiment of the software architecture-based low-level requirement data coupling correctness analysis apparatus of the present invention, the component and the low-level requirement data integrity check module are further configured as follows:
[0043] Check whether the "Component Name" column in the draft tables of component low-level requirement input and output information, component low-level requirement data "Definition" draft table, component low-level requirement data "Use" draft table, and component low-level requirement data "Definition-Use" draft table contains NA information, where NA indicates non-existence. Check whether each component defined in the software component low-level requirement interface correspondence table or software component low-level requirement composition information table can be found in each draft table. If not, record the inconsistency and submit a defect report; if yes, continue the analysis.
[0044] According to an embodiment of the software architecture-based low-level requirement data coupling correctness analysis device of the present invention, the low-level requirement data coupling between components validity judgment module is further configured as follows:
[0045] Remove the "Define-Use" pairs between low-level requirement entries within a component from the component's low-level requirement data draft table. Specifically, remove "Define-Use" pairs where the "Component Name" is the same in the "Define" and "Use" columns. Only retain the "Define-Use" pairs between components to form a low-level requirement data "Define-Use" table between components. Review the control flow relationships between all components and analyze the validity of each "Define-Use" pair in Table 5-4-1. Only retain the "Define-Use" pairs that are reachable from the control flow and delete the "Define-Use" pairs that are not reachable from the control flow to form a valid low-level requirement data "Define-Use" pair table between components.
[0046] According to an embodiment of the software architecture-based low-level requirement data coupling correctness analysis device of the present invention, the inter-component invalid low-level requirement data coupling elimination module is further configured as follows:
[0047] Based on the valid "Define-Use" table of low-level requirement data between components, delete the entries for data definitions and / or uses that do not exist in the "Define-Use" table of low-level requirement input and output information, the "Define" table of low-level requirement data, the "Use" table of low-level requirement data, and the "Coupling Relationship" table of low-level requirement data of components, respectively, and generate the following tables: Component Low-Level Requirement Input and Output Information Table, Component Low-Level Requirement Data "Define" Table, Component Low-Level Requirement Data "Use" Table, and Component Low-Level Requirement Data Coupling Relationship Table.
[0048] According to an embodiment of the software architecture-based low-level requirement data coupling correctness analysis device of the present invention, the associated component data coupling analysis module is further configured as follows:
[0049] Following the principle of identical "component names", the data with the same component names in the draft table of component low-level requirement data coupling relationship are centrally arranged to obtain the complete input and output interfaces of each component, complete the data coupling relationship analysis between related components, and form the component low-level requirement data coupling relationship table.
[0050] According to an embodiment of the software architecture-based low-level requirement data coupling correctness analysis device of the present invention, the consistency judgment module for the data coupling relationship between two sets of components based on low-level requirements and source code is further configured as follows:
[0051] Referring to the correspondence table between low-level requirement input / output interfaces and function input / output variables, or the software low-level requirement function composition information table, software component function composition information table, and software component low-level requirement interface correspondence table, reconfirm whether the information in the component low-level requirement input / output information table expressed by the low-level requirement interface is consistent with the component input / output variable table expressed by the function interface, the component low-level requirement data "definition" table is consistent with the component variable "definition" table, the component low-level requirement data "usage" table is consistent with the component variable "usage" table, and the component low-level requirement data coupling relationship table is consistent with the software component data coupling relationship table. That is, whether the two sets of component data coupling relationships obtained based on the low-level requirements and source code function analysis are consistent. If not, record the inconsistencies and submit a defect report. If yes, the analysis ends, the data coupling analysis results of low-level requirements and software architecture are consistent, and the data coupling analysis results of low-level requirements based on software architecture are correct.
[0052] The present invention also discloses a computer device including a memory, a processor, and a computer program stored in the memory, the processor executing the computer program to implement the steps of the method described above.
[0053] The present invention also discloses a computer-readable medium having stored thereon computer program instructions, characterized in that the computer program instructions, when executed by a processor, implement the steps of the method described above.
[0054] The present invention also discloses a computer program product, including computer program instructions, characterized in that the computer program instructions, when executed by a processor, implement the steps of the method described above.
[0055] Compared with existing technologies, this invention offers the following advantages: It fully utilizes the traceability relationship between source code functions and low-level requirements, as well as the mapping relationship between software functional components and source code functions. Using source code functions as an intermediary, it indirectly obtains the software architecture data flow mapping relationship expressed through low-level requirement interfaces. Therefore, to a certain extent, it eliminates different interpretations and even misunderstandings caused by the lack of definition of the relationship between software functional components and low-level requirements in DO-178C, filling a gap in DO-178C. Furthermore, it confirms the consistency between this mapping relationship and the software architecture data flow mapping relationship expressed through source code interfaces, enabling the evaluation of the correctness of low-level requirement data coupling relationships based on the software architecture.
[0056] Specifically, the present invention has the following two features:
[0057] 1. Based on the inclusion relationship between software functional components and source code functions in the software architecture, and the traceability relationship between source code functions and low-level requirements, a 1:q (q>1) data coupling mapping relationship between software functional components and low-level requirements was established. By checking the completeness of the mapping relationship (i.e., all low-level requirements have corresponding software functional components, and all functional components have corresponding low-level requirements), the consistency between low-level requirements and software functional components was determined, serving as the basis for judging the correctness of low-level requirements.
[0058] 2. By utilizing the mapping relationship between software functional components and low-level requirements, the data coupling relationship of low-level requirements is transformed into a data coupling relationship between software functional components. Based on the software architecture data flow mapping relationship expressed through source code interfaces, and the data flow mapping relationship between software functional components and low-level requirements, by comparing the two data flow mapping relationships, the software architecture can be benchmarked, and the correctness of the low-level requirement data coupling relationship can be quantitatively evaluated. Attached Figure Description
[0059] The above-described features and advantages of the present invention will be better understood after reading the following detailed description of embodiments of the present disclosure in conjunction with the accompanying drawings. In the drawings, components are not necessarily drawn to scale, and components having similar related characteristics or features may have the same or similar reference numerals.
[0060] Figure 1 A flowchart illustrating an embodiment of the software architecture-based low-level requirement data coupling correctness analysis method of the present invention is shown.
[0061] Figure 2 A schematic diagram of an embodiment of the software architecture-based low-level requirement data coupling correctness analysis device of the present invention is shown. Detailed Implementation
[0062] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. It should be noted that the aspects described below with reference to the accompanying drawings and specific embodiments are merely exemplary and should not be construed as limiting the scope of protection of the present invention in any way.
[0063] Before describing the method steps of the present invention, a brief explanation of the implementation principle of the present invention will be given first.
[0064] According to DO-178C, in the software design process, through one or more iterations, high-level requirements are refined, leading to the development of software architecture and low-level requirements for implementing the source code. Software architecture and low-level requirements are developed from high-level requirements. The purpose of software architecture design is to decompose and reorganize the functionalities within the software requirements into a logically coherent software structure. After the architecture design is completed, detailed design of individual software functions begins, developing low-level and derived requirements.
[0065] Although DO-178C does not define a direct correlation between software architecture and low-level requirements, it defines the relationships between software architecture, low-level requirements, and source code, including whether the source code conforms to low-level requirements and whether it conforms to the software architecture. According to the requirement of "source code conforming to the software architecture," the source code should match the data flow and control flow defined in the software architecture. According to the DO-178C requirement of "consistency in software architecture," control flow and data flow, as the representation of interfaces between different components in the software architecture, should be defined consistently across components. Each software functional component, when implemented as source code, corresponds to a set of functions. These function modules can be traced back to another set of low-level requirements. Therefore, the data flow mapping relationship between the software architecture and low-level requirements can be indirectly obtained by using source code functions as an intermediary, as well as the tracing relationship between source code functions and low-level requirements, and the mapping relationship between software functional components and source code functions.
[0066] For ease of description, we assume that a low-level requirement can only be mapped to one software functional component. In actual projects, if some low-level requirements are mapped to p (p>1) software functional components, they are not treated as a single requirement, but as p independent copies (i.e., p independent low-level requirements).
[0067] Figure 1 The flowchart illustrates an embodiment of the software architecture-based low-level requirement data coupling correctness analysis method of the present invention. Please refer to... Figure 1 The following is a detailed description of the implementation steps of the method in this embodiment.
[0068] Step 1: Based on the inclusion relationship between software functional components and source code functions in the software architecture, and the traceability relationship between source code functions and low-level requirements, establish a 1:q (q>1) mapping relationship between software functional components and low-level requirements. That is, in the software functional component function composition information table 4-0, and in the correspondence table 3-0 / 3-0-0 / 3-0-1 or the software low-level requirement function composition information table 3-0-2 (only one mapping relationship between low-level requirements and functions is used as an example here, other mapping relationships are handled in the same way), add two columns of component information (name, number). This is equivalent to converting into a mapping relationship comparison table between software functional components and low-level requirements (i.e., software functional component low-level requirement interface correspondence table 5-0 or software functional component low-level requirement composition information table 5-0-0). Then check the completeness of the mapping relationship (i.e., all low-level requirements have corresponding software functional components, and all functional components have corresponding low-level requirements) to determine the consistency between low-level requirements and software functional components, which serves as the basis for judging the correctness of low-level requirements.
[0069] Software Functional Components Information Table 4-0
[0070]
[0071] Table 3-0 shows the correspondence between low-level requirement input / output interfaces and function input / output variables.
[0072]
[0073] Table 3-0-0 shows the correspondence between low-level requirement input / output interfaces and function input / output variables.
[0074]
[0075]
[0076] Table 3-0-1 shows the correspondence between low-level requirement input / output interfaces and function input / output variables.
[0077]
[0078]
[0079] Software Low-Level Requirement Function Composition Information Table 3-0-2
[0080]
[0081] Table 5-0 shows the correspondence between low-level requirements interfaces of software functional components.
[0082]
[0083]
[0084] Software Functional Components Low-Level Requirements Information Table 5-0-0
[0085]
[0086] Step 2: Supplement the information of the components to which the low-level requirements belong in the low-level requirement data coupling analysis results, establish the mapping relationship between software functional components and low-level requirements, and then, taking the software functional components as objects and the low-level requirement input (use) and output (definition) interfaces as data elements, automatically generate the low-level requirement input (use) and output (definition) interface variables for each component, transforming the data coupling relationship of low-level requirements into the data coupling relationship between software functional components. That is, add one column "Component Name" to each of the low-level requirement input / output information table 3-1, low-level requirement data "Definition" table 3-2, and low-level requirement data "Use" table 3-3, which is equivalent to converting them into the component low-level requirement input / output information draft table 5-1-0, the component low-level requirement data "Definition" draft table 5-2-0, and the component low-level requirement data "Use" draft table 5-3-0; add one column "Component Name" to each of the definition and use columns of the effective low-level requirement data "Definition-Use" in Table 3-4, which is equivalent to converting them into the component low-level requirement data "Definition-Use" draft table 5-3-0. Table 5-4-0 adds three columns, "Component Name," to the low-level requirement entries (including input source and output destination) in Table 3-5, which is equivalent to a draft table 5-5-0 of low-level requirement data coupling relationships. Based on Table 5-0, which corresponds to the interface of low-level requirements of software components, or Table 5-0-0, the newly added columns in Tables 5-1-0, 5-2-0, 5-3-0, 5-4-0, and 5-5-0 are filled with the component name information corresponding to the low-level requirement entries (if it does not exist, fill in NA to indicate that it does not exist).
[0087] Low-level requirement input and output information table 3-1
[0088]
[0089] Low-level demand data "definition" Table 3-2
[0090]
[0091] Low-level demand data “Use” Table 3-3
[0092]
[0093] Effective low-level demand data "definition-use" in Table 3-4
[0094]
[0095] Table 3-5 shows the coupling relationship between low-level demand data.
[0096]
[0097] Draft of Component Low-Level Requirements Input / Output Information Table 5-1-0 / Component Low-Level Requirements Input / Output Information Table 5-1
[0098]
[0099] Draft Table 5-2-0 of "Definition" of Low-Level Component Requirements Data / Table 5-2 of "Definition" of Low-Level Component Requirements Data
[0100]
[0101] Component lower-level requirement data "using" Draft Table 5-3-0 / Component lower-level requirement data "using" Table 5-3
[0102]
[0103]
[0104] Component low-level requirement data "Define - Use" Draft Table 5-4-0
[0105]
[0106] Component-level low-level requirement data "Define-Use" Table 5-4-1
[0107]
[0108] Effective component low-level demand data "Definition-Use" to Table 5-4
[0109]
[0110] Draft Table 5-5-0 of Low-Level Component Demand Data Coupling Relationships
[0111] Draft Table 5-5-1 of Coupling Relationships Between Low-Level Component Requirements Data
[0112] Table 5-5 Coupling Relationships of Low-Level Component Requirements Data
[0113]
[0114] Step 3: Examine the integrity of component data coupling relationships based on low-level requirements from both component and low-level requirement perspectives. Specifically, check whether NA information (indicating non-existence) exists in the "Component Name" column of the following draft tables: Draft Table 5-1-0 (input / output information of low-level component requirements), Draft Table 5-2-0 ("Definition" of low-level component requirement data), Draft Table 5-3-0 ("Use" of low-level component requirement data), and Draft Table 5-4-0 ("Definition-Use" of low-level component requirement data). Also check whether each component defined in Draft Table 5-0 ("Software Component Low-Level Requirement Interface Correspondence Relationship Table") can be found in its corresponding data item in each draft table. If not, record the inconsistency and submit a defect report; if yes, continue the analysis.
[0115] Step 4: Determine the validity of low-level requirement data coupling pairs between components. That is, delete the "Definition-Use" pairs between low-level requirement entries within a component (internal interfaces of the component) from the component low-level requirement data "Definition-Use" draft table 5-4-0. Specifically, delete the "Definition-Use" (DU) pairs with the same "Component Name" in the Definition and Usage columns. Only retain the "Definition-Use" pairs between components (external interfaces of the component), forming the component low-level requirement data "Definition-Use" table 5-4-1. Review the control flow relationships between all components and analyze the validity of the "Definition-Use" pairs in Table 5-4-1 one by one. Only retain the "Definition-Use" pairs that are reachable from the control flow (indicating validity) and delete the "Definition-Use" pairs that are not reachable from the control flow (indicating invalidity), forming the valid component low-level requirement data "Definition-Use" pair table 5-4.
[0116] Step 5: Eliminate invalid low-level requirement data coupling pairs between components. That is, based on the valid low-level requirement data "definition-use" table 5-4 between components, delete the data definition and / or use entries that do not exist in Table 5-4 from the component low-level requirement input and output information draft table 5-1-0, component low-level requirement data "definition" draft table 5-2-0, component low-level requirement data "use" draft table 5-3-0, and component low-level requirement data coupling relationship draft table 5-5-0, and generate component low-level requirement input and output information table 5-1, component low-level requirement data "definition" table 5-2, component low-level requirement data "use" table 5-3, and component low-level requirement data coupling relationship draft table 5-5-1.
[0117] Step 6: Generate data coupling relationships between top-level components based on low-level requirement interfaces. That is, according to the principle of the same "component name", centrally arrange the data with the same component name in the draft table 5-5-1 of the component low-level requirement data coupling relationship to obtain the complete input and output interfaces of each component, complete the data coupling relationship analysis between related components, and form the component low-level requirement data coupling relationship table 5-5.
[0118] Step 7: Based on the software architecture, compare and analyze the data flow mapping relationship of the software architecture expressed by the source code interface and the data flow mapping relationship between the software functional components and the low-level requirements. Determine whether the two sets of component data coupling relationships obtained based on the low-level requirements and source code functions are consistent, and evaluate the correctness of the data coupling analysis results of the low-level requirements based on the software architecture. That is, referring to the correspondence between low-level requirement input and output interfaces and function input and output variables in Table 3-0 / 3-0-0 / 3-0-1 or the software low-level requirement function composition information table 3-0-2, software component function composition information table 4-0, and software component low-level requirement interface correspondence table 5-0, reconfirm whether the information in the component low-level requirement input and output information table 5-1 expressed by the low-level requirement interface is consistent with the component input and output variable table 4-1 expressed by the function interface, the component low-level requirement data "definition" table 5-2 is consistent with the component variable "definition" table 4-2, the component low-level requirement data "use" table 5-3 is consistent with the component variable "use" table 4-3, and the component low-level requirement data coupling relationship table 5-5 is consistent with the software component data coupling relationship table 4-5. In other words, whether the two sets of component data coupling relationships obtained based on low-level requirements and source code function analysis are consistent. If not, record the inconsistencies and submit a defect report; if yes, the analysis ends, the data coupling analysis results of low-level requirements and software architecture are consistent, and the data coupling analysis results of low-level requirements based on software architecture are correct.
[0119] Component Input and Output Variables Draft 4-1-0 / Component Input and Output Variables Table 4-1
[0120]
[0121] Draft Table 4-2-0 of Component Variable "Definition" / Table 4-2 of Component Variable "Definition"
[0122]
[0123]
[0124] Component variable "Use" Draft 4-3-0 / Component variable "Use" Table 4-3
[0125]
[0126] The "Define-Use" section for component variables applies to Draft 4-4-0 / The "Define-Use" section for valid component variables applies to Table 4-4.
[0127]
[0128] Component data coupling relationship draft table 4-5-0 / Component data coupling relationship draft table 4-5-1 / Component data coupling relationship table 4-5
[0129]
[0130] Figure 2 The principle of one embodiment of the software architecture-based low-level requirement data coupling correctness analysis device of the present invention is illustrated. Please refer to... Figure 2 The device in this embodiment includes: a component-to-lower-level requirement mapping module, a component-to-lower-level requirement data coupling transformation module, a component-to-lower-level requirement data integrity check module, a component-to-lower-level requirement data coupling pair validity judgment module, a component-to-invalid lower-level requirement data coupling pair elimination module, an associated component data coupling analysis module, and a consistency judgment module for two sets of component data coupling relationships based on lower-level requirements and source code.
[0131] The component-to-lower-level requirement mapping module establishes the mapping relationship between software functional components and low-level requirements based on the inclusion relationship between software functional components and source code functions in the software architecture, and the tracing relationship between source code functions and low-level requirements.
[0132] The component-to-lower-level requirement mapping module is further configured as follows:
[0133] In the software functional component function composition information table, two columns of component information are added to the correspondence table between low-level requirement input / output interfaces and function input / output variables, or to the software low-level requirement function composition information table. This is equivalent to converting it into a mapping relationship lookup table between software functional components and low-level requirements. Then, the completeness of the mapping relationship is checked to determine the consistency between low-level requirements and software functional components, which serves as the basis for judging the correctness of low-level requirements. The mapping relationship lookup table between software functional components and low-level requirements includes a software functional component low-level requirement interface correspondence table or a software functional component low-level requirement composition information table. The completeness check of the mapping relationship includes checking whether all low-level requirements have corresponding software functional components and whether all functional components have corresponding low-level requirements.
[0134] The component-to-lower-level requirement data coupling and transformation module supplements the information of the component to which the lower-level requirement belongs in the lower-level requirement data coupling analysis results, establishes the mapping relationship between software functional components and lower-level requirements, and then automatically generates the lower-level requirement input and output interface variables for each component, taking the software functional components as objects and the lower-level requirement input and output interfaces as data elements, thus transforming the data coupling relationship of lower-level requirements into the data coupling relationship between software functional components.
[0135] The component and lower-level requirement data coupling and transformation module is further configured as follows:
[0136] Add one column for component name to each of the low-level requirement input / output information table, low-level requirement data "definition" table, and low-level requirement data "usage" table, equivalent to converting them into draft tables for low-level requirement input / output information, low-level requirement data "definition", and low-level requirement data "usage". Add one column for component name to each of the definition and usage columns in the effective low-level requirement data "definition-usage" table, equivalent to converting them into draft tables for low-level requirement data "definition-usage". Add three columns for component name before the low-level requirement entries in the low-level requirement data coupling relationship table, equivalent to converting them into draft tables for low-level requirement data coupling relationships. Based on the software component low-level requirement interface correspondence table or the software component low-level requirement composition information table, fill the newly added columns in the draft tables for low-level requirement input / output information, low-level requirement data "definition", low-level requirement data "usage", low-level requirement data "definition-usage", and low-level requirement data coupling relationships with the component name information corresponding to the low-level requirement entries.
[0137] The component and low-level requirement data integrity check module checks the integrity of component data coupling relationships based on low-level requirements from two aspects: components and low-level requirements.
[0138] The component and lower-level requirement data integrity check module is further configured as follows:
[0139] Check whether the "Component Name" column in the draft tables of component low-level requirement input and output information, component low-level requirement data "Definition" draft table, component low-level requirement data "Use" draft table, and component low-level requirement data "Definition-Use" draft table contains NA information, where NA indicates non-existence. Check whether each component defined in the software component low-level requirement interface correspondence table or software component low-level requirement composition information table can be found in each draft table. If not, record the inconsistency and submit a defect report; if yes, continue the analysis.
[0140] The module for determining the validity of low-level requirement data coupling pairs between components is used to determine the validity of such pairs.
[0141] The low-level requirement data coupling between components further configures the validity judgment module as follows:
[0142] Remove the "Define-Use" pairs between low-level requirement entries within a component from the component's low-level requirement data draft table. Specifically, remove "Define-Use" pairs where the "Component Name" is the same in the "Define" and "Use" columns. Only retain the "Define-Use" pairs between components to form a low-level requirement data "Define-Use" table between components. Review the control flow relationships between all components and analyze the validity of each "Define-Use" pair in Table 5-4-1. Only retain the "Define-Use" pairs that are reachable from the control flow and delete the "Define-Use" pairs that are not reachable from the control flow to form a valid low-level requirement data "Define-Use" pair table between components.
[0143] Invalid low-level requirement data coupling pairs between components are removed from the module.
[0144] Invalid low-level requirement data coupling between components requires further configuration of the elimination module.
[0145] Based on the valid "Define-Use" table of low-level requirement data between components, delete the entries for data definitions and / or uses that do not exist in the "Define-Use" table of low-level requirement input and output information, the "Define" table of low-level requirement data, the "Use" table of low-level requirement data, and the "Coupling Relationship" table of low-level requirement data of components, respectively, and generate the following tables: Component Low-Level Requirement Input and Output Information Table, Component Low-Level Requirement Data "Define" Table, Component Low-Level Requirement Data "Use" Table, and Component Low-Level Requirement Data Coupling Relationship Table.
[0146] The associated component data coupling analysis module generates data coupling relationships between top-level components based on lower-level requirement interfaces.
[0147] The associated component data coupling analysis module is further configured as follows:
[0148] Following the principle of identical "component names", the data with the same component names in the draft table of component low-level requirement data coupling relationship are centrally arranged to obtain the complete input and output interfaces of each component, complete the data coupling relationship analysis between related components, and form the component low-level requirement data coupling relationship table.
[0149] The consistency judgment module for the data coupling relationship between two sets of components based on low-level requirements and source code compares and analyzes the data flow mapping relationship of the software architecture expressed by the source code interface and the data flow mapping relationship between the software functional components and low-level requirements, based on the software architecture. It judges whether the two sets of component data coupling relationships obtained based on low-level requirements and source code functions are consistent and evaluates the correctness of the data coupling analysis results of low-level requirements based on the software architecture.
[0150] The consistency judgment module for the data coupling relationship between the two sets of components based on low-level requirements and source code is further configured as follows:
[0151] Referring to the correspondence table between low-level requirement input / output interfaces and function input / output variables, or the software low-level requirement function composition information table, software component function composition information table, and software component low-level requirement interface correspondence table, reconfirm whether the information in the component low-level requirement input / output information table expressed by the low-level requirement interface is consistent with the component input / output variable table expressed by the function interface, the component low-level requirement data "definition" table is consistent with the component variable "definition" table, the component low-level requirement data "usage" table is consistent with the component variable "usage" table, and the component low-level requirement data coupling relationship table is consistent with the software component data coupling relationship table. That is, whether the two sets of component data coupling relationships obtained based on the low-level requirements and source code function analysis are consistent. If not, record the inconsistencies and submit a defect report. If yes, the analysis ends, the data coupling analysis results of low-level requirements and software architecture are consistent, and the data coupling analysis results of low-level requirements based on software architecture are correct.
[0152] Furthermore, the present invention also discloses a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to perform, as follows: Figure 1 The steps of the method shown.
[0153] The present invention also discloses a computer-readable medium having stored thereon computer program instructions, which, when executed by a processor, implement as follows: Figure 1 The steps of the method shown.
[0154] The present invention also discloses a computer program product, including computer program instructions that, when executed by a processor, implement as follows: Figure 1 The steps of the method shown.
[0155] Although the methods described above are illustrated and depicted as a series of actions for the sake of simplicity, it should be understood and appreciated that these methods are not limited by the order of the actions, as some actions may occur in a different order and / or concurrently with other actions from the illustrations and descriptions herein or not illustrated and described herein but which may be understood by those skilled in the art, according to one or more embodiments.
[0156] Those skilled in the art will further appreciate that the various illustrative logic blocks, modules, circuits, and algorithm steps described in conjunction with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability between hardware and software, the various illustrative components, blocks, modules, circuits, and steps are described above in a generalized manner in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. Those skilled in the art may implement the described functionality in different ways for each specific application, but such implementation decisions should not be construed as departing from the scope of the invention.
[0157] The various illustrative logic blocks, modules, and circuits described in conjunction with the embodiments disclosed herein can be implemented or performed using a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. The general-purpose processor may be a microprocessor, but in alternatives, it may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors cooperating with a DSP core, or any other such configuration.
[0158] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of both. The software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor such that the processor can read and write information to / from the storage medium. In an alternative, the storage medium may be integrated into the processor. The processor and storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In an alternative, the processor and storage medium may reside as discrete components in the user terminal.
[0159] In one or more exemplary embodiments, the described functionality may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software as a computer program product, the functionality may be stored or transmitted as one or more instructions or code on or through a computer-readable medium. A computer-readable medium includes both computer storage media and communication media, encompassing any medium that facilitates the transfer of a computer program from one location to another. A storage medium may be any available medium accessible to a computer. By way of example and not limitation, such a computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disc storage, disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and is accessible to a computer. Any connection is also legitimately referred to as a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of a medium. As used in this article, disk and disc include compact discs (CDs), laser discs, optical discs, digital multi-purpose discs (DVDs), floppy disks, and Blu-ray discs. Disks typically reproduce data magnetically, while discs reproduce data optically using lasers. Combinations of these should also be included within the scope of computer-readable media.
[0160] The prior description of this disclosure is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to this disclosure will be apparent to those skilled in the art, and the general principles defined herein may be applied to other variations without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not intended to be limited to the examples and designs described herein, but should be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for analyzing the correctness of low-level requirement data coupling based on software architecture, characterized in that, The methods include: Step 1: Based on the inclusion relationship between software functional components and source code functions in the software architecture, and the traceability relationship between source code functions and low-level requirements, establish the mapping relationship between software functional components and low-level requirements; Step 2: Supplement the information of the components to which the low-level requirements belong in the low-level requirement data coupling analysis results, establish the mapping relationship between software functional components and low-level requirements, and then take the software functional components as objects and the low-level requirement input and output interfaces as data elements to automatically generate the low-level requirement input and output interface variables of each component, and transform the data coupling relationship of low-level requirements into the data coupling relationship between software functional components. Step 3: Check the integrity of component data coupling relationships based on low-level requirements from both component and low-level requirements perspectives. Step 4: Determine the validity of low-level requirement data coupling pairs between components; Step 5: Eliminate invalid low-level requirement data coupling pairs between components; Step 6: Generate data coupling relationships between top-level components based on low-level requirement interfaces; Step 7: Based on the software architecture, compare and analyze the data flow mapping relationship of the software architecture expressed by the source code interface and the data flow mapping relationship between the software functional components and the low-level requirements. Determine whether the two sets of component data coupling relationships obtained based on the low-level requirements and source code functions are consistent, and evaluate the correctness of the data coupling analysis results of the low-level requirements based on the software architecture.
2. The method for correctness analysis of low-level requirement data coupling based on software architecture according to claim 1, characterized in that, Step 1 further includes: In the software functional component function composition information table, two columns of component information are added to the correspondence table between low-level requirement input / output interfaces and function input / output variables, or to the software low-level requirement function composition information table. This is equivalent to converting it into a mapping relationship lookup table between software functional components and low-level requirements. Then, the completeness of the mapping relationship is checked to determine the consistency between low-level requirements and software functional components, which serves as the basis for judging the correctness of low-level requirements. The mapping relationship lookup table between software functional components and low-level requirements includes a software functional component low-level requirement interface correspondence table or a software functional component low-level requirement composition information table. The completeness check of the mapping relationship includes checking whether all low-level requirements have corresponding software functional components and whether all functional components have corresponding low-level requirements.
3. The method for correctness analysis of low-level requirement data coupling based on software architecture according to claim 2, characterized in that, Step 2 further includes: Add one column for component name to each of the low-level requirement input / output information table, low-level requirement data "definition" table, and low-level requirement data "usage" table, equivalent to converting them into draft tables for low-level requirement input / output information, low-level requirement data "definition", and low-level requirement data "usage". Add one column for component name to each of the definition and usage columns in the effective low-level requirement data "definition-usage" pair table, equivalent to converting them into draft tables for low-level requirement data "definition-usage". Add three columns for component name before the low-level requirement entries in the low-level requirement data coupling relationship table, equivalent to converting them into draft tables for low-level requirement data coupling relationships. Based on the software component low-level requirement interface correspondence table or the software component low-level requirement composition information table, fill the newly added columns in the draft tables for low-level requirement input / output information, low-level requirement data "definition", low-level requirement data "usage", low-level requirement data "definition-usage", and low-level requirement data coupling relationships with the component name information corresponding to the low-level requirement entries.
4. The method for correctness analysis of low-level requirement data coupling based on software architecture according to claim 3, characterized in that, Step 3 further includes: Check whether the "Component Name" column in the component low-level requirement input and output information draft table, component low-level requirement data "Definition" draft table, component low-level requirement data "Use" draft table, and component low-level requirement data "Definition-Use" draft table contains NA information, where NA indicates non-existence. Check whether each component defined in the software component low-level requirement interface correspondence table or software component low-level requirement composition information table can be found in each draft table. If not, record the inconsistency and submit a defect report; if yes, continue the analysis.
5. The method for correctness analysis of low-level requirement data coupling based on software architecture according to claim 4, characterized in that, Step 4 further includes: Remove the "Define-Use" pairs between low-level requirement entries within a component from the draft table of component low-level requirement data. That is, remove the "Define-Use" pairs where the "Component Name" is the same in the "Define" and "Use" columns. Only retain the "Define-Use" pairs between components to form a "Define-Use" table of low-level requirement data between components. Review the control flow relationships between all components and analyze the validity of the "Define-Use" pairs in the "Define-Use" table of low-level requirement data between components one by one. Only retain the "Define-Use" pairs that are reachable from the control flow and delete the "Define-Use" pairs that are not reachable from the control flow to form a valid "Define-Use" table of low-level requirement data between components.
6. The method for correctness analysis of low-level requirement data coupling based on software architecture according to claim 5, characterized in that, Step 5 further includes: Based on the valid "Define-Use" table of low-level inter-component requirement data, delete the entries for data definitions and / or uses that do not exist in the "Define-Use" table of low-level inter-component requirement data from the draft tables of low-level inter-component requirement input and output information, the draft table of low-level inter-component requirement data "Define", the draft table of low-level inter-component requirement data "Use", and the draft table of low-level inter-component requirement data coupling relationship.
7. The method for correctness analysis of low-level requirement data coupling based on software architecture according to claim 6, characterized in that, Step 6 further includes: Following the principle of identical "component names", the data with the same component name in the draft table of component low-level requirement data coupling relationship are centrally arranged to obtain the complete input and output interfaces of each component, complete the data coupling relationship analysis between related components, and form the component low-level requirement data coupling relationship table.
8. The method for correctness analysis of low-level requirement data coupling based on software architecture according to claim 7, characterized in that, Step 7 further includes: Referring to the correspondence table between low-level requirement input / output interfaces and function input / output variables, or the software low-level requirement function composition information table, software component function composition information table, and software component low-level requirement interface correspondence table, reconfirm whether the information in the component low-level requirement input / output information table expressed by the low-level requirement interface matches the component input / output variable table expressed by the function interface, the component low-level requirement data "definition" table matches the component variable "definition" table, the component low-level requirement data "usage" table matches the component variable "usage" table, and the component low-level requirement data coupling relationship table matches the software component data coupling relationship table. In other words, confirm whether the two sets of component data coupling relationships obtained based on low-level requirements and source code function analysis are consistent. If not, record the inconsistencies and submit a defect report. If yes, the analysis ends, the data coupling analysis results of low-level requirements and software architecture are consistent, and the low-level requirement data coupling analysis results based on the software architecture are correct.
9. A low-level requirement data coupling correctness analysis device based on software architecture, characterized in that, The device includes: The component-to-lower-level requirement mapping module establishes the mapping relationship between software functional components and low-level requirements based on the inclusion relationship between software functional components and source code functions in the software architecture, and the tracing relationship between source code functions and low-level requirements. The component and low-level requirement data coupling and transformation module supplements the information of the component to which the low-level requirement belongs in the low-level requirement data coupling analysis results, establishes the mapping relationship between software functional components and low-level requirements, and then automatically generates the low-level requirement input and output interface variables of each component with the software functional components as objects and the low-level requirement input and output interfaces as data elements, transforming the data coupling relationship of low-level requirements into the data coupling relationship between software functional components. The component and low-level requirement data integrity check module checks the integrity of the component data coupling relationship based on low-level requirements from two aspects: components and low-level requirements. The module for determining the validity of low-level requirement data coupling pairs between components is used to determine the validity of such pairs. Remove modules that are ineffective low-level requirement data coupling pairs between components; remove ineffective low-level requirement data coupling pairs between components. The associated component data coupling analysis module generates data coupling relationships between top-level components based on lower-level requirement interfaces. The consistency judgment module for the data coupling relationship between two sets of components based on low-level requirements and source code compares and analyzes the data flow mapping relationship of the software architecture expressed by the source code interface and the data flow mapping relationship between the software functional components and low-level requirements, based on the software architecture. It judges whether the two sets of component data coupling relationships obtained based on low-level requirements and source code functions are consistent and evaluates the correctness of the data coupling analysis results of low-level requirements based on the software architecture.
10. The software architecture-based low-level requirement data coupling correctness analysis device according to claim 9, characterized in that, The component-to-lower-level requirement mapping module is further configured as follows: In the software functional component function composition information table, two columns of component information are added to the correspondence table between low-level requirement input / output interfaces and function input / output variables, or to the software low-level requirement function composition information table. This is equivalent to converting it into a mapping relationship lookup table between software functional components and low-level requirements. Then, the completeness of the mapping relationship is checked to determine the consistency between low-level requirements and software functional components, which serves as the basis for judging the correctness of low-level requirements. The mapping relationship lookup table between software functional components and low-level requirements includes a software functional component low-level requirement interface correspondence table or a software functional component low-level requirement composition information table. The completeness check of the mapping relationship includes checking whether all low-level requirements have corresponding software functional components and whether all functional components have corresponding low-level requirements.
11. The software architecture-based low-level requirement data coupling correctness analysis device according to claim 10, characterized in that, The component and lower-level requirement data coupling and transformation module is further configured as follows: Add one column for component name to each of the low-level requirement input / output information table, low-level requirement data "definition" table, and low-level requirement data "usage" table, equivalent to converting them into draft tables for low-level requirement input / output information, low-level requirement data "definition", and low-level requirement data "usage". Add one column for component name to each of the definition and usage columns in the effective low-level requirement data "definition-usage" pair table, equivalent to converting them into draft tables for low-level requirement data "definition-usage". Add three columns for component name before the low-level requirement entries in the low-level requirement data coupling relationship table, equivalent to converting them into draft tables for low-level requirement data coupling relationships. Based on the software component low-level requirement interface correspondence table or the software component low-level requirement composition information table, fill the newly added columns in the draft tables for low-level requirement input / output information, low-level requirement data "definition", low-level requirement data "usage", low-level requirement data "definition-usage", and low-level requirement data coupling relationships with the component name information corresponding to the low-level requirement entries.
12. The software architecture-based low-level requirement data coupling correctness analysis device according to claim 11, characterized in that, The component and lower-level requirement data integrity check module is further configured as follows: Check whether there is NA information in the "Component Name" column of the component low-level requirement input and output information draft table, component low-level requirement data "definition" draft table, component low-level requirement data "use" draft table, and component low-level requirement data "definition-use" draft table. NA indicates that the component does not exist. Check whether each component defined in the software component low-level requirement interface correspondence table or software component low-level requirement composition information table can be found in each draft table. If not, record the inconsistency and submit a defect report. If so, then continue the analysis.
13. The software architecture-based low-level requirement data coupling correctness analysis device according to claim 12, characterized in that, The low-level requirement data coupling between components further configures the validity judgment module as follows: Remove the "Define-Use" pairs between low-level requirement entries within a component from the draft table of component low-level requirement data. That is, remove the "Define-Use" pairs where the "Component Name" is the same in the "Define" and "Use" columns. Only retain the "Define-Use" pairs between components to form a "Define-Use" table of low-level requirement data between components. Review the control flow relationships between all components and analyze the validity of the "Define-Use" pairs in the "Define-Use" table of low-level requirement data between components one by one. Only retain the "Define-Use" pairs that are reachable from the control flow and delete the "Define-Use" pairs that are not reachable from the control flow to form a valid "Define-Use" table of low-level requirement data between components.
14. The software architecture-based low-level requirement data coupling correctness analysis device according to claim 13, characterized in that, Invalid low-level requirement data coupling between components requires further configuration of the elimination module. Based on the valid "Define-Use" table of low-level inter-component requirement data, delete the entries for data definitions and / or uses that do not exist in the "Define-Use" table of low-level inter-component requirement data from the draft tables of low-level inter-component requirement input and output information, the draft table of low-level inter-component requirement data "Define", the draft table of low-level inter-component requirement data "Use", and the draft table of low-level inter-component requirement data coupling relationship.
15. The software architecture-based low-level requirement data coupling correctness analysis device according to claim 14, characterized in that, The associated component data coupling analysis module is further configured as follows: Following the principle of identical "component names", the data with the same component name in the draft table of component low-level requirement data coupling relationship are centrally arranged to obtain the complete input and output interfaces of each component, complete the data coupling relationship analysis between related components, and form the component low-level requirement data coupling relationship table.
16. The software architecture-based low-level requirement data coupling correctness analysis device according to claim 15, characterized in that, The consistency judgment module for the data coupling relationship between the two sets of components based on low-level requirements and source code is further configured as follows: Referring to the correspondence table between low-level requirement input / output interfaces and function input / output variables, or the software low-level requirement function composition information table, software component function composition information table, and software component low-level requirement interface correspondence table, reconfirm whether the information in the component low-level requirement input / output information table expressed by the low-level requirement interface is consistent with the component input / output variable table expressed by the function interface, the component low-level requirement data "definition" table is consistent with the component variable "definition" table, the component low-level requirement data "usage" table is consistent with the component variable "usage" table, and the component low-level requirement data coupling relationship table is consistent with the software component data coupling relationship table. That is, whether the two sets of component data coupling relationships obtained based on the low-level requirements and source code function analysis are consistent. If not, record the inconsistencies and submit a defect report. If so, the analysis ends. The data coupling analysis results of low-level requirements and software architecture are consistent, and the data coupling analysis results of low-level requirements based on software architecture are correct.
17. A computer device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method of claim 1.
18. A computer-readable medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the steps of the method of claim 1.
19. A computer program product comprising computer program instructions, characterized in that, When the computer program instructions are executed by the processor, they implement the steps of the method of claim 1.
Citation Information
Patent Citations
Computer-aided design (CAD) graphical modeling method for software / hardware system
CN103123660A
Method and device for importing and analyzing source code based on FOG data
CN106033338A