Design and Implementation of High Integrity Safe-Compiler
- Author
- ShenRuiFen
- Advisor
- HuangChun
- School
- National University of Defense Science and Technology
- Major
- Computer Science and Technology
- Classification
- TP314 Compiler,interpreter
- Degree
- Master's thesis
- Year
- 2007
- Downloads
- 112
- Citations
- 1
Abstract
Embedded software has been widely used in the key areas of aerospace , automotive control and safety . The characteristics of these areas require embedded software with high credibility , the the embedded software credibility depends on the credibility of the Security compiler . The safe compiler has two characteristics : safety testing , early detection of potential safety problems in the program ; credibility of the compiler itself to ensure that the program can be translated into the correct object code . MISRA-C is based on the security of the C89 standard extracted C language subset that has become the standard C language in the field of embedded software . Widely used as in the field of embedded compiler , GCC and not for any safe subset of the specification systemic syntax and semantic checks , can not help software developers to the early detection of software security risks exist . In this paper, by extending the GCC-3.4.6 MISRA-C specification testing security compiler CCRG -SC and use embedded real-time operating system μC / OS and GCC-3.4.3 compiler source CCRG-SC functionality and performance testing , test results show that : the program does not meet the safe subset of the standard place , CCRG-SC is able to give a warning or error message ; CCRG-SC introduced standardized testing time overhead is very small . Testing is an important method to ensure the correctness of the compiler . Based on black-box testing methods , design the C compiler verification tools the CVT . CVT is a C compiler test suite , the test set includes syntax test set , test set expression GNU extended test set , compile and run-time counter-example test set . In order to meet the test of expression width and depth requirements , design a the expression self test case generation tool automatically GREAT . GREAT to support mathematical function arbitrarily complex expression template given by the user to generate expression instance , calculate the expected value of the expression instance and generates a detailed test report . Finally, the 25636 expression GREAT generate test cases to test the CCRG-SC compiler , test results show that the CCRG-SC compiler to maintain the original expression processing capability of the GCC-3.4.6 compiler does not introduce new results error and error .
Table of contents
Abstract 9-10
ABSTRACT 10-11
Chapter Introduction 11-17
§ 1.1 subject background and significance 11-12
1.1.1 program credibility 11-12
1.1.2 compiler's own credibility 12
§ 1.2 Research 12-15
1.2.1 program credibility 12-14
1.2.2 compiler's own credibility 14-15
the
§ 1.3 major work and innovation 15-16
the
§ 1.4 This paper is structured 16-17
safe subset of the MISRA-C specification 17-23
the
§ 2.1 MISRA-C security sub-set specifications put forward 17-18
the
§ 2.2 MISRA-C rules Classification and content 18-21
the
§ 2.3 on the specification of the MISRA-C thinking 21-23
2.3.1 MISRA-C negative effects 21-22
2.3.2 MISRA-C improvement and development 22-23
the
the third chapter GCC process and important data structure analysis 23-32
The
§ 3.1 GCC workflow 23-24
3.1.1 GCC compiler processes 23-24
3.1.2 C compiler front-end process 24
the
§ 3.2 in GCC important data structures 24-32
3.2.1 pretreatment data structures 25-26
3.2.2 GCC syntax tree structure 26-30
3.2.3 GCC symbol table structure 30-32
-
fourth CCRG-SC supports MISRA-C compiler based on GCC 32-53
§ 4.1 CCRG-SC compiler design principles 32-33
the
§ 4.2 CCRG-SC modularity achieve 33-34
the
§ 4.3 CCRG-SC method classification 34-35
§ 4.4 pre-processing and related lexical rules 35-37
4.4.1 key technology 35-36
4.4.2 specific realization 36-37
the
§ 4.5 Statement relevant rules 37-41
4.5.1 key technology 37-39
4.5.2 specific realization 39-41
§ 4.6 expressions, and initialize the relevant rules 41-45
4.6.1 key technology 41-43
4.6.2 specific realization 43-45
§ 4.7 control flow related rules 45-48
4.7.1 process control flow rules check 45-46
the 4.7.2 process between the control flow rules check 46-48
§ 4.8 running failure related rules 48-49
4.8.1 key technology 48
4.8.2 specific realization 48-49
the
§ 4.9 Experimental and analytical 49-52
4.9.1 CCRG-SC functionality test 50-51
4.9.2 CCRG-SC performance test 51-52
§ the 4.10 CCRG-SC characteristics 52-53
Chapter C compiler validation tool CVT 53-66
§ 5.1 compiler testing methods 53-54
The
§ 5.2 CVT framework for 54-55
the
§ 5.3 GREAT's Design and Applications 55-62
5.3.1 GREAT works 55-56
5.3.2 GREAT achieve technical characteristics and innovation 56-57
5.3.3 GREAT achieve 57-60
5.3.4 GREAT experimental results and analysis 60-62
§ 5.4 CCRG-SC expression processing capability testing and analysis 62-66
5.4.1 Test Results 62
5.4.2 Test results analysis 62-64
5.4.3 CCRG-SC and test comparison and analysis of GCC-3.4.6 64-66
Chapter VI Conclusion 66-68
the
§ 6.1 summarizes 66-67
§ 6.2 the next step of the work 67-68
Acknowledgements 68-69
Reference 69-72
the
author academic achievements made during the master's degree 72