The Design and implementation of AST in C/C++ Safety Checker
- Author
- ChenChao
- Advisor
- LiuJian
- School
- Xi'an University of Electronic Science and Technology
- Major
- Computer Software and Theory
- Classification
- TP311.52 Software Development
- Degree
- Master's thesis
- Year
- 2009
- Downloads
- 133
- Citations
- 3
Abstract
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.
Table of contents
Abstract 3-4
Abstract 4-7
first chapter 7-13
1.1 Background 7-9 < br /> 1.1.1 C / C language and its application security 7-8
1.1.2 static security check status 8-9
1.2 C / C safety checks tools Overview 9-10
1.3 this work and content organization 10-13
Chapter ANTLR realization of the abstract syntax tree 13-25 <br / > 2.1 abstract Syntax tree Overview 13-14
2.2 abstract syntax tree implementations contrast 14-16
2.3 ANTLR Overview 16-23
2.3 .1 ANTLR abstract syntax tree storage structure 16-17
2.3.2 ANTLR in the abstract syntax tree construction 17-20
2.3.3 ANTLR node in the tree management mechanism 20-22
2.3.4 ANTLR abstract syntax tree traversal 22-23
2.4 Summary 23-25 ??
first chapters abstract syntax tree design 25-41
3.1 abstract syntax tree design 25
3.2 abstract syntax tree tree design 25-35
3.2.1 expression abstract syntax tree 26-31
3.2.2 variable Declaration abstract syntax tree 31-32
3.2.3 Statement the abstract syntax tree 32-35
3.3 abstract syntax tree node class design 35-39
3.4 Summary 39-41 <br / > Chapter member function abstract syntax tree and abstract syntax tree construction instantiation 41-51
4.1 definition of a member function in the class body abstract syntax tree construction 41-42 < br /> 4.2 instantiation of an abstract syntax tree 42-49
4.2.1 and abstract syntax tree function template instantiation 42-44
4.2.2 nonmember functions corresponding abstract syntax tree template instantiation 44-49
4.2.3 corresponding member function template instantiation of an abstract syntax tree 49
4.3 chapter Summary 49 - 51
Chapter abstract syntax tree in the security check tool application 51-63
5.1 tools in the security check in front of the use of 51-58
5.1 .1 array subscript values ??inferred 51-55
5.1.2 expression Type calculate 55-58
5.2 switch statement vulnerability checks 58-61
5.3 Chapter Summary 61-63
Chapter VI Conclusion 63-65
Thanks 65-67
References 67-69
during school research 69
Related dissertations
- The Design and Implementation of the Abstract Synatax Tree in Safety Verifying Tool
- Design and Implementation of an IDE for WSN Nodes
- The Design and Implementation of Front End of Software Safety Checking Tool
- The Research and Implementation of Cross-Platform Technology on DTSC
- The Study and Construction of Java Front-end for Security Checker
- A Study On Improved JAVA Software Evolution Analysis Technique Based On Abstract Syntax Tree
- Research on High Precision Log Parsing Techniques
- Formal Verification of Security Protocols Implementation by Java
- Research on Automatic Conversion from Chemical Scripting Languages to UDLC
- Research on the Reverse Engineering Based on Design Pattern
- The Design and Realization of JBFT
- Design and Implementation of Code Smell Detection Tool for Auto-refactoring
- Analysis and Check of Type Conversion and Control Flow Safety Vulnerability
- Study on Code Generation Technology and Its Applications on Telecom Add-Value Services
- Design and Implementation of C to Java Automatic Program Transformation System Prototype
- Design and Implementation of C to Java Automatic Program Transformation System Prototype
- Design and Implementation of Software Tool Based Tree Structure
- Design and Implementation of a Refactoring Tool for Java Application
- Study and Implementation of Interpreter of Data Base Procedure Language
- A Conversion from Java Language to XML