Method and device for evaluating program codes

A program code and programming language technology, applied in the computer field, can solve problems such as time-consuming, limited, and inability to detect problems, and achieve the effect of automatic auditing

Inactive Publication Date: 2014-09-03
XIAOMI INC
View PDF4 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The existing method is that auditors manually check the code line by line to check out possible problems and then make corresponding modifications. This manual method takes a long time on the one hand, and is limited by the auditors. There may be some problems that cannot be detected, etc.

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
  • Method and device for evaluating program codes
  • Method and device for evaluating program codes
  • Method and device for evaluating program codes

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0021] The present invention will be further described in detail below through specific implementation examples in conjunction with the accompanying drawings.

[0022] figure 1 It is a flowchart showing a method for evaluating program code according to an exemplary embodiment, and the method includes:

[0023] In step S10, the program code is converted into a syntax tree;

[0024] In step S20, the syntax tree is compared with a pre-created preset evaluation sample model;

[0025] In step S30, the result of the comparison is output.

[0026] This method uses the pre-created evaluation sample model to evaluate the program code, thereby realizing the automatic review of the program code.

[0027] figure 2 It is a flowchart showing a method for evaluating program code according to another exemplary embodiment. Such as figure 2 As shown, step S10 includes:

[0028] In step S110, the program code is analyzed using the lexical analysis rules defined in advance according to the program languag...

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 invention provides a method for evaluating program codes. The method includes the steps that the program codes are converted into a syntax tree; the syntax tree is compared with a pre-established and preset evaluation sample model; a comparison result is output. The invention further provides a device for evaluating the program codes. The device comprises a conversion module, a comparison module and an output module, wherein the conversion module is used for converting the program codes into the syntax tree, the comparison module is used for comparing the syntax tree with the pre-established and preset evaluation sample model, and the output module is used for outputting the comparison result. The pre-established and preset evaluation sample model is used for evaluating the program codes, and then the program codes can be automatically checked.

Description

Technical field [0001] The field of computer technology of the present invention, in particular, relates to an evaluation method and device for program code. Background technique [0002] Whether the application code is concise or not will directly affect the loading, running, and response speed of the application. Therefore, before the application goes online, the general programmer will review the written application to make some necessary modifications. The existing method is that the reviewers manually check the code line by line to check out the possible problems and then make corresponding modifications. This manual method takes a long time on the one hand, and is limited by the reviewers on the other hand. There may be some problems that cannot be found, etc. Summary of the invention [0003] The purpose of the present invention is to provide an evaluation method and device for program code to solve the above-mentioned problems. [0004] According to the first aspect of the...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36
Inventor 余鹏马哲谭国斌
Owner XIAOMI INC
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