Font Size: a A A

C++ Static Analyzer's Development Based On GCC

Posted on:2010-12-07Degree:MasterType:Thesis
Country:ChinaCandidate:S H DanFull Text:PDF
GTID:2178360278965573Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Nowadays, C++ has become one of most mainstream development languages. C++ has application in many fields, especially in some important field including vehicle carried control, astronautics domain and so on. With the development of computer technology, the software which is developed with C++ obtained the widespread use in astronautics domain, not only ground and radar system, but also astronautics and missile system. C++ obtains more widespread application inevitably because of its high efficiency. But there are some unsafe factors because of its complex language system. Therefore we should develop a set of testing tool independently to ensure the software's safety and reliability. The C++ static analyzer is part of this thesis. The software developers can check the code, and discover code error to guarantee code security and the reliability with the C++ static analyzer.Firstly, this thesis make "C++ Static check Rule" version 1.0 according to "MISRA C++:2008", "C++ Programming Standard", "the High grade C++ Programming" and so on, combine with the C++ language characteristic. In the basic of "MISRA C++:2008", this thesis described C++ common error which divided into rule and suggestion according to the importance. When we are programming, alarm are provided to distinguish. "C++ Static check Rule" version 1.0 is a handbook which we compile. With the technical development, the handbook should update and develop C++ static analyzer whitch suitable for astronautics domain.Secondly, C++ static analyzer takes source compiler GCC as the foundation. GCC is one of most successful open one source tools, its code is standard and strict. The tool had the good cross platform and high quality with GCC. According to "C++ Static check Rule" verdion 1.0, the process of check rule can be classified as lexical analysis process, syntax analysis process as well as the semantic analysis process. In this thesis,I analyse C++ compile process, program logic process as well as GCC symbol table. And using GCC symbol table correctly is the basic of realizing check rule. Lookup and analysis on symbol table is thesis's nodus. At last, this thesis described rule check's step, method, process and simple test sample with GCC. To test with the example, the C++ static state analyzer is correct and feasible. Source code error can be examined applyng this tool.
Keywords/Search Tags:GCC, C++ check rule, C++ static analyzer, compiler principle
PDF Full Text Request
Related items