Font Size: a A A

The Design And Implementation Of AST In C/C++ Safety Checker

Posted on:2010-02-04Degree:MasterType:Thesis
Country:ChinaCandidate:C ChenFull Text:PDF
GTID:2178330332987802Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
What this paper done is a part of a research project, which is "C/C++ Safety Checker". According to the actual needs of this project and on the basis of fully research on the C/C++ syntax, first of all, this paper gives the abstract syntax tree of C/C++ program with the abstract syntax tree automatically generated mechanism that is provided by the ANTLR, which is a automatically generated tool of analyzer, and completes the design and implement of node class and can provide the abstract syntax tree information of safety checker's other model; Secondly, for sake of ensuring the information of abstract syntax tree to build accurately and completely, this paper brings forward to the method to build the function-AST of the member function that is defined inside of classes, and the method of building the abstract syntax tree corresponding to the function template instance.The last but not the least, this paper combined the abstract systax tree traversal framework automatically generated mechanism that is provided by the ANTLR, and gives a method of information collection in frontend and switch-statement safety bug inspection in backend of the safety checker by using AST. It has been found that the abstract syntax design can meet the needs of safety hole inspection.
Keywords/Search Tags:safety hole, static safety check, Abstract Syntax Tree, ANTLR
PDF Full Text Request
Related items