Certifying Assembly Programs Using a Control-flow-explicit Language

Author
WangWei
Advisor
ChenYiYun
School
University of Science and Technology of China
Major
Computer Software and Theory
Classification
TP311.11 Programming method
Degree
Doctoral dissertation
Year
2011
Downloads
18
Citations
0

Request the full text

Abstract

With regard to the critical demand on the safety and correctness of systemsoftwares and executable codes from the computer programmers and users, pro-gram certifcation has been very popular in the computer science research area,since it is able to ensure the high accuracy and reliability of its result. Certifyinga program means that providing a mechanized mathematical proof showing thatthe program satisfes some user-concerned properties, which are expressed with itsspecifcation. In recent decades, in order to make the safety and correctness of pro-grams independent of the large and complex compilers, more and more certifyingworks choose to certify programs directly over assembly languages.Assembly programs are, however, hard to reason about, since the programabstractions (for example, while loop blocks and functions) that one can rely on inhigh-level languages are not structured. The only structure in assembly programsis the basic code block, which is a sequence of instructions ending with a jumpor an indirect jump. Previous program logics for certifying assembly programssupport diferent abstractions mainly by viewing the programs in Continuation-Passing Style (CPS). CPS certifying systems treat the basic code block as thebasic module and totally ignore the program abstractions, which makes them veryhard to certify large softwares. Furthermore, CPS program logics are mainly forthe basic safety property of assembly programs, but not the partial correctnessproperty, which is not only for the safety but also the correctness of the programs.In this dissertation, we propose solutions to the above issues. The maincontents and contributions are as following:We present a brand new methodology of certifying assembly programs, whichmakes it possible to reason about the partial correctness property of assem-bly programs without losing the understanding of any program abstraction-s. When reasoning an assembly program, previous programs logics directlywrite specifcations based on the real code and then reason about the programwith their inference rules. In this dissertation, we introduce an intermediateauxiliary structure, which is a control-fow-explicit language CFEL, between the the specifcation and the real code. We use CFEL to illustrate the con-trol fow of the program execution and use the control fow to represent theactual program during the certifying process. CFEL is simple but power-ful enough to illustrate the control fow of diferent kinds of abstractionsincluding function call/return, exception handling, embedded code pointersand self-modifying code. Before a program is certifed, we frst use CFEL toillustrate the control fow of it to help the certifcation and the specifcationswill be written based on the CFEL structures.Based on CFEL, we give a simple, modular and general program logic sys-tem TCAP to reason about the partial correctness property. The rules inTCAP guarantee that the control fows are correctly illustrated in CFELand well specifed by their corresponding specifcations. Assembly program-s with diferent program abstractions can be certifed in one logic system.Even though TCAP is powerful, it is also clean and easy to use since thespecifcations and rules do not need to worry about as much control fow asbefore, thanks to CFEL. Some non-trivial examples of using TCAP to certifyreal programs are provided.An step-index based semantic model is provided to explain specifcations andjudgements in TCAP and the soundness of the logic system TCAP is provenin a totally semantical fashion. The step-index denotes how many steps ofsafe execution the current program cares. Providing a semantic model to alogic system with diferent program abstractions is not easy. Many assembly-level logic systems have to prove their soundness syntactically. Giving asemantic model to a logic system can makes it easier to be extended with themeanings of its inference rules. The Modularity and genericity are anotherbenefts of the semantic methods. We also show that our semantic modelcan be extended and used to explain the high-order frame rule, which is oneof the most difcult issues in local reasoning area.

Table of contents

Summary 5-7 Abstract 7-13 Chapter 1 Introduction 13-25 1.1 in the form of program verification 14-17 1.1.1 classic Hall logical 14-16 1.1.2 carry identification code 16-17 1.2 assembly-level overview of program verification 17-20 1.2.1 typed assembly language 17-18 1.2.2 CAP series gaps and challenges exist 18 1.2.3 18-20 work Overview 1.3 This article 20-25 1.3.1 an assembler partial correctness verification system 20-22 1.3.2 a verification system based on semantic model step index 22-24 1.3.3 chapters arranged 24-25 chapter background knowledge and basic settings 25 -35 security and correctness nbsp 2.1 program ; 25-26 2.2 metalogic 26-27 2.3 machine model 27-35 2.3.1 basic machine model definition and operational semantics 27-32 2.3.2 indicators of the machine model and its operational semantics 32-35 Chapter III in the form of program verification system TCAP 35-61 3.1 explicit control flow language 35-44 3.1.1 language definition 36-43 3.1 Locality nbsp .2 procedures ; 43-44 3.2 assertion language and coverage 44-51 3.3 verification system and its semantic model 51-61 <br / > 3.3.1 Summary 60-61 Chapter IV TCAP reasoning using several examples 61-83 4.1 assembly-level verification function 61-67 4.2 verify the assembly language level exception handling 67-72 4.3 embed code pointer support 72-81 4.4 Summary 81-83 expansion Chapter TCAP system 83-97 5.1 validate self-modifying code 83-89 5.1.1 supports self-modifying code machine model 84 5.1.2 validation Framework 84-85 5.1.3 validate self-modifying program instance 85-89 5.1.4 supports self-modifying code extended Summary support 89 5.2 high-level framework of rules new assertion 89-95 5.2.1 expanded and new types of assertions operator 90 - 93 5.2.2 framework of rules and a new high-level semantic model 93-95 5.3 summary 95-97 related work and Chapter VI article summarizes 97-101 6.1 related work 97-99 6.2 article summarizes 99-100 6.3 follow-up prospects 100-101 References 101-107 Thanks 107-108 during reading published research papers and obtained 108-109

Related dissertations

  1. Public Information Analysis and Early Warning Prototype System Design and Implementation of Xinjiang Province Public Security WEB
  2. Information integration based on XML program delivery
  3. Research on the Graded-index Plastic Optical Fiber
    LiuKai ·Yanshan University ·2002 ·Master's thesis
  4. Verifying Parallel Low-Level Programs for Multi-core Processor
    ZhuYunMin ·Tsinghua University ·2009 ·Master's thesis