Source code data coupling correctness analysis method and system based on low-level requirements

By using a source code data coupling correctness analysis method based on low-level requirements, the problem of early assessment of data coupling relationships between source code modules is solved, improving analysis efficiency, discovering software defects, and reducing repair costs.

CN117453519BActive Publication Date: 2026-08-04AECC COMML AIRCRAFT ENGINE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
AECC COMML AIRCRAFT ENGINE CO LTD
Filing Date
2022-07-19
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Existing technologies make it difficult to detect the correctness of data coupling relationships between different function modules in the source code at an early stage in software engineering, resulting in high costs for defect repair.

Method used

By using a source code data coupling correctness analysis method based on low-level requirements, the consistency of data coupling is evaluated by utilizing the mapping relationship between low-level requirements and function modules. This includes steps such as statement block numbering, mapping relationship conversion, and input/output interface checking to ensure the consistency between source code and low-level requirements.

Benefits of technology

It improves the efficiency of source code data coupling analysis, enabling early detection of defects in software implementation, such as missing functions or redundant code, and reducing the cost of defect repair.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117453519B_ABST
    Figure CN117453519B_ABST
Patent Text Reader

Abstract

The application discloses a source code data coupling correctness analysis method and system based on low-layer requirements, evaluates the consistency of data coupling relations between low-layer requirement entries, and evaluates the correctness of source code data coupling based on low-layer requirements. The technical scheme is as follows: based on the traceability relation between source code and low-layer requirements, the data coupling relation based on low-layer requirements is quickly and reversely generated by using the result of source code data coupling analysis, which can be used as the criterion for the correctness of the data coupling relation between low-layer requirement entries, and in turn, can be used as the judgment benchmark for whether the source code data coupling relation conforms to the low-layer requirements, thereby bridging the correctness of the data coupling relation between source code and high-layer requirements. Meanwhile, the software defects, such as the missed low-layer requirement functions in software implementation and the extra introduced redundant codes, can be found.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software testing and verification, specifically a method and system for analyzing the correctness of source code data coupling based on low-level requirements. Background Technology

[0002] DO-178B / C, "Software Considerations in the Certification of Airborne Systems and Equipment," defines the airworthiness verification objective of "achieving test coverage of the software architecture (data coupling and control coupling)" in Schedule A-7. This objective is typically used to measure the degree to which data coupling relationships are covered during requirements-based software (hardware) integration testing. Before performing tests, it is necessary to identify the data coupling relationships between different function modules in the source code.

[0003] Since software (hardware) integration testing is a late-stage activity in software engineering, fixing defects after they are discovered is costly. Therefore, if the correctness of data coupling relationships between different function modules in the source code can be discovered early in the software engineering process through reviews and analyses, the cost of fixing defects will be greatly reduced.

[0004] In all software lifecycle data, there is a direct traceability relationship between low-level requirements and source code. To determine the correctness of the data coupling relationship between different modules of the source code, it is first necessary to confirm whether it conforms to the low-level requirements.

[0005] To achieve the aforementioned test coverage of the software structure (data coupling and control coupling), a software data coupling analysis scheme was developed that approximates data from both ends of the software development lifecycle (high-level requirements, source code) towards the middle (low-level requirements, software architecture), combining forward and reverse approaches. To fully implement this scheme in airborne software verification practices, the various data coupling analysis sub-processes need further decomposition and refinement. Among these, how to determine the correctness of data coupling relationships between different modules of the source code based on low-level requirements is a problem that the industry currently needs to solve. 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 problems and provide a method and system for analyzing the correctness of source code data coupling based on low-level requirements. On the one hand, it can evaluate the consistency of data coupling relationships between low-level requirement items, and on the other hand, it can evaluate the correctness of source code data coupling based on low-level requirements.

[0008] The technical solution of this invention is as follows: This invention discloses a source code data coupling correctness analysis method based on low-level requirements. The method includes a processing sub-flow where multiple low-level requirements correspond to a function module. This sub-flow includes:

[0009] Step 1: Based on the one-to-one correspondence between the union of a set of low-level requirement external interfaces and the function module interfaces, the function module is further subdivided into statement blocks, and each statement block is uniquely numbered and identified. A set of low-level requirements contains s numbers.

[0010] Step 2: Convert the s:1 mapping relationship between low-level requirements and function modules into a 1:1 mapping relationship between low-level requirements and function module statement blocks;

[0011] Step 3: Based on the division of low-level requirements and source code functions and statement blocks, check whether the 1:1 mapping table between low-level requirements and function module statement blocks covers all low-level requirement entries and all statement blocks. If the low-level requirements are not fully covered, it means that the software implementation is incomplete. If all statement blocks are not fully covered, it means that redundant code may have been introduced into the software implementation, resulting in unexpected functions. Submit the corresponding software defect handling process.

[0012] Step 4: Utilize the tracing relationship between source code functions and low-level requirements to establish a mapping table between source code functions and a set of low-level requirements;

[0013] Step 5: Based on the low-level requirements document, extract the low-level requirements input and output interfaces described in text or table form to form a low-level requirements input and output information table;

[0014] Step 6: Extract low-level requirement output information / data from the low-level requirement input and output information table to generate a low-level requirement data definition table; extract low-level requirement input information / data to generate a low-level requirement data usage table;

[0015] Step 7: Based on the low-level requirement data definition table and the low-level requirement data usage table, cross-pair all definitions and all uses of each low-level requirement data to form multiple possible low-level requirement data definition-use pair tables. Then, automatically delete definitions and uses that are limited to a single low-level requirement definition-use pair to form a low-level requirement data definition-use pair table.

[0016] Step 8: Based on the definition-use pair table for low-level requirement data, expand the low-level requirement input and output information table, supplement the input sources and output destinations, complete the data coupling relationship analysis between related low-level requirement items, and form a low-level requirement data coupling relationship table. Among them, the input interface corresponds to the use in the definition-use pair, the input source corresponds to the definition in the definition-use pair, the output interface corresponds to the definition in the definition-use pair, and the output destination corresponds to the use in the definition-use pair.

[0017] Step 9: Check if there is any empty data in the input source and output destination of the low-level requirement data coupling relationship table. If so, it indicates that there is a data coupling anomaly, and the low-level requirements need to be modified and the analysis should be restarted. If not, continue the analysis of the following steps.

[0018] Step 10: Based on the principle of having the same name for source code functions, group the low-level requirements according to the information table of low-level software requirement functions, and automatically delete the definition and usage pairs that are limited to a group of low-level requirements from the low-level requirement data definition-usage table to form a valid low-level requirement data definition-usage pair table corresponding to the source code valid variable definition-usage pair table.

[0019] Step 11: Taking the low-level requirement entries grouped in the function as the object, convert the valid low-level requirement data definition-use pair table into a function low-level requirement entry group definition table and a function low-level requirement entry group use table, while deleting duplicate data and arranging the same function set into adjacent consecutive rows;

[0020] Step 12: Merge the function low-level requirement item grouping definition table and the function low-level requirement item grouping usage table into a function low-level requirement item grouping function input and output interface table;

[0021] Step 13: Following the principle of identical function names, review whether the data names in the input and output interface tables of the low-level requirement items of the function correspond one-to-one with the variable names in the function input and output variable tables generated during the source code data coupling analysis. If so, determine that the source code data coupling relationship meets the low-level requirements; otherwise, submit a defect report and start the regression review after the defect is fixed.

[0022] According to an embodiment of the source code data coupling correctness analysis method based on low-level requirements of the present invention, the method further includes a processing sub-flow where each low-level requirement corresponds to a function module, the sub-flow including:

[0023] Based on the one-to-one correspondence between the external interfaces of low-level requirements and the function module interfaces, and according to the function input and output variable table generated during the source code data coupling analysis, the one-to-one correspondence between the low-level requirement input and output interfaces and the function input and output variables is directly generated by using the traceability relationship between source code functions and low-level requirements, combined with the low-level requirement input and output interfaces defined in the low-level requirement document.

[0024] Review whether the source code functions are consistent with the input and output interfaces of the lower-level requirements. If the review results are consistent, it means that the output generated during the source code data coupling analysis is applicable to the lower-level requirements. Based on the lower-level requirements, directly determine whether the source code data coupling relationship is correct. Based on the data coupling analysis results of the lower-level requirements, perform equivalent substitutions on the lower-level requirement items and function names, input / output interfaces and input / output variables respectively. This is directly generated from the source code data coupling analysis results and does not need to be carried out separately. If the review results are inconsistent, modify the lower-level requirements or source code to make the source code functions consistent with the lower-level requirement input and output interfaces.

[0025] According to an embodiment of the source code data coupling correctness analysis method based on low-level requirements of the present invention, the method further includes a processing sub-flow for low-level requirements corresponding to multiple function modules, the sub-flow including:

[0026] Based on the one-to-one correspondence between the external interfaces of low-level requirements and the union of a set of function module interfaces, and according to the tracing relationship between source code functions and low-level requirements, a 1:t mapping table between low-level requirements and function modules is established, where a set of function module interfaces contains t numbers.

[0027] Take t function templates as a group and generate a union of t function external interfaces;

[0028] Review the consistency between the external interface of the low-level requirement and the union of the external interfaces of t functions. If it is consistent, it means that the data coupling relationship of the source code conforms to the low-level requirement; otherwise, it means that it does not conform and the low-level requirement or source code needs to be modified to make the external interface of the low-level requirement consistent with the union of the external interfaces of t functions.

[0029] This invention also discloses a source code data coupling correctness analysis system for low-level requirements. The system includes a processing subsystem for multiple low-level requirements corresponding to a function module. This subsystem includes:

[0030] The statement block division module is configured to further subdivide the function module into statement blocks based on the one-to-one correspondence between the union of a set of low-level requirement external interfaces and the function module interfaces. The statement blocks are uniquely numbered and identified, and a set of low-level requirements contains s numbers.

[0031] The mapping conversion module is configured to convert the s:1 mapping relationship between low-level requirements and function modules into a 1:1 mapping relationship between low-level requirements and function module statement blocks;

[0032] The coverage check module is configured to check whether the 1:1 mapping table between low-level requirements and function / block statements covers all low-level requirement entries and all statement blocks, based on the division of low-level requirements and source code functions and statement blocks. If the low-level requirements are not fully covered, it indicates that the software implementation is incomplete; if all statement blocks are not fully covered, it indicates that redundant code may have been introduced into the software implementation, resulting in unexpected functions, and the corresponding software defect handling process should be submitted.

[0033] The lookup table creation module is configured to use the tracing relationship between source code functions and low-level requirements to create a lookup table between source code functions and a set of low-level requirements.

[0034] The module for creating a low-level requirement input and output information table is configured to extract each low-level requirement input and output interface described in text or table form based on the low-level requirement document, and form a low-level requirement input and output information table.

[0035] The low-level requirement data usage table creation module is configured to extract low-level requirement output information / data from the low-level requirement input and output information tables to generate a low-level requirement data definition table; and extract low-level requirement input information / data to generate a low-level requirement data usage table.

[0036] The module for establishing data definition-use pairs between low-level requirements is configured to be based on the low-level requirement data definition table and the low-level requirement data use table. All definitions and all uses of each low-level requirement data are cross-paired to form multiple possible low-level requirement data definition-use pairs. Then, definitions and uses that are limited to a single low-level requirement definition-use pair are automatically deleted to form a low-level requirement data definition-use pair.

[0037] The module for establishing a low-level requirement data coupling relationship table is configured to expand the low-level requirement input and output information table based on the low-level requirement data definition-use pair table, supplement the input source and output destination, complete the data coupling relationship analysis between related low-level requirement items, and form a low-level requirement data coupling relationship table. In this table, the input interface corresponds to the use in the definition-use pair, the input source corresponds to the definition in the definition-use pair, the output interface corresponds to the definition in the definition-use pair, and the output destination corresponds to the use in the definition-use pair.

[0038] The empty data check module is configured to check whether there is empty data in the input source and output destination of the low-level requirement data coupling relationship table. If so, it indicates that there is a data coupling anomaly, and the low-level requirements need to be modified and the analysis should be restarted; otherwise, the analysis of subsequent steps continues.

[0039] The effective low-level requirement data definition-use pair table creation module is configured to form an information table based on the principle of identical names of source code functions, grouping low-level requirements, and automatically deleting definitions and uses that are limited to a group of low-level requirements from the low-level requirement data definition-use table, thus forming an effective low-level requirement data definition-use pair table corresponding to the source code effective variable definition-use pair table;

[0040] The low-level requirement item grouping module is configured to take the low-level requirement item grouping in the function as the object, convert the valid low-level requirement data definition-use pair table into a function low-level requirement item grouping definition table and a function low-level requirement item grouping use table, while deleting duplicate data and arranging the same function set into adjacent consecutive rows.

[0041] The module for establishing the function input and output interface table for grouping function low-level requirement items is configured to merge the function low-level requirement item grouping definition table and the function low-level requirement item grouping usage table into the function low-level requirement item grouping function input and output interface table.

[0042] The conformity check module for source code data coupling relationship and low-level requirements is configured to review whether the data names in the input and output interface table of the function low-level requirement items correspond one-to-one with the variable names in the function input and output variable table generated during the source code data coupling analysis, based on the principle of identical function names. If they do, the source code data coupling relationship is determined to conform to the low-level requirements; otherwise, a defect report is submitted, and regression review is initiated after the defect is fixed.

[0043] According to an embodiment of the source code data coupling correctness analysis system based on low-level requirements of the present invention, the system includes a processing subsystem that corresponds to one function module for each low-level requirement, the subsystem comprising:

[0044] The module for handling the correspondence between low-level requirement interfaces and function variables is configured to be based on a one-to-one correspondence between the external interfaces of low-level requirements and the interfaces of function modules. Based on the function input and output variable table generated during the source code data coupling analysis, it utilizes the traceability relationship between source code functions and low-level requirements, combined with the low-level requirement input and output interfaces defined in the low-level requirement document, to directly generate a one-to-one correspondence between the low-level requirement input and output interfaces and the function input and output variables.

[0045] The source code function and low-level requirement interface module is configured to review whether the input and output interfaces of the source code function and the low-level requirement are consistent. If the review results are consistent, it means that the output generated during the source code data coupling analysis is applicable to the low-level requirement. Based on the low-level requirement, the correctness of the source code data coupling relationship is directly determined. Based on the data coupling analysis results of the low-level requirement, the low-level requirement items and function names, input / output interfaces and input / output variables are equivalently replaced respectively. This is directly generated from the source code data coupling analysis results and does not need to be carried out separately. If the review results are inconsistent, the low-level requirement or source code is modified to make the source code function consistent with the low-level requirement input and output interface.

[0046] According to an embodiment of the source code data coupling correctness analysis system for low-level requirements of the present invention, the system includes a processing subsystem for a low-level requirement corresponding to multiple function modules, the subsystem including:

[0047] The low-level requirement and function module mapping processing module is configured to establish a one-to-one correspondence between the external interface of the low-level requirement and a set of function module interfaces based on the union of the interface of the low-level requirement. According to the tracing relationship between source code functions and low-level requirements, a 1:t mapping table between low-level requirements and function modules is established, where a set of function module interfaces contains t numbers.

[0048] The union generation module is configured to take t function templates as a group and generate a union of t function external interfaces;

[0049] The module for processing the union of low-level requirements and function interfaces is configured to review the consistency between the external interface of the low-level requirements and the union of t external interfaces of functions. If the consistency is found, it indicates that the data coupling relationship of the source code conforms to the low-level requirements; otherwise, it indicates that the consistency is not found and the low-level requirements or source code need to be modified to make the union of the external interface of the low-level requirements consistent with the union of t external interfaces of functions.

[0050] Compared with the prior art, the present invention has the following beneficial effects: the correctness of the data coupling relationship between source code modules includes two parts: 1) the data coupling relationship between different source code modules is consistent and without conflict; 2) the data coupling relationship between source code modules is consistent with the requirements and design documents for generating source code and without conflict.

[0051] Simply conducting data coupling analysis on the source code itself can solve the first problem mentioned above regarding the correctness of data coupling relationships between source code modules; however, it cannot solve the problem of consistency between the source code and upstream data in the software lifecycle, and cannot provide a complete conclusion on whether it is correct or not.

[0052] As low-level requirements that have a direct traceability and hierarchical relationship with the source code during the software lifecycle, they occupy a pivotal position in judging the correctness of data coupling relationships in the source code. Only by first resolving the issue of judging the consistency of data coupling relationships between the source code and low-level requirements can we then assess the consistency of data coupling relationships between the source code and high-level requirements based on the direct traceability and hierarchical relationships between high-level and low-level requirements.

[0053] This invention was developed to solve the problem of judging the correctness of data coupling relationships in source code based on low-level requirements. It can evaluate the consistency of data coupling relationships between source code and low-level requirements, as well as the consistency of data coupling relationships between different low-level requirement items, based on the data coupling analysis results between single-level source code modules and across two adjacent software life cycle processes.

[0054] The present invention includes the following innovative features:

[0055] (1) Based on the 1:1, 1:t, s:1, s:t (s>1, t>1) relationships between low-level requirements and source code function modules, classify and solve the problem of correctness judgment of source code data coupling based on low-level requirements (except for the s:t class).

[0056] (2) It simplifies the source code data coupling correctness analysis of the 1:1 relationship between low-level requirements and source code function modules, and directly reviews the consistency between the source code functions and the low-level requirement input and output interfaces based on the function input and output variable tables generated during the source code data coupling analysis process. At the same time, the data coupling analysis based on low-level requirements does not need to be carried out from scratch based on textual low-level requirements, but can directly reverse the output generated during the source code data coupling analysis process into the output of the low-level requirement data coupling analysis, which greatly improves work efficiency.

[0057] (3) This method simplifies the source code data coupling correctness analysis of the 1:t relationship type between low-level requirements and source code function modules. By grouping source code functions and establishing a correspondence with a certain low-level requirement, the external interface of the corresponding low-level requirement is calculated through the union of the external interfaces of the source code functions in the same group. By judging the consistency between the external interface and the interface defined by the low-level requirement, the correctness of source code data coupling based on the low-level requirement is confirmed. This method makes full use of the results of source code data coupling analysis, greatly reducing the workload of the two verification activities of low-level requirement data coupling analysis and source code data coupling correctness analysis based on low-level requirements, thus saving verification costs.

[0058] (4) A source code data coupling correctness analysis process of the s:1 relationship type between low-level requirements and source code function modules is proposed. Based on further subdividing the function modules into statement blocks and assigning unique numbers, the s:1 mapping relationship between low-level requirements and source code function modules is converted into a 1:1 mapping relationship between function module statement blocks and low-level requirements, thereby discovering software defects such as low-level requirement functions omitted in the software implementation and additional redundant code.

[0059] In summary, the source code data coupling correctness analysis process based on low-level requirements of this invention can fully utilize the results of source code data coupling analysis. Based on the traceability relationship between the source code and low-level requirements, it can quickly and reversely generate data coupling relationships based on low-level requirements. This can serve as a criterion for the correctness of data coupling relationships between low-level requirement items, and conversely, as a benchmark for judging whether the source code data coupling relationships conform to low-level requirements, thus bridging the gap in evaluating the correctness of data coupling relationships between source code and high-level requirements. Simultaneously, it can discover software defects such as omitted low-level requirement functions in the software implementation and redundant code introduced. Attached Figure Description

[0060] 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.

[0061] Figure 1 A flowchart of an embodiment of the source code data coupling correctness analysis method based on low-level requirements of the present invention is shown.

[0062] Figure 2 A schematic diagram of an embodiment of the source code data coupling correctness analysis system based on low-level requirements of the present invention is shown. Detailed Implementation

[0063] 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.

[0064] According to the definition in DO-178C, low-level requirements refer to software requirements developed from high-level requirements, derived requirements, and design constraints. Software source code can be directly compiled from these low-level requirements without further information. Based on this definition, there is a direct mapping relationship between low-level software requirements and source code. This mapping relationship is usually expressed as a bidirectional traceability relationship from source code to low-level requirements. In software engineering implementation, source code is often organized in the form of functions. Therefore, the mapping relationship between low-level requirements and source code is often mediated by function modules. To conduct source code data coupling correctness analysis based on low-level requirements, the mapping relationship between low-level requirements and function modules should first be established. The possible mapping relationships between the two are shown in Table 1 below:

[0065] Table 1. Mapping Relationship between Low-Level Requirements and Function Modules

[0066]

[0067]

[0068] The prerequisite for conducting source code data coupling correctness analysis based on low-level requirements is that the mapping relationship between low-level requirements and function modules is feasible in engineering, that is, it satisfies a 1:1, 1:t, or s:1 mapping relationship; otherwise, the analysis should be suspended.

[0069] To conduct source code data coupling correctness analysis based on low-level requirements, the mapping relationship between low-level requirements and functions should be analyzed first. If the mapping relationship between low-level requirements and function modules satisfies 1:1, 1:t, or s:1, then different analysis strategies can be adopted according to the classification of the mapping relationship. For a complete software, some low-level requirements may have a 1:1 mapping relationship with functions, while others may have a 1:t, s:1, or s:t mapping relationship. These can be grouped according to the mapping relationship type, and different analysis or pause analysis criteria can be applied to different groups.

[0070] The following section describes the methods for conducting source code data coupling correctness analysis based on low-level requirements, addressing three engineering-feasible mapping relationships between low-level requirements and function modules: 1:1, 1:t, or s:1.

[0071] The first scenario: one low-level requirement corresponds to one function module (1:1 mapping).

[0072] Step 11: Based on the one-to-one correspondence between the low-level requirement external interface (i.e., "low-level requirement input and output interface") and the function module interface, according to the function input and output variable table 2-1 generated during the source code data coupling analysis, and using the traceability relationship between source code functions and low-level requirements, combined with the low-level requirement input (use) and output (definition) interfaces defined in the low-level requirement document, directly generate the one-to-one correspondence table 3-0 between the low-level requirement input and output interfaces and the function input and output variables (excluding local variables).

[0073] Table 2 Function Input and Output Variables Table 2-1

[0074]

[0075] Table 3. Correspondence between low-level requirement input / output interfaces and function input / output variables. (Table 3-0)

[0076]

[0077] Step 12: Review whether the source code functions are consistent with the input and output interfaces of the lower-level requirements. If the review results are consistent, it means that the output generated during the source code data coupling analysis is applicable to the lower-level requirements. Based on the lower-level requirements, directly determine whether the source code data coupling relationship is correct. Based on the data coupling analysis results of the lower-level requirements (including lower-level requirement input and output information table 3-1, lower-level requirement data "definition" table 3-2, and lower-level requirement data "usage" table 3-3), perform equivalent substitutions between the lower-level requirement items and function names, and input / output interfaces and input / output variables, respectively. This is directly generated from the source code data coupling analysis results and does not need to be carried out separately.

[0078] If the review results are not satisfactory, modify the lower-level requirements or source code to ensure that the source code functions are consistent with the input and output interfaces of the lower-level requirements.

[0079] Low-level requirement input and output information table 3-1

[0080]

[0081]

[0082] Low-level demand data "definition" Table 3-2

[0083]

[0084] Low-level demand data “Use” Table 3-3

[0085]

[0086] The second scenario: A low-level requirement corresponds to multiple function modules (1:t mapping).

[0087] Step 21: Based on the one-to-one correspondence between the external interface of the low-level requirements and the union of a set (t) function module interfaces, and according to the tracing relationship between source code functions and low-level requirements, establish a 1:t mapping table 3-0-0 between low-level requirements and function modules.

[0088] Table 4. Correspondence between lower-level requirement input / output interfaces and function input / output variables. (Table 3-0-0)

[0089]

[0090] Step 22: Take the t function templates as a group and generate the union of the t function external interfaces.

[0091] Step 23: Review the consistency between the lower-level requirement's external interface and the union of the t function's external interfaces. If so, the source code data coupling relationship conforms to the lower-level requirement; otherwise, it does not, and the lower-level requirement or source code needs to be modified to ensure consistency between the lower-level requirement's external interface and the union of the t function's external interfaces.

[0092] The third scenario: multiple low-level requirements correspond to one function module (s:1 mapping). The processing flow for this scenario is as follows: Figure 1 As shown.

[0093] Step 311: Based on the one-to-one correspondence between the union of a set (s) of low-level requirement external interfaces and the function module interfaces, the function module is further subdivided into statement blocks, and each statement block is uniquely numbered and identified (SUID1).

[0094] Step 312: Convert the s:1 mapping relationship between low-level requirements and function modules into a 1:1 mapping relationship between low-level requirements and function module statement blocks (Table 5). To simplify the analysis, the input and output interfaces corresponding to function module statement blocks are not further refined and broken down. Therefore, the 1:1 mapping relationship between low-level requirements and function module statement blocks does not include input and output interfaces.

[0095] Table 5 shows the 1:1 mapping relationship between low-level requirements and function module statement blocks.

[0096]

[0097] Step 313: Based on the division of low-level requirements and source code functions and statement blocks, check whether the "1:1 mapping relationship table of low-level requirements and function module statement blocks" (Table 5) covers all low-level requirement items and all statement blocks. If the low-level requirements are not fully covered, it indicates that the software implementation is incomplete; if all statement blocks are not fully covered, it indicates that the software implementation may have introduced redundant code, resulting in unexpected functions, and the software defect handling process needs to be submitted.

[0098] Step 314: Using the traceability relationship between source code functions and low-level requirements, establish a correspondence table between source code functions and a set (s) of low-level requirements, namely Table 3-0-1, which is the correspondence between low-level requirement input and output interfaces and function input and output variables. This can be further simplified into Table 3-0-2, which is the information table of software low-level requirement function composition.

[0099] Table 6. Correspondence between low-level requirement input / output interfaces and function input / output variables (Table 3-0-1)

[0100]

[0101] Table 7. Composition Information of Software Low-Level Demand Functions (Table 3-0-2)

[0102]

[0103] Step 315: Based on the low-level requirements document, extract the low-level requirements input (use) and output (definition) interfaces described in text or table form, and form a low-level requirements input and output information table 3-1.

[0104] Table 8. Low-level demand input and output information (Table 3-1)

[0105]

[0106] Step 316: Extract low-level requirement output information / data from low-level requirement input and output information table 3-1 to generate low-level requirement data "definition" table 3-2; extract low-level requirement input information / data to generate low-level requirement data "usage" table 3-3.

[0107] Table 9. Definition of Lower-Level Demand Data (Table 3-2)

[0108]

[0109] Table 10 Lower-level demand data "Usage" Table 3-3

[0110]

[0111] Step 317: Based on the "Definition" table 3-2 and the "Use" table 3-3 of the low-level requirement data, cross-pair all definitions (e.g., at m) and all uses (e.g., at n) of each low-level requirement data to form (m*n groups) of possible low-level requirement data "definition-use" pairs in table 3-4-0; automatically delete the "definition-use" pairs whose definitions and uses are limited to one low-level requirement (within) to form low-level requirement data "definition-use" pairs in table 3-4-1.

[0112] Table 11 Lower-level demand data "Definition-Use" Table 3-4-0 / Lower-level demand data "Definition-Use" to Table 3-4-1

[0113]

[0114] Step 318: Based on the "Define-Use" pair of low-level requirement data in Table 3-4-0, expand the low-level requirement input and output information table 3-1, and supplement the "Input Source" (input interface corresponds to "Use" in the "Define-Use" pair, and "Input Source" corresponds to "Define" in the "Define-Use" pair) and "Output Destination" (output interface corresponds to "Define" in the "Define-Use" pair, and "Output Destination" corresponds to "Use" in the "Define-Use" pair) to complete the data coupling relationship analysis between the associated low-level requirement items, forming the low-level requirement data coupling relationship table 3-5.

[0115] Table 12 Coupling Relationships of Lower-Level Demand Data (Table 3-5)

[0116]

[0117] Step 319: Check if there is any empty data in the "Input Source" and "Output Destination" fields of the low-level requirement data coupling relationship table 3-5. If so, it indicates an abnormal data coupling, and the low-level requirements need to be modified and the analysis restarted; if not, continue with the following analysis.

[0118] Step 320: Based on the principle of identical names for source code functions, and according to the information table 3-0-0 of the software's low-level requirement functions, group the low-level requirements. Automatically delete the "definition-use" pairs in the low-level requirement data "definition-use" table 3-4-0 that are limited to a single low-level requirement (internal) in terms of definition and use, forming a valid low-level requirement data "definition-use" pair table 3-4 that corresponds to the valid variable "definition-use" pair table in the source code.

[0119] Table 13 Effective Low-Level Demand Data "Definition-Use" in relation to Tables 3-4

[0120]

[0121] Step 321: Using the function [low-level requirement item (UID) grouping] as the object, transform the valid low-level requirement data "definition-use" from Table 3-4 into the "function [low-level requirement item (UID) grouping] definition table" (Table 14) and the "function [low-level requirement item (UID) grouping] usage table" (Table 15), while deleting duplicate data and arranging the same function groups into adjacent consecutive rows.

[0122] Table 14 Definition of Function

Lower-Level Requirement Item (UID) Grouping

[0123]

[0124] Table 15 Function Usage Table for "Grouping Low-Level Requirement Items (UIDs)"

[0125]

[0126] Step 322: Merge the "Function [Lower-level Requirement Item (UID) Grouping] Definition Table" (Table 14) and the "Function [Lower-level Requirement Item (UID) Grouping] Usage Table" (Table 15) into the "Function [Lower-level Requirement Item (UID) Grouping] Function Input and Output Interface Table" (the number of rows occupied by each function is the maximum of the number of input and output interfaces) (Table 16).

[0127] Table 16 Input and Output Interface Table for Functions [Grouping of Low-Level Requirement Items (UIDs)]

[0128]

[0129] Step 323: Following the principle of identical function names, review whether the data names in the "Function [Lower-Level Requirement Item (UID) Grouping] Input and Output Interface Table" (Table 16) correspond one-to-one with the variable names (global variables, parameters) in the "Function Input and Output Variable Table 2-1" generated during the source code data coupling analysis. If so, determine that the source code data coupling relationship conforms to the lower-level requirements; otherwise, submit a defect report, and initiate regression review after the defect is fixed.

[0130] Figure 2 This illustrates the principle of an embodiment of the source code data coupling correctness analysis system based on low-level requirements of the present invention. Please refer to... Figure 2 The system in this embodiment includes three subsystems: a processing subsystem where one low-level requirement corresponds to one function module, a processing subsystem where one low-level requirement corresponds to multiple function modules, and a processing subsystem where multiple low-level requirements correspond to one function module.

[0131] In a subsystem that processes a low-level requirement corresponding to a function module, there are: a module for processing the correspondence between low-level requirement interfaces and function variables, and a module for processing source code functions and low-level requirement interfaces.

[0132] The module for handling the correspondence between low-level requirement interfaces and function variables is configured to have a one-to-one correspondence between the external interfaces of low-level requirements and the interfaces of function modules. Based on the function input and output variable table generated during the source code data coupling analysis, it utilizes the traceability relationship between source code functions and low-level requirements, combined with the low-level requirement input and output interfaces defined in the low-level requirement document, to directly generate a one-to-one correspondence between the low-level requirement input and output interfaces and the function input and output variables.

[0133] The source code function and low-level requirement interface module is configured to review whether the input and output interfaces of the source code function and the low-level requirement are consistent. If the review results are consistent, it means that the output generated during the source code data coupling analysis is applicable to the low-level requirement. Based on the low-level requirement, the correctness of the source code data coupling relationship is directly determined. Based on the data coupling analysis results of the low-level requirement, the low-level requirement items and function names, input / output interfaces and input / output variables are equivalently replaced respectively. This is directly generated from the source code data coupling analysis results and does not need to be carried out separately. If the review results are inconsistent, the low-level requirement or source code is modified to make the source code function consistent with the low-level requirement input and output interface.

[0134] In a subsystem that processes multiple function modules corresponding to a single low-level requirement, the following modules are included: a low-level requirement and function module mapping processing module, a union generation module, and a low-level requirement and function interface union processing module.

[0135] The low-level requirement and function module mapping processing module is configured to establish a one-to-one correspondence between the external interface of the low-level requirement and a set of function module interfaces based on the union of the external interface of the low-level requirement and the function module interface. According to the tracing relationship between source code functions and low-level requirements, a 1:t mapping table between low-level requirements and function modules is established, where a set of function module interfaces contains t numbers.

[0136] The union generation module is configured to take t function templates as a group and generate a union of t function external interfaces.

[0137] The module for processing the union of low-level requirements and function interfaces is configured to review the consistency between the external interface of the low-level requirements and the union of t external interfaces of functions. If the consistency is found, it indicates that the data coupling relationship of the source code conforms to the low-level requirements; otherwise, it indicates that the consistency is not found and the low-level requirements or source code need to be modified to make the union of the external interface of the low-level requirements consistent with the union of t external interfaces of functions.

[0138] The processing subsystem for multiple low-level requirements corresponding to a single function module includes: a statement block segmentation module, a mapping relationship conversion module, a coverage check module, a lookup table creation module, a low-level requirement input and output information table creation module, a low-level requirement data usage table creation module, a low-level requirement data definition-usage pair table creation module, a low-level requirement data coupling relationship table creation module, an empty data check module, a valid low-level requirement data definition-usage pair table creation module, a low-level requirement item grouping module, a function low-level requirement item grouping function input and output interface table creation module, and a source code data coupling relationship and low-level requirement conformity check module.

[0139] The statement block partitioning module is configured to further subdivide the function module into statement blocks based on the one-to-one correspondence between the union of a set of low-level requirement external interfaces and the function module interfaces. Each statement block is uniquely numbered and identified, and a set of low-level requirements contains s numbers.

[0140] The mapping conversion module is configured to convert the s:1 mapping relationship between low-level requirements and function modules into a 1:1 mapping relationship between low-level requirements and function module statement blocks.

[0141] The coverage check module is configured to check whether the 1:1 mapping table between low-level requirements and function / block statements covers all low-level requirement entries and all statement blocks, based on the division of low-level requirements and source code functions and statement blocks. If the low-level requirements are not fully covered, it indicates that the software implementation is incomplete; if all statement blocks are not fully covered, it indicates that redundant code may have been introduced into the software implementation, resulting in unexpected functions, and the corresponding software defect handling process should be submitted.

[0142] The lookup table creation module is configured to use the tracing relationship between source code functions and low-level requirements to create a lookup table between source code functions and a set of low-level requirements.

[0143] The module for creating low-level requirement input and output information tables is configured to extract each low-level requirement input and output interface described in text or tabular form based on the low-level requirement document, and form a low-level requirement input and output information table.

[0144] The module for creating low-level requirement data usage tables is configured to extract low-level requirement output information / data from the low-level requirement input and output information tables to generate a low-level requirement data definition table; and to extract low-level requirement input information / data to generate a low-level requirement data usage table.

[0145] The module for creating low-level requirement data definition-use pairs is configured to be based on low-level requirement data definition tables and low-level requirement data use tables. It cross-pairs all definitions and all uses of each low-level requirement data to form multiple possible low-level requirement data definition-use pairs. Then, it automatically deletes definitions and uses that are limited to a single low-level requirement definition-use pair, thus forming a low-level requirement data definition-use pair table.

[0146] The module for establishing low-level requirement data coupling relationship tables is configured to expand the low-level requirement input and output information tables based on the low-level requirement data definition-use pair table, supplement the input sources and output destinations, complete the data coupling relationship analysis between related low-level requirement items, and form a low-level requirement data coupling relationship table. In this table, the input interface corresponds to the use in the definition-use pair, the input source corresponds to the definition in the definition-use pair, the output interface corresponds to the definition in the definition-use pair, and the output destination corresponds to the use in the definition-use pair.

[0147] The empty data check module is configured to check whether there is empty data in the input source and output destination of the low-level requirement data coupling relationship table. If so, it indicates that there is a data coupling anomaly, and the low-level requirements need to be modified and the analysis should be restarted; otherwise, the analysis of subsequent steps continues.

[0148] The effective low-level requirement data definition-use pair table creation module is configured to form an information table based on the principle of identical names of source code functions, grouping low-level requirements, and automatically deleting definitions and uses that are limited to a group of low-level requirements from the low-level requirement data definition-use table, thus forming an effective low-level requirement data definition-use pair table corresponding to the source code effective variable definition-use pair table;

[0149] The low-level requirement item grouping module is configured to take the low-level requirement item grouping in the function as the object, convert the valid low-level requirement data definition-use pair table into a function low-level requirement item grouping definition table and a function low-level requirement item grouping use table, while deleting duplicate data and arranging the same function set into adjacent consecutive rows.

[0150] The module for establishing the function input and output interface table for grouping function low-level requirement items is configured to merge the function low-level requirement item grouping definition table and the function low-level requirement item grouping usage table into the function low-level requirement item grouping function input and output interface table.

[0151] The conformity check module for source code data coupling relationship and low-level requirements is configured to review whether the data names in the input and output interface table of the function low-level requirement items correspond one-to-one with the variable names in the function input and output variable table generated during the source code data coupling analysis, based on the principle of identical function names. If they do, the source code data coupling relationship is determined to conform to the low-level requirements; otherwise, a defect report is submitted, and regression review is initiated after the defect is fixed.

[0152] 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.

[0153] 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.

[0154] 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.

[0155] 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.

[0156] 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.

[0157] 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 source code data coupling correctness analysis method based on low-level requirements, characterized in that, The method includes a processing sub-flow for each function module corresponding to multiple low-level requirements. This sub-flow includes: Step 1: Based on the one-to-one correspondence between the union of a set of low-level requirement external interfaces and the function module interfaces, the function module is further subdivided into statement blocks, and each statement block is uniquely numbered and identified. A set of low-level requirements contains s numbers. Step 2: Convert the s:1 mapping relationship between low-level requirements and function modules into a 1:1 mapping relationship between low-level requirements and function module statement blocks; Step 3: Based on the division of low-level requirements and source code functions and statement blocks, check whether the 1:1 mapping table between low-level requirements and function module statement blocks covers all low-level requirement entries and all statement blocks. If the low-level requirements are not fully covered, it means that the software implementation is incomplete. If all statement blocks are not fully covered, it means that redundant code may have been introduced into the software implementation, resulting in unexpected functions. Submit the corresponding software defect handling process. Step 4: Utilize the tracing relationship between source code functions and low-level requirements to establish a mapping table between source code functions and a set of low-level requirements; Step 5: Based on the low-level requirements document, extract the low-level requirements input and output interfaces described in text or table form to form a low-level requirements input and output information table; Step 6: Extract low-level requirement output information / data from the low-level requirement input and output information table to generate a low-level requirement data definition table; extract low-level requirement input information / data to generate a low-level requirement data usage table; Step 7: Based on the low-level requirement data definition table and the low-level requirement data usage table, cross-pair all definitions and all uses of each low-level requirement data to form multiple possible low-level requirement data definition-use pair tables. Then, automatically delete definitions and uses that are limited to a single low-level requirement definition-use pair to form a low-level requirement data definition-use pair table. Step 8: Based on the definition-use pair table for low-level requirement data, expand the low-level requirement input and output information table, supplement the input sources and output destinations, complete the data coupling relationship analysis between related low-level requirement items, and form a low-level requirement data coupling relationship table. Among them, the input interface corresponds to the use in the definition-use pair, the input source corresponds to the definition in the definition-use pair, the output interface corresponds to the definition in the definition-use pair, and the output destination corresponds to the use in the definition-use pair. Step 9: Check if there is any empty data in the input source and output destination of the low-level requirement data coupling relationship table. If so, it indicates that there is a data coupling anomaly, and the low-level requirements need to be modified and the analysis should be restarted. If not, continue the analysis of the following steps. Step 10: Based on the principle of having the same name for source code functions, group the low-level requirements according to the information table of low-level software requirement functions, and automatically delete the definition and usage pairs that are limited to a group of low-level requirements from the low-level requirement data definition-usage table to form a valid low-level requirement data definition-usage pair table corresponding to the source code valid variable definition-usage pair table. Step 11: Taking the low-level requirement entries grouped in the function as the object, convert the valid low-level requirement data definition-use pair table into a function low-level requirement entry group definition table and a function low-level requirement entry group use table, while deleting duplicate data and arranging the same function set into adjacent consecutive rows; Step 12: Merge the function low-level requirement item grouping definition table and the function low-level requirement item grouping usage table into a function low-level requirement item grouping function input and output interface table; Step 13: Following the principle of identical function names, review whether the data names in the input and output interface tables of the low-level requirement items of the function correspond one-to-one with the variable names in the function input and output variable tables generated during the source code data coupling analysis. If so, determine that the source code data coupling relationship meets the low-level requirements; otherwise, submit a defect report and start the regression review after the defect is fixed.

2. The source code data coupling correctness analysis method based on low-level requirements according to claim 1, characterized in that, The method also includes a sub-processing flow where a low-level requirement corresponds to a function module, and this sub-flow includes: Based on the one-to-one correspondence between the external interfaces of low-level requirements and the function module interfaces, and according to the function input and output variable table generated during the source code data coupling analysis, the one-to-one correspondence between the low-level requirement input and output interfaces and the function input and output variables is directly generated by using the traceability relationship between source code functions and low-level requirements, combined with the low-level requirement input and output interfaces defined in the low-level requirement document. Review whether the source code functions are consistent with the input and output interfaces of the lower-level requirements. If the review results are consistent, it means that the output generated during the source code data coupling analysis is applicable to the lower-level requirements. Based on the lower-level requirements, directly determine whether the source code data coupling relationship is correct. Based on the data coupling analysis results of the lower-level requirements, perform equivalent substitutions on the lower-level requirement items and function names, input / output interfaces and input / output variables respectively. This is directly generated from the source code data coupling analysis results and does not need to be carried out separately. If the review results are inconsistent, modify the lower-level requirements or source code to make the source code functions consistent with the lower-level requirement input and output interfaces.

3. The method for analyzing the correctness of source code data coupling in low-level requirements according to claim 1, characterized in that, The method also includes a sub-process for handling low-level requirements corresponding to multiple function modules, which includes: Based on the one-to-one correspondence between the external interfaces of low-level requirements and the union of a set of function module interfaces, and according to the tracing relationship between source code functions and low-level requirements, a 1:t mapping table between low-level requirements and function modules is established, where a set of function module interfaces contains t numbers. Take t function templates as a group and generate a union of t function external interfaces; Review the consistency between the external interface of the low-level requirement and the union of the external interfaces of t functions. If it is consistent, it means that the data coupling relationship of the source code conforms to the low-level requirement; otherwise, it means that it does not conform and the low-level requirement or source code needs to be modified to make the external interface of the low-level requirement consistent with the union of the external interfaces of t functions.

4. A source code data coupling correctness analysis system for low-level requirements, characterized in that, The system includes a processing subsystem where multiple low-level requirements correspond to a function module. This subsystem includes: The statement block division module is configured to further subdivide the function module into statement blocks based on the one-to-one correspondence between the union of a set of low-level requirement external interfaces and the function module interfaces. The statement blocks are uniquely numbered and identified, and a set of low-level requirements contains s numbers. The mapping conversion module is configured to convert the s:1 mapping relationship between low-level requirements and function modules into a 1:1 mapping relationship between low-level requirements and function module statement blocks; The coverage check module is configured to check whether the 1:1 mapping table between low-level requirements and function / block statements covers all low-level requirement entries and all statement blocks, based on the division of low-level requirements and source code functions and statement blocks. If the low-level requirements are not fully covered, it indicates that the software implementation is incomplete; if all statement blocks are not fully covered, it indicates that redundant code may have been introduced into the software implementation, resulting in unexpected functions, and the corresponding software defect handling process should be submitted. The lookup table creation module is configured to use the tracing relationship between source code functions and low-level requirements to create a lookup table between source code functions and a set of low-level requirements. The module for creating a low-level requirement input and output information table is configured to extract each low-level requirement input and output interface described in text or table form based on the low-level requirement document, and form a low-level requirement input and output information table. The low-level requirement data usage table creation module is configured to extract low-level requirement output information / data from the low-level requirement input and output information tables to generate a low-level requirement data definition table; and extract low-level requirement input information / data to generate a low-level requirement data usage table. The module for establishing data definition-use pairs between low-level requirements is configured to be based on the low-level requirement data definition table and the low-level requirement data use table. All definitions and all uses of each low-level requirement data are cross-paired to form multiple possible low-level requirement data definition-use pairs. Then, definitions and uses that are limited to a single low-level requirement definition-use pair are automatically deleted to form a low-level requirement data definition-use pair. The module for establishing a low-level requirement data coupling relationship table is configured to expand the low-level requirement input and output information table based on the low-level requirement data definition-use pair table, supplement the input source and output destination, complete the data coupling relationship analysis between related low-level requirement items, and form a low-level requirement data coupling relationship table. In this table, the input interface corresponds to the use in the definition-use pair, the input source corresponds to the definition in the definition-use pair, the output interface corresponds to the definition in the definition-use pair, and the output destination corresponds to the use in the definition-use pair. The empty data check module is configured to check whether there is empty data in the input source and output destination of the low-level requirement data coupling relationship table. If so, it indicates that there is a data coupling anomaly, and the low-level requirements need to be modified and the analysis should be restarted; otherwise, the analysis of subsequent steps continues. The effective low-level requirement data definition-use pair table creation module is configured to form an information table based on the principle of identical names of source code functions, grouping low-level requirements, and automatically deleting definitions and uses that are limited to a group of low-level requirements from the low-level requirement data definition-use table, thus forming an effective low-level requirement data definition-use pair table corresponding to the source code effective variable definition-use pair table; The low-level requirement item grouping module is configured to take the low-level requirement item grouping in the function as the object, convert the valid low-level requirement data definition-use pair table into a function low-level requirement item grouping definition table and a function low-level requirement item grouping use table, while deleting duplicate data and arranging the same function set into adjacent consecutive rows. The module for establishing the function input and output interface table for grouping function low-level requirement items is configured to merge the function low-level requirement item grouping definition table and the function low-level requirement item grouping usage table into the function low-level requirement item grouping function input and output interface table. The conformity check module for source code data coupling relationship and low-level requirements is configured to review whether the data names in the input and output interface table of the function low-level requirement items correspond one-to-one with the variable names in the function input and output variable table generated during the source code data coupling analysis, based on the principle of identical function names. If they do, the source code data coupling relationship is determined to conform to the low-level requirements; otherwise, a defect report is submitted, and regression review is initiated after the defect is fixed.

5. The source code data coupling correctness analysis system based on low-level requirements according to claim 4, characterized in that, The system includes a processing subsystem where each low-level requirement corresponds to a function module. This subsystem includes: The module for handling the correspondence between low-level requirement interfaces and function variables is configured to be based on a one-to-one correspondence between the external interfaces of low-level requirements and the interfaces of function modules. Based on the function input and output variable table generated during the source code data coupling analysis, it utilizes the traceability relationship between source code functions and low-level requirements, combined with the low-level requirement input and output interfaces defined in the low-level requirement document, to directly generate a one-to-one correspondence between the low-level requirement input and output interfaces and the function input and output variables. The source code function and low-level requirement interface module is configured to review whether the input and output interfaces of the source code function and the low-level requirement are consistent. If the review results are consistent, it means that the output generated during the source code data coupling analysis is applicable to the low-level requirement. Based on the low-level requirement, the correctness of the source code data coupling relationship is directly determined. Based on the data coupling analysis results of the low-level requirement, the low-level requirement items and function names, input / output interfaces and input / output variables are equivalently replaced respectively. This is directly generated from the source code data coupling analysis results and does not need to be carried out separately. If the review results are inconsistent, the low-level requirement or source code is modified to make the source code function consistent with the low-level requirement input and output interface.

6. The low-level requirement source code data coupling correctness analysis system of claim 4, wherein, The system includes a processing subsystem that handles multiple function modules corresponding to a low-level requirement. This subsystem includes: The low-level requirement and function module mapping processing module is configured to establish a one-to-one correspondence between the external interface of the low-level requirement and a set of function module interfaces based on the union of the interface of the low-level requirement. According to the tracing relationship between source code functions and low-level requirements, a 1:t mapping table between low-level requirements and function modules is established, where a set of function module interfaces contains t numbers. The union generation module is configured to take t function templates as a group and generate a union of t function external interfaces; The module for processing the union of low-level requirements and function interfaces is configured to review the consistency between the external interface of the low-level requirements and the union of t external interfaces of functions. If the consistency is found, it indicates that the data coupling relationship of the source code conforms to the low-level requirements; otherwise, it indicates that the consistency is not found and the low-level requirements or source code need to be modified to make the union of the external interface of the low-level requirements consistent with the union of t external interfaces of functions.