Code static detection method and device

A static detection and code technology, applied in the computer field, can solve problems such as program running errors

Active Publication Date: 2021-03-19
SPREADTRUM COMM (SHANGHAI) CO LTD
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The embodiment of the present invention provides a static detection method and device for codes, which can effectively detect objects with the same function name or global va

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Code static detection method and device
  • Code static detection method and device
  • Code static detection method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0053] Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with aspects of the present disclosure as recited in the appended claims.

[0054] In the embodiments of the present invention, "at least one" means one or more, and "multiple" means two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three types of relationships, for example, A and / or B, which can mean: A exists alone, A and B exist simultaneously, and B exists independently. A, B can be singular o...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The embodiment of the invention provides a code static detection method and device, when codes corresponding to at least two projects in a software system are compiled, and if a new object is detected, the new object is a new external declaration and/or a new prototype declaration; if yes, whether a prototype declaration identical to the variable name of the new global variable exists in the database and/or whether a prototype declaration identical to the function name of the new function exists in the database is searched, and if the prototype declaration identical to the variable name of thenew global variable and/or the prototype declaration identical to the function name of the new function exists in the database, a prototype declaration with the same variable name as the new global variable and/or a prototype declaration with the same function name as the new function is output, so that an object with the same function name or global variable can be effectively detected; therefore, the problem of program running errors caused by the fact that a software system comprises two objects with the same function names or global variables is solved.

Description

technical field [0001] The invention relates to the technical field of computers, in particular to a code static detection method and device. Background technique [0002] For a large software product, it includes at least two or more projects. Among them, each project can define required functions or global variables according to actual needs, so there may be two projects with the same function name or global variable. [0003] For example, project A defines a function, and project B refers to the function defined by project A. In this case, it can be considered that project A and project B have the same function name; but in this case, if project A subsequently modifies the function name The function type or return type will cause the program of project B to run incorrectly; or, project A defines a function, and project B also defines a function with the same function name, but the function type is different from the function type defined by project A. In this case, it c...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F11/36
CPCG06F11/3604
Inventor 凡志明庄劼韩俊波
Owner SPREADTRUM COMM (SHANGHAI) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products