Source code error detection device and method thereof
AssigneeMStar Semiconductor, Inc.
InventorHuei-Jyun SONG
Life of this patent
Estimating the term…
Abstract
A source code error detection device and a source code error detection method are disclosed. The device and method are applied to detect source codes of a software product. The software product includes a plurality of function modules. A database stores the source codes of multiple versions of these function modules. Each version of the each module corresponds to a version information. The source code error detection device and the source code error detection method find an erroneous version information in order to immediately identify the source of the erroneous source codes during the development of a software project.
Claims20
A source code error detection device, a database storing source codes of a plurality of versions of a plurality of function modules, each version of each function module corresponding to version information, the source code error detection device adapted to identify erroneous version information, the source code error detection device comprising:
- a storage unit, storing a plurality of program instructions;
- and
- a processing unit, coupled to the storage unit, executing the program instructions to perform steps of:
- a) obtaining a compile combination information list, wherein the compile combination information list comprises a plurality of sets of compile combination information corresponding to a plurality of compile combinations, the sets of compile combination information arranged according to a module adding time sequence, each set of compile combination information comprising compile combination version information;
- b) selecting a target compile combination from the compile combinations;
- c) retrieving the source codes of the function modules corresponding to the target compile combination from the database according to the compile combination version information of the target compile combination;
- d) compiling the source codes to generate a compiled result of the target compile combination;
- e) determining whether an adjacent compile combination, which is one of a previous compile combination and a next compile combination of the target compile combination, has been compiled according to the compiled result of the target compile combination;
- f) when the adjacent compile combination has been compiled, determining whether the compiled result of the target compile combination is opposite to a compiled result of the adjacent compile combination;
- and
- g) when the compiled result of the target compile combination is opposite to the compiled result of the adjacent compile combination, identifying the erroneous version information according to the compile combination information of the target compile combination and the compile combination information of the adjacent compile combination.
A source code error detection method, a database storing source codes of a plurality of versions of a plurality of function modules, each version of each function module corresponding to version information, the source code error detection method for identifying erroneous version information, the source code error detection method comprising:
- a) obtaining a compile combination information list, the compile combination information list comprising a plurality of sets of compile combination information corresponding to a plurality of compile combinations, the sets of compile combination information arranged according to a module adding time sequence, each set of compile combination information comprising compile combination version information;
- b) selecting a target compile combination from the compile combinations;
- c) retrieving the source codes of the function modules corresponding to the target compile combination from the database according to the compile combination version information of the target compile combination;
- d) compiling the source codes to generate a compiled result of the target compile combination;
- e) determining whether an adjacent compile combination, which is one of a previous compile combination and a next compile combination of the target compile combination, has been compiled according to the compiled result of the target compile combination;
- f) when the adjacent compile combination has been compiled, determining whether the compiled result of the target compile combination is opposite to a compiled result of the adjacent compile combination;
- and
- g) when the compiled result of the target compile combination is opposite to the compiled result of the adjacent compile combination, identifying the erroneous version information according to the compile combination information of the target compile combination and the compile combination information of the adjacent compile combination.
Dependencies are inferred from the claim text.