Certifying Compilation in an Infrastructure for Developing Trustable Software
- Author
- GeLin
- Advisor
- ChenYiYun
- School
- University of Science and Technology of China
- Major
- Computer Software and Theory
- Classification
- TP311.52 Software Development
- Degree
- Doctoral dissertation
- Year
- 2007
- Downloads
- 619
- Citations
- 2
- software safety
- Program Verification
- Hoare Logic
- Trusted Computing Base
- type safety
- verification framework
- Certifying compiler
Abstract
Nowadays, high-assurance software is more and more valued, and among its properties, safety and security are most important. Safety is the ability to guarantee that software execution does no harm to the system. And security is the ability to preserve the confidentiality, integrity, availability and authentication of data. There is a close relationship between safety and security. For example, hackers usually use low-grade safety errors, such as buffer overflows, out-of-bound array accesses and dangling pointer dereferences, to destroy a system or achieve unauthorized control of a system. Apparently, it is helpful to ensure software security by strengthening its safety.To achieve software safety, all program errors should be discovered before the execution of the program or be gently captured during the execution. The research goal of software safety is to build a wholesome scientific and technological infrastructure for the management of software safety. And the verification method for software to meet its safety policies (i.e. program verification) is one of the hot topics in this research field. In the past decade, great progress has been made in the area of program verification. Many projects adopt type-based or logic-based approaches to reason about program properties. And in recent years, some projects have tried to combine them. However, previous program verification projects have focused on either high-level programming languages or low-level assembly languages, but not on both simultaneously. Research on high-level languages has many advantages such as user-friendliness, early safety bug detection etc., but the TCB (Trusted Computing Base) is relatively large; on the other hand, the TCB of low-level program verification is much smaller but the low-level safety proofs are more complex and harder to construct than the high-level ones. Even though some certifying compilers are able to produce safety proofs for assembly programs based on the knowledge of the compiled source programs, only some simple program properties—typically those of type system—could be proved automatically. Much more complex properties, such as partial correctness about values, are hard to prove automatically in these compilers.Under the above considerations, in this dissertation, I present the design and implementation of a high-assurance software development infrastructure. In this infrastructure, source-level and assembly-level program verification could be done simultaneously, and a certifying compiler produces assembly-level safety proofs automatically from the source-level specifications and safety proofs. The main advantage of this infrastructure is that the proved safety properties include not only type properties, but also advanced properties, such as partial correctness about values. This dissertation presents the important technique I adopted in certifying compilation. That is, along with code generation, the compiler produces the safety proofs of the assembly programs satisfying assembly specifications from source-level programs, specifications and safety proofs. Both the specifications and the safety proofs are carried by the code, and could be checked by an assembly-level proof checker to ensure that the code satisfies its specifications. The work in this dissertation is inspired by TAL (Typed Assembly Language), CAP (Certified Assembly Programming) and PCC (Proof-Carrying Code) etc., and adopts an approach of combining both types and logics.In this dissertation, I, firstly, introduce some previous work on program verification and certifying compilation; then I present a high-assurance software development infrastructure; next I mainly present the certifying compilation techniques based on this infrastructure and the design and implementation of a certifying compiler prototype. These techniques include: verification condition generation (VC Gen), assembly-level code specification translation and generation, assembly-level safety proof generation, etc. I also discuss the influence of certifying compilation techniques on traditional compilation.The main contributions and characteristics of this dissertation are:It presents an infrastructure for high-assurance software development. This infrastructure gives an interface for programmers to provide source specifications and the proofs of programs satisfying these specifications along with source programs. A certifying compiler in this infrastructure could produce the assembly specifications and safety proofs from the source-level ones. Assembly-level proof checking removes the compiler from the TCB, and so enhances the reliability of the system. The automatic assembly-level proof generation alleviates the difficulty of writing proofs.It improves the design of source-level VC Generation algorithm. The new algorithm turns the problem of proving programs satisfying specifications into an equivalent problem of judging the validity of the verification conditions (VCs). This algorithm also combines the collection of side conditions in source typing rules and considers the simplification of VCs. The proving of source VCs makes the early bug detection possible and easy.It shows the design and implementation of a certifying compiler prototype, and this certifying compiler produces assembly-level specifications and safety proofs automatically from the source-level counterparts. The generated proofs contain the soundness proofs of VC generation, so that the VC generator is removed from the TCB. And this avoids the existence of a big TCB—VC generator. Compared with previous certifying compilers, this compiler could deal with much more complex program properties, such as partial correctness about values.
Table of contents
Chinese Abstract 5-7
English summary of research 7-16
first chapter 16-38
§ 1.1 Background 16 -19
§ 1.1.1 procedural in nature prove 17
§ 1.1.2 software credibility 17
§ 1.1.3 Trusted Computing basis 17-18
§ 1.1.4 certified compiler 18-19
§ 1.2 the procedural nature of proof and certifying compiler related research and compare 19 - 33
§ 1.2.1 based on the procedural nature of the Hoare logic reasoning to prove 19-24
§ 1.2.2 Based on the nature of the procedures of the theory of types proved method 24-27
§ 1.2.3 combined with the method of logic and type theory 27-29
§ 1.2.4 verify the compiler 29-33
§ 1.3 exist issues and direction of development 33-34
§ 1.4 of this article an overview of 34-38
§ 1.4.1 studies 34-35
§ 1.4. characteristics and contribution 35-36
§ 1.4.3 chapter arrangement 36-38
Chapter II of the credibility of the program design and proven framework 38-60
§ 2.1 application development framework describes 38-42
§ 2.1.1 the traditional procedure development framework 38
§ 2.1.2 added the credibility of the program verification system § 2.2.1 PointerC language program development framework 38-42
§ 2.2 source level program design and source-level verification system 42-49
About 42-45
§ 2.2.2 source-level verification system 45-49
§ 2.3 target level verification system 49-54
§ 2.3.1 FCAP framework 50-52
§ 2.3.2 target level pointer logic system 52-54
§ 2.4 certifying compiler 54-56
§ 2.4.1 certified compiler of the overall framework 54-56
§ 2.4.2 each module Introduction 56
§ 2.5 Summary 56-60
issued prove that the compiler front-end design 60-78
the overall framework of § 3.1 front-end design 60
§ 3.2 Main data structures 60-67
§ 3.2.1 abstract syntax tree of AST 61-65
§ 3.2.2 symbol table TABLE 65-67
§ 3.3 verification conditions generator design 67 - 76
§ 3.3.1 verification condition generation algorithm 68-70
§ 3.3.2 stereotyped rules attached conditions to collect 70
§ 3.3.3 weakest ago conditions of variable substitution 70-74
§ 3.3.4 validation criteria simplification 74-75
§ 3.3.5 verification conditions generator AST in 75-76
§ 3.4 certified characteristics of the compiler front-end 76-77
§ 3.5 of this chapter Summary 77-78
Chapter IV certified compiler back-end design 78-100
the overall framework of § 4.1 back-end design 78-80
§ 4.2 the main data structures 80-85
§ 4.2.1 function frame 80-81
§ 4.2.2 for code generation CodeGen-Table, the symbol table.; 81-82
§ 4.2.3 code abstract representation of ASM 82-84
§ 4.2.4 abstract specification expressed ASSERT 84-85
§ 4.3 code generator design 85-90
§ 4.3.1 the basic process 86
§ 4.3.2 data structures and conventions 86-90
§ 4.4 specification translator design 90-98 <br / § 4.4.1 divided into basic blocks 90-91
§ 4.4.2 translate source-level specification 91-94
§ 4.4.3 the form of standard adjustment 94-95
§ 4.4.4 to generate intermediate specification 95-98
§ 4.5 certified features of the compiler back-end 98
§ 4.6 Summary 98-100
Chapter certifying compiler proof generation and checking 100-116
§ 5.1 carry proof of principle to prove the security of the code 100 - 102
§ 5.2 PLCC, the target level verification system to prove the basic form of 102-105
§ 5.2.1 to prove the process 102-104
§ 5.2 .2 to prove the form of 104-105
§ 5.3 blocks to meet the specifications prove 105-111
§ 5.3.1 to prove the process between the assertion of the 105-107
§ 5.3.2 command generation algorithm 107-108
§ 5.3.3 generation of verification conditions and proving 108-109
§ 5.3 .4 proof of the internal representation of 109-111
§ 5.4 program proved to generate 111-112
§ 5.5 to prove the test 112-113
§ 5.6 of this chapter section 113-116
Chapter VI Conclusion 116-120
§ 6.1 thesis work summary 116-118
§ 6.2 for further work 118-120
References 120-128
thank 128-130
pursuing a degree during the research work and papers published situation 130
Related dissertations
- A Pointer Logic for Safety Verification of Pointer Programs
- Certifying the Safety of Assembly Pointer Programs
- Certifying Concurrent Porgrams Using Transactional Memory
- A program verification tool design and implementation
- Researches on Two Important Topics of Certifying Compiler
- A Method to Generate Assertion and Proof about Assembly Language Certifying Compiler
- Proof Generation for Certifying Compiler
- To support the research of use case modeling formal evolution
- An Integration of Several Data Flow Analysis Techniques for Program Verification
- Researchand Implementatrusted Management System Based on Domestic Trusted Chip
- A Modular Approach on Building Certified Software System
- Research on Testing and Evaluating Theory of Reliability and Safety for High Dependability Software
- Study on Multi-Kernel Component-Based Embedded Operating System
- Constraint Based Prolog Semantics and Its Applications in the Testing, Analysis and Verification of Prolog Programs
- Study on Program Verification Based on Symbolic Computation
- Research on Relationship and Transition between the Software Reliability and Safety
- The Research of Partitioned Symbolic Execution Model and Its Environment Interaction Problem
- Pointer Logic’s Extensions and Applications
- Program Verification Based on Computer Algebra
- Automated Loop Invariant Generation for Program Verification