Patents
Literature
Patsnap Eureka AI that helps you search prior art, draft patents, and assess FTO risks, powered by patent and scientific literature data.

19 results about "Control flow analysis" patented technology

In computer science, control-flow analysis (CFA) is a static-code-analysis technique for determining the control flow of a program. The control flow is expressed as a control-flow graph (CFG). For both functional programming languages and object-oriented programming languages, the term CFA, and elaborations such as k-CFA, refer to specific algorithms that compute control flow.

Intelligent optimization method for unit test coverage rate guided by using control flow

PendingCN121349900AError detection/correctionCode generationControl flow analysis
The invention discloses a unit test coverage rate intelligent optimization method guided by using a control flow. The method comprises the following steps: S1, obtaining and preprocessing a to-be-tested code; s2, a cycle generation stage: calling a predefined tool by using a large generative model to dynamically obtain a code to be tested, and generating a unit test code; s3, repairing the unit test codes which fail to compile or run; s4, acquiring the coverage rate and coverage information of the unit test code; performing control flow analysis on the to-be-detected code according to the coverage information and the coverage rate, and outputting a control flow information set; and uncovered control flow information is fed back to the generation cycle stage as output. According to the method, the automation degree of unit test generation based on the large model is high, the effectiveness of the codes generated by the large model is effectively improved, the coverage rate of the unit test codes generated by the large model is obviously improved, and the problems that the effectiveness of the codes generated by other unit test automatic generation tools based on the large model is low and the coverage rate in a complex scene is low are solved.
Owner:HANGZHOU DIANZI UNIV +2

Static analysis tool test case generation method based on program slicing technology

The invention discloses a static analysis tool test case generation method based on a program slicing technology, which comprises the following steps: step 1) according to a defect report of a static analysis tool, collecting and extracting variable information related to generation of a specific defect in a program as a slicing criterion; 2) through control flow analysis and data flow analysis, recording data and a control dependency relationship between statements, constructing a program dependency graph, and calculating a statement set having a dependency relationship with a slicing criterion; 3) positioning nodes corresponding to the statement set in the abstract syntax tree of the source code through a depth-first search algorithm, and deleting other nodes; the method comprises the following steps of (1) collecting a user-defined type or an external function declaration which is used through static program analysis, and outputting the type definition and the function declaration to an independent header file, and (5) writing edited codes into a file, and clearing redundant information to serve as a test case, the method adopts two-section analysis, and the test case can be generated efficiently and precisely.
Owner:NANJING UNIV

Lightweight program control flow obfuscation method, system, equipment and medium

The invention discloses a lightweight program control flow obfuscation method, system and device and a medium, and the method comprises the steps: carrying out the static analysis of a program based on a program source code, recognizing all basic blocks, analyzing the execution sequence and jump relation of the basic blocks, and obtaining a control flow diagram of the program; a unique runtime state is distributed for the basic blocks by analyzing the dependency relationship among the basic blocks, and a conversion rule among the states is defined, so that a state transition model is obtained; the method comprises the following steps: dynamically generating an encryption key by using a state conversion relationship, and encrypting sensitive information in a control flow to obtain an encryption program code subjected to obfuscation protection; a current runtime state is read in a program execution process, a corresponding decryption key is generated, a plaintext address of sensitive information is restored, and executable implicit jump and variable access operation is obtained. Static analysis, especially control flow analysis, can be effectively resisted, so that source codes and algorithms of software are protected from being easily acquired or tampered.
Owner:YUNNAN POWER GRID CO LTD KUNMING POWER SUPPLY BUREAU

Source code processing method and device, and electronic device

ActiveCN119807010BSolve information-dependent issuesError detection/correctionProgram code adaptionTheoretical computer scienceControl flow analysis
The application discloses a source code processing method and device and electronic equipment. The method comprises the following steps: obtaining source code and configuration information of a project; performing syntax analysis processing on the source code based on the configuration information, and generating an abstract syntax tree of the source code; determining a target node of a correlation function in the abstract syntax tree, performing analysis processing on the target node, and obtaining an analysis processing result of the target node; performing code block division based on the analysis processing result of the target node, obtaining a code block division result of the target node, performing control flow analysis based on the code block division result of the target node, and generating a control flow graph of the target node; and performing dependency analysis based on the control flow graph of the target node, and obtaining dependency information of the target node. In combination with common static code analysis technology and a dependency information extraction method, the dependency relationship of each function is extracted, code understanding and code transplantation are facilitated, and the problem of how to extract dependency information in the code when software testing is performed on the source code is solved.
Owner:CHINA AUTOMOTIVE INNOVATION CORP

A method for extracting structural information from Pascal-like binary programs based on static analysis

The present invention relates to a method for extracting structured information from a Pascal-like binary program based on static analysis, which is as follows: (1) using scripts and other tools to preliminarily read basic properties in a binary file compiled from a Pascal-like program; (2) finding all functions that create class objects by obtaining construction feature functions and combining control flow analysis technology; (3) using the base object address as the base address and combining data analysis technology, recursively identifying the member object definition relationship and the inheritance relationship between classes in the binary file; (4) combining the results automatically generated by the script to confirm the corresponding construction function name and the corresponding parameter type and name; (5) based on the above analysis results, finding the corresponding class interface to ensure that the restored code logic is consistent with the original binary file behavior. This method achieves accurate restoration of the class structure, interface, and function, thereby improving the efficiency and accuracy of reverse analysis.
Owner:SOUTHEAST UNIV

Low-code platform script generation method and system based on LLM+RAG

The application provides an LLM+RAG-based low-code platform script generation method and system, relates to the technical field of script generation, and comprises the following steps: constructing a semantic graph by analyzing user requirements, retrieving and screening a component combination that can be connected in series, generating an original script by using a large language model, and finally generating an executable script and deploying and running the executable script through control flow analysis and variable initialization. The application realizes the automatic generation of an executable script from a natural language requirement, and improves the development efficiency and code reliability.
Owner:冠骋信息技术(苏州)有限公司

A smart contract bytecode similarity detection method based on graph neural network

The present invention discloses a method for detecting the similarity of smart contract bytecodes based on a graph neural network, comprising: disassembling the bytecode of the Ethereum virtual machine, performing data flow analysis and control flow analysis on the disassembly result, and obtaining a data flow graph and a control flow graph corresponding to the bytecode; combining the data flow graph and the control flow graph of each external function into a bytecode feature graph; training the graph neural network using a large number of smart contracts with similar labels, performing vectorization operations on the bytecode feature graph during the training process to obtain a feature vector; using the problem contract as a reference smart contract, inputting the bytecode feature graphs of the reference smart contract and the smart contract to be detected into the trained graph neural network respectively, obtaining corresponding feature vectors respectively, comparing the Euclidean distance of the two feature vectors, and measuring the similarity of the bytecodes of the two smart contracts. Compared with traditional methods, the present invention has higher accuracy, can effectively identify problem contracts, and enhance the security of the blockchain system.
Owner:ZHEJIANG UNIV

Low-code platform script generation method and system based on LLM+RAG

This invention provides a low-code platform script generation method and system based on LLM+RAG, belonging to the field of script generation technology. The method includes constructing a semantic graph by analyzing user requirements, retrieving and filtering chainable component combinations, generating a raw script using a large language model, refining it through control flow analysis and variable initialization, and finally generating an executable script for deployment and execution. This invention achieves automated generation from natural language requirements to executable scripts, improving development efficiency and code reliability.
Owner:冠骋信息技术(苏州)有限公司

Abnormal function detection method and device, equipment, storage medium and program product

The invention discloses an abnormal function detection method and device, equipment, a storage medium and a program product, and relates to the technical field of computers, a feature sequence and a semantic category sequence are extracted from a disassembled assembly instruction sequence, a dynamic frequency model is generated, and then a reference model is constructed, so that the limitation of a fixed signature library is avoided, and the detection accuracy is improved. The method can adapt to code variants under different platforms and compiling environments, and the detection capability of unknown malicious codes is improved; the method focuses on analysis of operation codes and semantic category sequences, so that the error risk in complex control flow analysis is reduced, and the detection accuracy is improved; by adopting static analysis, the problems of high overhead and anti-debugging of dynamic analysis are avoided, and the detection efficiency is improved; by constructing the reference model and comparing the reference model with the to-be-detected function in the to-be-detected code, dependence on static signature and complex control flow analysis is avoided, the adaptability problem of obfuscated codes and unknown malicious logic is solved, and the technical effect of stable and efficient abnormal function recognition is achieved.
Owner:LANGCHAO ELECTRONIC INFORMATION IND CO LTD

A smart contract testing method and device, an electronic device, and a storage medium

The application discloses a smart contract testing method and device, electronic equipment and storage medium, and is used to solve the technical problem that the existing security detection tool seriously depends on expert knowledge to define detection rules, which leads to poor expansibility and ignores the detection of the annotated code segments, and cannot identify potential security risks caused by error annotations. The method comprises the following steps: identifying the annotated code in the contract source code of the smart contract; determining the annotated code statements of the annotated code, and obtaining the affected functions and program paths of the affected functions affected by the annotated code statements; performing control flow analysis according to the affected functions and the program paths; when it is determined that the annotated code statements change the control flow of code execution, obtaining the path constraint conditions for changing the control flow; obtaining the key operation statements affected by the path constraint conditions; determining whether the key operation statements are affected by the annotated code statements; and if yes, generating a security warning.
Owner:SUN YAT SEN UNIV

Code correction method, correction device and intelligent analysis system

The present application provides a code correction method, correction device and intelligent analysis system, which includes: parsing source code to convert the source code into a syntax tree; performing pre-analysis based on a code blacklist and the syntax tree to obtain a first analysis result; if the first analysis result indicates that a vulnerability exists, inputting the first analysis result, the syntax tree and the source code into a code correction model to obtain a first correction code; if the first analysis result indicates that there is no vulnerability, performing control flow analysis on the control flow to obtain a second analysis result, and performing data flow analysis on the data flow to obtain a third analysis result; simulating the source code in a simulation environment to perform simulation analysis to obtain a fourth analysis result; and inputting the second analysis result, the third analysis result, the fourth analysis result, the syntax tree and the source code into the code correction model to obtain a second correction code. The present application solves the problem that the code detection method in the prior art has a high false alarm rate, resulting in low quality of the corrected code.
Owner:ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD

Program labyrinth protection method based on jump statement and dispersed encrypted map construction

The invention discloses a program labyrinth protection method based on jump statements and dispersed encrypted map construction, which comprises the following steps of: performing control flow analysis on an original program to generate an equivalent block, an initialization block, a redundant calculation block, an opaque predicate and an error path, and expanding a key control flow edge into a labyrinth structure comprising a plurality of correct paths and error paths. A binary maze map is generated for correct behaviors of each conditional jump intersection, and the map is fragmented, encrypted and disguised as common data to be stored dispersedly. During operation, the navigator calculates an index based on a current instruction address and a local execution context, locates and decrypts a target map fragment, and reads a map bit to control jump; meanwhile, sentinel points are arranged at key nodes of the labyrinth, a debugging environment and indexes are detected, abnormal decryption is carried out, progressive countering is triggered or an execution stream is guided to enter an error path, and therefore under the condition that the program performance is slightly influenced, the reverse and dynamic debugging resisting capacity of a program is greatly improved.
Owner:SHENGWEI DIGITAL (SHENZHEN) TECHNOLOGY CO LTD

Abnormal function detection method and device, equipment, storage medium and program product

The application discloses a kind of detection methods, device, equipment, storage medium and program product of abnormal function, involve computer technical field, by extracting feature sequence and semantic category sequence from the assembly instruction sequence of disassembly, generate dynamic frequency model, and then build benchmark model, avoid the limitation of fixed signature library, can adapt to the code variety under different platform and compiling environment, improve the detection ability of unknown malicious code;Focus on analyzing opcode and semantic category sequence, reduce the error risk in complex control flow analysis, improve detection accuracy;Using static analysis avoids the high overhead of dynamic analysis and anti-debugging problem, improve detection efficiency;By building benchmark model and comparing with the function to be detected in the code to be tested, avoid relying on static signature and complex control flow analysis, solve the adaptability problem of obfuscated code and unknown malicious logic, achieve the technical effect of stable, efficient abnormal function identification.
Owner:LANGCHAO ELECTRONIC INFORMATION IND CO LTD

Java cryptography static analysis tool and method based on Soot

The invention discloses a Soot-based Java cryptography static analysis tool and method, and belongs to the field of software static analysis, and the method comprises the following steps: S1, environment initialization: inputting a JAR file or class folder path by a user, and starting and initializing Soot configuration by using an Entry class main method; s2, traversing application program classes by using a Soot analysis worker, pre-loading byte code representation of a method body, and constructing a call graph by using the Soot analysis worker at the same time; s3, task allocation and parallel processing are carried out, a plurality of independent detectors are constructed, and the detectors execute the allocated task queues in parallel; s4, generating a vulnerability report; s5, cleaning and exiting; according to the method, the powerful analysis function of Soot on Java bytecodes is utilized, on the basis of key technologies such as data flow tracing, control flow analysis and call graph construction, the tool performance is optimized in combination with programming technologies such as method-level multithreading, and efficient cryptographic detection is conducted on the Java codes.
Owner:NANJING UNIV OF SCI & TECH

Smart contract vulnerability detection method and system based on taint analysis

ActiveCN120197178BPlatform integrity maintainanceControl flow analysisSecurity analysis
The present application relates to the field of vulnerability detection, in particular to a smart contract vulnerability detection method and system based on taint analysis, control flow analysis is performed on the EVM bytecode of the smart contract, key operation instructions in the control flow graph and key parameters of each key operation instruction are extracted; based on the defined access permission control condition, the access permission control of the EVM bytecode is identified, and the access permission control check and the access permission control state variable are identified; then based on the key operation instruction, the access permission control state variable sets the taint sink, carries out the taint analysis, generates the constraint condition of the taint flow path through the symbolic execution, efficiently and accurately distinguishes the expected normal operation in the smart contract from the real security vulnerability, takes the inverse of the constraint condition to obtain the negative constraint condition, further solves the negative constraint condition, significantly improves the accuracy and reliability of the smart contract security analysis, and provides strong support for the security protection of the smart contract.
Owner:YANTAI UNIV

A method and device for automatically mining protocol vulnerabilities based on an enhanced data flow graph

The application provides a protocol vulnerability automatic mining method and device based on an enhanced data flow graph. The method comprises the following steps: determining an analysis range of source code, compiling the source code into an intermediate language file based on the analysis range; performing control flow analysis on the intermediate language file to obtain a total control flow graph; performing data flow analysis and perfecting on the intermediate language based on the total control flow graph to generate an enhanced data flow graph; determining an analysis target, obtaining a calling path of the analysis target based on the enhanced data flow graph; and performing potential risk judgment on the calling path of the analysis target, printing the path with potential vulnerability risks and warning a user. The application extracts protocol interaction semantic information in the source code through static analysis technology, and performs potential risk judgment on the interaction information, so that the vulnerability caused by the protocol interaction can be effectively identified, the dependence on manual analysis or test cases in the protocol vulnerability mining process is reduced, the analysis range of the protocol vulnerability is expanded, and the ability and efficiency of the protocol vulnerability mining are improved.
Owner:TSINGHUA UNIVERSITY +1

Sandbox-free environment Vue single file component development and rendering implementation method and system

The application provides a sandbox-free environment Vue single file component development and rendering implementation method and system, relates to the technical field of component development, and comprises receiving declarative configuration data containing a component tree, attribute binding and a life cycle hook; constructing a control flow graph and inferring capability requirements through control flow analysis, generating a capability authorization matrix recording path and capability mapping, and allocating a dynamic permission token accordingly; constructing a virtualization layer with a host object image, verifying permissions and synchronizing host status through an interceptor during operation; initializing a component instance and executing a hook, establishing a responsive observation, and triggering local re-rendering when data changes; and submitting updates after performing a security scan on the re-rendered DOM to remove dangerous content. The application realizes safe and efficient component rendering and permission control in a sandbox-free environment.
Owner:冠骋信息技术(苏州)有限公司

Detecting patient-zero exfiltration attacks on websites using taint tracking

An execution environment has been designed that detects likely data exfiltration by using taint tracking and abstract execution. The execution environment is instrumented to monitor for use of functions identified as having functionality for transferring data out of an execution environment. In addition, heuristics-based rules are defined to mark or “taint” objects (e.g., variables) that are likely targets for exfiltration. With taint tracking and control flow analysis, the execution environment tracks the tainted objects through multiple execution paths of a code sample. After comprehensive code coverage, logged use of the monitored functions are examined to determine whether any tainted objects were passed to the monitored functions. If so, the logged use will indicate a destination or sink for the tainted source. Each tainted source-sink association can be examined to verify whether the exfiltration was malicious.
Owner:PALO ALTO NETWORKS INC

LogSoftmax function hardware implementation system and method

The invention belongs to the technical field of artificial intelligence chip design, and particularly relates to a LogSoftmax function hardware implementation system and method. Comprising a control module; the data preprocessing module is connected with the control module and comprises a maximum value calculation circuit, a data parallel processing circuit and a precision conversion circuit; the configuration data generation module is connected with the control module and comprises a control flow analysis module, a data flow analysis module, a control information generation module, an index FIFO (First In First Out) and a logarithm FIFO; the LUT storage module is connected with the control module and the configuration data generation module and is used for storing an LUT table of index values and logarithm values; and the operation module is connected with the control module, the data preprocessing module and the LUT storage module, and the method can significantly reduce the consumption of storage resources and improve the calculation efficiency.
Owner:58TH RES INST OF CETC