Apparatus and method for pruning infeasible paths and static analysis using ai-based rag

The apparatus and method leverage AI-based search augmentation to enhance static analysis by accurately identifying and removing non-executable paths in software with external dependencies, addressing inefficiencies and false positives in conventional systems, ensuring reliable and efficient software quality verification.

KR103045745B1Active Publication Date: 2026-11-10코컴
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
KR1020260083455
Authority / Receiving Office
KR · KR
Patent Type
Patents
Current Assignee / Owner
Filing Date
2026-05-08
Publication Date
2026-11-10
Estimated Expiration
2046-05-08

AI Technical Summary

Technical Problem

Conventional static analysis systems face challenges in accurately analyzing software with external library or OS-dependent functions due to incomplete understanding of their internal workings, leading to unnecessary analysis time and frequent false positives, especially in critical domains like aerospace and defense.

Method used

An apparatus and method using artificial intelligence-based search augmentation generation to parse source code, derive control flow graphs, identify and remove non-executable paths, and generate final analysis paths by analyzing operational characteristics of external dependencies, enhancing accuracy and efficiency.

Benefits of technology

This approach significantly reduces false positives and computational resources by precisely determining non-executable paths, ensuring high-speed, integrated, and precise quality analysis, thereby improving software reliability and compliance verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 112026055981213-PAT00005_ABST
    Figure 112026055981213-PAT00005_ABST
Patent Text Reader

Abstract

The present invention relates to an apparatus and method for blocking non-executable paths and static analysis using artificial intelligence-based search augmentation generation. An electronic device according to one embodiment of the present invention includes a memory and a processor connected to the memory, wherein the processor parses the source code of target software to derive a control flow graph representing the execution flow of a program, searches for a branch structure on the control flow graph to generate a plurality of analysis paths, identifies a target path among the plurality of analysis paths that includes a call to an external dependency function, analyzes the operational characteristics of the external dependency function using a search-augmentation-generation technique, removes non-executable paths among the target paths that are logically impossible to execute based on the analyzed operational characteristics, and generates a final analysis path by merging the target path from which the non-executable paths have been removed with an analysis path that does not include a call to the external dependency function.
Need to check novelty before this filing date? Find Prior Art

Description

Technology Field

[0001] The present invention relates to an apparatus and method for blocking non-executable paths and static analysis using artificial intelligence-based search augmentation generation. Background Technology

[0003] Unless otherwise indicated in this specification, the contents described in this section are not prior art for the claims of this application, and are not to be recognized as prior art simply because they are included in this section.

[0004] With the rapid increase in software complexity in recent years, static analysis technology, which detects defects and vulnerabilities by analyzing source code without actually executing the program, is being widely used to ensure software quality and reliability.

[0005] Common static analysis tools track the control flow and data flow of source code to detect runtime errors or coding rule violations.

[0006] However, when the code under analysis calls external library functions or operating system-dependent functions for which source code is not provided (e.g., VxWorks proprietary APIs), there is a limitation in that the analyzer finds it difficult to directly determine the internal workings of those functions.

[0007] In such cases, conventional static analysis systems make overly conservative assumptions about the behavior following external function calls or rely on simple stubs or models written manually to perform analysis. As a result, the analysis extends to infeasible paths that cannot actually be reached or executed within the program, leading to problems such as unnecessary analysis time and frequent false positives.

[0008] Furthermore, in fields requiring high reliability and safety, such as aerospace and defense weapon system software, it is necessary to verify strict regulatory compliance with static analysis results and prepare quality reports. Consequently, the need for efficient static analysis is emerging. Prior art literature

[0010] Korean Registered Patent No. 10-1300256 (August 20, 2013) The problem to be solved

[0011] One embodiment of the present invention provides an apparatus and method for blocking non-executable paths and static analysis using artificial intelligence-based search augmentation generation.

[0012] The technical problems to be solved by the present invention are not limited to those mentioned above, and other technical problems not mentioned will be clearly understood by those skilled in the art to which the present invention belongs from the description below. means of solving the problem

[0014] To achieve the above-mentioned objective, an electronic device according to one embodiment of the present invention includes a memory and a processor connected to the memory, wherein the processor parses the source code of target software to derive a control flow graph representing the execution flow of a program, searches for a branching structure on the control flow graph to generate a plurality of analysis paths, identifies a target path among the plurality of analysis paths that includes a call to an external dependency function, analyzes the operational characteristics of the external dependency function using a search-augmentation-generation technique, removes non-executable paths among the target paths that are logically impossible to execute based on the analyzed operational characteristics, and generates a final analysis path by merging the target path from which the non-executable paths have been removed with an analysis path that does not include a call to the external dependency function.

[0015] At this time, the processor can generate an abstract syntax tree from the source code, derive a control flow graph by analyzing control transition relationships between nodes of the abstract syntax tree, and generate multiple analysis paths by performing symbolic execution on the control flow graph to track the execution conditions for each branch of the source code.

[0016] At this time, the processor may retrieve and obtain context information related to the external dependency function from a pre-established technical document knowledge base, and use a large-scale language model (LLM) to generate function summary information, including the input value range, return value type, and error occurrence condition of the external dependency function, from the context information as the operation characteristic.

[0017] At this time, the processor may convert the function summary information into a constraint, compare it with the branch condition of the target path, and determine the path containing a branch that contradicts the constraint as the non-executable path.

[0018] At this time, the processor can automatically generate an analysis result report by examining compliance with preset software coding rules and security vulnerability rules for the final analysis path to extract defect data, and mapping the extracted defect data to a template of preset document specifications.

[0019] At this time, the processor may calculate a path priority index (P) to set an analysis priority for individual paths constituting the final analysis path, and perform defect inspection in order of paths with a higher calculated path priority index.

[0020] At this time, the above path priority index is derived by the following mathematical formula,

[0021]

[0022] P represents the path priority index for the individual path, D represents the branch depth, which is the total number of branch statements included from the start point to the end point of the individual path, C represents the constraint complexity, which is the total number of logical operators included in the symbolic expression defining the execution conditions of the individual path, and R represents the coverage ratio, which is the ratio of the number of nodes included in the individual path to the total number of nodes in the control flow graph.

[0023] At this time, the processor may operate a function management database that stores past analysis history information for each external dependency function, calculate a Function Risk Index for the external dependency function based on the analysis history information extracted from the function management database, and if the Function Risk Index exceeds a preset threshold, perform a deep analysis mode that re-verifies the judgment result of the non-executable path for the target path or strengthens the process of extracting the defect data.

[0024] At this time, the analysis history information may include the total number of target paths identified as calling the external dependency function among the total analysis paths generated during multiple software analyses in the past, the number of times the target paths were determined to be non-executable paths, and the average number of defects found in the final analysis paths containing the external dependency function.

[0025] At this time, the deep analysis mode may include a step of expanding the search range of the contextual information obtained through the search augmentation generation technique and performing a follow-up query to verify the detailed logic of the operation characteristics step by step with respect to the artificial intelligence model to refine the function summary information.

[0026] At this time, the processor may reflect the function summary information refined in the deep analysis mode back into the constraint expression and perform a re-verification step of double-checking the validity of the constraint expression for the branch that was removed as a non-executable path.

[0027] At this time, the above-mentioned function risk index is derived by the following mathematical formula,

[0028]

[0029] I represents the function risk index for the corresponding external dependency function, F represents the number of times the target path containing the corresponding external dependency function identified during multiple past software analyses was determined to be a non-executable path, N represents the total number of the target path containing the corresponding external dependency function identified during multiple past software analyses, T represents the total number of defects found in the final analysis paths containing the corresponding external dependency function identified during multiple past software analyses, and M represents the total number of the final analysis paths containing the corresponding external dependency function identified during multiple past software analyses. Effects of the invention

[0031] As such, according to one embodiment of the present invention, a device and method for blocking non-executable paths and static analysis using artificial intelligence-based search augmentation generation can be provided.

[0032] The effects obtainable from the present invention are not limited to those mentioned above, and other unmentioned effects will be clearly understood by those skilled in the art from the description below. Brief explanation of the drawing

[0034] Other aspects, features, and benefits of specific preferred embodiments of the present invention, as described above, will become more apparent from the following description in conjunction with the accompanying drawings. FIG. 1 is a conceptual diagram of a device for blocking non-executable paths and static analysis using artificial intelligence-based search augmentation generation according to an embodiment of the present invention. FIG. 2 is a block diagram of an electronic device according to one embodiment of the present invention. FIG. 3 is a diagram showing the derivation of a final analysis path according to an embodiment of the present invention. FIG. 4 is a diagram showing the analysis priority according to one embodiment of the present invention. FIG. 5 is a diagram showing a re-verification and deep analysis mode according to one embodiment of the present invention. FIG. 6 is a flowchart of a method for blocking non-executable paths and static analysis using artificial intelligence-based search augmentation generation according to an embodiment of the present invention. It should be noted that in the drawings above, similar reference numbers are used to illustrate identical or similar elements, features, and structures. Specific details for implementing the invention

[0035] Hereinafter, embodiments of the present invention will be described in detail with reference to the attached drawings.

[0036] In describing the embodiments, technical details that are well known in the technical field to which the present invention belongs and are not directly related to the present invention are omitted. This is intended to convey the essence of the present invention more clearly without obscuring it by omitting unnecessary explanations.

[0037] For the same reason, some components in the attached drawings have been exaggerated, omitted, or schematically depicted. Additionally, the size of each component does not entirely reflect its actual dimensions. Identical or corresponding components in each drawing have been assigned the same reference numbers.

[0038] The advantages and features of the present invention and the methods for achieving them will become clear by referring to the embodiments described below in detail together with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below but can be implemented in various different forms. These embodiments are provided merely to ensure that the disclosure of the present invention is complete and to fully inform those skilled in the art of the scope of the invention, and the present invention is defined only by the scope of the claims. Throughout the specification, the same reference numerals refer to the same components.

[0039] At this point, it will be understood that each block of the process flow diagrams and combinations of the flow diagrams can be executed by computer program instructions. Since these computer program instructions can be loaded into the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing equipment, the instructions executed through the processor of the computer or other programmable data processing equipment create means to perform the functions described in the flow diagram block(s). Since these computer program instructions can also be stored in computer-available or computer-readable memory that can be directed toward the computer or other programmable data processing equipment to implement the function in a specific way, the instructions stored in computer-available or computer-readable memory can also produce a manufactured item containing instruction means to perform the function described in the flow diagram block(s). Since computer program instructions can be loaded onto a computer or other programmable data processing equipment, instructions that perform a series of operation steps on the computer or other programmable data processing equipment to create a process executed by the computer can also provide steps for executing the functions described in the flowchart block(s).

[0040] Additionally, each block may represent a module, segment, or part of code containing one or more executable instructions for executing a specified logical function(s). It should also be noted that in some alternative execution examples, the functions mentioned in the blocks may occur out of order. For instance, two blocks described in succession may actually be executed substantially simultaneously, or the blocks may be executed in reverse order according to their corresponding functions.

[0041] In this embodiment, the term "part" refers to a software or hardware component such as a field-programmable gate array (FPGA) or an application-specific integrated circuit (ASIC), and the "part" performs certain roles. However, the meaning of "part" is not limited to software or hardware. The "part" may be configured to reside in an addressable storage medium or configured to run one or more processors. Accordingly, as an example, the "part" includes components such as software components, object-oriented software components, class components, and task components, as well as processes, functions, attributes, procedures, subroutines, segments of program code, drivers, firmware, microcode, circuits, data, databases, data structures, tables, arrays, and variables. The functions provided within the components and "parts" may be combined into a smaller number of components and "parts" or further separated into additional components and "parts." In addition, the components and '~parts' may be implemented to play one or more CPUs within the device or secure multimedia card.

[0042] In describing the embodiments of the present invention in detail, the primary focus will be on examples of specific systems, but the main point claimed in this specification is applicable to other communication systems and services having a similar technical background without significantly departing from the scope disclosed in this specification, and this will be possible at the judgment of a person with skilled technical knowledge in the relevant technical field.

[0043] In addition, the user terminal described below may include a communication-capable desktop computer, laptop computer, notebook, smartphone, tablet PC, mobile phone, smart watch, smart glass, e-book reader, PMP (portable multimedia player), portable game console, navigation device, digital camera, DMB (digital multimedia broadcasting) player, digital audio recorder, digital audio player, digital video recorder, digital video player, PDA (Personal Digital Assistant), etc.

[0045] FIG. 1 is a conceptual diagram of a non-executable path blocking and static analysis device using artificial intelligence-based search augmentation generation according to one embodiment of the present invention, and FIG. 2 is a block diagram of an electronic device (100) according to one embodiment of the present invention.

[0046] An electronic device (100) according to one embodiment includes a processor (110) and a memory (120). The processor (110) can perform at least one of the methods described above. The memory (120) can store information related to the method described above or store a program in which the method described above is implemented. The memory (120) may be volatile memory or non-volatile memory. The memory (120) may be referred to as a 'database', 'storage unit', etc.

[0047] The processor (110) can execute a program and control the electronic device (100). The code of the program executed by the processor (110) can be stored in memory (120). The device (100) can be connected to an external device (e.g., a personal computer or a network) through an input / output device (not shown) and exchange data.

[0048] At this time, the processor (110) can parse the source code of the target software to derive a control flow graph representing the execution flow of the program, and search for branch structures on the control flow graph to generate multiple analysis paths.

[0049] More specifically, the processor can generate an abstract syntax tree from the source code, derive a control flow graph by analyzing control transition relationships between nodes of the abstract syntax tree, and generate multiple analysis paths by performing symbolic execution on the control flow graph to track the execution conditions for each branch of the source code.

[0050] In this context, an 'Abstract Syntax Tree (AST)' refers to a data structure that abstracts the grammatical structure of source code written in a programming language into a tree form that is easy for a computer to process.

[0051] Furthermore, a 'Control Flow Graph (CFG)' refers to a model that formalizes all valid paths and conditional branching points (e.g., conditional statements, loops, etc.) through the connection relationships of nodes and edges, representing the range of control that can be transferred during program execution.

[0052] In addition, 'Symbolic Execution' is a software analysis technique that explores code by assuming that the input values ​​of a program are symbols instead of concrete actual values ​​(e.g., integer 10).

[0053] Through this, the logical constraints that input variables must satisfy to pass through specific branching statements and reach the target code line can be collected in the form of mathematical formulas.

[0054] According to this configuration, the processor according to an embodiment of the present invention can perfectly convert complex logic and execution flow inherent in source code into a mathematical and systematic model without establishing a dynamic analysis environment that actually runs the program.

[0055] In particular, by thoroughly tracking numerous branch probabilities present in the code through symbolic execution and structuring them into 'multiple analysis paths,' it is possible to minimize blind spots and maximize code coverage during subsequent defect detection or vulnerability scanning processes.

[0057] In addition, the processor can identify a target path among the plurality of analysis paths that includes a call to an external dependency function, analyze the operational characteristics of the external dependency function using a search augmentation generation technique, and remove non-executable paths among the target paths that are logically impossible to execute based on the analyzed operational characteristics.

[0058] More specifically, the processor may retrieve and obtain context information related to the external dependency function from a pre-established technical document knowledge base, and use a large-scale language model (LLM) to generate function summary information as the operational characteristic, including the input value range, return value type, and error occurrence condition of the external dependency function from the context information.

[0059] Additionally, the processor may convert the function summary information into a constraint, compare it with the branch conditions of the target path, and determine the path containing a branch that contradicts the constraint as the non-executable path.

[0060] In this context, an 'External Dependency Function' refers to a function that is not directly implemented within the source code being analyzed but is called from an external environment, such as an external library or operating system (OS). Since the internal logic of such external functions cannot be directly verified during the static analysis process, they can act as a factor that hinders the accuracy of the analysis.

[0061] In this context, 'Retrieval-Augmented Generation (RAG)' is a technology in which an artificial intelligence model does not rely solely on internal knowledge learned in advance, but instead searches for relevant information in real-time from a reliable external knowledge base and utilizes it as the basis for the answer.

[0062] In this context, a 'Large Language Model (LLM)' refers to a super-large artificial intelligence capable of learning from vast amounts of data to grasp context and generate and summarize complex information at a level similar to humans.

[0063] Furthermore, a 'constraint' is a formalization using mathematical codes or symbols of the logical range that specific conditions or variables within a program must satisfy, while an 'infeasible path' refers to a logical error path within the program's control flow structure that cannot be physically reached or executed by any input value.

[0064] According to this configuration, the processor according to an embodiment of the present invention can intelligently infer the operation of external functions, which remained in a black-box area due to the absence of source code, through artificial intelligence. In particular, by generating accurate function summary information based on actual technical documents by linking RAG technology, it is possible to drastically improve the numerous false positives that occurred when the analyzer made vaguely conservative assumptions about external functions.

[0065] Consequently, by precisely determining logically impossible paths and removing them from the analysis target in advance, it is possible to enhance the reliability of static analysis while significantly reducing system computational resources and analysis time required for unnecessary path searching, thereby maximizing the overall efficiency of software quality verification.

[0066] For example, the algorithmic processing of the above-mentioned large-scale language model (LLM) in deriving the function summary information based on technical documents is as follows.

[0067] First, the technical document text in natural language form obtained through the aforementioned Search Augmented Generation (RAG) technique and the source code syntax to be analyzed are divided into multiple tokens through a natural language processing algorithm, converted into high-dimensional vector-form embedding data, and input into the aforementioned artificial intelligence model.

[0068] Subsequently, the aforementioned embedding data passes through a deep neural network based on a Transformer architecture, where a Self-Attention algorithm is applied. During this process, the model mathematically calculates the associations between specific words within the text and other words. For example, by intensively calculating the contextual weights between the phrase "if the input argument is negative" in the manual and the phrase "returns an exit code" located far away, the model mechanically identifies the meaning of the specific exception handling logic of the function.

[0069] Finally, the model's decoding layer repeats the process of calculating the probability distribution of the next token's appearance based on the computed context vector. Through this, the human-readable natural language manual is converted into a structured form that the analyzer can directly interpret and apply—namely, specific logical constraint data such as "Pre-condition: argument value > 0" and "Post-condition: return -1 on error"—and outputs it.

[0071] As illustrated in FIG. 3, the processor can generate a final analysis path by merging the target path from which the non-executable path has been removed and the analysis path that does not include a call to the external dependency function.

[0072] In this context, 'Merging' refers to the process of integrating valid paths related to external functions, free from logical contradictions, with general paths that are executable independently of external function calls, to form a complete set of analysis targets. The 'Final Analysis Path' refers to the entire integrity search space completed through this merging. This configuration allows for the connection of the entire program's control flow without interruption or omission while completely excluding impossible error search spaces. Consequently, it effectively prevents false positives during the subsequent actual defect and vulnerability scanning phase and enables high-speed, integrated, and precise quality analysis of the entire source code.

[0074] In addition, the processor can extract defect data by checking compliance with preset software coding rules and security vulnerability rules for the final analysis path, and automatically generate an analysis result report by mapping the extracted defect data to a template of preset document specifications.

[0075] In this context, 'software coding rules' and 'security vulnerability rules' refer to standardized verification criteria based on industry-standard safe coding guidelines (e.g., MISRA C / C++) or the Common Weakness Enumeration (CWE), which must be strictly adhered to when developing programs requiring high reliability and safety. Alternatively, verification criteria customized by the administrator of the present invention may be applied.

[0076] Furthermore, 'defect data' refers to information on code-level errors and security threats, such as memory leaks, buffer overflows, and abnormal termination, that may occur due to violations of the aforementioned rules, and 'document specification template' refers to standardized document outlines and data mapping forms required by the ordering agency or defense and aviation software development regulation manuals.

[0077] According to this configuration, the processor according to the embodiment of the present invention performs a precision inspection only on the final analysis path of integrity that has been pruned through artificial intelligence, so it is possible to obtain highly reliable defect data with minimized false positives occurring in incorrect paths.

[0078] In particular, quality reports are immediately and automatically completed in accordance with required standard document specifications, eliminating the need for developers to manually aggregate technical logs from fragmented analysis systems.

[0079] Through this, it is possible to drastically reduce the massive manpower and time costs consumed in preparing for software quality assurance (QA) and certification audits, and to prevent human errors in the document preparation process at the source, thereby enabling the establishment of a consistent and objective verification system.

[0081] FIG. 4 is a diagram showing the analysis priority according to one embodiment of the present invention.

[0082] Referring to FIG. 4, the processor can calculate a path priority index (P) to set an analysis priority for individual paths constituting the final analysis path, and perform defect inspection in order of paths with a high calculated path priority index.

[0083] To examine it more specifically, the above path priority index can be derived by the following mathematical formula 1.

[0084] [Mathematical Formula 1]

[0085]

[0086] In this case, P represents the path priority index for the individual path, D represents the branch depth, which is the total number of branch statements included from the start point to the end point of the individual path, C represents the constraint complexity, which is the total number of logical operators included in the symbolic expression defining the execution condition of the individual path, and R represents the coverage ratio, which is the ratio of the number of nodes included in the individual path to the total number of nodes in the control flow graph.

[0087] In this context, 'Analysis Priority' refers to the processing order assigned to first explore paths with a high probability of defect detection within limited system resources and time, while 'Symbolic Expression' refers to a mathematical proposition that symbolically represents the logical correlation between variables determining the program's execution path.

[0088] At this time, the above mathematical formula 1 is designed to give high weight to complex and deep paths that are likely to have hidden defects, and to give low weight to general paths that have already been sufficiently verified or are too extensive.

[0089] Looking at the specific design structure and meaning, the branch depth (D) is configured to have the strongest influence on the exponent through squared (D^2) processing. This reflects the fact that the deeper the layer of logic located in the source code, the more complex the exception handling becomes and the greater the potential for developer error.

[0090] In addition, the constraint complexity (C) applies the natural logarithm (ln) to increase priority as conditions become stricter, while adjusting weights gradually to prevent a specific path from monopolizing the total score; meanwhile, the coverage ratio (R) is placed as an exponential function (exp) term in the denominator, thereby optimizing analysis efficiency by drastically lowering the priority score of general paths that account for a large proportion of the total code.

[0091] For example, we can compare two analysis paths. Assume there exists a first path that is complex with a branch depth of 5 (D=5) and 10 constraints (C=10) but occupies only 10% (R=0.1) of the total code, and a second path that is simple with a branch depth of 2 (D=2) and 2 constraints (C=2) and occupies 60% (R=0.6) of the total code.

[0092] At this time, when substituted into the above mathematical formula, the first path, which is the former, obtains a high priority index (P) due to the square effect of the numerator and the low denominator value, and the processor determines this as a section with a high risk of defect occurrence and performs a detailed inspection before the second path, which is the latter.

[0093] According to this configuration, instead of indiscriminately scanning all paths, the processor can identify and prioritize paths with mathematically proven defect probability.

[0094] Through this, it is possible to detect critical defects early within limited computational resources and time, and to rapidly ensure software code quality and security stability.

[0096] FIG. 5 is a diagram showing a re-verification and deep analysis mode according to one embodiment of the present invention.

[0097] Referring to FIG. 5, the processor operates a function management database that stores historical analysis information for each external dependency function, calculates a Function Risk Index based on the historical analysis information extracted from the function management database for the external dependency function, and when the Function Risk Index exceeds a preset threshold, performs a deep analysis mode that re-verifies the determination result of the non-executable path for the target path or strengthens the process of extracting the defect data.

[0098] At this time, the analysis history information may include the total number of target paths identified as calling the external dependency function among the total analysis paths generated during multiple software analyses in the past, the number of times the target paths were determined to be non-executable paths, and the average number of defects found in the final analysis paths containing the external dependency function.

[0099] In addition, the deep analysis mode may include a step of expanding the search range of the contextual information obtained through the search augmentation generation technique and performing a follow-up query to verify the detailed logic of the operation characteristics step by step for the artificial intelligence model to refine the function summary information.

[0100] At this time, the processor may reflect the function summary information refined in the deep analysis mode back into the constraint expression and perform a re-verification step of double-checking the validity of the constraint expression for the branch that was removed as a non-executable path.

[0101] To look more specifically, the above function risk index can be derived by the following mathematical formula 2.

[0102] [Mathematical Formula 2]

[0103]

[0104] In this case, I represents the function risk index for the corresponding external dependency function, F represents the number of times the target path containing the corresponding external dependency function identified during multiple past software analyses was determined to be a non-executable path, N represents the total number of the target path containing the corresponding external dependency function identified during multiple past software analyses, T represents the total number of defects found in the final analysis paths containing the corresponding external dependency function identified during multiple past software analyses, and M represents the total number of the final analysis paths containing the corresponding external dependency function identified during multiple past software analyses.

[0105] In this context, the 'function management database' refers to a knowledge repository that continuously accumulates and manages the call frequency, path determination results, and defect detection history of various external dependency functions identified during the program analysis process.

[0106] Furthermore, the 'Function Risk Index' refers to a numerical value that quantifies the statistical risk that a specific external function may interfere with the static analyzer's search for normal execution paths, thereby causing false positives, or that it may contain actual critical security vulnerabilities and defects; meanwhile, the 'Deep Analysis Mode' refers to a high-precision analysis stage that intensively allocates system computational resources to high-risk functions to re-verify the AI's inference results from various angles.

[0107] At this time, the above mathematical formula 2 is designed to comprehensively evaluate the degree to which a specific external dependency function confuses the analyzer and the degree to which it causes actual software defects.

[0108] Looking at the specific design structure, the (F / N) term placed at the front end represents the ratio of logically impossible non-executable paths among the total search paths containing the corresponding function, and this serves as an indicator of how much the function hinders the analyzer's understanding of control flow.

[0109] In addition, the (T / M) term placed at the rear end represents the density of defects occurring on average per valid final analysis path containing the corresponding function. Specifically, a logarithmic function is applied to the defect density term and a constant of 10 is added to ensure mathematical stability and prevent the analysis system's weights from collapsing due to excessive divergence of the total exponential value caused by specific extreme cases where an abnormally high number of defects are found.

[0110] For example, we can compare the analysis history of two external dependency functions. In the case of a widely used stable first function, if it was included in 10,000 paths in the past but was judged as non-executable path only 100 times and had a total of 10 defects, then both the (F / N) and (T / M) values ​​converge to 0, and the function risk index is calculated to be at the lowest level.

[0111] On the other hand, in the case of the second function involving complex pointer operations, if it was included in the past 100 paths and caused non-executable paths in 80 of them, and a total of 40 defects came out from the remaining 20 valid paths, the result of the above mathematical formula is rapidly amplified by the high interference rate (80%) and the very high defect density value.

[0112] At this time, the 'pre-set threshold' that serves as the criterion for evaluating the above function risk index can be dynamically and automatically set by the system based on statistical standard deviation to identify only the top certain percentage (e.g., top 5%) based on the distribution of risk indices of all external dependency functions accumulated in the entire function management database.

[0113] Alternatively, the strictness may be adjusted by manually setting differentially by the system administrator according to the security integrity level required by the software under analysis (e.g., general commercial software, financial network systems, defense and aviation software, etc.).

[0114] According to this configuration, instead of indiscriminately consuming the same level of high-cost analysis resources for all numerous external dependency functions, the processor can selectively perform double re-verification and deep querying only on malicious functions whose probability of causing false positives or risk of defect occurrence has been mathematically proven based on accumulated big data from the past.

[0115] Through this, it is possible to establish an intelligent analysis system that fundamentally prevents the system from missing critical security vulnerabilities or logical defects that could lead directly to actual accidents, while significantly reducing the time and computing power required for overall software static analysis.

[0117] FIG. 6 is a flowchart of a method for blocking non-executable paths and static analysis using artificial intelligence-based search augmentation generation according to an embodiment of the present invention.

[0118] Referring to FIG. 6, a non-execution path blocking and static analysis method using artificial intelligence-based search augmentation generation according to one embodiment of the present invention can derive a control flow graph representing the execution flow of a program by parsing the source code of the target software (S101).

[0119] In addition, the non-executable path blocking and static analysis method using artificial intelligence-based search augmentation generation according to one embodiment of the present invention can generate a plurality of analysis paths by searching for a branching structure on the control flow graph (S103).

[0120] In addition, the non-executable path blocking and static analysis method using artificial intelligence-based search augmentation generation according to one embodiment of the present invention can identify a target path that includes a call to an external dependency function among the plurality of analysis paths (S105).

[0121] In addition, the non-executable path blocking and static analysis method using artificial intelligence-based search augmentation generation according to one embodiment of the present invention can analyze the operational characteristics of the external dependency function using a search augmentation generation technique (S107).

[0122] In addition, the method for blocking non-executable paths and static analysis using artificial intelligence-based search augmentation generation according to one embodiment of the present invention can remove non-executable paths among the target paths that are logically impossible to execute based on the analyzed operation characteristics (S109).

[0123] In addition, the method for blocking non-executable paths and static analysis using artificial intelligence-based search augmentation generation according to one embodiment of the present invention can generate a final analysis path by merging the target path from which the non-executable path has been removed and the analysis path that does not include the call of the external dependency function (S111).

[0124] In addition, the non-executable path blocking and static analysis method using artificial intelligence-based search augmentation generation according to one embodiment of the present invention may be configured in the same way as the non-executable path blocking and static analysis device using artificial intelligence-based search augmentation generation disclosed in FIGS. 1 to 5.

[0126] The embodiments described above may be implemented as hardware components, software components, and / or combinations of hardware and software components. For example, the devices, methods, and components described in the embodiments may be implemented using one or more general-purpose or special-purpose computers, such as, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA), a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions. The processing unit may execute an operating system (OS) and one or more software applications executed on said operating system. Additionally, the processing unit may access, store, manipulate, process, and generate data in response to the execution of the software. For ease of understanding, the processing unit may be described as being used as a single unit, but those skilled in the art will understand that the processing unit may include multiple processing elements and / or multiple types of processing elements. For example, the processing unit may include multiple processors or one processor and one controller. Additionally, other processing configurations, such as parallel processors, are also possible.

[0127] The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, etc., either alone or in combination. The program instructions recorded on the medium may be those specifically designed and configured for the embodiment, or they may be those known and available to those skilled in the art of computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes; optical recording media such as CD-ROMs and DVDs; magneto-optical media such as floptical disks; and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, and flash memory. Examples of program instructions include machine code, such as that generated by a compiler, as well as high-level language code that can be executed by a computer using an interpreter, etc. The hardware devices described above may be configured to operate as one or more software modules to perform the operation of the embodiment, and vice versa.

[0128] Software may include computer programs, code, instructions, or a combination of one or more of these, and may configure a processing unit to operate as desired or command the processing unit independently or collectively. Software and / or data may be permanently or temporarily embodied in any type of machine, component, physical device, virtual equipment, computer storage medium or device, or transmitted signal wave so as to be interpreted by the processing unit or to provide instructions or data to the processing unit. Software may be distributed over networked computer systems and may be stored or executed in a distributed manner. Software and data may be stored on one or more computer-readable recording media.

[0129] Although the embodiments have been described above with reference to the limited drawings, those skilled in the art can apply various technical modifications and variations based on the above. For example, suitable results may be achieved even if the described techniques are performed in a different order than described, and / or if the components of the described system, structure, device, circuit, etc. are combined or assembled in a form different from described, or replaced or substituted by other components or equivalents.

[0130] Therefore, other implementations, other embodiments, and equivalents to the claims also fall within the scope of the claims set forth below.

Claims

Claim 1 In an electronic device, memory; and a processor connected to said memory; The processor comprises: parsing the source code of the target software to derive a control flow graph representing the execution flow of the program; exploring branch structures on the control flow graph to generate multiple analysis paths; identifying a target path among the multiple analysis paths that includes a call to an external dependency function; analyzing the operational characteristics of the external dependency function using a search-augmentation generation technique; removing non-executable paths among the target paths that are logically impossible to execute based on the analyzed operational characteristics; and merging the target path from which the non-executable paths have been removed with an analysis path that does not include a call to the external dependency function to generate a final analysis path; the processor generates an abstract syntax tree from the source code; analyzes control transition relationships between nodes of the abstract syntax tree to derive the control flow graph; generates multiple analysis paths by performing symbolic execution on the control flow graph to track the execution conditions for each branch of the source code; and the processor retrieves context information related to the external dependency function from a pre-established technical document knowledge base and uses a Large Language Model (LLM) to obtain the external dependency function's from the context information The processor generates function summary information including input value ranges, return value types, and error occurrence conditions as the operational characteristics, converts the function summary information into a constraint expression and compares it with the branch conditions of the target path, determines a path containing a branch that contradicts the constraint expression as the non-executable path, and the processor examines the final analysis path for compliance with pre-established software coding rules and security vulnerability rules to extract defect data, maps the extracted defect data to a template of a pre-established document specification to automatically generate an analysis result report,The above processor calculates a path priority index (P) to set an analysis priority for individual paths constituting the final analysis path, performs defect inspection in order of paths with a higher calculated path priority index, and the path priority index is derived by the following mathematical formula, An electronic device characterized in that P represents a path priority index for the individual path, D represents a branch depth which is the total number of branch statements included from the start point to the end point of the individual path, C represents a constraint complexity which is the total number of logical operators included in the symbolic expression defining the execution condition of the individual path, and R represents a coverage ratio which is the ratio of the number of nodes included in the individual path to the number of nodes in the entire control flow graph. Claim 2 delete Claim 3 delete

Citation Information

Patent Citations

  • Method and apparatus for determining dependencies between components of reused open source software

    KR1020260028941A

  • Implicit software dependency analysis

    US20170090876A1

  • Automated dependency detection and response

    US20210149667A1

  • Patch-based vulnerability discovery using machine learning

    US20250173443A1