Font Size: a A A

The Research Of C Language's Code Analysis And Calculating The Time Complexity Of Functions

Posted on:2015-02-07Degree:MasterType:Thesis
Country:ChinaCandidate:Y D LiFull Text:PDF
GTID:2348330485493443Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
The existing C language compiler or code analysis software are mostly concentrated in testing the correctness of the encoding process and the accuracy of the structure of C program code, but the automatically testing of the information contained in the code, such as keywords information and time efficiency level of determination has not been implemented.Through static analysis process, this paper analyzed the lexical and grammatical form of the C language code under ANSI C standard, accomplished the resolving and storage of information of C language program in XML tree storage structure, then designed, implemented, and verified the algorithm model of the time complexity calculated automatically.The experimental results show that the keywords information in the C program code can be extracted and summarized well, meanwhile, the time efficiency of C program depends greatly on the time complexity of the intrinsic functions. The higher the overall time complexity of functions, the less run-time efficiency. Compared to the traditional method of C language analysis, this algorithm focuses more on analyzing and calculating the time complexity of C language, which can judge the time efficiency quickly and accurately.This research may help the C developer to analyze the C language program more simplicity, more conveniently, more directly. The C program can be analyzed before running, so that developer can make pre-correcting, which means the workload of reading the code and the learning costs will be greatly reduced, and focus on other more important work.
Keywords/Search Tags:Tree Structure, C Code Analysis, Calculating The Complexity, XML
PDF Full Text Request
Related items